neuschaefer / wpcm450

Nuvoton WPCM450 tools and documentation
26 stars 4 forks source link

JTAG exploration and OpenOCD support #24

Open neuschaefer opened 1 year ago

neuschaefer commented 1 year ago
StidOfficial commented 8 months ago

Hi,

By using the correct JTAG pins with nuc910 as target with openocd seem work and correctly reset the CPU :

# openocd -f interface/raspberrypi-native.cfg -f target/nuc910.cfg -c "adapter_khz 1000"
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : TMS/SWDIO moved to GPIO 8 (pin 24). Check the wiring please!
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
nuc910.cpu
DEPRECATED! use 'adapter speed' not 'adapter_khz'
adapter speed: 1000 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 1000 kHz
Info : JTAG tap: nuc910.cpu tap/device found: 0x07926f0f (mfg: 0x787 (<unknown>), part: 0x7926, ver: 0x0)
Info : Embedded ICE version 6
Info : nuc910.cpu: hardware has 2 breakpoint/watchpoint units
Info : starting gdb server for nuc910.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x60000013 pc: 0xc00281b8
MMU: enabled, D-Cache: enabled, I-Cache: enabled

But i got an error with bootscript.elf :

# gdb-multiarch ./bootscript.elf 
GNU gdb (GDB) 14.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "armv7-alpine-linux-musleabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bootscript.elf...
(No debugging symbols found in ./bootscript.elf)
(gdb) target extended-remote localhost:3333
Remote debugging using localhost:3333
0xc0027c18 in ?? ()
(gdb) 

Do you have an idea what is going wrong ?

neuschaefer commented 8 months ago

Hey, nice to see that the NUC910 config seems to work!

bootscript.elf is just a container to hold some text (the bootscript), so gdb is right that it doesn't find symbols in that. If you want to debug the monitor, you'll need to use monitor.elf. You might also have to add -g or something to the CFLAGS.

StidOfficial commented 7 months ago

Yes, thanks. That work fine now with monitor.elf.

That little bit tricky with openocd.

So the only i found is :

openocd # Run openocd
telnet localhost 4444 # Run soft_reset_halt & exit
# kill openocd
openocd # Start again
./gdb.sh # monitor.elf is execute on the CPU

I don't known if is link to the fact i use an RPI as JTAG programmer and non welded cables. But i cannot halt during the boot, only after few minutes when is ready. I cannot do a reset halt at all. I mostly need to restart openocd, result as many timeouts.

I don't known, if you can confirm the same behavior on your side ?

I cross check JTAG connections that my conclusion :

J_IBMC_JTAG
2                                                     20
() () () () () () () () () () () () () () () () () () ()
[] () () () () () () () () () () () () () () () () () ()
pin function
1 VTref (3.3V)
2 VCC (3.3V)
3 TRST (Used)
4 GND (Used)
5 TDI (Used)
6 GND (Seem NC)
7 TMS/SWDIO
8 GND (Seem NC)
9 TCK/SWCLK
10 GND (Seem NC)
11 NC (Not check)
12 GND (Seem NC)
13 TDO/SWO
14 GND (Seem NC)
15 RESET
16 GND (Seem NC)
17 NC (Not check)
18 GND (Seem NC)
19 NC (Not check)
20 GND (Seem NC)

./gdb.sh output :

# ./gdb.sh 
GNU gdb (GDB) 14.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "armv7-alpine-linux-musleabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from monitor.elf...
Remote debugging using localhost:3333
0x00000000 in _start ()
Undefined command: "".  Try "help".
Loading section .text, size 0xce8 lma 0x0
Loading section .rodata, size 0x45c lma 0xce8
Loading section .bootscript, size 0x188 lma 0x1800
Loading section .data, size 0x1 lma 0x1988
Start address 0x00000000, load size 4813
Transfer rate: 12 KB/sec, 1203 bytes/write.
Continuing.

^C
Program received signal SIGINT, Interrupt.
0x0000044c in uart_rx () at monitor.c:43
warning: 43 monitor.c: No such file or directory
(gdb) q
A debugging session is active.

    Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y
Detaching from program: /root/monitor.elf, Remote target
[Inferior 1 (Remote target) detached]

UART output :

Jan  1 00:00:15 (none) kernel: NET: Registered protocol family 10
Jan  1 00:00:15 (none) kernel: start init aess_mem_driver
Jan  1 00:00:15 (none) kernel: finish init aess_mem_driver
Starting debug for AIMLIB-ipmiSystemCallAgent
aim_init() - szComponentName:ipmiSystemCallAgent ulProgNum:536872532
rpcCallbackService() - calling svc_run to wait for rpc callbacks for socket:/tmp/rpSocketCB536872532 in thread ID: 16386 process ID: 420
Press any key to avoid running the default boot script
Run test... 
Loading Linux... 

