按照论坛里的教程:
1) 删除TF卡所有分区
2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
在V3S ZERO开发板上运行后,出现如下情况:
[ 1.391582] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.401860] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.552817] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
[ 1.567509] EXT4-fs (mmcblk0p2): recovery complete
[ 1.577550] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.585719] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.594166] devtmpfs: mounted
[ 1.598397] Freeing unused kernel memory: 1024K
[ 1.613776] Starting init: /sbin/init exists but couldn't execute it (error -5)
[ 1.623757] Starting init: /bin/sh exists but couldn't execute it (error -5)
[ 1.630930] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 1.645087] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero #1
[ 1.652298] Hardware name: Allwinner sun8i Family
[ 1.657036] [<c010e514>] (unwind_backtrace) from [<c010b1b8>] (show_stack+0x10/0x14)
[ 1.664779] [<c010b1b8>] (show_stack) from [<c065e5a4>] (dump_stack+0x88/0x9c)
[ 1.672001] [<c065e5a4>] (dump_stack) from [<c011b48c>] (panic+0xdc/0x248)
[ 1.678875] [<c011b48c>] (panic) from [<c06700ec>] (kernel_init+0x100/0x110)
[ 1.685919] [<c06700ec>] (kernel_init) from [<c0107538>] (ret_from_fork+0x14/0x3c)
[ 1.693492] Rebooting in 5 seconds..
板子启动不了?是什么情况?
如果把第二步改一下:
4) 建立第二个分区,大小100M,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
第二个分区改成100M,就可以正常启动。200M就不行了,是什么问题呢?
离线
离线
https://whycan.cn/t_561.html
按照这个论坛做的,目前不知道该如何解决问题
离线
第二个分区100M可以,大于100M就不行了
离线
论坛里说sudo解压缩rootfs,明天我试试
离线
烧到tf卡里后,卡住了
U-Boot SPL 2017.01-rc2-00055-gc41fbfe7b5 (Jan 20 2017 - 00:39:08)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2-00055-gc41fbfe7b5 (Jan 20 2017 - 00:39:08 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2-00055-gc41fbfe7b5 (Jan 20 2017 - 00:39:08 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
287 bytes read in 15 ms (18.6 KiB/s)
## Executing script at 41900000
reading zImage
3370592 bytes read in 563 ms (5.7 MiB/s)
reading sun8i-v3s-licheepi-zero.dtb
8585 bytes read in 27 ms (309.6 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dff188 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.0-licheepi-zero+ (root@6d32bb12421e) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #2 SMP Wed Aug 5 11:27:20 UTC 2020
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3de8000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 54636K/64036K available (5120K kernel code, 207K rwdata, 1172K rodata, 1024K init, 257K bss, 9400K 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 : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0600000 (6112 kB)
[ 0.000000] .init : 0xc0800000 - 0xc0900000 (1024 kB)
[ 0.000000] .data : 0xc0900000 - 0xc0933e00 ( 208 kB)
[ 0.000000] .bss : 0xc093a0b8 - 0xc097a684 ( 258 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000019] Switching to timer-based delay loop, resolution 41ns
[ 0.000161] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000377] Console: colour dummy device 80x30
[ 0.000805] console [tty0] enabled
[ 0.000845] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000883] pid_max: default: 32768 minimum: 301
[ 0.001022] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001055] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001673] CPU: Testing write buffer coherency: ok
[ 0.002065] /cpus/cpu@0 missing clock-frequency property
[ 0.002110] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002551] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002744] Hierarchical SRCU implementation.
[ 0.003267] smp: Bringing up secondary CPUs ...
[ 0.003300] smp: Brought up 1 node, 1 CPU
[ 0.003320] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.003340] CPU: All CPU(s) started in SVC mode.
[ 0.004123] devtmpfs: initialized
[ 0.006628] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006947] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.007007] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007193] pinctrl core: initialized pinctrl subsystem
[ 0.008086] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[ 0.008260] NET: Registered protocol family 16
[ 0.008731] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009824] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009879] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.020183] SCSI subsystem initialized
[ 0.020522] usbcore: registered new interface driver usbfs
[ 0.020602] usbcore: registered new interface driver hub
[ 0.020705] usbcore: registered new device driver usb
[ 0.020942] pps_core: LinuxPPS API ver. 1 registered
[ 0.020969] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.021016] PTP clock support registered
[ 0.022321] clocksource: Switched to clocksource arch_sys_counter
[ 0.023124] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4080000
[ 0.023178] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 0.029977] Console: switching to colour frame buffer device 100x30
[ 0.039945] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 0.053715] NET: Registered protocol family 2
[ 0.058154] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.062039] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.065936] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.069838] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.073635] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.077544] NET: Registered protocol family 1
[ 0.081926] RPC: Registered named UNIX socket transport module.
[ 0.085717] RPC: Registered udp transport module.
[ 0.089260] RPC: Registered tcp transport module.
[ 0.092748] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.098173] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.110703] NFS: Registering the id_resolver key type
[ 0.114334] Key type id_resolver registered
[ 0.117679] Key type id_legacy registered
[ 0.122007] random: fast init done
[ 0.128372] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.131886] io scheduler noop registered
[ 0.135441] io scheduler deadline registered
[ 0.139137] io scheduler cfq registered (default)
[ 0.142607] io scheduler mq-deadline registered
[ 0.145889] io scheduler kyber registered
[ 0.153841] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.226760] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.233881] console [ttyS0] disabled
[ 0.257435] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 31, base_baud = 1500000) is a U6_16550A
[ 0.871554] console [ttyS0] enabled
[ 0.880026] libphy: Fixed MDIO Bus: probed
[ 0.887758] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.897528] ehci-platform: EHCI generic platform driver
[ 0.906013] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.915377] ohci-platform: OHCI generic platform driver
[ 0.924232] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.937145] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 0.947315] sun6i-rtc 1c20400.rtc: RTC enabled
[ 0.955048] i2c /dev entries driver
[ 0.963095] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[ 0.975921] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.042377] sunxi-mmc 1c0f000.mmc: base:0xc405d000 irq:23
[ 1.052213] usbcore: registered new interface driver usbhid
[ 1.061363] usbhid: USB HID core driver
[ 1.069008] NET: Registered protocol family 17
[ 1.077060] Key type dns_resolver registered
[ 1.084925] Registering SWP/SWPB emulation handler
[ 1.099841] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.118390] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.127930] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.142955] hub 1-0:1.0: USB hub found
[ 1.150632] hub 1-0:1.0: 1 port detected
[ 1.159622] using random self ethernet address
[ 1.167928] using random host ethernet address
[ 1.177065] usb0: HOST MAC 16:61:b5:5c:4c:0a
[ 1.185025] usb0: MAC a6:3b:5d:7d:87:2e
[ 1.192333] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.203253] g_cdc gadget: g_cdc ready
[ 1.210604] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:11 UTC (11)
[ 1.222507] vcc3v0: disabling
[ 1.228981] vcc5v0: disabling
[ 1.236864] Waiting for root device /dev/mmcblk0p2...
[ 1.279840] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.293451] mmc0: new high speed SD card at address 0260
[ 1.302952] mmcblk0: mmc0:0260 NCard 949 MiB
[ 1.312755] mmcblk0: p1 p2
[ 1.333604] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.346583] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.957788] random: crng init done
[ 2.245240] EXT4-fs (mmcblk0p2): recovery complete
[ 2.260269] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.271807] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.282610] devtmpfs: mounted
[ 2.290205] Freeing unused kernel memory: 1024K
[ 2.407201] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
离线