FedoraPPC

From MediaWiki
Revision as of 22:54, 9 July 2018 by Else58 (Talk | contribs) (Details)

(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

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)


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 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:

cd /mnt/f23/
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

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

Notes

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. [2]

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

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

Additional Tools

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



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