Exception 04, Undefined
> rst
> 

U-Boot 1.2.0 (Jul 29 2014 - 17:19:26) Avocent (1.13.8) Whoville

Board: WPCM450_01
DRAM:  128 MB
Flash:  2 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
MMC:   12 MHz     1 GB
*** no Avocent signature found ***
Net:   LOM0 Gb1
Hit any key to stop autoboot:  0 
*** previous boot was failed, retry=01 ***
Copying kernel image ... Press any key to avoid running the default boot script
Run test... 
Loading Linux... 

Exception 04, Undefined
> 

You can find my config environment on https://github.com/OpeniDrac/wpcm450-openocd

neuschaefer commented 7 months ago

I'll investigate this when I get around to it (hopefully this weekend, no guarantee though, sorry!). I have a few Dell boards with JTAG headers.

neuschaefer commented 7 months ago

I've managed to connect to the JTAG port, but I'm still exploring how to do resets with my adapter (Glasgow + OpenOCD)

neuschaefer commented 7 months ago

I got it to work somewhat well today, but then it stopped working, probably for electrical reasons (I'll re-check my connections when I get around to it).

I had to use reset_config trst_and_srst combined in my openocd scripts. Afterwards I was able to do this in gdb:

monitor reset halt   # execute "reset halt" in openocd
load monitor.elf     # with a patch to add debug symbols, which I'm going to push soon
b main               # set breakpoints
c                    # run
si                   # step, etc.

I had petty bad performance, it took several seconds for a single step (si), but OpenOCD printed a warning that this might be because I forgot to tell OpenOCD about the adapter speed.

neuschaefer commented 7 months ago

@StidOfficial unfortunately, I haven't had much success with OpenOCD + GDB either. I get lots of weird errors, UART output doesn't seem to work, etc.

StidOfficial commented 7 months ago

Ok, for me that work fine but i still need always to restart openocd after halting the CPU. I try too to test with SWD but that seem need to be implemented in openocd as only jtag from GPIO is supported.

I try to run the latest Linux, but i have some issue with the DTB. As i understand, now is mandatory to include the DTB with the kernel. So i concat both together with :

cat arch/arm/boot/Image arch/arm/boot/dts/nuvoton/nuvoton-wpcm450.dtsi > newImage
mkimage -A ARM -O linux -T kernel -C none -a 8000 -e 8000 -n "arm-linux" -d newImage uImage

When i launch from u-boot, i got this error :

[uboot_wpcm450]# dhcp
...
[uboot_wpcm450]# set serverip XXX.XXX.XXX.XXX
[uboot_wpcm450]# tftp
...
[uboot_wpcm450]# bootm 01000000
## Booting image at 01000000 ...
   Image Name:   arm-linux
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    12278965 Bytes = 11.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x000003eb, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        WPCM450 chip

Please check your kernel config and/or bootloader.

When i run the kernel arch/arm/boot/Image directly from openocd :

Error: unrecognized/unsupported processor variant (0xeb00004e).

Did you known what i'am doing wrong or this variant is not declared in Linux code ? How did you validate your kernel implementations ?

neuschaefer commented 7 months ago
cat arch/arm/boot/Image arch/arm/boot/dts/nuvoton/nuvoton-wpcm450.dtsi > newImage

You can't do that, because it's not a DTB:

See for example arch/arm/boot/dts/nuvoton/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts and the corresponding dtb that is built along with the kernel.

To build the final bootable image, I use this command:

cat arch/arm/boot/zImage arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dtb > zImage-dtb

Error: invalid dtb and unrecognized/unsupported machine ID

The kernel didn't find a DTB, so it requires a machine ID that it recognizes. Machine IDs are the legacy way of telling ARM Linux what kind of board it's running on.

Error: unrecognized/unsupported processor variant (0xeb00004e).

That looks a bit like an ARM instruction that got mistaken for a processor type somehow… Not sure what went wrong here. I've never seen this error (but I've also never tried to load a kernel with openocd).

StidOfficial commented 7 months ago

Thanks for your quick reply and clear explanation, i try and understand this morning how is work.

So i basically do what you told me :

