[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
slackwarearm:development_refguide_di [2022/03/23 09:22 (UTC)] mozesslackwarearm:development_refguide_di [2024/01/21 12:28 (UTC)] (current) – [Brain Dump] Kernel module loader example mralk3
Line 1: Line 1:
-<note warning>March 2022 - work in progress. needs to cover all supported HWM's</note>+<note warning>March 2022 - work in progress. needs to cover all supported HWM's. Will be split into separate documents.</note> 
 + 
 + 
 + 
  
  
Line 7: Line 11:
 | Version          | 1.00, April 2022 | | Version          | 1.00, April 2022 |
 | Author           | Stuart Winter <mozes@slackware> | | Author           | Stuart Winter <mozes@slackware> |
 +
 +==== Brain Dump ====
 +
 +[[https://www.linuxquestions.org/questions/slackware-arm-108/direct-integration-rock5-4175724301/|Brain Dump onto LQ]] - needs sorting into individual pages
 +
 +[[https://www.linuxquestions.org/questions/slackware-arm-108/slackware-aarch64-raspberry-pi-400-hardware-support-4175733019/| Brain Dump on LQ 2.0]] - Kernel module loader example
  
  
Line 24: Line 34:
  
 This document is aimed at advanced Slackware and Linux users. This document is aimed at advanced Slackware and Linux users.
 +
 +====== Slackware ARM Development Kit ====== 
 +
 +Using any of the build system referenced here requires the [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/README_SOURCE.txt|Slackware ARM development kit]] to be installed and configured natively on an installation of Slackware ARM.
 +
 +The Slackware ARM Development Kit is contained within the 'd' package series and will be installed as part of a full Slackware installation.
  
 ======  Bootware ====== ======  Bootware ======
  
 The boot loader employed on the RockPro64 and PineBook Pro is [[https://www.denx.de/wiki/U-Boot|U-Boot]]. The boot loader employed on the RockPro64 and PineBook Pro is [[https://www.denx.de/wiki/U-Boot|U-Boot]].
 +
 +==== Secure Boot ====
 +
 +Presently none of the bootware assets supplied by Slackware ARM are signed.  However, the Slackware Linux project does have a suitable signing key that can be used when necessary for Directly Integrated Hardware Models (i.e. supported directly by Slackware ARM).
 +
 +If the Hardware Model you're interested mandates Secure Boot, you'll need to figure this out for yourself.
 +
  
 ==== Trusted Firmware-A (ARM Trusted Firmware) ==== ==== Trusted Firmware-A (ARM Trusted Firmware) ====
Line 44: Line 67:
 ==== Recovery / Initialisation SD Card image ==== ==== Recovery / Initialisation SD Card image ====
  
-* Needs script work to create one 
  
 ==== U-Boot configured to boot from SPI Flash ==== ==== U-Boot configured to boot from SPI Flash ====
Line 63: Line 85:
  
 ^ Script                                     ^ Called from  ^ Purpose ^ Hardware Models ^ ^ Script                                     ^ Called from  ^ Purpose ^ Hardware Models ^
-| /usr/lib/setup/armedslack-SeTpartitions    | Installer    | Automatic Handling of the OS /boot Partition | All | 
-| /usr/lib/setup/armedslack-bootloader-flash | Installer    | Installing the Boot Loader onto SPI Flash | Not Raspberry Pi | 
 | /etc/rc.d/rc.installerconfig               | init         | Hardware Model Installer Runtime Configuration Adjustments (CPU fan control, installer font size etc.) | All | | /etc/rc.d/rc.installerconfig               | init         | Hardware Model Installer Runtime Configuration Adjustments (CPU fan control, installer font size etc.) | All |
 | /usr/lib/setup/armedslack-clock-set        | /etc/rc.d/rc.S | If wrong time,set the clock with Slackware Installer build date. This indicates no RTC. | All | | /usr/lib/setup/armedslack-clock-set        | /etc/rc.d/rc.S | If wrong time,set the clock with Slackware Installer build date. This indicates no RTC. | All |
-| /usr/lib/setup/armedslack-setconsole       | Installer    Configure Linux cmdline 'console=' setting | All |+| /usr/lib/setup/armedslack-SeTpartitions    /usr/lib/setup/SeTpartitions | Automatic Handling of the OS /boot Partition | All |
  
 +==== Slackware ARM Post Installation Setup Scripts ====
  
-==== Operating System Configuration (per Hardware Model) ==== 
  
-/usr/lib/setup/armedslack-hwm-os-configure +The Slackware ARM post installation setup scripts are contained within '' /usr/lib/setup/armedslack-postinstall-scripts'' and are all called from ''/usr/lib/setup/armedslack-run-postinstall-scripts'' 
 + 
 +''/usr/lib/setup/armedslack-run-postinstall-scripts'' is sourced/run from ''/usr/lib/setup/SeTconfig'' immediately prior to running the Slackware package setup scripts (named ''setup.*'') within the newly installed OS' ''/var/log/setup/'' directory. 
 + 
 +These post installation setup scripts are to configure the Operating System, but the scripts are not part of any Slackware package (unlike the rest of the post installation scripts within Slackware).  This is simplify the work required to port Slackware to another architecture - rather than editing numerous scripts within the Slackware Installer, we run one script which launches the others. 
 + 
 +^ Script                                     ^ Purpose ^ Hardware Models ^ 
 +| bootloader-flash | Installing the Boot Loader onto SPI Flash | Not Raspberry Pi | 
 +| setconsole       | Configure Linux cmdline 'console=' setting | All | 
 +| os-initrd-mgr | Configures the OS InitRD (Operating System Initial RAM Disk) | All | 
 +| removeinstaller | Removes the Slackware Installer from the /boot partition | All | 
 +| hwm-os-configure | Helper launch script for Hardware Model-specific configuration (see below) | - | 
 + 
 +== Operating System Configuration (per Hardware Model) == 
 + 
 +''hwm-os-configure''
  
 This runs helper scripts found within the Slackware Installer. This runs helper scripts found within the Slackware Installer.
Line 110: Line 145:
 ====== Slackware Operating System ====== ====== Slackware Operating System ======
  
 +==== Packages ====
 +
 +Slackware ARM needs to modify some packages and add new ones.  Below follows a list of the packages that have been added or modified.
 +
 +=== Package: a/kernel-firmware ===
 +
 +^ Hardware Model | Rock Pro64 / Pinebook Pro |
 +^ Asset  ^ Src ^
 +| platform/aarch64/rk3399/rk3399 | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/rk3399/rk3399|Firmware packaging script helper]] |
 +|  platform/aarch64/rk3399/get-firmware.sh | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/rk3399/get-firmware.sh|Script to retrieve firmware assets]]|
 +| platform/aarch64/rk3399/assets/* | [[ftp://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/rk3399/assets|Firmware assets]]|
 +
 +
 +
 +^ Hardware Model | Raspberry Pi 4|
 +^ Asset  ^ Src ^
 +| platform/aarch64/bcm2711/bcm2711/ | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/bcm2711/bcm2711/|Firmware packaging script helper]] |
 +|  platform/aarch64/bcm2711/get-firmware.sh | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/bcm2711//get-firmware.sh|Script to retrieve firmware assets]]|
 +| platform/aarch64/bcm2711/assets/* | [[ftp://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/bcm2711/assets|Firmware assets]]|
 +
 +
 +^ Change Management Process ^
 +| Provide the origin of the patch set (one or more URLs - https, git, etc.) and they will be retrieved from there. |
 +
 +<note warning>Licences must be included</note>
 +
 +====== Serial Console System Login ======
 +
 +<note important>This is a hard requirement</note>
 +
 +To enable a TTY that presents a OS login prompt, which enables system access via the Serial adapter.
 +All Hardware Models must support this.
 +
 +^ Package Series ^ Package ^ Asset changed ^ Src ^
 +| a | sysvinit-scripts | /install/doinst.sh | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/sysvinit-scripts/sources/doinst.sh-set-serial-port|Install script additions]] |
 +
 +The additions script has inline documentation.
 +
 +^ Change Management Process ^
 +| This is a simple script and should not be made more complex, because this code typically never changes, thus modularising it serves no utility. Please email a diff to the Slackware ARM devel mailing list and it will be applied |
 +
 +====== Linux Virtual Console (Local Console (HDMI video, USB Keyboard / Mouse )) ======
 +
 +==== Console Video Display ====
 +
 +Set within the Kernel Module Loader.
 +Variable name..
 +
 +==== X11/Xorg Window System ====
 +
 +Package: x/x11-skel
 +Asset: doinst.sh
 +
 +The x11-skel package's post-installation script detects the RockPro64 and Pinebook Pro at install time, and deletes /etc/X11/xorg.conf enabling
 +Xorg to automatically configure the video display.
 +
 +Other Hardware Models contain configuration within this doinst.sh script.
 +
 +====== Slackware Operating System Post Boot Configuration ======
 +
 +Package: a/sysvinit-scripts
 +Assets: /etc/rc.d/rc.platform - load helper scripts from /etc/rc.d/rc.platform.d/<arch>
 +These scripts perform such things as setting the LCD panel brightness, setting fan speeds, etc.
 +
 +Used on the RockPro64, Pinebook Pro.
  
 ===== Kernel ===== ===== Kernel =====
Line 115: Line 215:
 <note>All Hardware Models are supported by a single generic Kernel.</note> <note>All Hardware Models are supported by a single generic Kernel.</note>
  
-^ Package Series ^ Package ^ Asset  ^ Src ^ +^ Hardware Model ^ Package Series ^ Package ^ Asset  ^ Src ^ 
-| k | kernel-source | configs/config-armv8 | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/k/configs/config-armv8|Slackware AArch64 generic Kernel configuration]] |+|All | k | kernel-source | configs/config-armv8 | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/k/configs/config-armv8|Slackware AArch64 generic Kernel configuration]] |
  
 ^Change Management Process^ ^Change Management Process^
Line 166: Line 266:
 | Email the new configuration to the Slackware ARM devel mailing list, or provide a URL from which it may be obtained. | | Email the new configuration to the Slackware ARM devel mailing list, or provide a URL from which it may be obtained. |
  
-====== Hardware Model Firmware ====== 
  
-^ Package Series ^ Package ^ Asset  ^ Src ^ +* Note about modprobe.d within installer and os-initrd-mgr conditionally installing the correct version depending on the Hardware Model. 
-| a | kernel-firmware | platform/aarch64/rk3399/rk3399 | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/rk3399/rk3399|Firmware packaging script helper]] | +SOC_NAME in the Kernel module loader plugins needs to match the file name.
-| | |  platform/aarch64/rk3399/get-firmware.sh | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/rk3399/get-firmware.sh|Script to retrieve firmware assets]]| +
-| | |platform/aarch64/rk3399/assets/* | [[ftp://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/kernel-firmware/platform/aarch64/rk3399/assets|Firmware assets]]|+
  
-^ Change Management Process ^ +source/k/SlkOS-initrd-overlay/usr/share/hwm-configure/platform/aarch64/modprobe.d | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/k/SlkOS-initrd-overlay/usr/share/hwm-configure/platform/aarch64/modprobe.d|Hardware Model/SoC modprobe configurations]] |
-Provide the origin of the patch set (one or more URLs https, git, etc.) and they will be retrieved from there. |+
  
-<note warning>Licences must be included</note> +These are populated by /load_kernel_modules at run timedepending on which Hardware Model is detected by the Kernel Module loader plugin scripts.
- +
-====== Serial Console System Login ====== +
- +
-<note important>This is a hard requirement</note> +
- +
-To enable a TTY that presents a OS login prompt, which enables system access via the Serial adapter. +
-All Hardware Models must support this. +
- +
-^ Package Series ^ Package ^ Asset changed ^ Src ^ +
-| a | sysvinit-scripts | /install/doinst.sh | [[http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/source/a/sysvinit-scripts/sources/doinst.sh-set-serial-port|Install script additions]] | +
- +
-The additions script has inline documentation. +
- +
-^ Change Management Process ^ +
-| This is a simple script and should not be made more complex, because this code typically never changes, thus modularising it serves no utility. Please email a diff to the Slackware ARM devel mailing list and it will be applied | +
- +
-====== Linux Virtual Console (Local Console (HDMI video, USB Keyboard / Mouse )) ====== +
- +
-==== Console Video Display ==== +
- +
-Set within the Kernel Module Loader. +
-Variable name.. +
- +
-==== X11/Xorg Window System ==== +
- +
-Package: x/x11-skel +
-Asset: doinst.sh +
- +
-The x11-skel package's post-installation script detects the RockPro64 and Pinebook Pro at install time, and deletes /etc/X11/xorg.conf enabling +
-Xorg to automatically configure the video display. +
- +
-Other Hardware Models contain configuration within this doinst.sh script. +
- +
-====== Slackware Operating System Post Boot Configuration ====== +
- +
-Package: a/sysvinit-scripts +
-Assets: /etc/rc.d/rc.platform - load helper scripts from /etc/rc.d/rc.platform.d/<arch> +
-These scripts perform such things as setting the LCD panel brightness, setting fan speeds, etc. +
- +
-Used on the RockPro64, Pinebook Pro.+
  
 +<note important>Presently the modprobe configuration for the Hardware Model is not copied or in sync with the OS' copy.  If this becomes an issue in the future, it will be syncronised by init within the OS InitRD.</note>
  
 ====== Hardware Management ====== ====== Hardware Management ======
 slackwarearm:development_refguide_di ()