电子说
AMD Xilinx K26 Ubuntu
AMD Xilinx K26支持Ubuntu。从ubuntu amd-xilinx下载映像后,把image烧入到TF卡,可以正常启动Ubuntu。
AMD Xilinx K26 从eMMC启动Ubuntu失败
有客户将image中的文件,复制到K26 eMMC,不能启动Ubuntu, Linux报告找不到根文件系统。
AMD Xilinx K26 Ubuntu 文件系统配置
ubuntu使用fstab加载文件系统。fstab的内容如下:
hankf@XSZGS4:ubuntu_rootfs$ cat ./etc/fstab
LABEL=writable / ext4 discard,errors=remount-ro 0 1
LABEL=system-boot /boot/firmware vfat defaults 0 1
可以看到, fstab中使用了LABEL,因此要设置K26 eMMC的分区的LABEL。
设置K26 eMMC的分区的LABEL
使用fatlabel能设置FAT分区的LABEL。使用e2label能设置ext4分区的LABEL。
root@kria:/home/ubuntu# e2label /dev/mmcblk0p2 writable
root@kria:/home/ubuntu# e2label /dev/mmcblk0p2
writable
root@kria:/home/ubuntu# fatlabel /dev/mmcblk0p1 system-boot
fatlabel: warning - lowercase labels might not work properly on some systems
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
65:01/00
Not automatically fixing this.
root@kria:/home/ubuntu# e2label /dev/mmcblk0p1
e2label: Bad magic number in super-block while trying to open /dev/mmcblk0p1
/dev/mmcblk0p1 contains a vfat file system labelled 'system-boot'
AMD Xilinx K26 从eMMC启动Ubuntu
设置K26 eMMC的分区的LABEL后,再次启动,能够正常启动。简化后的启动信息如下:
U-Boot 2022.01 (Apr 04 2022 - 07:53:54 +0000)
MMC: mmc@ff160000: 0, mmc@ff170000: 1
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr.uimg
[ 5.306816] mmcblk0: mmc0:0001 S0J56X 14.8 GiB
[ 5.316453] mmcblk0: p1 p2
[ 5.319951] mmcblk0boot0: mmc0:0001 S0J56X 31.5 MiB
[ 5.326406] mmcblk0boot1: mmc0:0001 S0J56X 31.5 MiB
[ 5.332637] mmcblk0rpmb: mmc0:0001 S0J56X 4.00 MiB, chardev (508:0)
[ 9.711829] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 12.276435] EXT4-fs (mmcblk0p2): re-mounted. Opts: discard,errors=remount-ro. Quota mode: none.
root@kria:/home/ubuntu# df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 391M 3.7M 387M 1% /run
/dev/mmcblk0p2 11G 4.6G 5.5G 46% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 4.0G 348M 3.7G 9% /boot/firmware
tmpfs 391M 72K 391M 1% /run/user/132
tmpfs 391M 64K 391M 1% /run/user/1000
root@kria:/home/ubuntu# dosfslabel /dev/mmcblk0p1
system-boot
root@kria:/home/ubuntu# e2label /dev/mmcblk0p2
writable
审核编辑:汤梓红
全部0条评论
快来发表一下你的评论吧 !