Warning: unable to open an initial console.

I've struggled through porting the adi-linux to a new PCB and I'm almost there.  Right now the kernel will boot using the nfsboot command in uboot.  Here are my uboot environment vars

newport# printenv
addip=set bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off
autoload=no
baudrate=115200
bootargs=root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
bootcmd=run sdboot
bootdelay=5
dnsip=192.168.2.1
dtbaddr=0xC4000000
dtbfile=sc589-ezkit.dtb
ethact=dwmac.3100c000
ethaddr=02:80:ad:20:31:e8
gatewayip=192.168.2.1
hostname="nape90-c"
initramaddr=0xC5000000
initramfile=ramdisk.cpio.xz.u-boot
ipaddr=192.168.2.63
loadaddr=0xC2000000
loads_echo=1
nc=set ncip ${serverip};set stdin nc;set stdout nc;set stderr nc
netmask=255.255.255.0
nfsargs=set bootargs root=/dev/nfs rw nfsroot=192.168.2.62:/romfs,tcp,nfsvers=3 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
nfsboot=tftp ${loadaddr} ${nfsfile};tftp ${dtbaddr} ${dtbfile};run nfsargs;run addip;bootz ${loadaddr} - ${dtbaddr}
nfsfile=zImage
norboot=tftp ${loadaddr} ${ramfile};tftp ${dtbaddr} ${dtbfile};run ramargs;run addip;bootz ${loadaddr} - ${dtbaddr}
ramargs=set bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
ramboot=tftp ${loadaddr} ${ramfile};tftp ${dtbaddr} ${dtbfile};tftp ${initramaddr} ${initramfile};run ramargs;run addip;bootz ${loadaddr} ${initramaddr} ${dtbaddr}
ramboot_emmc=mmc rescan;mmc dev 0 0;ext2load mmc 0:1 ${loadaddr} /boot/${ramfile};ext2load mmc 0:1 ${dtbaddr} /boot/${dtbfile};ext2load mmc 0:1 ${initramaddr} /boot/${initramfile};run sdcardargs;run addip;bootz ${loadaddr} ${initramaddr} ${dtbaddr}
ramfile=zImage
rootpath=/romfs
sdcardargs=set bootargs root=/dev/mmcblk0p1 rw rootfstype=ext2 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
sdcardboot=mmc rescan;mmc dev 0 0;ext2load mmc 0:1 ${loadaddr} /boot/${ramfile};ext2load mmc 0:1 ${dtbaddr} /boot/${dtbfile};run sdcardargs;bootz ${loadaddr} - ${dtbaddr}
serverip=192.168.2.62
stderr=serial
stdin=serial
stdout=serial
ubootfile=u-boot-sc589-ezkit.ldr
update=tftp ${loadaddr} ${ubootfile};sf probe 2:1;sf erase 0 0x80000;sf write ${loadaddr} 0 ${filesize}

Environment size: 2231/8188 bytes

It goes through the boot process with the following output

