# /boot/local/load_kernel_modules.post # # This is a user-serviceable script that is executed within the # OS InitRD (Operating System Initial RAM Disk) subsequent to loading # the Linux Kernel modules. # # The purpose of this script is for users to load any particular modules # they require to boot their system within the initial boot stages. # However, it can be used for any other purpose as this is a bash # shell script that is run within the 'init' process directly. # Therefore, be careful what you put here. # Example: modprobe abcmodulexyz modprobe anothermodule modprobe andanother # Other options here are to initialise a peripheral that's attached # to the GPIO array. # # Example: Initialise an ds1307-based RTC on the GPIO pins. # Note that on the Raspberry Pi 4, this RTC is already # initialised by the bcm2711 Kernel Module Loader helper(*) # within the OS InitRD, and is only repeated here as an example # of the type of options available at this stage of the boot process. # * http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/source/k/SlkOS-initrd-overlay/load_kernel_modules.scr/platform/aarch64/bcm2711 # Initialise it with the i2cdetect tool: #i2cdetect -y 1 > /dev/null 2>&1 # If detected, provide the address to the Kernel interface so that # the RTC driver can find it: #[ -f /sys/class/i2c-adapter/i2c-1/new_device ] && echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device # Define a function to run from the OS InitRD's '/init' immediately prior # to switching into the Slackware OS proper. # This is after any software RAID arrays et al have been initialised. # There's no current use case for this, but it may be useful in the future. # # At this stage, the following paths for Slackware OS are mounted: # /proc, /sys, /run, /dev # The root file system ('/') is mounted under /mnt # #function hook_pre_switch_root() { # echo "Just about to switch into the Slackware OS proper, leaving the OS InitRD" # sleep 4 #}