您尚未登录。

楼主 # 2022-06-30 11:43:05

linux-xc
会员
注册时间: 2022-06-28
已发帖子: 29
积分: 51

荔枝派zero如何从uboot启动Linux

打印信息如下:

switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
reading /sun8i-v3s-licheepi-zero.dtb
8585 bytes read in 26 ms (322.3 KiB/s)
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
starting USB...
No controllers found
No ethernet found.
No ethernet found.
=>

查看分区文件:

=> ls mmc 0
  3860984   zimage
     8585   sun8i-v3s-licheepi-zero.dtb

2 file(s), 0 dir(s)

=>

已经烧录uboot
已经将 zimage、sun8i-v3s-licheepi-zero.dtb拷贝到FAT16主分区
未拷贝根文件系统

前辈们,这是需要烧录跟文件系统才可以自动加载Linux吗?
已经看到uboot读取了设备树。

离线

#1 2022-06-30 12:20:14

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 荔枝派zero如何从uboot启动Linux

荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)
https://whycan.com/t_561.html





离线

#2 2022-06-30 12:20:39

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 荔枝派zero如何从uboot启动Linux

(V3s/V3x/S3/S3L/R11通吃)小智V3x开发板smallwitpi lite u-boot/linux/buildroot测试
https://whycan.com/t_7248.html





离线

楼主 #3 2022-06-30 13:01:21

linux-xc
会员
注册时间: 2022-06-28
已发帖子: 29
积分: 51

Re: 荔枝派zero如何从uboot启动Linux

哇酷小二 说:

(V3s/V3x/S3/S3L/R11通吃)小智V3x开发板smallwitpi lite u-boot/linux/buildroot测试
https://whycan.com/t_7248.html

对比了以下,是没有打印 reading zImage
但是已经有了这个文件,reading 了设备树

离线

#4 2022-06-30 13:39:07

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 荔枝派zero如何从uboot启动Linux

linux-xc 说:
哇酷小二 说:

(V3s/V3x/S3/S3L/R11通吃)小智V3x开发板smallwitpi lite u-boot/linux/buildroot测试
https://whycan.com/t_7248.html

对比了以下,是没有打印 reading zImage
但是已经有了这个文件,reading 了设备树

可能没有默认的执行脚本,

首先看下 手动执行能不能引导。


bootcmd  了解一下。





离线

楼主 #5 2022-06-30 14:25:10

linux-xc
会员
注册时间: 2022-06-28
已发帖子: 29
积分: 51

Re: 荔枝派zero如何从uboot启动Linux

@哇酷小二

感谢回答,的确是bootcmd脚本问题,但我好奇的是官方给的配置为什么不加入启动内核的脚本?

我在uboot命令行输入以下两条指令成功引导镜像:

