OpenNuvoton / NUC970_Buildroot

Buildroot for NUC970
Other
44 stars 54 forks source link

Rootfs error of Buildroot for nuc980 #35

Closed yongzhiliu1006 closed 1 year ago

yongzhiliu1006 commented 1 year ago

Dear sir: I am using buildroot to generate rootfs image for a 980 dev board. The 980 MPU boot from a spi nor flash w25q256. The uboot and kernel seem to be ok from the message printed. But the rootfs from buildroot seem to be wrong."**devtmpfs: error mounting -2". It puzzled me for a long time. And I tried several version of buildroot, no one worked on the board. Please give me some advice on this issue. Thank you very much!

NUC980 IBR 20180813 Boot from SPI-NOR DDR-OK fK皀-F{籹 NUC980 IBR 20180813 Boot from SPI-NOR DDR-OK finish SPI dow頪#S

U-Boot 2016.11 (Apr 21 2023 - 02:09:10 -0700)

CPU: NUC980 Board: NUC980 DRAM: 64 MiB SF: Detected W25Q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB In: serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 2  1  0 SF: Detected W25Q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB device 0 offset 0x200000, size 0x760000 SF: 7733248 bytes @ 0x200000 Read: OK

Booting kernel from Legacy Image at 00007fc0 ...

Image Name: Linux-4.4.289 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2147264 Bytes = 2 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK XIP Kernel Image ... OK

Starting kernel ...

SF: Detected W25Q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB SF: Device\0Booting Linux on physical CPU 0x0 Linux version 4.4.289 (root@yang-Inspiron-3137) (gcc version 4.6.4 (crosstool-NG hg+unknown-20130521.154019 - tc0002) ) #21 PREEMPT Wed May 3 21:13:48 CST 2023 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f CPU: VIVT data cache, VIVT instruction cache Machine: NUC980 Memory policy: Data cache writeback Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: root=/dev/mtdblock1 console=ttyS0,115200n8 rdinit=/sbin/init rootfstype=jffs2 mem=64M) PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 60264K/65536K available (3182K kernel code, 183K rwdata, 892K rodata, 148K init, 205K bss, 5272K reserved, 0K cma-reserved) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xc4800000 - 0xff800000 ( 944 MB) lowmem : 0xc0000000 - 0xc4000000 ( 64 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .text : 0xc0008000 - 0xc0402d64 (4076 kB) .init : 0xc0403000 - 0xc0428000 ( 148 kB) .data : 0xc0428000 - 0xc0455f60 ( 184 kB) .bss : 0xc0455f60 - 0xc04894f4 ( 206 kB) SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Preemptible hierarchical RCU implementation. Build-time adjustment of leaf fanout to 32. NR_IRQS:545 clocksource: nuc980-timer5: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 62215505635 ns sched_clock: 24 bits at 120kHz, resolution 8333ns, wraps every 69905062489ns Console: colour dummy device 80x30 console [ttyS0] enabled Calibrating delay loop... 148.88 BogoMIPS (lpj=744448) 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 0x8400 - 0x843c devtmpfs: initialized clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 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 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 nuc980-timer5 NET: Registered protocol family 2 IP idents hash table entries: 2048 (order: 2, 16384 bytes) TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 NetWinder Floating Point Emulator V0.97 (double precision) jffs2: version 2.2. (NAND) (SUMMARY) 漏 2001-2006 Red Hat, Inc. romfs: ROMFS MTD (C) 2007 Red Hat, Inc. io scheduler noop registered (default) nuc980_gpio_probe - pdev = nuc980-gpio nuc980_dma_probe - pdev = nuc980-dma nuc980-dma nuc980-dma: NUC980 DMA ready nuc980-uart.0: ttyS0 at I/O 0x0 (irq = 36, base_baud = 750000) is a NUC980 brd: module loaded SCSI Media Changer driver v0.25 m25p80 spi0.0: w25q256 (32768 Kbytes) Creating 2 MTD partitions on "m25p80": 0x000000000000-0x000000800000 : "kernel" 0x000000800000-0x000001000000 : "rootfs" RX nuc980_spi0_probe: dma0chan0 module removed TX nuc980_spi0_probe: dma0chan1 module removed m25p80 spi1.0: unrecognized JEDEC id bytes: ff, ff, ff libphy: nuc980_rmii0: probed libphy: nuc980_rmii1: probed ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver nuc980-ehci nuc980-ehci: Nuvoton NUC980 EHCI Host Controller nuc980-ehci nuc980-ehci: new USB bus registered, assigned bus number 1 nuc980-ehci nuc980-ehci: irq 23, io mem 0xb0015000 nuc980-ehci nuc980-ehci: USB 2.0 started, EHCI 0.95 hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver usb_hcd_nuc980_probe, id = 0, name: nuc980-ohci.0, 0 nuc980-ohci nuc980-ohci.0: Nuvoton NUC980 OHCI Host Controller nuc980-ohci nuc980-ohci.0: new USB bus registered, assigned bus number 2 nuc980-ohci nuc980-ohci.0: irq 24, io mem 0xb0017000 hub 2-0:1.0: USB hub found hub 2-0:1.0: 8 ports detected usb_hcd_nuc980_probe, id = 1, name: nuc980-ohci.1, 0 usb_hcd_nuc980_probe, id = 2, name: nuc980-ohci.2, 0 usb_hcd_nuc980_probe, id = 3, name: nuc980-ohci.3, 0 usb_hcd_nuc980_probe, id = 4, name: nuc980-ohci.4, 0 usb_hcd_nuc980_probe, id = 5, name: nuc980-ohci.5, 0 usb_hcd_nuc980_probe, id = 6, name: nuc980-ohci.6, 0 usbcore: registered new interface driver usb-storage nuc980-rtc nuc980-rtc: rtc core: registered nuc980-rtc as rtc0 usbcore: registered new interface driver usbhid usbhid: USB HID core driver NET: Registered protocol family 17 nuc980-rtc nuc980-rtc: setting system clock to 2005-01-01 00:00:00 UTC (1104537600) VFS: Mounted root (jffs2 filesystem) on device 31:1. //////////////////////////////////////////////////////////////////////////////seem to be wrong from here////////////////////////////// devtmpfs: error mounting -2 Freeing unused kernel memory: 148K Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance. CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.289 #21 Hardware name: NUC980 Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) r6:00000000 r5:c031d91c r4:c0456208 r3:00000000 [] (show_stack) from [] (dump_stack+0x20/0x28) [] (dump_stack) from [] (panic+0xac/0x23c) [] (panic) from [] (kernel_init+0xc8/0xec) r3:c3840000 r2:c3f6e0b0 r1:60000013 r0:c03ad014 r7:00000000 [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) r4:00000000 r3:ffffffff ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

yongzhiliu1006 commented 1 year ago

buildroot config of nuc980.txt

ychuang3 commented 1 year ago

yaffs2 is for NAND flash, but you are boorting from SPI NOR. You may have selected the wrong defconfig. What's the name of board you are using?

yongzhiliu1006 commented 1 year ago

The issue solved. I do not fully understand the mkfs utility, packed wrong dir.