Fedora 36 Rockpi 4b

Hi! I’ve created a Fedora 36 eMMC image for Rockpi 4b. How do I share the image with the community? Is anyone interested?

1 Like

Hi! Mega may be a good choice.

https://mega.nz/file/jQxTHRQa#dmN2zNFDSBVlkgm855ElfFoE95ncZiyuF0JUIEeoGe4

1 Like

Refer to https://wiki.radxa.com/Rockpi4/dev/usb-install for instructions of installing to onboard eMMC.
To reiterate:
Use USB Male A to Male A cable to connect Rockpi OTG port to your pc.
Press the middle button, then power on and unpress the button
Download the image with the above link
sudo dnf install -y rkdeveloptool
wget “https://dl.radxa.com/rockpi/images/loader/rk3399_loader_v1.20.119.bin
xz -d rockpi-4b-fedora-minimal-36-1.5-aarch64-gpt.img.xz
sudo rkdeveloptool ld #confirm the output contains “Maskrom”
sudo rkdeveloptool db rk3399_loader_v1.20.119.bin
sleep 1
sudo rkdeveloptool wl 0 rockpi-4b-fedora-minimal-36-1.5-aarch64-gpt.img
sudo rkdeveloptool rd
After booting, you may want to grow the root partition to the whole device with fdisk and resize2fs.
Also note it’s a minimal version of fedora. You may want to switch to the desired edition with dnf group install "Fedora Server Edition", dnf group install "Fedora Workstation", etc.

1 Like

Tips to recreate the image (for advanced users only):

  1. Download the official fedora aarch64 image. It has a DOS partition table. We will use its partitions but in a GPT partition table. Will refer to the file as fedora.img
  2. Download an official rockpi os GPT image. Will refer to this file as rockpi.img
  3. dnf install uboot-images-armv8
  4. Use partx -v -a rockpi.img to mount the last partition of rockpi.img (/dev/loop0p5), then copy and save all the usr/lib/firmware/brcm/*4345* files somewhere. Then umount and run losetup -d /dev/loop0.
  5. Use fdisk fedora.img to lookup the partitions in fedora.img.
  6. Use fdisk rockpi.img to delete all partitions except the first two. Then create new partitions with the same size (in blocks) as in fedora.img. Add more bytes to the end of rockpi.img if needed.
  7. Use partx -v -a rockpi.img and partx -v -a fedora.img to get the loop partition devices. Copy all the fedora.img partitions (starting from partition 1) to corresponding rockpi.img partitions (starting from partition 3) with dd.
  8. Mount the last partition on rockpi.img again and restore the usr/lib/firmware/brcm/*4345* files from step 4.
  9. sudo dd if=/usr/share/uboot/rock-pi-4-rk3399/idbloader.img of=/dev/loop0p1 && sudo dd if=/usr/share/uboot/rock-pi-4-rk3399/u-boot.itb of=/dev/loop0p2
  10. umount /dev/loop0* /dev/loop1* and losetup -d /dev/loop0 /dev/loop1. You are done. The rockpi.img is your image. You can delete the other files now.

For troubleshooting use serial console on UART2.

1 Like

Can u show us some images and give some feedback?

https://mega.nz/file/jQxTHRQa#dmN2zNFDSBVlkgm855ElfFoE95ncZiyuF0JUIEeoGe4

This is the image.
Wifi works, USB works, SATA works, kernel update works, performance is good, the rest I didn’t check. For my use case (headless backup server) it’s just perfect.

Awesome I shared it on discord

1 Like

Awesome! I was trying to install it myself but I failed, now i will try Your image :slight_smile: I have penta sata hat to i will report if it works :slight_smile:

@Denis.Shulyaka can you please share default login password? :slight_smile:

can you please share default login password?

There is none. There is a setup wizard on the first boot to create it.

Hi Denis!
I am using your Fedora 36 .img on Rock 4 Plus, it is working fine, thank you!
I managed to upgrade to Fedora 38 from within OS with dnf, but further upgrade to Fedora 40 fails.
Any .iso images from Fedora site do not work after USB OTG port install on eMMC and I cannot upgrade further than F38.
Your tip for creating gpt.img is too complex for my modest skill. Could you spare some time to compile gpt.img for the latest Fedora 42 version?

Hi! You can still upgrade from within the OS itself, but you have to keep the 6.4.12-200.fc38.aarch64 kernel, because later kernels have a bug, see https://bugzilla.redhat.com/show_bug.cgi?id=2298659

Thanks for the valuable info! I spent a lot of time bumping my head against the wall.

But there is a strange problem. A couple of years ago, after a trip to China, I acquired a few Rock4+ and installed F36, then upgraded successfully to F38 build 6.3.12-200.fc38.aarch64 and then to the latest 6.4.4-200.fc38.aarch64. Now I destroyed this installation attempting F40 upgrades, but cannot reproduce the excercise.
F36 is installed OK, but version upgrade to 6.3 kernel (Fedora update repo is excluded) does not start. Even dnf upgrade --refresh, which updates F36 to 6.2 kernel, stones the Rock SBC.
Moreover, my serial-USB adapter, which worked correctly in Putty, now is showing scrambled symbols with all available character sets in Window-Translation (UTF-8, ISO, WIN).
Do you have any tip how to restore serial console to get an idea what is wrong with the upgrades?

About UART characters, check your baud rate. About other things I have nothing to advise at the moment, other than keeping backups before destroying an installation, sorry.

UART is working properly now on another USB port.
Can I provide you with some boot logs after update attempt for advice?

Last upgrade attempt, which again ended in stoned SBC, was to update just the kernel to the latest F36 version 6.2.12. Serial data flow stopped at:
Booting "Fedora Linux … " 36

I made a 32GB image of the once successful upgrade to F38 with dd command to NVMe disk, then copied it to PC. But now SBC is asking for repair when I load it . . .