=> <INTERRUPT>
=> load mmc 0:1 0x41000000 zImage
reading zImage
3860984 bytes read in 633 ms (5.8 MiB/s)
=> bootz 0x41000000 - 0x41800000
## 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.10.15-licheepi-zero (root@linux) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #1 SMP Thu Jun 30 10:31:52 CST 2022
[    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 14 pages/cpu @c3dea000 s24716 r8192 d24436 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line:
[    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: 53648K/64036K available (6144K kernel code, 199K rwdata, 1420K rodata, 1024K init, 259K bss, 10388K 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 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a31e00   ( 200 kB)
[    0.000000]        .bss : 0xc0a33000 - 0xc0a73f0c   ( 260 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected 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.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000017] Switching to timer-based delay loop, resolution 41ns
[    0.000137] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000343] Console: colour dummy device 80x30
[    0.000755] console [tty0] enabled
[    0.000792] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000829] pid_max: default: 32768 minimum: 301
[    0.000980] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001007] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001769] CPU: Testing write buffer coherency: ok
[    0.002222] /cpus/cpu@0 missing clock-frequency property
[    0.002269] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002654] Setting up static identity map for 0x40100000 - 0x40100058
[    0.003422] smp: Bringing up secondary CPUs ...
[    0.003465] smp: Brought up 1 node, 1 CPU
[    0.003485] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.003504] CPU: All CPU(s) started in SVC mode.
[    0.004226] devtmpfs: initialized
[    0.006813] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.007145] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.007201] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.007374] pinctrl core: initialized pinctrl subsystem
[    0.008388] NET: Registered protocol family 16
[    0.008775] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.009981] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.010031] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.021085] SCSI subsystem initialized
[    0.021405] usbcore: registered new interface driver usbfs
[    0.021492] usbcore: registered new interface driver hub
[    0.021602] usbcore: registered new device driver usb
[    0.021842] pps_core: LinuxPPS API ver. 1 registered
[    0.021869] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.021913] PTP clock support registered
[    0.022144] Advanced Linux Sound Architecture Driver Initialized.
[    0.023845] clocksource: Switched to clocksource arch_sys_counter
[    0.024693] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4080000
[    0.024747] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[    0.031608] Console: switching to colour frame buffer device 100x30
[    0.041423] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[    0.055151] NET: Registered protocol family 2
[    0.059552] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.063404] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.067295] TCP: Hash tables configured (established 1024 bind 1024)
[    0.071122] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.074894] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.078778] NET: Registered protocol family 1
[    0.083037] RPC: Registered named UNIX socket transport module.
[    0.086796] RPC: Registered udp transport module.
[    0.090362] RPC: Registered tcp transport module.
[    0.093836] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.099389] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.111856] NFS: Registering the id_resolver key type
[    0.115497] Key type id_resolver registered
[    0.118859] Key type id_legacy registered
[    0.126443] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.130019] io scheduler noop registered
[    0.133516] io scheduler deadline registered
[    0.137353] io scheduler cfq registered (default)
[    0.145273] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.215756] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.242905] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 31, base_baud = 1500000) is a U6_16550A
[    0.828234] console [ttyS0] enabled
[    0.835991] [drm] Initialized
[    0.844314] libphy: Fixed MDIO Bus: probed
[    0.852011] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.861965] ehci-platform: EHCI generic platform driver
[    0.870665] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.880206] ohci-platform: OHCI generic platform driver
[    0.889181] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    0.902240] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    0.912511] sun6i-rtc 1c20400.rtc: RTC enabled
[    0.920358] i2c /dev entries driver
[    0.928463] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[    0.941516] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.013891] sunxi-mmc 1c0f000.mmc: base:0xc405d000 irq:23
[    1.023694] usbcore: registered new interface driver usbhid
[    1.032831] usbhid: USB HID core driver
[    1.041939] NET: Registered protocol family 17
[    1.050184] Key type dns_resolver registered
[    1.057987] Registering SWP/SWPB emulation handler
[    1.072559] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.084263] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.093657] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.108566] hub 1-0:1.0: USB hub found
[    1.116159] hub 1-0:1.0: 1 port detected
[    1.124600] using random self ethernet address
[    1.132617] using random host ethernet address
[    1.141649] usb0: HOST MAC 5a:d7:ae:2e:0b:f8
[    1.149474] usb0: MAC e6:b2:10:79:28:3f
[    1.156656] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.167447] g_cdc gadget: g_cdc ready
[    1.174687] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 02:58:39 UTC (10719)
[    1.186709] vcc3v0: disabling
[    1.193115] vcc5v0: disabling
[    1.199430] ALSA device list:
[    1.205635]   No soundcards found.
[    1.214483] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.225466] Please append a correct "root=" boot option; here are the available partitions:
[    1.237208] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.248790] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.15-licheepi-zero #1
[    1.259370] Hardware name: Allwinner sun8i Family
[    1.267484] [<c010e2fc>] (unwind_backtrace) from [<c010b098>] (show_stack+0x10/0x14)
[    1.278669] [<c010b098>] (show_stack) from [<c0336824>] (dump_stack+0x84/0x98)
[    1.289287] [<c0336824>] (dump_stack) from [<c01a6e54>] (panic+0xdc/0x248)
[    1.299491] [<c01a6e54>] (panic) from [<c09011f0>] (mount_block_root+0x188/0x260)
[    1.310335] [<c09011f0>] (mount_block_root) from [<c09013e8>] (mount_root+0x120/0x128)
[    1.321666] [<c09013e8>] (mount_root) from [<c0901540>] (prepare_namespace+0x150/0x194)
[    1.333132] [<c0901540>] (prepare_namespace) from [<c0900e40>] (kernel_init_freeable+0x1d4/0x1e4)
[    1.345573] [<c0900e40>] (kernel_init_freeable) from [<c06495f8>] (kernel_init+0x8/0x10c)
[    1.357379] [<c06495f8>] (kernel_init) from [<c0107638>] (ret_from_fork+0x14/0x3c)
[    1.368541] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

现在出现了两个问题:
这个脚本应该在那里固化?
最后我将跟文件系统的结果解压到了SD卡上,但Linux内核最后提示无法加载跟文件系统。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn