Fedora porting on imx8 platform

Hi,

We are porting fedora-iot 33 on aarch64 (imx8 platform). We have downloaded raw image Fedora-IoT-33-20201215.0.aarch64.raw from this link Download Fedora IoT.

We have tried two different approaches.

Approach 1: Mainline Kernel and Fedora Kernel

Extract the RAW file and fetch the file system. Copy rootfs and OStree to SDcard. Detailed steps mentioned in the attached approach1.txt file.

we are using upstream/fedora kernel in this approach .Following the link, Building a Custom Kernel :: Fedora Docs

Exploded git :
git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git
Vanilla Kernel :
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

As Kernel mainline support available for Thor96 board. We are trying to configure the kernel defconfig (attached for reference - fedora_thor96_defconfig)

Try to install package using “rpm-ostree install ”. Observed the error :

[root@localhost ~]# rpm-ostree status
** State: idle**
** Deployments:**
** * ostree://fedora-iot:fedora/stable/aarch64/iot**
** Version: 33.20201215.0 (2020-12-15T11:17:41Z)**
** Commit: 23010389d9eb42baedcd764a2aca8afa2a5958e61477359526a3ea998f0c4d2d**
** GPGSignature: Valid signature by 963A2BEB02009608FE67EA4249FD77499570FF31**

[root@localhost ~]# rpm-ostree update
��⠁ Receiving objects: 99% (8730/8738) 492.7� kB/s 238.0� MB
Receiving objects: 99% (8730/8738) 492.7� kB/s 238.0� MB… done
Staging deployment… done
error: Child process exited with code 1

Approach 2:Fedora-IoT-33-20201215.0.aarch64.raw + Uboot and Kernel update

Below steps following (Architectures/ARM/F20/Installation - Fedora Project Wiki)

  1. xzcat Fedora-IoT-33-20201215.0.aarch64.raw | sudo dd of=/dev/
  2. sudo dd if=/home/einfochips/Downloads/fedora/uboot.bin of=/dev/mmcblk0 bs=1024 seek=33 conv=fsync; sync
  3. Copy upstream kernel (git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git) to image “/ostree/fedora-iot-5664fcf7ba61ad3632b58faf71ec0965c413be4b6a63754015d1cba5b09079db/Image” path.

Note: Tried with vmlinuz-5.9.13-200.fc33.aarch64, due to compressed image - Bad Linux ARM64 Image magic! Error observed.

  1. Command line argument update

setenv mmcpart 2;
setenv image /ostree/fedora-iot-5664fcf7ba61ad3632b58faf71ec0965c413be4b6a63754015d1cba5b09079db/Image;
setenv initramfsfile /ostree/fedora-iot-5664fcf7ba61ad3632b58faf71ec0965c413be4b6a63754015d1cba5b09079db/initramfs-5.9.13-200.fc33.aarch64.img;
setenv loadimage “ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}”
setenv fdt_file /ostree/fedora-iot-5664fcf7ba61ad3632b58faf71ec0965c413be4b6a63754015d1cba5b09079db/dtb/freescale/imx8mq-thor96.dtb;
setenv loadfdt “ext4load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file};”
setenv loadinitrd “ext4load mmc ${mmcdev}:${mmcpart} ${initrd_addr} ${initramfsfile}”;
setenv mmcboot “echo Booting from mmc …; run loadinitrd ; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else echo wait for boot; fi;”
setenv mmcroot /dev/mmcblk0p3 init=/ostree/deploy/fedora-iot/deploy/23010389d9eb42baedcd764a2aca8afa2a5958e61477359526a3ea998f0c4d2d.0/usr/lib/ostree/ostree-prepare-root rootwait rw

  1. Error while loading initfs: (refer attached complete booting_log_approach2.log)

[ 3.196215] Kernel panic - not syncing: Requested init /ostree/deploy/fedora-iot/deploy/23010389d9eb42baedcd764a2aca8afa2a5958e61477359526a3ea998f0c4d2d.0/usr/lib/ostree/ostree-prepare-root failed (error -2).