我想使用kernel 6.5.4
图像启动 Beaglebone Black Board。所以我拿了一张 SDCard(8GB),格式化并使用以下方法将其分成 2 个分区gpartedubuntu中的应用。我已将以下启动文件复制到 SDCard 的 BOOT 分区中。
- am335x-boneblack.dtb
- 米洛
- u-boot.img
- uEnv.txt
- u图像
我能够kernel 6.5.4
毫无错误地进行构建,并且获得了 uImage 和 zImage 内核映像。但无法生成从 SDCard 启动我的主板的 rootfs。我已经使用下载了骨-debian-9.9-lxqt-armhf-2019-08-03-4gb.img.xz从
Debian 9.9 2019-08-03 4GB SD LXQT - BeagleBoard
首先将其解压为
unxz bone-debian-9.9-lxqt-armhf-2019-08-03-4gb.img
这给了我们骨-debian-9.9-lxqt-armhf-2019-08-03-4gb.img文件
右键单击并打开“Disk Image Mounter”将其安装到
主页/waageesh/rootfs
之后,我将 /home/waageesh/rootfs(从 beaglebone 黑色映像文件解压缩的 rootfs)中的所有内容复制到 /home/waageesh/ROOTFS(在 SDCard 中创建的分区,在 BBB 上启动时作为内核的 rootfs)
现在尝试从 SDCard 启动 BBB 板
从 SDCard 加载时,内核恐慌即将到来并挂起。现在我正在为相同的内核版本构建内核模块,并希望通过在 SDCard 中 rootfs 分区的 /lib/modules/6.5.4 中安装这些 .ko 模块来交叉检查 ARM 架构。
Debian GNU/Linux 9 beaglebone ttyS0
BeagleBoard.org Debian Image 2019-08-03
Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
default username:password is [debian:temppwd]
beaglebone login: debian
[ 403.045819] 8<--- cut here ---
[ 403.048935] Unable to handle kernel paging request at virtual address 2d333150 when read
[ 403.057130] [2d333150] *pgd=00000000
[ 403.060746] Internal error: Oops: 5 [#2] SMP ARM
[ 403.065390] Modules linked in: snd_soc_hdmi_codec evdev iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 snd_soc_simple_card iptable_man4
[ 403.132385] CPU: 0 PID: 50 Comm: kworker/0:17 Tainted: G D 6.5.4 #1
[ 403.140082] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 403.146210] Workqueue: 0x0 (events)
[ 403.149823] PC is at __kmem_cache_alloc_node+0xbc/0x4dc
[ 403.155093] LR is at 0xe03e9e58
[ 403.158249] pc : [<c02f08d8>] lr : [<e03e9e58>] psr: a0010013
[ 403.164543] sp : e03e9e58 ip : e03e9f28 fp : 0000cc52
[ 403.169791] r10: 00000000 r9 : c1005694 r8 : 00000cc0
[ 403.175038] r7 : c1134598 r6 : 2d333130 r5 : 00000000 r4 : c1801100
[ 403.181595] r3 : 00000020 r2 : df93bb38 r1 : 0000cc51 r0 : 1e9b4000
[ 403.188153] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 403.195324] Control: 10c5387d Table: 82ebc019 DAC: 00000051
[ 403.201093] Register r0 information: non-paged memory
[ 403.206175] Register r1 information: non-paged memory
[ 403.211252] Register r2 information: non-slab/vmalloc memory
[ 403.216944] Register r3 information: non-paged memory
[ 403.222021] Register r4 information: slab kmem_cache start c1801100 pointer offset 0 size 124
[ 403.230614] Register r5 information: NULL pointer
[ 403.235343] Register r6 information: non-paged memory
[ 403.240420] Register r7 information: non-slab/vmalloc memory
[ 403.246109] Register r8 information: non-paged memory
[ 403.251185] Register r9 information: non-slab/vmalloc memory
[ 403.256872] Register r10 information: NULL pointer
[ 403.261687] Register r11 information: non-paged memory
[ 403.266851] Register r12 information: 2-page vmalloc region starting at 0xe03e8000 allocated at kernel_clone+0xa4/0x3ac
[ 403.277713] Process kworker/0:17 (pid: 50, stack limit = 0x2dc970a1)
[ 403.284101] Stack: (0xe03e9e58 to 0xe03ea000)
[ 403.288480] 9e40: ffffffff 00000000
[ 403.296697] 9e60: 00000000 00000cc0 00000020 ffffffff 00000000 df938800 00000000 00000020
[ 403.304914] 9e80: c015b888 c1801100 00000cc0 00000000 00000000 c02a7e88 c015b888 ffff0a00
[ 403.313131] 9ea0: 00000dc0 c0d73fdb ffffff04 df938800 00000000 c2f1c780 c0d73fe8 c0156bd0
[ 403.321348] 9ec0: c1003d40 00000000 00000000 c015b888 00000000 00000000 e03e9ed8 e03e9ed8
[ 403.329565] 9ee0: ffff0a00 6c427dcb df938800 c2f1c780 00000000 df938988 c1fd0000 df938820
[ 403.337781] 9f00: df93885c c015b9d4 e03e9f28 c0aee730 e03e9f28 6c427dcb df93885c df938800
[ 403.345998] 9f20: c01539f8 c0d73fe8 e03e9f34 c0d7f5c8 00002843 00303a30 00000000 00000000
[ 403.354214] 9f40: 00000000 6c427dcb df938800 c1ff4b80 df938800 df938820 df938800 c0156ee4
[ 403.362432] 9f60: c1ff4b80 00000000 e03e5ed0 c1ff5a40 c1ff5dc0 c0156bd0 c1ff4b80 c1fd0000
[ 403.370649] 9f80: e03e5ed0 00000000 00000000 c015d3e8 c1ff5a40 c015d310 00000000 00000000
[ 403.378865] 9fa0: 00000000 00000000 00000000 c0100174 00000000 00000000 00000000 00000000
[ 403.387082] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 403.395298] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 403.403520] __kmem_cache_alloc_node from kmalloc_trace+0x28/0xb4
[ 403.409668] kmalloc_trace from __kthread_create_on_node+0x54/0x170
[ 403.415995] __kthread_create_on_node from kthread_create_on_node+0x30/0x60
[ 403.423008] kthread_create_on_node from create_worker+0xb8/0x254
[ 403.429144] create_worker from worker_thread+0x314/0x504
[ 403.434578] worker_thread from kthread+0xd8/0xf8
[ 403.439315] kthread from ret_from_fork+0x14/0x20
[ 403.444048] Exception stack(0xe03e9fb0 to 0xe03e9ff8)
[ 403.449125] 9fa0: 00000000 00000000 00000000 00000000
[ 403.457341] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 403.465556] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 403.472207] Code: e3560000 13530000 0a0000b2 e594301c (e796c003)
[ 403.478435] ---[ end trace 0000000000000000 ]---
uImage(内核 6.5.4) + rootfs(4.14.108-ti-r113) -> 内核未加载
uImage(内核 6.5.4) + rootfs(4.19.94-ti-r42) -> 内核加载,但因错误而崩溃无法将 SDCard 更改为高速模式&挂起内核恐慌错误
我的疑问是...我们是否必须根据内核版本构建 rootfs 或者我们可以使用任何 rootfs 进行内核引导? (如上所述,这对我不起作用)
再次尝试与buildroot-2021.02.1生成与 linux 兼容的 rootfs kernel 6.5.4
。
我尝试使用 buildroot 构建具有相同版本的 rootfs + 内核,但最终再次出现以下错误
>>> Executing post-image script support/scripts/genimage.sh
board/beaglebone/genimage.cfg:30: no sub-section title/index for 'config'
INFO: cmd: "mkdir -p "/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/build/genimage.tmp"" (stderr):
INFO: cmd: "rm -rf "/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/build/genimage.tmp"/*" (stderr):
INFO: cmd: "mkdir -p "/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/build/genimage.tmp"" (stderr):
INFO: cmd: "cp -a "/tmp/tmp.BK4lPFymRs" "/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/build/genimage.tmp/root"" (stderr):
INFO: cmd: "find '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r '/tmp/tmp.BK4lPFymRs/{}' '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/build/genimage.tmp/root/{}'" (stderr):
INFO: cmd: "mkdir -p "/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images"" (stderr):
INFO: vfat(boot.vfat): cmd: "dd if=/dev/zero of="/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/boot.vfat" seek=16777216 count=0 bs=1 2>/dev/null" (stderr):
INFO: vfat(boot.vfat): cmd: "mkdosfs '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/boot.vfat'" (stderr):
INFO: vfat(boot.vfat): adding file 'MLO' as 'MLO' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/boot.vfat' '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/MLO' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'u-boot.img' as 'u-boot.img' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/boot.vfat' '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/u-boot.img' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'zImage' as 'zImage' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/boot.vfat' '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/zImage' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'uEnv.txt' as 'uEnv.txt' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/boot.vfat' '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/uEnv.txt' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'am335x-boneblack.dtb' as 'am335x-boneblack.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/boot.vfat' '/home/waageesh/embedded/ELARM/EOS/buildroot-2021.02.1/output/images/am335x-boneblack.dtb' '::'" (stderr):
INFO: hdimage(sdcard.img): adding partition 'u-boot' (in MBR) from 'boot.vfat' ...
INFO: hdimage(sdcard.img): adding partition 'rootfs' (in MBR) from 'rootfs.ext4' ...
INFO: hdimage(sdcard.img): writing MBR
所以,我陷入困境和困惑。
我只想构建所需特定版本的任何内核,并且应该能够从该自定义内核生成 rootfs。
我到底缺少什么以及为我们想要的任何内核版本构建 rootfs 的正确方法是什么?