RockyRpi/Rocky8_Rpi4.ks

57 lines
1.4 KiB
Plaintext
Raw Normal View History

# Kickstart to build Rocky 8 image for Raspberry Pi 4 hardware (aarch64)
#
# (pull from pgreco: https://github.com/psgreco/sig-core-AltArch/tree/master/image_build
# Basic setup information
%include "Rocky8_Rpi4/010_repos_aarch64.ksi"
%include "Rocky8_Rpi4/020_common.ksi"
%include "Rocky8_Rpi4/040_packages.ksi"
%include "Rocky8_Rpi4/050_files.ksi"
#%include "../ks.include/common.ksi"
#%include "../ks.include/RaspberryPI.ksi"
#%include "../ks.include/wifi.ksi"
#%include "../ks.include/pkgs_common_7.ksi"
#%include "../ks.include/pkgs_exclude_7.ksi"
# Repositories to use
#repo --name="instKern" --baseurl=http://mirror.centos.org/altarch/7/kernel/armhfp/kernel-rpi2/ --cost=100
# Disk setup
clearpart --initlabel --all
part /boot --asprimary --fstype=vfat --size=300 --label=boot
part swap --asprimary --fstype=swap --size=512 --label=swap
part / --asprimary --fstype=ext4 --size=2800 --label=rootfs
# Package setup
%packages
raspberrypi2-firmware
raspberrypi2-kernel4
%end
%post
# Generating initrd
# Ensure no ssh keys are present
rm -f /etc/ssh/*_key*
# Important: find the partuuid and add it to our cmdline.txt so we can boot(!)
partuuid=`blkid | grep '_/' | awk '{print $NF}' | tr -d '"' | tr '[:lower:]' '[:upper:]'`
cat > /boot/cmdline.txt << EOF
console=ttyAMA0,115200 console=tty1 root=${partuuid} rootfstype=ext4 elevator=deadline rootwait
EOF
%end