From HDebugWiki
Revision as of 20:18, 14 October 2019 by Else58 (talk | contribs) (Added pointer to updated instructions for Fedora 28 (The last ppc64 release). Fixed iso download link.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Fedora ppc64 23 Installation for t4240 e6500-based SoC based on NXP SDK v2.0 Linux kernel

See updated Fedora28ppc64 instructions

The goal is to chroot into the install rootfs of the target release (f23).


0. If current kernel is not configured with squashfs and overlay filesystem, install and boot with this kernel first.

1. Download and mount Fedora-Server-DVD and the install-rootfs it contains. (this requires kernel support of the squashfs and overlay filesystems).

2. Create and mount an overlay on the DVD-install-rootfs with fixes for ppc64 and the mntiso.repo.

3. Prepare the chroot mounts

4. chroot into the modified install-rootfs

5. use dnf into install into target partition (mounted at <chroot>/mnt/sysimage)


1. Get desired DVD:

wget http://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/23/Server/ppc64/iso/Fedora-Server-DVD-ppc64-23.iso

2. Get t4240 kernel, dtb, kernel-modules, and install-overlay from [1]:

wget http://hdebug.com/Fedora/f23/Fedora-23-ppc64-20160609.tgz

Note: this kernel is much larger than the standard SDK so more space is needed when it is uncompressed to zero.
Suggest to changing loadaddr from 1000000 to 2000000 and fdtaddr to 4000000 to fix Must RESET board to recover error.

The SDK v2.0.x Linux repository is [http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/log/?h=sdk-v2.0.x ]

3. mount dvd:

mkdir /mnt/f23dvd
mount -r Fedora-Server-DVD-ppc64-23.iso /mnt/f23dvd

4. Mount the DVD LiveOS install image rootfs from inside the squashfs install.img:

mkdir /mnt/f23/image
mkdir /mnt/f23/instro
mount -r -t squashfs /mnt/f23dvd/images/install.img /mnt/f23/image
mount -r /mnt/f23/image/LiveOS/rootfs.img /mnt/f23/instro

5. Create an overlay to add yum.repos.d/mntiso.repo file to the DVD. Note: ensure /mnt/f23 directory has sufficient space to contain overlay and stage dnf files. If not, any pick any another location.

cd /mnt/f23/
tar -zxf <PATH>f23install-overlay.tgz

mkdir $cr
mount -t overlay overlay $cr -olowerdir=/mnt/f23/instro,upperdir=overlay/overlay,workdir=overlay/work

Ready for installation

Installation steps:

1. mount the install target (the desired ext2/3/4 formatted partition for rootfs) in the install rootfs:

mount *TARGET* $cr/mnt/sysimage

2a. mount DVD and special files in install rootfs:

mount --bind /mnt/f23dvd $cr/mnt/f23dvd
mount --bind /sys $cr/sys
mount --bind /dev $cr/dev
mount --bind /dev/pts $cr/dev/pts

2b. or with a loop:

bindlist="/mnt/f23dvd /sys /dev /dev/pts"
function bindchroot { for f in $bindlist; do mount --bind $f $1/$f; done; }
bindchroot $cr

3. chroot into install rootfs:

chroot $cr
mount -t proc proc /proc

4. verify dvd is available:

dnf repolist
dnf group list

5. install server group:

dnf --installroot=/mnt/sysimage group install "Fedora Server"

6. copy the mozjs17 rpm to install later to fix the polkit signal 11:

polkitd[6747]: unhandled signal 11 at 0000000000000000 nip 00003fff849fc7f8 lr 00003fff849fc7d4 code 30001

cp /root/mozjs17* /mnt/sysimage/root

7. set root password:

chroot /mnt/sysimage

8. Upgrade the mozjs17 package:

rpm -U /root/mozjs17-17.0.0-16.fc23.ppc64.rpm

9. exit both chroot's

10. install modules into $cr/mnt/sysimage/usr/lib/modules

mkdir -p $cr/mnt/sysimage/usr/lib/modules
cd $cr/mnt/sysimage/usr/lib/modules
tar -zxf <PATH>modules-4.1.8-rt8-sdkv20-03570-gbd51baf.tgz

11. Grab and install the sdk v2.0-1703 kernel and modules from [2]


1. The SDK v2.0.x 4.1.8 kernel does not have the fixes to be compiled with gcc 6, use 4.1.35 from fsl-sdk-v2.0-1703 instead (see note 5).

2. The Kernel has SELinux enabled but it defaults to off.

3. 2016/06/09: Enabled CONFIG_FHANDLE to fix the ttyS0 systemd-serial-console issue. [3]

4. 2016/06/09: Updated kernel config to more closely match Fedora's features. [4]

5. 2018/6/11: The 4.1.35-rt41 kernel from fsl-sdk-v2.0-1703 is now available [5]

6. 2019/3/27: Added caution to ensure install/overlay directory has sufficient space. Fixes:

root@t4240qds:/# dnf --installroot=/mnt/sysimage group install "Fedora Server"
Failed to synchronize cache for repo 'mntiso' from 'file:///mnt/f23dvd': Yum repo downloading error: Downloading error(s): 
repodata/ae8d6b1c4205aca9f726dc173b9f9398ec0e47507fc4da02f3d9283823c04745-filelists.xml.gz - Download failed: Curl error (23): Failed writing received data to disk/application for file:///mnt/f23dvd/repodata/ae8d6b1c4205aca9f726dc173b9f9398ec0e47507fc4da02f3d9283823c04745- filelists.xml.gz [Failed writing body (56 != 16383)]; 

7. 2019/10/14: Added pointer to updated instructions for Fedora 28 (The last ppc64 release). Fixed iso download link.

Additional Tools

  • Memory Display for Linux md_for_linux (similar to u-boot's md)

Ed.Swarthout at hdebug.com 2016/06/09