HOW-TO install Fedora Linux for any Khadas SBC

HOW-TO install Fedora Linux for any Khadas SBC

About Fedora Linux

Fedora is a Linux distribution developed by the community-supported Fedora Project which is sponsored primarily by Red Hat, a subsidiary of IBM, with additional support from other companies. Fedora (operating system) - Wikipedia

Start Krescue from SD

NOTE: need to update Krescue to latest version !!! works only for latest FROM: Mon Sep 6 08:21:43 2021

Preparation

  • your SBC must connected to internet via ethernet or Wi-Fi
  • ethernet will auto-connect if a LAN cable is plugged in before boot-up

Wi-Fi Configuration

If you’re currently in a console / shell, just type krescue or exit to return to Krescue’s main menu

  • krescue main menu → network → wifi → connect /select

Install Fedora Linux into eMMC from Shell

Going into Krescue shell.

  • krescue main menu → shell

One-line shell script installation method

Just copy-paste the line below into krescue shell

server edition

  • curl -jkL https://raw.githubusercontent.com/khadas/krescue-scripts/master/scripts/install/Fedora-Linux-install.sh | sh -s -

Workstation edition

  • curl -jkL https://raw.githubusercontent.com/khadas/krescue-scripts/master/scripts/install/Fedora-Linux-install.sh | TYPE=Workstation sh -s -

ENJOY :wink:

PS: works as is without any modification !!!

PROBLEMS

  • display 4k not usable plz use FullHD
  • ethernet bug can solved with sudo rmmod dwmac_generic && sudo modprobe dwmac_generic
  • default kernel old have many bugs
  • need update sudo dnf update
  • need manual update dtb for UEFI boot
sudo cp -av /boot/dtb/rockchip /boot/efi/dtb
sudo cp -av /boot/dtb/amlogic  /boot/efi/dtb
  • VIM3 VIM3L sound card missed some kernel modules - onboard audio not usable
# CONFIG_COMMON_CLK_AXG_AUDIO is not set

Links

2 Likes

script is working, fedora working flawlessly!


thank you so much @hyphop !

2 Likes

Hi @Electr1 ,

Can you please share if audio, video, wifi, bt and all common stuff is working properly?

What are the things you experienced which are not working… hyphop has mentioned audio… but did you find any fix/workaround?

and what is uefi boot? is it different from normal linux manjaro boot on vim3? i dont understand this point…

Also can you please confirm the steps to get it working on a blank(erased) emmc…

  • boot sdcard having latest krescure
  • update uboot to latest vim3 mainline uboot
  • run the command script for fedore in krescure while connected to wifi
  • reboot and remove sdcard…

will it now boot to a working desktop or any other steps i missed above?

thanks for support, it is much appreciated.

soc audio : lost
video : ok
wifi: ok
bt: not checked

What are the things you experienced which are not working… hyphop has mentioned audio… but did you find any fix/workaround?

need to rebuild kernel - i have submit this issue to fedora bug report may be later will be fixed

and what is uefi boot? is it different from normal linux manjaro boot on vim3? i dont understand this point…

what is normal ? :wink:
fedora like many other distros use EFI boot by default

Also can you please confirm the steps to get it working on a blank(erased) emmc…

its was written before

1 Like

Thanks for confirmation.
This is great work from you, I can safely say that Khadas boards have the best software support compared to all SBCs out there.
Krescue is a life saver. Thanks again.

I haven’t test it out much yet, I’m working on other things atm,
my findings however show that the gnome40 is slightly taxing the system, ram usage is around 1.1GB when idle. audio not tested, but @hyphop has listed many of the missing things, I will try to rebuild kernel manually and try it again :slightly_smiling_face:

@hyphop where can I get the defconfig file for mainline VIM3 kernel ?

for example from fenix

2 Likes

@hyphop I didn’t find that kernel module and couldn’t add it when building manually, also the server script seems to have some issues:

root@Krescue:/# curl -jkL https://raw.githubusercontent.com/khadas/krescue-scripts/master/scripts/
install/Fedora-Linux-install.sh | sh -s -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3923  100  3923    0     0   8795      0 --:--:-- --:--:-- --:--:--  9165
ArchLinux installation for Khadas VIM3 ... > /dev/mmcblk1
check network connection...
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_req=1 ttl=59 time=6.32 ms

--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 6.324/6.324/6.324/0.000 ms
[i] fast opkg install https://github.com/khadas/khadas-linux-kernel/releases/download/5.14-rc5/kernel-modules-fs.ipk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   629  100   629    0     0   1419      0 --:--:-- --:--:-- --:--:--  1459
100 1116k  100 1116k    0     0   813k      0  0:00:01  0:00:01 --:--:-- 2061k
Installing kernel-modules-fs (0.0.0) to root...
Configuring kernel-modules-fs.
download and extract https://download.fedoraproject.org/pub/fedora/linux/releases/34/Server/aarch64/images/Fedora-Server-34-1.2.aarch64.raw.xz
pixz: image Fedora-Server-34-1.2.aarch64.raw.xz > /dev/mmcblk1
can not seek in input: Invalid seek
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  788M  100  788M    0     0   772k      0  0:17:24  0:17:24 --:--:--  570k
wait...
label: dos
label-id: 0xd17792e4
device: /dev/mmcblk1
unit: sectors

/dev/mmcblk1p1 : start=        2048, size=     1228800, type=6, bootable
/dev/mmcblk1p2 : start=     1230848, size=     2097152, type=83
/dev/mmcblk1p3 : start=     3328000, size=    11352064, type=8e
partition: none, disk: /dev/mmcblk1, lower: 0, upper: 0
/dev/mmcblk1: partition table type 'dos' detected
/dev/mmcblk1: partition #1 added
/dev/mmcblk1: partition #2 resized
/dev/mmcblk1: partition #3 added
/dev/mmcblk1p1: UUID="8171-1D60" TYPE="vfat" PARTUUID="d17792e4-01"
/dev/mmcblk1p2: UUID="8994f34c-2c8d-4ab6-a61a-aa1ef8338d07" TYPE="xfs" PARTUUID="d17792e4-02"
/dev/mmcblk1p3: UUID="G27dL3-f2Cn-Wup4-Au99-x2fS-MYYV-HFvhnt" TYPE="LVM2_member" PARTUUID="d17792e4-03"
/dev/sda1: SEC_TYPE="msdos" LABEL_FATBOOT="rescue" LABEL="rescue" UUID="DEAD-BEEF" TYPE="vfat" PARTUUID="20bfde93-01"
/dev/sda2: LABEL="dumps" UUID="6F5A-7D16" TYPE="exfat" PTTYPE="dos" PARTUUID="20bfde93-02"
cp: can't create directory '3/root/lib/firmware': No such file or directory

tnx ! i will improve this script later

Any plans to fix to allow 4K displays?

its was allowed but i think 4K still not much usable (slow frame rate)

FIXED

  1. update krescue to last version
  2. curl -jkL https://raw.githubusercontent.com/khadas/krescue-scripts/master/scripts/ install/Fedora-Linux-install.sh | sh -s -

Changes:

  • splash logo added
  • wifi fw blobs added
Fedora 34 (Server Edition)
Kernel 5.11.12-300.fc34.aarch64 on an aarch64 (ttyAML0)

Web console: https://fedora:9090/ or https://192.168.11.151:9090/

fedora login: root
Password: 
[root@fedora ~]# 

2 Likes