Fedora 是知名的
linux操作系统,是由全球社区爱好者构建的面向日常应用的快速、稳定、强大的操作系统。
目前在D1哪吒
开发板上已经支持了Fedora系统。
在哪吒上启动Fedora的最简说明
预编译的镜像文件
我们已经为您准备好一个可以在
全志 D1上直接运行的预编译Fedora镜像文件: Fedora-riscv64-d1-developer-xfce-with-esp-
rawhide-latest-sda.raw.zst
您只需要做以下操作:
解压镜像文件
unzstd Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide-latest-sda.raw.zst
写入一个TF卡 (必须大于或等于16GB)
sudo wipefs -a /dev/sdX
sudo dd if=Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide-latest-sda.raw of=/dev/sdX status=progress bs=4M
请在烧录前一定要使用wipefs清理备份的
gpt分区表,否则会出现这种问题:Architectures/RISC-V/
Allwinner/zh-cn#
内核无法访挂载
rootfs
对于dd命令,有一个
GUI工具:balena-
ETCher-electron,简单好用,但wipefs依然是必须在之前执行,切记!
插入TF卡并上电
默认是在
LCD (竖屏)上显示:
(可选) 转换到
HDMI显示器上 (仅支持 1080p 模式竖屏)
cd /sys/
kernel/debug/dispdbg
echo disp0 > name; echo switch1 > command; echo 4 10 0 0 0x4 0x101 0 0 0 8 > param; echo 1 >
start;
可能出现的问题
内核无法访挂载ROOTFS
如果你出现以下启动失败的问题:
[ 9.015501] md: Waiting for all
devices to be available before autodetect
[ 9.039910] md: If you don't use raid, use raid=noautodetect
[ 9.064235] md: Autodetecting RAID arrays.
[ 9.085291] md: autorun ...
[ 9.104713] md: ... autorun DONE.
[ 9.126379] List of all partitions:
[ 9.146691] b300 15558144 mmcblk0
[ 9.146697]
driver: mmcblk
[ 9.186490] b301 1048576 mmcblk0p1 1676bb7b-c349-4f5b-a48a-0f77d0cb680b
[ 9.186495]
[ 9.228663] b302 32 mmcblk0p2 de35d1f7-9081-4f33-8952-3bc51a4b10c6
[ 9.228668]
[ 9.270932] b303 16384 mmcblk0p3 47aae416-9ac3-47dc-a4f4-8023251eaefc
[ 9.270937]
[ 9.313210] b304 14491119 mmcblk0p4 b93e5544-034f-41b7-b64d-1d7c2a5cfe58
[ 9.313214]
[ 9.355206] No filesystem could mount root, tried:
[ 9.355212] ext4
[ 9.376478]
[ 9.411420] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,4)
[ 9.436391]
CPU: 0 PID: 1 Comm: sw
APPer Not tainted 5.4.61 #3
[ 9.458151]
call Trace:
[ 9.475929] [<ffffffe0000d6598>] walk_stackframe+0x0/0xc4
[ 9.496999] [<ffffffe0000d6838>] show_stack+0x3c/0x46
[ 9.517441] [<ffffffe000bb19f6>] dump_stack+0x24/0x2c
[ 9.537749] [<ffffffe0000e1f0a>] panic+0x100/0x32a
[ 9.557557] [<ffffffe000001522>] 0xffffffe000001522
[ 9.577224] [<ffffffe0000015e2>] 0xffffffe0000015e2
[ 9.596711] [<ffffffe00000173c>] 0xffffffe00000173c
[ 9.616044] [<ffffffe00000105e>] 0xffffffe00000105e
[ 9.635113] [<ffffffe000bc6e5a>] kernel_init+0x1c/0x100
[ 9.654494] [<ffffffe0000d4838>] ret_from_exception+0x0/0xc
[ 9.674194] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,4) ]---
说明您使用的
sd卡存在GPT分区表残留,导致内核不知道如何找到rootfs。(似乎您忘记了在烧写前使用wipefs清理GPT备份分区表) 解决的办法如下:
将出问题的SD卡插入PC,通过gdisk清除残余的分区表,过程如下:
$ sudo gdisk /dev/sdf
GPT fdisk (gdisk)
version 1.0.5
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Warning: Invalid CRC on main header data; loaded backup partition table.
Warning! Main and backup partition tables differ! Use the 'c' and 'e'
options
on the recovery & transformation menu to examine the two tables.
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!
Warning! One or more CRCs don't match. You should repair the disk!
Main header: ERROR
Backup header: OK
Main partition table: ERROR
Backup partition table: OK
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: damaged
Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
1 - MBR
2 - GPT
3 - Create blank GPT
Your answer: 1
Command (? for help): p
Disk /dev/sdf: 62333952 sectors, 29.7 GiB
Model: Multi-Reader -3
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 632BFA1B-F09D-42A8-82F4-5FAB32E41DC2
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 62333918
Partitions will be aligned on 2048-sector boundaries
Total free space is 37084093 sectors (17.7 GiB)
Number Start (sector) End (sector) Size Code Name
2 69632 319487 122.0 MiB 0700 Microsoft b
ASIC data
3 319488 1320959 489.0 MiB 8300 Linux filesystem
4 1320960 25319423 11.4 GiB 8300 Linux filesystem
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdf.
Warning: The kernel is still using the old partition table.
The new table will be u
SED at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
如果此过程中导致您的 boot0_sdcard_sun20iw1p1.bin 或者 boot_package.fex 受损,请通过以下预编译固件修复
......
更多详细内容请下载附件查看
Fedora支持.docx
(808.95 KB, 下载次数: 2)