U-Boot SPL 2018.01-05679-g013ca45-dirty (Aug 02 2021 - 10:22:39)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2018.01-05679-g013ca45-dirty (Aug 02 2021 - 10:22:39 -0700) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 816fb000, end 816fff46 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.0-rc8-licheepi-nano (root@ubuntu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5 Mon Aug 2 10:11:14 PDT 2021
[ 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: Lichee Pi Nano
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] random: fast init done
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=31:3 rw rootfstype=jffs2
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Memory: 22672K/32768K available (6144K kernel code, 237K rwdata, 1412K rodata, 1024K init, 246K bss, 10096K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc2800000 - 0xff800000 ( 976 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc2000000 ( 32 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (7136 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 238 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 247 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000110] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000629] Console: colour dummy device 80x30
[ 0.000714] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070227] pid_max: default: 32768 minimum: 301
[ 0.070526] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070567] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.071962] CPU: Testing write buffer coherency: ok
[ 0.073592] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076088] devtmpfs: initialized
[ 0.082518] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.082587] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.082828] pinctrl core: initialized pinctrl subsystem
[ 0.084764] NET: Registered protocol family 16
[ 0.086127] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.087844] cpuidle: using governor menu
[ 0.113120] SCSI subsystem initialized
[ 0.113465] usbcore: registered new interface driver usbfs
[ 0.113604] usbcore: registered new interface driver hub
[ 0.113802] usbcore: registered new device driver usb
[ 0.114200] pps_core: LinuxPPS API ver. 1 registered
[ 0.114227] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.114284] PTP clock support registered
[ 0.114743] Advanced Linux Sound Architecture Driver Initialized.
[ 0.116228] clocksource: Switched to clocksource timer
[ 0.141954] NET: Registered protocol family 2
[ 0.143353] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.143432] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.143481] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.143743] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.143799] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.144257] NET: Registered protocol family 1
[ 0.145444] RPC: Registered named UNIX socket transport module.
[ 0.145482] RPC: Registered udp transport module.
[ 0.145499] RPC: Registered tcp transport module.
[ 0.145515] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.147814] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.149579] Initialise system trusted keyrings
[ 0.150118] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.167184] NFS: Registering the id_resolver key type
[ 0.167267] Key type id_resolver registered
[ 0.167287] Key type id_legacy registered
[ 0.167404] jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
[ 0.181592] Key type asymmetric registered
[ 0.181632] Asymmetric key parser 'x509' registered
[ 0.181827] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.181857] io scheduler noop registered
[ 0.181874] io scheduler deadline registered
[ 0.182623] io scheduler cfq registered (default)
[ 0.182655] io scheduler mq-deadline registered
[ 0.182672] io scheduler kyber registered
[ 0.183765] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[ 0.193096] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.359608] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.366106] console [ttyS0] disabled
[ 0.386399] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[ 0.858712] console [ttyS0] enabled
[ 0.869171] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.895661] loop: module loaded
[ 0.899681] SCSI Media Changer driver v0.25
[ 0.907414] m25p80 spi0.0: xt25f128b (16384 Kbytes)
[ 0.913364] 4 ofpart partitions found on MTD device spi0.0
[ 0.918970] Creating 4 MTD partitions on "spi0.0":
[ 0.923782] 0x000000000000-0x000000100000 : "u-boot"
[ 0.929837] 0x000000100000-0x000000110000 : "dtb"
[ 0.935537] 0x000000110000-0x000000510000 : "kernel"
[ 0.941606] 0x000000510000-0x000001000000 : "rootfs"
[ 0.948165] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.954699] ehci-platform: EHCI generic platform driver
[ 0.960305] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.966602] ohci-platform: OHCI generic platform driver
[ 0.972238] usbcore: registered new interface driver usb-storage
[ 0.979287] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.988322] i2c /dev entries driver
[ 1.046352] sunxi-mmc 1c0f000.mmc: base:0x0a10f691 irq:19
[ 1.053732] usbcore: registered new interface driver usbhid
[ 1.059424] usbhid: USB HID core driver
[ 1.081080] NET: Registered protocol family 17
[ 1.085748] Key type dns_resolver registered
[ 1.092252] Loading compiled-in X.509 certificates
[ 1.107193] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739c38)
[ 1.116005] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0738f1c)
[ 1.123789] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.130445] [drm] No driver support for vblank timestamp query.
[ 1.184399] Console: switching to colour frame buffer device 60x34
[ 1.207786] sun4i-drm display-engine: fb0: frame buffer device
[ 1.214887] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.224050] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.235977] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.241897] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.252033] hub 1-0:1.0: USB hub found
[ 1.255983] hub 1-0:1.0: 1 port detected
[ 1.261580] using random self ethernet address
[ 1.266115] using random host ethernet address
[ 1.272434] usb0: HOST MAC ca:bb:95:1e:b2:eb
[ 1.276947] usb0: MAC ae:bc:dd:e4:eb:26
[ 1.280941] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.288494] g_cdc gadget: g_cdc ready
[ 1.293092] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.310500] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.317357] vcc3v3: disabling
[ 1.320339] ALSA device list:
[ 1.323304] #0: Loopback 1
[ 1.327160] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.335829] cfg80211: failed to load regulatory.db
[ 1.494340] random: crng init done
[ 1.672968] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 1.680968] devtmpfs: mounted
[ 1.688712] Freeing unused kernel memory: 1024K
[ 1.707666] jffs2: notice: (1) check_node_data: wrong data CRC in data node at 0x00178f78: read 0xac142184, calculated 0x311bc0f2.
[ 1.720037] jffs2: warning: (1) jffs2_do_read_inode_internal: no data nodes found for ino #150
[ 1.728822] jffs2: iget() failed for ino #150
[ 1.733229] Starting init: /sbin/init exists but couldn't execute it (error -5)
[ 2.650560] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 2.658806] pgd = 94ca7928
[ 2.661522] [00000004] *pgd=00000000
[ 2.665112] Internal error: Oops: 5 [#1] ARM
[ 2.669372] Modules linked in:
[ 2.672440] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc8-licheepi-nano #5
[ 2.679725] Hardware name: Allwinner suniv Family
[ 2.684444] PC is at jffs2_add_full_dnode_to_inode+0x1c0/0x4d8
[ 2.690269] LR is at jffs2_add_full_dnode_to_inode+0x158/0x4d8
[ 2.696088] pc : [<c02d1518>] lr : [<c02d14b0>] psr: a0000013
[ 2.702338] sp : c182dca8 ip : 000a4600 fp : c10a0870
[ 2.707551] r10: 000a4400 r9 : c0cf9df8 r8 : c10a0880
[ 2.712767] r7 : c0ce8800 r6 : c0d98ab0 r5 : c0cf9df8 r4 : c0d8cfd8
[ 2.719277] r3 : c0d98ab0 r2 : 00000000 r1 : 00000100 r0 : c0d8cfd8
[ 2.725790] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 2.732906] Control: 0005317f Table: 80004000 DAC: 00000053
[ 2.738642] Process swapper (pid: 1, stack limit = 0x8ca6eabb)
[ 2.744463] Stack: (0xc182dca8 to 0xc182e000)
[ 2.748828] dca0: 00000ae3 c0d99a00 00000000 c0ce8800 c182dcf8 00000b89
[ 2.756998] dcc0: c0d99a28 00000000 c10a0870 c02d3a14 0000001c c182dcf8 c0cc5d48 00000003
[ 2.765168] dce0: c182dd68 00000044 c182dd8c c10a0870 00000028 c182dcfc 00000000 c0da6438
[ 2.773336] dd00: 00000000 00000b89 00000000 00000000 00000000 c0cff8f0 c10a0028 c10a0870
[ 2.781506] dd20: c0ce8800 00000014 ffffe000 c182dd8c c01347c8 c10a0438 c109f908 c02d51f8
[ 2.789676] dd40: 00000014 c01e3ec0 00000710 00000000 00000014 c01e4f98 c181e000 c0d8bbe0
[ 2.797847] dd60: c10a0898 c10a0870 c0ce9da0 c0ce8800 c10a0460 c0ce9db5 c10a0438 c02db888
[ 2.806016] dd80: c109f908 00000007 a1afe946 c01e2678 c109f770 0000000e 00000004 c109f770
[ 2.814186] dda0: a1afe946 c10a0460 c109f908 c182de88 c0a65b6c c01e2bac c0a66928 0000036e
[ 2.822356] ddc0: c182de50 c109f908 c182de44 c181bc50 0000000e c0d8bbe0 00000014 c0ce9da0
[ 2.830526] dde0: c109f908 c02d07a0 c182de80 00000000 c182df24 00020020 c10a0460 00000001
[ 2.838694] de00: c109f770 c01d8f44 00000002 ffffe000 00000000 c0ceb0a0 00000041 00000000
[ 2.846862] de20: 00000000 00020020 00000000 00000000 c182de50 c182de88 00000609 00000000
[ 2.855032] de40: 00000000 c10a0730 c181bc50 c109f880 c182de50 c182de50 c0a3d488 00000000
[ 2.863201] de60: c182df24 00000001 c1825000 c0cb3500 ffffe000 ffffff9c 00000000 c01d9ff0
[ 2.871371] de80: c181bc50 c109f770 a1afe946 00000007 c0ce9d60 60000093 c181bc50 c109f5d8
[ 2.879540] dea0: c10a0460 00000101 00000002 0000002e 00000000 00000001 00000001 c182dec0
[ 2.887709] dec0: c181bc50 c109f880 00000000 c014547c 00000000 00000000 00000000 c01454f4
[ 2.895877] dee0: 00000003 c0144284 00000000 60000013 c1825000 00000000 c10a0730 00000002
[ 2.904048] df00: ffffff9c c181e000 00000000 c1825000 c0a05194 c01d0a14 c18e9580 c0130994
[ 2.912216] df20: ffffe000 00020020 00000000 00000001 00000100 00000001 c0cb3500 00000000
[ 2.920384] df40: c0a0510c c0a05194 c1825000 c01d20bc 00000000 00000008 c0a032d8 00000000
[ 2.928552] df60: 00000000 c0a3b7e0 c07cac18 00000000 00000000 00000000 00000000 00000000
[ 2.936721] df80: 00000000 c01d2574 00000000 c07cac18 00000000 c010175c c0a3b7e0 c0666908
[ 2.944889] dfa0: 00000000 c06669cc 00000000 c0107dc0 00000000 00000000 00000000 00000000
[ 2.953055] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.961223] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 55555555 445d1555
[ 2.969431] [<c02d1518>] (jffs2_add_full_dnode_to_inode) from [<c02d3a14>] (jffs2_do_read_inode_internal+0x188/0x1878)
[ 2.980117] [<c02d3a14>] (jffs2_do_read_inode_internal) from [<c02d51f8>] (jffs2_do_read_inode+0xf4/0x1f4)
[ 2.989759] [<c02d51f8>] (jffs2_do_read_inode) from [<c02db888>] (jffs2_iget+0x78/0x338)
[ 2.997842] [<c02db888>] (jffs2_iget) from [<c02d07a0>] (jffs2_lookup+0xfc/0x148)
[ 3.005329] [<c02d07a0>] (jffs2_lookup) from [<c01d8f44>] (path_openat+0xb8c/0x10a0)
[ 3.013076] [<c01d8f44>] (path_openat) from [<c01d9ff0>] (do_filp_open+0x60/0xc4)
[ 3.020574] [<c01d9ff0>] (do_filp_open) from [<c01d0a14>] (do_open_execat+0x5c/0x168)
[ 3.028418] [<c01d0a14>] (do_open_execat) from [<c01d20bc>] (do_execveat_common+0x168/0x5fc)
[ 3.036856] [<c01d20bc>] (do_execveat_common) from [<c01d2574>] (do_execve+0x24/0x2c)
[ 3.044690] [<c01d2574>] (do_execve) from [<c010175c>] (try_to_run_init_process+0xc/0x3c)
[ 3.052864] [<c010175c>] (try_to_run_init_process) from [<c06669cc>] (kernel_init+0xc4/0x10c)
[ 3.061389] [<c06669cc>] (kernel_init) from [<c0107dc0>] (ret_from_fork+0x14/0x34)
[ 3.068952] Code: 13833003 15823004 e599300c e5932000 (e5923004)
[ 3.075223] ---[ end trace aee6386aa83db2a4 ]---
[ 3.080922] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 3.080922]
[ 3.090065] Rebooting in 5 seconds..
[ 9.069299] Reboot failed -- System halted
离线
文件系统有问题
离线
[ 1.707666] jffs2: notice: (1) check_node_data: wrong data CRC in data node at 0x00178f78: read 0xac142184, calculated 0x311bc0f2.
[ 1.720037] jffs2: warning: (1) jffs2_do_read_inode_internal: no data nodes found for ino #150
[ 1.728822] jffs2: iget() failed for ino #150
[ 1.733229] Starting init: /sbin/init exists but couldn't execute it (error -5)
文件系统出错了
离线
我已经重新编译了但是还是不行
离线
离线
@哇酷小二
jffs2 那个 mtd是啥
我是按照
https://whycan.com/t_3138.html
这个地址的第五点来搞的
是用
BuildMyImage.sh这个命令烧写进去的,其他的我就不知道咋搞了
离线
@哇酷小二
mtd是【drivers/mtd/spi-nor/spi-nor.c】这个文件吗
我里面注释掉了
/*{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },*/
增加了
{ "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, 0) },
离线
@哇酷小二
设备树是这样
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
spi-max-frequency = <60000000>;
flash: xt25f128b@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128,xt25f128b", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <60000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};
partition@100000 {
label = "dtb";
reg = <0x100000 0x10000>;
read-only;
};
partition@110000 {
label = "kernel";
reg = <0x110000 0x400000>;
read-only;
};
partition@510000 {
label = "rootfs";
reg = <0x510000 0xAF0000>;
};
};
};
};
启动参数是这样
console=ttyS0,115200 panic=5 rootwait root=31:3 rw rootfstype=jffs2
31:3是照着其他教程改的以前是
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
离线
文件系统烧录地址是不是 0x510000
[ 0.941606] 0x000000510000-0x000001000000 : "rootfs"
有没有超过这个范围?
用这个打包成镜像的
if=/dev/zero of=f1c100s_spiflash_16M.bin bs=1M count=16 &&\
dd if=u-boot/u-boot-sunxi-with-spl.bin of=f1c100s_spiflash_16M.bin bs=1K conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb of=f1c100s_spiflash_16M.bin bs=1K seek=1024 conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/zImage of=f1c100s_spiflash_16M.bin bs=1K seek=1088 conv=notrunc &&\
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\
dd if=rootfs.jffs2 of=f1c100s_spiflash_16M.bin bs=1k seek=5184 conv=notrunc &&\
sync
离线
用这个命令看下你的rootfs文件夹大小: du -sh rootfs/
用这个命令看下文件多大: ls -l rootfs.jffs2
root@ubuntu:/opt# ls -l rootfs.jffs2
-rw-r--r-- 1 root root 11468800 Aug 6 09:25 rootfs.jffs2
root@ubuntu:/opt# du -sh rootfs/
1.6M rootfs/
离线
啊这, 应该没啥错误, 那你把整个flash读出来吧, 与写进去的对比, 看是否一模一样.
这还能写错了?我怀疑是不是我配置有问题
我看这个文章有配置
https://whycan.com/t_3138.html#p43702
CONFIG_MTD_BLOCK
但是我没有配
我搜都搜不到,哈哈哈哈
请问下怎么对比呢?
离线
@tlxfif
本站右上角搜: CONFIG_MTD_BLOCK
昨晚研究了一晚上,好像没啥用....
离线
我发现
我把uboot启动参数改成31:3就会出现
console=ttyS0,115200 panic=5 rootwait root=31:3 rw rootfstype=jffs2
[ 1.703774] jffs2: notice: (1) check_node_data: wrong data CRC in data node at 0x001792fc: read 0xac142184, calculated 0x311bc0f2.
[ 1.716584] jffs2: warning: (1) jffs2_do_read_inode_internal: no data nodes found for ino #150
[ 1.725281] jffs2: iget() failed for ino #150
改成/dev/mtdblock3
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
又会一直等待
离线