Difference between revisions of "Fedora28ppc64"

From MediaWiki
Jump to: navigation, search
(Fedora28 install for QoriQ ppc64)
 
m
Line 7: Line 7:
  
 
  wget http://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/28/Server/ppc64/iso/Fedora-Server-DVD-ppc64-28-1-1.iso
 
  wget http://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/28/Server/ppc64/iso/Fedora-Server-DVD-ppc64-28-1-1.iso
 
  
 
2. Get prebuilt t4240 kernel, dtb, and kernel-modules from [http://hdebug.com/Fedora/ppc64/index.html]:
 
2. Get prebuilt t4240 kernel, dtb, and kernel-modules from [http://hdebug.com/Fedora/ppc64/index.html]:
  
 
  wget http://hdebug.com/Fedora/ppc64/linux-4.1.35-rt41-sdkv20-1703-03067.tgz
 
  wget http://hdebug.com/Fedora/ppc64/linux-4.1.35-rt41-sdkv20-1703-03067.tgz
 
  
 
3. mount install DVD:
 
3. mount install DVD:
  
  mkdir /mnt/f28dvd<br>
+
  mkdir /mnt/f28dvd
 
  mount -r Fedora-Server-DVD-ppc64-28-1.1.iso /mnt/f28dvd
 
  mount -r Fedora-Server-DVD-ppc64-28-1.1.iso /mnt/f28dvd
  
 
4. Mount the LiveOS-install-image rootfs from inside the DVD squashfs install.img:
 
4. Mount the LiveOS-install-image rootfs from inside the DVD squashfs install.img:
  
  mkdir /mnt/f28/image<br>
+
  mkdir /mnt/f28/image
  mkdir /mnt/f28/instro<br>
+
  mkdir /mnt/f28/instro
  mount -r -t squashfs /mnt/f28dvd/images/install.img /mnt/f28/image<br>
+
  mount -r -t squashfs /mnt/f28dvd/images/install.img /mnt/f28/image
  mount -r /mnt/f28/image/LiveOS/rootfs.img /mnt/f28/instro<br>
+
  mount -r /mnt/f28/image/LiveOS/rootfs.img /mnt/f28/instro
  
 
5. Create a writable overlay on top of the DVD install image in order to to add yum.repos.d/f28dvd.repo file to the DVD and allow dnf to write files.  Note: ensure the overlay directory has sufficient space to contain the new files.
 
5. Create a writable overlay on top of the DVD install image in order to to add yum.repos.d/f28dvd.repo file to the DVD and allow dnf to write files.  Note: ensure the overlay directory has sufficient space to contain the new files.
  
 
  # chroot directory
 
  # chroot directory
  cr=/mnt/f28/install
+
  cr=/mnt/f28/install<br>
 
+
  mkdir -p /mnt/f28/overlay/upper
  mkdir -p /mnt/f28/overlay/upper<br>
+
  mkdir /mnt/f28/overlay/work
  mkdir /mnt/f28/overlay/work<br>
+
 
  mkdir $cr
 
  mkdir $cr
 
+
  mount -t overlay overlay $cr -olowerdir=/mnt/f28/instro,upperdir=overlay/overlay,workdir=overlay/work<br>
  mount -t overlay overlay $cr -olowerdir=/mnt/f28/instro,upperdir=overlay/overlay,workdir=overlay/work
+
 
+
 
  mkdir $cr/etc/yum.repos.d
 
  mkdir $cr/etc/yum.repos.d
  cat - > $cr/etc/yum.repos.d/f28dvd
+
# Create repo file pointing to dvd:
 +
  cat - > $cr/etc/yum.repos.d/f28dvd<br>
 
   [f28dvd]
 
   [f28dvd]
 
   name=Fedora 28
 
   name=Fedora 28
Line 52: Line 48:
 
7. mount DVD and special files in install rootfs:
 
7. mount DVD and special files in install rootfs:
  
  mount --bind /mnt/f28dvd $cr/mnt/f28dvd<br>
+
  mount --bind /mnt/f28dvd $cr/mnt/f28dvd
  mount --rbind /sys $cr/sys<br>
+
  mount --rbind /sys $cr/sys
  mount --rbind /dev $cr/dev<br>
+
  mount --rbind /dev $cr/dev
  
 
8. chroot into install rootfs:
 
8. chroot into install rootfs:
Line 63: Line 59:
 
9. verify dvd is available and populate dnf working files:
 
9. verify dvd is available and populate dnf working files:
  
  dnf repolist<br>
+
  dnf repolist
 
  dnf group list
 
  dnf group list
  
Line 72: Line 68:
 
11. set root password:
 
11. set root password:
  
  chroot /mnt/sysimage<br>
+
  chroot /mnt/sysimage
 
  passwd
 
  passwd
  
Line 79: Line 75:
 
13. install modules into $cr/mnt/sysimage/usr/lib/modules
 
13. install modules into $cr/mnt/sysimage/usr/lib/modules
  
  mkdir -p $cr/mnt/sysimage/usr/lib/modules<br>
+
  mkdir -p $cr/mnt/sysimage/usr/lib/modules
 
  cd $cr/mnt/sysimage/usr/lib/modules<br>
 
  cd $cr/mnt/sysimage/usr/lib/modules<br>
 
 
  tar -zxf <PATH-TO>/linux-4.1.35-rt41-sdkv20-1703-03067/modules-4.1.35-rt41-sdkv20-1703-03067-g1ae843c.tgz
 
  tar -zxf <PATH-TO>/linux-4.1.35-rt41-sdkv20-1703-03067/modules-4.1.35-rt41-sdkv20-1703-03067-g1ae843c.tgz

Revision as of 22:10, 14 October 2019

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

This method uses dnf in a chroot from a native boot (either yocto sdk-v2.0-1703 rootfs or an older Fedora release)


1. Get Install DVD:

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

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

wget http://hdebug.com/Fedora/ppc64/linux-4.1.35-rt41-sdkv20-1703-03067.tgz

3. mount install DVD:

mkdir /mnt/f28dvd
mount -r Fedora-Server-DVD-ppc64-28-1.1.iso /mnt/f28dvd

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

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

5. Create a writable overlay on top of the DVD install image in order to to add yum.repos.d/f28dvd.repo file to the DVD and allow dnf to write files. Note: ensure the overlay directory has sufficient space to contain the new files.

# chroot directory
cr=/mnt/f28/install
mkdir -p /mnt/f28/overlay/upper mkdir /mnt/f28/overlay/work mkdir $cr mount -t overlay overlay $cr -olowerdir=/mnt/f28/instro,upperdir=overlay/overlay,workdir=overlay/work
mkdir $cr/etc/yum.repos.d # Create repo file pointing to dvd: cat - > $cr/etc/yum.repos.d/f28dvd
[f28dvd] name=Fedora 28 baseurl=file:///mnt/f28dvd enabled=1 gpgcheck=0

6. mount the target partition for f28 (ext4 formated) in the install rootfs:

mkdir -p $cr/mnt/sysimage
mount *TARGET* $cr/mnt/sysimage

7. mount DVD and special files in install rootfs:

mount --bind /mnt/f28dvd $cr/mnt/f28dvd
mount --rbind /sys $cr/sys
mount --rbind /dev $cr/dev

8. chroot into install rootfs:

HOME=/root chroot $cr
mount -t proc proc /proc

9. verify dvd is available and populate dnf working files:

dnf repolist
dnf group list

10. install server group:

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

11. set root password:

chroot /mnt/sysimage
passwd

12. exit both chroot's

13. 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-TO>/linux-4.1.35-rt41-sdkv20-1703-03067/modules-4.1.35-rt41-sdkv20-1703-03067-g1ae843c.tgz