############################################################################### # Helper script: /load_kernel_modules.scr/platform/aarch64/lx2160acex7 # Purpose......: Set the Kernel modules for Hardware Models that use the # lx2160acex7 SoC within the Slackware initial RAM disk # ('OS initrd') and the Slackware installer. # This script is sourced from '/load_kernel_modules' # Author.......: Brenton Earl # Date.........: 18-Jul-2022 # Maintainer...: Brenton Earl # # Important Note: # * You must _append_ to the module lists (as this script does) # otherwise the base set of modules will not be loaded and would result in # a Kernel panic. # * The initrd uses the 'bash' shell, rather than 'busybox' # (as in upstream/x86 Slackware). This allows you (for example) # to use 'fallthrough' (case statements terminated with ';&' # rather than ';;') within case statements and regular expression # matches within 'if' statements. # This permits the 'c'-style switch statements where you can # 'inherit' the previous matches as you move down the cases. # This enables you to match on varients of boards, and inherit # a 'baseline' of platform modules for that board. # # The 'PLATWALK' match is to enable build scripts to process these # scripts outside of the initrd environment and determine which # modules will be loaded by a particular Hardware Model. This must remain # in place for all scripts. ############################################################################### case $HWM in "SolidRun CEX7 Platform"*|"SolidRun LX2160A Honeycomb"*|PLATWALK) platform_detected=1 SOC_NAME=lx2160acex7 echo "Architecture: ${ARCH}, Hardware model: ${HWM}, SoC: ${SOC_NAME}" # If one of the modules within the base list is causing problems on # your platform, here are the options laid out as examples: # USB="${USB/ehci_orion/differentmodule}" # Substitute module 'ehci_orion' with 'differentmodule' # USB="${USB/ehci_orion/}" # Remove the 'ehci_orion' module from the list MOD_GPIO+=" " # Drivers for PCI and other core sub systems: MOD_PHY+=" ahci_qoriq sdhci_of_esdhc" # MFD (Multi Functional Devices) drivers: MOD_MFD+=" " # Needs a little more work: # root@honey:~# modinfo amdgpu|grep depen # depends: ttm,drm_display_helper,drm_suballoc_helper,drm_buddy,i2c-algo-bit,gpu-sched,drm_exec,amdxcp,video,drm_ttm_helper # [ 9.711289] amdgpu: Unknown symbol acpi_video_register_backlight (err -2) # [ 9.718369] amdgpu: Unknown symbol __acpi_video_get_backlight_type (err -2) # modprobe: ERROR: could not insert 'amdgpu': Unknown symbol in module, or unknown parameter (see dmesg) #MOD_VIDEO+=" amdgpu" # Any known-supported PCIe cards (apart from the AMD gfx card above) MOD_CARDS+=" " MOD_USB+=" dwc2 dwc3" MOD_NET+=" fsl_dpaa2_eth" MOD_CMP+=" " MOD_CRYPTO+=" caam" # The following modules do not inherit: MOD_RTC="rtc-pcf2127 rtc-efi" # Modules for the peripherals on the Hardware Model's main board # (outside of the SoC itself) MOD_HWM="amc6821" # Modules for the IP blocks/peripherals embedded within the SoC: MOD_SOC="" # Detect a specfic AMD graphics card and load the Kernel module: # This couldn't be detected during the initial Hardware Model detection because # the modules to light up the PCI interface were not loaded. # 0004:01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7) # 0004:01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] #function hwm_hook_post-modload() { # { lspci 2>/dev/null | grep -q 'Radeon 540/540X/550/550X' ;} && modprobe amdgpu #} # 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. # # At this stage, the following paths for Slackware OS are mounted: # /proc, /sys, /run, /dev # The root file system ('/') is mounted under /mnt # #function hwm_hook_pre_switch_root() { # echo "Just about to switch into the Slackware OS proper, leaving the OS InitRD" #} ;; esac