Difference between revisions of "FedoraPPC"

From HDebugWiki
Jump to navigation Jump to search
m
(12 intermediate revisions by the same user not shown)
Line 23: Line 23:
1. Get desired DVD:
1. Get desired DVD:


wget http://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/ppc64/iso/Fedora-Server-DVD-ppc64-23.iso
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:
2. Get t4240 kernel, dtb, kernel-modules, and install-overlay from [http://hdebug.com/Fedora/f23/index.html]:


wget http://hdebug.com/Fedora/f23/Fedora-23-ppc64-20160609.tgz
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.<br>
Suggest to changing loadaddr from 1000000 to 2000000 and fdtaddr to 4000000 to fix [[Must RESET board to recover]] error.


See [http://hdebug.com/Fedora/f23/index.html] for detail.


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


2. mount dvd:
3. mount dvd:


mkdir /mnt/f23dvd<br>
mkdir /mnt/f23dvd<br>
mount -r Fedora-Server-DVD-ppc64-23.iso /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:
4. Mount the DVD LiveOS install image rootfs from inside the squashfs install.img:


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


4. Create an overlay to add yum.repos.d/mntiso.repo file to the DVD:
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<br>
cd /mnt/f23/<br>
tar -zxf <PATH>f23install-overlay.tgz
tar -zxf <PATH>f23install-overlay.tgz
<br>
<br>
cr=/mnt/f23/install<br>
cr=/mnt/f23/install<br>
mkdir $cr<br>
mkdir $cr<br>


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


== Ready for installation ==
== Ready for installation ==
Line 61: Line 63:
Installation steps:
Installation steps:


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


mount *TARGET* $cr/mnt/sysimage
mount *TARGET* $cr/mnt/sysimage


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


mount --bind /mnt/f23dvd $cr/mnt/f23dvd<br>
mount --bind /mnt/f23dvd $cr/mnt/f23dvd<br>
mount --bind /sys $cr/sys<br>
mount --bind /sys $cr/sys<br>
mount --bind /dev $cr/dev<br>
mount --bind /dev $cr/dev<br>
mount --bind /dev/pts $cr/dev/pts<br>
mount --bind /dev/pts $cr/dev/pts<br>


2b. or with a loop:
2b. or with a loop:


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


3. chroot into install rootfs:
3. chroot into install rootfs:


chroot $cr<br>
chroot $cr<br>
mount -t proc proc /proc
mount -t proc proc /proc


4. verify dvd is available:
4. verify dvd is available:


dnf repolist<br>
dnf repolist<br>
dnf group list
dnf group list


5. install server group:
5. install server group:


dnf --installroot=/mnt/sysimage group install "Fedora Server"
dnf --installroot=/mnt/sysimage group install "Fedora Server"
 
6. copy the mozjs17 rpm to install later to fix the polkit signal 11:<br>


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''<br>
''polkitd[6747]: unhandled signal 11 at 0000000000000000 nip 00003fff849fc7f8 lr 00003fff849fc7d4 code 30001''<br>


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


7. set root password:
7. set root password:


chroot /mnt/sysimage<br>
chroot /mnt/sysimage<br>
passwd
passwd


8. Either install or upgrade the mozjs17 package:
8. Upgrade the mozjs17 package:


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


9. exit both chroot's
9. exit both chroot's
Line 110: Line 113:
10. install modules into $cr/mnt/sysimage/usr/lib/modules
10. install modules into $cr/mnt/sysimage/usr/lib/modules


cd $cr/mnt/sysimage/usr/lib/modules<br>
mkdir -p $cr/mnt/sysimage/usr/lib/modules<br>
tar -zxf <PATH>modules-4.1.8-rt8-sdkv20-03570-gbd51baf.tgz
cd $cr/mnt/sysimage/usr/lib/modules<br>
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 [http://hdebug.com/Fedora/ppc64/index.html]


== 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).


== Notes ==
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.  [https://cgit.freedesktop.org/systemd/systemd/tree/README]
 
4. 2016/06/09: Updated kernel config to more closely match Fedora's features. [http://hdebug.com/Fedora/f23/defconfig-4.1.8-rt8-sdkv20-03570-gbd51baf]
 
5. 2018/6/11: The 4.1.35-rt41 kernel from fsl-sdk-v2.0-1703 is now available [http://hdebug.com/Fedora/ppc64/index.html]
 
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)];


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
== Additional Tools ==


3. 2016/06/09: Enabled CONFIG_FHANDLE to fix the ttyS0 [[systemd-serial-console]] issue.
* Memory Display for Linux [[md_for_linux]] (similar to u-boot's md)


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


----
----


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

Revision as of 11:40, 27 March 2019

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


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 (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
passwd

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]

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. [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)]; 


Additional Tools

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



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