############################################################### # Helper script: /boot/platform/aarch64/helper/pkg-kernel-rpi # Purpose......: Copy Linux Kernel assets on to the RPi's # Hardware Model Boot Ware partition. # This enables seamless Kernel package upgrades # for users who opt to use the RPi's native # Boot Loader. # Called from..: Slackware Kernel package's post installation # script: /install/doinst.sh # Author.......: Stuart Winter # Date.........: 21-Dec-2021 ############################################################### HWM_MNTPT=/boot/platform/hwm_bw # If the Hardware Model Boot Ware partition isn't mounted, # there's nothing to do on this Hardware Model. mountpoint -q ${HWM_MNTPT} || exit 0 # Determine the Hardware Model: HWM=$( strings /proc/device-tree/model 2>/dev/null ) # Hardware Model specific settings: #case "${HWM}" in # "Raspberry Pi 4"*) #esac # Copy the assets only upon Raspberry Pi Hardware Models. # This may be expanded in future to handle other RPi's, assuming # the same non-standard boot process. case "${HWM}" in "Raspberry Pi"*) # Notes: # [1] The use of absolute paths works here because the # Slackware Installer has /boot symlinked to within the OS # mount point. The path is also correct within a chroot. # [2] The U-Boot Boot Loader, Linux Kernel and OS InitRD file # names are prefixed with 'slk_'. This is simply to # easily distinguish them from other assets. # Copy the Linux Kernel image: cp -fL /boot/Image-armv8 ${HWM_MNTPT}/slk_image-armv8 # Slackware OS InitRD (Operating System Initial RAM Disk): cp -fL /boot/initrd-armv8 ${HWM_MNTPT}/slk_initrd-armv8 # Copy the Device Tree Blobs (DTBs): cp -dpRfL /boot/dtb/broadcom/* ${HWM_MNTPT}/ ;; esac