nape90-c run nfsboot
Speed: 100, full duplex
Using dwmac.3100c000 device
TFTP from server 192.168.2.62; our IP address is 192.168.2.63
Filename 'zImage'.
Load address: 0xc2000000
Loading: #################################################################
#################################################################
#################################################################
################################################################
1.7 MiB/s
done
Bytes transferred = 3801760 (3a02a0 hex)
Speed: 100, full duplex
Using dwmac.3100c000 device
TFTP from server 192.168.2.62; our IP address is 192.168.2.63
Filename 'sc589-ezkit.dtb'.
Load address: 0xc4000000
Loading: ##
1.3 MiB/s
done
Bytes transferred = 17677 (450d hex)
Kernel image @ 0xc2000000 [ 0x000000 - 0x3a02a0 ]
## Flattened Device Tree blob at c4000000
Booting using the fdt blob at 0xc4000000
Loading Device Tree to cfe56000, end cfe5d50c ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.19.0-yocto-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 Wed Sep 15 15:14:28 UTC 2021
CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: ADI sc589-ezkit
bootconsole [earlycon0] enabled
Memory policy: Data cache writeback
Hit pending asynchronous external abort (FSR=0x00001c06) during first unmask, this is most likely caused by a firmware/bootloader bug.
CPU: All CPU(s) started in SVC mode.
dump init clock rate
CGU0_PLL 900 MHz
CGU0_SYSCLK 225 MHz
CGU0_CCLK 450 MHz
CGU0_SYS0 112 MHz
CGU0_DCLK 450 MHz
CGU0_OCLK 225 MHz
CGU0_SYS0 112 MHz
random: get_random_bytes called from start_kernel+0x98/0x3dc with crng_init=0
Built 1 zonelists, mobility grouping on. Total pages: 56896
Kernel command line: root=/dev/nfs rw nfsroot=192.168.2.62:/romfs,tcp,nfsvers=3 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M ip=192.168.2.63:192.168.2.62:192.168.2.1:255.255.255.0:nape90-c:eth0:off
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 217716K/229376K available (6144K kernel code, 195K rwdata, 1428K rodata, 1024K init, 113K bss, 11660K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xce800000 - 0xff800000 ( 784 MB)
lowmem : 0xc0000000 - 0xce000000 ( 224 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (7136 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 196 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 114 kB)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
clocksource: cs_gptimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 16988981748 ns
sched_clock: 32 bits at 112MHz, resolution 8ns, wraps every 19088743419ns
Console: colour dummy device 80x30
Calibrating delay loop... 297.98 BogoMIPS (lpj=595968)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc2100000 - 0xc210003c
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
L2C: device tree omits to specify unified cache
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 256 kB
L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x06040000
sc58x_init: registering device resources
sec init...
enabled
hw-breakpoint: Failed to enable monitor mode on CPU 0.
ADI DMA2 Controller
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource cs_gptimer
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with armv7_cortex_a5 PMU driver, 3 counters available
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=16 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler noop registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
ADI serial driver
loop: module loaded
libphy: Fixed MDIO Bus: probed
adi-dwmac 3100c000.ethernet: PTP uses main clock
adi-dwmac 3100c000.ethernet: no reset control found
adi-dwmac 3100c000.ethernet: User ID: 0x10, Synopsys ID: 0x37
adi-dwmac 3100c000.ethernet: DWMAC1000
adi-dwmac 3100c000.ethernet: DMA HW capability register supported
adi-dwmac 3100c000.ethernet: RX Checksum Offload Engine supported
adi-dwmac 3100c000.ethernet: COE Type 2
adi-dwmac 3100c000.ethernet: TX Checksum insertion supported
adi-dwmac 3100c000.ethernet: Wake-Up On Lan supported
adi-dwmac 3100c000.ethernet: Enhanced/Alternate descriptors
adi-dwmac 3100c000.ethernet: Enabled extended descriptors
adi-dwmac 3100c000.ethernet: Ring mode enabled
adi-dwmac 3100c000.ethernet: Enable RX Mitigation via HW Watchdog Timer
libphy: stmmac: probed
adi-dwmac 3100c000.ethernet: No PHY found
adi-dwmac 3100c000.ethernet: stmmac_dvr_probe: MDIO bus (id: 0) registration failed
stmmaceth 3100c000.ethernet: PTP uses main clock
stmmaceth 3100c000.ethernet: no reset control found
stmmaceth 3100c000.ethernet: User ID: 0x10, Synopsys ID: 0x37
stmmaceth 3100c000.ethernet: DWMAC1000
stmmaceth 3100c000.ethernet: DMA HW capability register supported
stmmaceth 3100c000.ethernet: RX Checksum Offload Engine supported
stmmaceth 3100c000.ethernet: COE Type 2
stmmaceth 3100c000.ethernet: TX Checksum insertion supported
stmmaceth 3100c000.ethernet: Wake-Up On Lan supported
stmmaceth 3100c000.ethernet: Enhanced/Alternate descriptors
stmmaceth 3100c000.ethernet: Enabled extended descriptors
stmmaceth 3100c000.ethernet: Ring mode enabled
stmmaceth 3100c000.ethernet: Enable RX Mitigation via HW Watchdog Timer
random: fast init done
libphy: stmmac: probed
stmmaceth 3100c000.ethernet: No PHY found
stmmaceth 3100c000.ethernet: stmmac_dvr_probe: MDIO bus (id: 0) registration failed
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
adi_wdt: initialized: timeout=20 sec (nowayout=0)
Synopsys Designware Multimedia Card Interface Driver
dwmmc_adi 31010000.mmc: IDMAC supports 32-bit address mode.
dwmmc_adi 31010000.mmc: Using internal DMA controller.
dwmmc_adi 31010000.mmc: Version ID is 270a
dwmmc_adi 31010000.mmc: DW MMC controller at irq 29,32 bit host data width,1024 deep fifo
mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
ADI hardware CRC crypto driver
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver r8712u
adi,corectrl 3108b000.core_ctrl: initialized
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
ThumbEE CPU extension supported.
Loading compiled-in X.509 certificates
console [netcon0] enabled
netconsole: network logging started
hctosys: unable to open rtc device (rtc0)
Warning: unable to open an initial console.

At this point it hangs and the watchdog goes off in 20 seconds a uboot starts.

I note that there are no entires in the /romfs/dev folder that got untared from adsp-sc5xx-full-adsp-sc589-ezkit.tar.xz  My research says there should be an entry for console.

  • Hi Andnan,

    Could you share your kernel configuration file (.config)?

    is the generated Filesystem from  adsp-sc5xx-full-adsp-sc589-ezkit.tar.xz. is a read-only filesystem?

    Thanks,

    Prasanth R

  • Hi Prasanth,

    Thanks for the reply but I found my issue, it was in the DTS file.  I can login to ADI linux now but I'd like to set the default baud rate to 115200, not 57600.  I've updated all the boot args in uboot (see below)

    printenv
    addip=set bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off
    autoload=no
    baudrate=115200
    bootargs=root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
    bootcmd=run sdboot
    bootdelay=5
    dnsip=192.168.2.1
    dtbaddr=0xC4000000
    dtbfile=sc589-ezkit.dtb
    ethact=dwmac.3100c000
    ethaddr=02:80:ad:20:31:e8
    gatewayip=192.168.2.1
    hostname="nape90-c"
    initramaddr=0xC5000000
    initramfile=ramdisk.cpio.xz.u-boot
    ipaddr=192.168.2.63
    loadaddr=0xC2000000
    loads_echo=1
    nc=set ncip ${serverip};set stdin nc;set stdout nc;set stderr nc
    netmask=255.255.255.0
    nfsargs=set bootargs root=/dev/nfs rw nfsroot=192.168.2.62:/romfs,tcp,nfsvers=3 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
    nfsboot=tftp ${loadaddr} ${nfsfile};tftp ${dtbaddr} ${dtbfile};run nfsargs;run addip;bootz ${loadaddr} - ${dtbaddr}
    nfsfile=zImage
    norboot=tftp ${loadaddr} ${ramfile};tftp ${dtbaddr} ${dtbfile};run ramargs;run addip;bootz ${loadaddr} - ${dtbaddr}
    ramargs=set bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
    ramboot=tftp ${loadaddr} ${ramfile};tftp ${dtbaddr} ${dtbfile};tftp ${initramaddr} ${initramfile};run ramargs;run addip;bootz ${loadaddr} ${initramaddr} ${dtbaddr}
    ramboot_emmc=mmc rescan;mmc dev 0 0;ext2load mmc 0:1 ${loadaddr} /boot/${ramfile};ext2load mmc 0:1 ${dtbaddr} /boot/${dtbfile};ext2load mmc 0:1 ${initramaddr} /boot/${initramfile};run sdcardargs;run addip;bootz ${loadaddr} ${initramaddr} ${dtbaddr}
    ramfile=zImage
    rootpath=/romfs
    sdcardargs=set bootargs root=/dev/mmcblk0p1 rw rootfstype=ext2 clkin_hz=(50000000) earlyprintk=serial,uart0,115200 console=ttySC0,115200 mem=224M
    sdcardboot=mmc rescan;mmc dev 0 0;ext2load mmc 0:1 ${loadaddr} /boot/${ramfile};ext2load mmc 0:1 ${dtbaddr} /boot/${dtbfile};run sdcardargs;bootz ${loadaddr} - ${dtbaddr}
    serverip=192.168.2.62
    stderr=serial
    stdin=serial
    stdout=serial
    ubootfile=u-boot-sc589-ezkit.ldr
    update=tftp ${loadaddr} ${ubootfile};sf probe 2:1;sf erase 0 0x80000;sf write ${loadaddr} 0 ${filesize}

    The console keeps coming up at 57600 and I have to change the putty baud to 57600.  I noticed that the default baud rate in adi_uart4.c: adi_uart4_serial_console_setup has a default baud of 57600 and that's the only place I can see where the baud could be getting set to 57600.  Is there anything else I'm missing?

  • Hi Andnan,

    It seems you were seeing this issue while loading the Root filesystem, I believe.

    ```

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0x0
    Linux version 4.19.0-yocto-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 Thu Sep 23 06:05:50 UTC 2021

    Kernel command line: console=ttySC0,115200 mem=224M root=/dev/mmcblk0p1 rootfstype=ext2 clkin_hz=(25000000) earlyprintk=serial,uart0,115200 rw rootwait
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    L2C: device tree omits to specify unified cache
    L2C-310 dynamic clock gating enabled, standby mode enabled
    L2C-310 cache controller enabled, 8 ways, 256 kB
    L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x06040000
    sc58x_init: registering device resources
    H�'���d�E����������Ņ���G���d�D���ħ������b��d�D�懦f憤Ć�$�����������D���d�D����憆�ǧ����b@���ƦŇ��������d��ć�F����f�����ƅ充����b��LJ���憆Ƈ���䆅�Ą�ń���F�@������Ɔ������GbBC���慅ǤćDB�᧦��
    �����愥����@�ť�Ć�䄇��ńB�Ņ����E��f���f���Ć�䄆��`BF��Ƥ�������Ĥ������$���������䅤��b�Ƥ�������Ĥ�������ƅ��䅄���Ą����D���---------------+����b�� a#fa�����懦䇤��b�������Ĥ�ŧB����
    ��������ĥ��B��ĥ��B�

    ```

    In this case, we need to set the value in the machine.conf 

    sources/meta-adi/meta-adi-adsp-sc5xx/conf/machine/adsp-sc589-ezkit.conf

    from

    SERIAL_CONSOLE ?= "57600 ttySC0"

    to 

    SERIAL_CONSOLE ?= "115200 ttySC0"

    You can make an entry in your local.conf file aswell 

    SERIAL_CONSOLE = "115200 ttySC0"

    Thanks,

    Prasanth R