Initial commit
Enough research done to build a successful, bootable image. -Skip G.
This commit is contained in:
parent
77b46c30d5
commit
f5cf9f6038
44
Rocky8_Rpi4.ks
Normal file
44
Rocky8_Rpi4.ks
Normal file
@ -0,0 +1,44 @@
|
||||
# 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 "../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
|
||||
#raspberrypi-vc-utils
|
||||
raspberrypi2-firmware
|
||||
raspberrypi2-kernel4
|
||||
|
||||
%end
|
||||
|
||||
%post
|
||||
# Generating initrd
|
||||
#export kvr=$(rpm -q --queryformat '%{version}-%{release}' $(rpm -q raspberrypi2-kernel4|tail -n 1))
|
||||
#dracut --force /boot/initramfs-$kvr.armv7hl.img $kvr.armv7hl
|
||||
|
||||
# Ensure no ssh keys are present
|
||||
rm -f /etc/ssh/*_key*
|
||||
|
||||
%end
|
6
Rocky8_Rpi4/010_repos_aarch64.ksi
Normal file
6
Rocky8_Rpi4/010_repos_aarch64.ksi
Normal file
@ -0,0 +1,6 @@
|
||||
repo --name="BaseOS" --baseurl=http://download.rockylinux.org/pub/rocky/8/BaseOS/aarch64/os/ --cost=100
|
||||
repo --name="AppStream" --baseurl=http://download.rockylinux.org/pub/rocky/8/AppStream/aarch64/os/ --cost=200 --install
|
||||
repo --name="PowerTools" --baseurl=http://download.rockylinux.org/pub/rocky/8/BaseOS/aarch64/os/ --cost=300 --install
|
||||
|
||||
# Rocky Rpi kernel repo, we need a more permanent place for this:
|
||||
repo --name="Rpi-Kernel" --baseurl=https://rocky.lowend.ninja/RockyRpi/Rpi-Kernel/ --cost=20
|
48
Rocky8_Rpi4/020_common.ksi
Normal file
48
Rocky8_Rpi4/020_common.ksi
Normal file
@ -0,0 +1,48 @@
|
||||
install
|
||||
keyboard us --xlayouts=us --vckeymap=us
|
||||
rootpw --plaintext rocky
|
||||
timezone --isUtc --nontp UTC
|
||||
selinux --enforcing
|
||||
firewall --enabled --port=22:tcp
|
||||
network --bootproto=dhcp --device=link --activate --onboot=on
|
||||
services --enabled=sshd,NetworkManager,chronyd
|
||||
shutdown
|
||||
bootloader --location=mbr --extlinux
|
||||
lang en_US.UTF-8
|
||||
|
||||
%post
|
||||
# Mandatory README file
|
||||
cat >/root/README << EOF
|
||||
== Rocky 8 Raspberry Pi Image (experimental) ==
|
||||
|
||||
This is a minimal Rocky 8 install intended for Raspberry Pi 4 devices (architecture is aarch64).
|
||||
|
||||
It should work similarly to any other aarch64 device. There is a special repository added that contains
|
||||
raspberry pi specific kernel builds.
|
||||
|
||||
If you want to automatically resize your / partition, just type the following (as root user):
|
||||
rootfs-expand
|
||||
|
||||
EOF
|
||||
|
||||
# Enabling chronyd on boot
|
||||
systemctl enable chronyd
|
||||
|
||||
|
||||
# Remove ifcfg-link on pre generated images
|
||||
rm -f /etc/sysconfig/network-scripts/ifcfg-link
|
||||
|
||||
# Remove machine-id on pre generated images
|
||||
rm -f /etc/machine-id
|
||||
touch /etc/machine-id
|
||||
|
||||
|
||||
# Specific cmdline.txt files needed for raspberrypi2/3/4
|
||||
cat > /boot/cmdline.txt << EOF
|
||||
console=ttyAMA0,115200 console=tty1 root=LABEL=rootfs rootfstype=ext4 elevator=deadline rootwait
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
|
||||
%end
|
8
Rocky8_Rpi4/040_packages.ksi
Normal file
8
Rocky8_Rpi4/040_packages.ksi
Normal file
@ -0,0 +1,8 @@
|
||||
%packages
|
||||
@core
|
||||
chrony
|
||||
cloud-utils-growpart
|
||||
net-tools
|
||||
NetworkManager-wifi
|
||||
|
||||
%end
|
Loading…
Reference in New Issue
Block a user