diff --git a/arch/arm/boot/dts/nuvoton/Makefile b/arch/arm/boot/dts/nuvoton/Makefile
index 89c157dad..d51206354 100644
--- a/arch/arm/boot/dts/nuvoton/Makefile
+++ b/arch/arm/boot/dts/nuvoton/Makefile
@@ -6,4 +6,5 @@ dtb-$(CONFIG_ARCH_NPCM7XX) += \
    nuvoton-npcm750-evb.dtb \
    nuvoton-npcm750-runbmc-olympus.dtb
 dtb-$(CONFIG_ARCH_WPCM450) += \
-   nuvoton-wpcm450-supermicro-x9sci-ln4f.dtb
+   nuvoton-wpcm450-supermicro-x9sci-ln4f.dtb \
+   nuvoton-wpcm450-dell-idrac6.dtb
diff --git a/arch/arm/configs/wpcm450_defconfig b/arch/arm/configs/wpcm450_defconfig
index 45483deab..84c51ae99 100644
--- a/arch/arm/configs/wpcm450_defconfig
+++ b/arch/arm/configs/wpcm450_defconfig
@@ -15,7 +15,8 @@ CONFIG_ARCH_WPCM450=y
 CONFIG_CPU_DCACHE_WRITETHROUGH=y
 CONFIG_AEABI=y
 CONFIG_UACCESS_WITH_MEMCPY=y
-# CONFIG_ATAGS is not set
+CONFIG_ATAGS=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_CPU_IDLE=y
 CONFIG_KPROBES=y

Now i can boot with dhcp; set serverip XXX.XXX.XXX.XXX; tftp; setenv bootargs root=/dev/mmcblk0p2 mem=112M; bootm 01000000.

I don't known why but console=tty0 and console=ttyS0 doesn't give any Kernel output. However the Kernel doesn't fully boot and seem crash without stack-trace.

``` [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.7.0-dirty (user@DEV1) (arm-none-eabi-gcc (Alpine Linux) 13.1.0, GNU ld (GNU Binutils) 2.41) #5 PREEMPT Sun Feb 4 11:15:59 CET 2024 [ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] OF: fdt: Machine model: Dell iDRAC6 BMC [ 0.000000] Memory policy: Data cache writethrough [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Kernel command line: root=/dev/mmcblk0p2 [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear) [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512 [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Memory: 101840K/131072K available (6144K kernel code, 1775K rwdata, 1456K rodata, 1024K init, 613K bss, 29232K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] /soc/timer@b8001000: Failed to get clock for timer1: -ENOENT [ 0.000000] clocksource: npcm7xx-timer1: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 622155056 ns [ 0.000000] Enabling NPCM7xx clocksource timer base: c8805000, IRQ: 16 [ 0.000000] Console: colour dummy device 80x30 [ 0.000000] printk: legacy console [tty0] enabled [ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns [ 0.000000] Calibrating delay loop... 218.72 BogoMIPS (lpj=1093632) [ 0.070000] CPU: Testing write buffer coherency: ok [ 0.070000] pid_max: default: 32768 minimum: 301 [ 0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.070000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1. [ 0.070000] Setting up static identity map for 0x100000 - 0x100058 [ 0.080000] rcu: Hierarchical SRCU implementation. [ 0.080000] rcu: Max phase no-delay instances is 1000. [ 0.080000] devtmpfs: initialized [ 0.090000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.090000] futex hash table entries: 256 (order: -1, 3072 bytes, linear) [ 0.090000] pinctrl core: initialized pinctrl subsystem [ 0.100000] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.100000] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.100000] cpuidle: using governor menu [ 0.110000] platform soc: Fixed dependency cycle(s) with /soc/interrupt-controller@b8002000 [ 0.120000] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible. [ 0.130000] SCSI subsystem initialized [ 0.130000] pps_core: LinuxPPS API ver. 1 registered [ 0.130000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [ 0.130000] PTP clock support registered [ 0.130000] clocksource: Switched to clocksource npcm7xx-timer1 [ 0.230000] NET: Registered PF_INET protocol family [ 0.230000] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.230000] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.230000] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.230000] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.240000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.240000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.240000] UDP hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.240000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.240000] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.250000] Initialise system trusted keyrings [ 0.250000] workingset: timestamp_bits=30 max_order=15 bucket_order=0 [ 0.250000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.250000] Key type asymmetric registered [ 0.250000] Asymmetric key parser 'x509' registered [ 0.250000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250) [ 0.250000] io scheduler mq-deadline registered [ 0.250000] io scheduler kyber registered [ 0.330000] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled [ 0.360000] b8000000.serial: ttyS0 at MMIO 0xb8000000 (irq = 21, base_baud = 1500000) is a Nuvoton 16550 [ 0.360000] printk: legacy console [ttyS0] enabled [ 0.850000] b8000100.serial: ttyS1 at MMIO 0xb8000100 (irq = 22, base_baud = 1500000) is a Nuvoton 16550 [ 0.910000] loop: module loaded [ 0.930000] i2c_dev: i2c /dev entries driver [ 0.940000] npcm-wdt b800101c.watchdog: NPCM watchdog driver enabled [ 0.960000] NET: Registered PF_INET6 protocol family [ 0.970000] Segment Routing with IPv6 [ 0.980000] In-situ OAM (IOAM) with IPv6 [ 0.980000] sit: IPv6, IPv4 and MPLS over IPv4 tunnelÿ ```

