FedoraPPC

From MediaWiki
Revision as of 02:27, 8 June 2016 by Else58 (Talk | contribs) (Fedora 23 install on NXP t4240)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

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


Overview

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)


Details

1. Get desired DVD:

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

2. Get t4240 kernel, dtb, kernel-modules, and install-overlay:

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

For details see: [1]

2. mount dvd:

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

3. 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

4. Create an overlay to add yum.repos.d/mntiso.repo file to the DVD:

cd /mnt
tar -zxf <PATH>f23install-overlay.tgz
cr=/mnt/f23/install
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 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 mozjs17* /mnt/sysimage/root

7. set root password:

chroot /mnt/sysimage
passwd

8. Either install or upgrade the mozjs17 package:

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

9. exit both chroot's

10. install modules into $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


Notes

1. The SDK v2.0.x Linux kernel does not have the upstream fixes to be compiled with gcc 6

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


Ed.Swarthout@hdebug.com 2016/06/08