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

install fedora via online scripts - more easy now

Krescue - online scripts - (beta testing)

Krescue - online scripts - Fedora 35 available

2 Likes

Fedora Improve bugs and other problems

Anyone who have problems with fedora plz submit all issues to bug-report https://bugzilla.redhat.com/ its very easy to improve your favorite distro by yourself

Examples

1 Like

FEDORA-2021-fdef34e26f has been pushed to the Fedora 35 testing repository.

Soon you’ll be able to install the update with the following command:
sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-fdef34e26f
You can provide feedback for this update here:

FEDORA-2021-7de33b7016 has been pushed to the Fedora 34 testing repository.

Soon you’ll be able to install the update with the following command:
sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-7de33b7016
You can provide feedback for this update here:

Last metadata expiration check: 0:07:01 ago on Thu 11 Nov 2021 12:00:42 AM EST.
Dependencies resolved.
================================================================================
 Package            Arch        Version               Repository           Size
================================================================================
Installing:
 kernel             aarch64     5.14.17-301.fc35      updates-testing      66 k
Installing dependencies:
 kernel-core        aarch64     5.14.17-301.fc35      updates-testing      39 M
 kernel-modules     aarch64     5.14.17-301.fc35      updates-testing      27 M

Transaction Summary
================================================================================
Install  3 Packages

Total download size: 66 M
Installed size: 137 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): kernel-5.14.17-301.fc35.aarch64.rpm       29 kB/s |  66 kB     00:02    
(2/3): kernel-modules-5.14.17-301.fc35.aarch64. 1.7 MB/s |  27 MB     00:15    
(3/3): kernel-core-5.14.17-301.fc35.aarch64.rpm 2.0 MB/s |  39 MB     00:19    
--------------------------------------------------------------------------------
Total                                           3.1 MB/s |  66 MB     00:21     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : kernel-core-5.14.17-301.fc35.aarch64                   1/3 
  Running scriptlet: kernel-core-5.14.17-301.fc35.aarch64                   1/3 
  Installing       : kernel-modules-5.14.17-301.fc35.aarch64                2/3 
  Running scriptlet: kernel-modules-5.14.17-301.fc35.aarch64                2/3 
  Installing       : kernel-5.14.17-301.fc35.aarch64                        3/3 
  Running scriptlet: kernel-core-5.14.17-301.fc35.aarch64                   3/3 

  Running scriptlet: kernel-5.14.17-301.fc35.aarch64                        3/3 
  Verifying        : kernel-5.14.17-301.fc35.aarch64                        1/3 
  Verifying        : kernel-core-5.14.17-301.fc35.aarch64                   2/3 
  Verifying        : kernel-modules-5.14.17-301.fc35.aarch64                3/3 

Installed:
  kernel-5.14.17-301.fc35.aarch64          kernel-core-5.14.17-301.fc35.aarch64 
  kernel-modules-5.14.17-301.fc35.aarch64 

Complete!

reboot

check new situation

[hyphop@fedora ~]$ cat /proc/asound/cards 
 0 [hdmisound      ]: simple-card - hdmi-sound
                      khadas-Edge-

HDMI sound already works - OK

2 Likes

That’s great news, thanks @hyphop

1 Like

@hyphop can we get these scripts to make images with legacy kernel ?

if u talking about vendor kernel from amlogic which used same in fenix ! maybe but not at this time …

1 Like

@hyphop
If i install Fedora using online script, and perform sudo dnf update, HDMI audio will work normally or do i still need to enable testing repos and upgrade the FEDORA-2021-7de33b7016/ FEDORA-2021-fdef34e26f

u can check but i think must be on next release

1 Like