You can load the kernel with load_image /home/user/linux/zImage-dtb but i need to find how pass kernel arguments.

neuschaefer commented 7 months ago
  • nuvoton-wpcm450-dell-idrac6.dtb

Yes, that's a good start, but what's in nuvoton-wpcm450-dell-idrac6.dts?

+CONFIG_ATAGS=y +CONFIG_ARM_ATAG_DTB_COMPAT=y

Not sure you need the ATAGS options. I think they should be uncessary if you supply a good devicetree.

I don't known why but console=tty0 and console=ttyS0 doesn't give any Kernel output.

tty0 would be the graphical console (and WPCM450 doesn't have a graphical output that it can reliably use), console=ttyS0 should work (but see below).

I have a few ideas:

StidOfficial commented 7 months ago

Yes, that's a good start, but what's in nuvoton-wpcm450-dell-idrac6.dts?

``` --- arch/arm/boot/dts/nuvoton/nuvoton-wpcm450-dell-idrac6.dts +++ arch/arm/boot/dts/nuvoton/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts @@ -12,8 +12,8 @@ #include / { - model = "Dell iDRAC6 BMC"; - compatible = "dell,idrac6-bmc", "nuvoton,wpcm450"; + model = "Supermicro X9SCi-LN4F BMC"; + compatible = "supermicro,x9sci-ln4f-bmc", "nuvoton,wpcm450"; aliases { serial0 = &serial0; @@ -98,7 +98,10 @@ }; &serial0 { - /* Debug serial port (J_IMBC_UART) */ + /* + * Debug serial port. TX is exposed on the right pad of unpopulated + * resistor R1247, RX on the right pad of R1162. + */ status = "okay"; }; ```

Not sure you need the ATAGS options. I think they should be uncessary if you supply a good devicetree.

I get the error no ATAGS support: can't continue when i boot on Linux. I don't known if is mandatory to use a latest u-boot version or if i can something elese like using monitor.

the kernel might be mis-configuring the serial port with the wrong baudrate

Yes, he use the wrong baudrate. But your supermicro dts use the good baudrate too.

keep_bootcon or something might help

That work too

the timer interrupts might not be firing or something

If you see in output logs, he fail to get the clock, i don't known if that as an impact : [ 0.000000] /soc/timer@b8001000: Failed to get clock for timer1: -ENOENT

EDIT : I finally found the issue, i don't known why but Linux is too fast for u-boot so i can't clearly see the Kernel panic. Now i use only go command to debug linux.

``` # dhcp; set serverip XXX.XXX.XXX.XXX; tftp 8000 zimage-dtb; go 8000 Wait for auto-negotiation complete ... OK 100MB - Full Duplex BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 DHCP client bound to address XXX.XXX.XXX.XXX Using AMEA device TFTP from server XXX.XXX.XXX.XXX; our IP address is XXX.XXX.XXX.XXX Filename 'zimage-dtb'. Load address: 0x8000 Loading: 6 MB T:1 Bytes transferred = 6772994 (675902 hex) ## Starting application at 0x00008000 ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.8.0-rc3 (@ae8b455fe9ac) (arm-none-eabi-gcc (Alpine Linux) 13.1.0, GNU ld (GNU Binutils) 2.41) #2 PREEMPT Sun Feb 11 17:19:20 UTC 2024 [ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] OF: fdt: Machine model: Dell iDRAC6 BMC [ 0.000000] Memory policy: Data cache writethrough [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Kernel command line: console=ttyS0,115200n8 [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear) [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512 [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Memory: 98768K/131072K available (6144K kernel code, 1774K rwdata, 1460K rodata, 4096K init, 614K bss, 32304K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] /soc/timer@b8001000: Failed to get clock for timer1: -ENOENT [ 0.000000] clocksource: npcm7xx-timer1: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 622155056 ns [ 0.000000] Enabling NPCM7xx clocksource timer base: c8805000, IRQ: 16 [ 0.000000] Console: colour dummy device 80x30 [ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns [ 0.000000] Calibrating delay loop... 218.72 BogoMIPS (lpj=1093632) [ 0.070000] CPU: Testing write buffer coherency: ok [ 0.070000] pid_max: default: 32768 minimum: 301 [ 0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.070000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1. [ 0.070000] Setting up static identity map for 0x100000 - 0x100058 [ 0.070000] rcu: Hierarchical SRCU implementation. [ 0.070000] rcu: Max phase no-delay instances is 1000. [ 0.080000] devtmpfs: initialized [ 0.090000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.090000] futex hash table entries: 256 (order: -1, 3072 bytes, linear) [ 0.090000] pinctrl core: initialized pinctrl subsystem [ 0.090000] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.100000] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.100000] cpuidle: using governor menu [ 0.110000] platform soc: Fixed dependency cycle(s) with /soc/interrupt-controller@b8002000 [ 0.120000] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible. [ 0.120000] SCSI subsystem initialized [ 0.130000] pps_core: LinuxPPS API ver. 1 registered [ 0.130000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [ 0.130000] PTP clock support registered [ 0.130000] clocksource: Switched to clocksource npcm7xx-timer1 [ 0.220000] NET: Registered PF_INET protocol family [ 0.220000] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.230000] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.230000] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.230000] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.230000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.230000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.230000] UDP hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.230000] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.240000] Initialise system trusted keyrings [ 0.240000] workingset: timestamp_bits=30 max_order=15 bucket_order=0 [ 0.240000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.260000] Key type asymmetric registered [ 0.260000] Asymmetric key parser 'x509' registered [ 0.260000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250) [ 0.260000] io scheduler mq-deadline registered [ 0.260000] io scheduler kyber registered [ 0.390000] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled [ 0.450000] printk: legacy console [ttyS0] disabled [ 0.450000] b8000000.serial: ttyS0 at MMIO 0xb8000000 (irq = 21, base_baud = 1500000) is a Nuvoton 16550 [ 0.450000] printk: legacy console [ttyS0] enabled [ 1.410000] b8000100.serial: ttyS1 at MMIO 0xb8000100 (irq = 22, base_baud = 1500000) is a Nuvoton 16550 [ 1.530000] loop: module loaded [ 1.570000] i2c_dev: i2c /dev entries driver [ 1.590000] npcm-wdt b800101c.watchdog: NPCM watchdog driver enabled [ 1.610000] NET: Registered PF_INET6 protocol family [ 1.630000] Segment Routing with IPv6 [ 1.650000] In-situ OAM (IOAM) with IPv6 [ 1.650000] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 1.670000] NET: Registered PF_PACKET protocol family [ 1.790000] Loading compiled-in X.509 certificates [ 1.970000] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 1.990000] clk: Disabling unused clocks [ 2.960000] Warning: unable to open an initial console. [ 2.990000] /dev/root: Can't open blockdev [ 2.990000] VFS: Cannot open root device "" or unknown-block(0,0): error -6 [ 3.000000] Please append a correct "root=" boot option; here are the available partitions: [ 3.010000] List of all bdev filesystems: [ 3.010000] squashfs [ 3.010000] vfat [ 3.020000] msdos [ 3.020000] [ 3.020000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 3.020000] CPU: 0 PID: 1 Comm: swapper Not tainted 6.8.0-rc3 #2 [ 3.020000] Hardware name: WPCM450 chip [ 3.020000] unwind_backtrace from show_stack+0x10/0x14 [ 3.020000] show_stack from dump_stack_lvl+0x28/0x30 [ 3.020000] dump_stack_lvl from panic+0x100/0x2ec [ 3.020000] panic from mount_root_generic+0x1d0/0x2a4 [ 3.020000] mount_root_generic from prepare_namespace+0x1b8/0x244 [ 3.020000] prepare_namespace from kernel_init+0x10/0x130 [ 3.020000] kernel_init from ret_from_fork+0x14/0x28 [ 3.020000] Exception stack(0xc880dfb0 to 0xc880dff8) [ 3.020000] dfa0: 00000000 00000000 00000000 00000000 [ 3.020000] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 3.020000] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 3.020000] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]--- ```
neuschaefer commented 6 months ago

[ 3.020000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Ah, you don't seem to have provided any root file system. Root FSes can be provided in the form of block devices (root=/dev/mmcblk0p1 or something), or as a initramfs (see CONFIG_INITRAMFS_SOURCE and surrounding options)