[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:inst_sa64_rk3399_rockpro64 [2023/02/01 10:14 (UTC)] mozesslackwarearm:inst_sa64_rk3399_rockpro64 [2024/03/19 09:34 (UTC)] (current) mozes
Line 7: Line 7:
 | Platform | AArch64/ARM64 |  | Platform | AArch64/ARM64 | 
 | Hardware Model |Rock Pro64 | | Hardware Model |Rock Pro64 |
-| Document Version | 1.01Jan 2023 |+| Document Version | 1.04Mar 2024 |
 | Author | Stuart Winter <mozes@slackware> | | Author | Stuart Winter <mozes@slackware> |
 | Contributors | Brenton Earl <el0226@slackware> (R&D for the RK3399 Hardware Models)| | Contributors | Brenton Earl <el0226@slackware> (R&D for the RK3399 Hardware Models)|
Line 53: Line 53:
 | [[https://thepihut.com/products/usb-to-ttl-serial-cable|USB to Serial adapter]] | PL2303 chip.  Other models may work, but this one has been tested. If your model has the option to set voltages, ensure **3volts** is set!  | Optional: This document covers installing using an HDMI monitor (you can find information about the Serial/UART adapter at the foot of this document), but a USB to Serial/UART adapter is recommended if you want to access the Boot Loader and Linux tty (serial line) remotely. The serial adapter is also required for developers needing to debug the boot process. | | [[https://thepihut.com/products/usb-to-ttl-serial-cable|USB to Serial adapter]] | PL2303 chip.  Other models may work, but this one has been tested. If your model has the option to set voltages, ensure **3volts** is set!  | Optional: This document covers installing using an HDMI monitor (you can find information about the Serial/UART adapter at the foot of this document), but a USB to Serial/UART adapter is recommended if you want to access the Boot Loader and Linux tty (serial line) remotely. The serial adapter is also required for developers needing to debug the boot process. |
 | Jumper or Dupont cable | See images below | This is to bridge the pins required for initial firmware deployment and/or Hardware Model recovery| | Jumper or Dupont cable | See images below | This is to bridge the pins required for initial firmware deployment and/or Hardware Model recovery|
-| [[https://www.amazon.co.uk/gp/product/B06WWLCYC3|USB to SATA adapter]] | Many models will work, but this one has been tested. | For a simple installation you require either storage attached to a USB interface, or using the SATA PCI card (see below).| 
-| [[https://pine64.com/product/pcie-to-dual-sata-iii-interface-card/|PCIe to dual SATA 3.0 Interface Card]] | PINE64's own| You can use this or the USB to SATA adapter (see row above)| 
-| [[https://www.amazon.co.uk/MZHOU-Adapter-Marvell-chipset-without/dp/B07NT1PWGW|PCIe to quad SATA 3.0 Interface Card]]| MZHOU / Marvell chipset | If you would like to use SATA storage, this is the **recommended** interface card |  
-| [[https://www.amazon.co.uk/Kingston-SA400S37-240G-Solid-State/dp/B01N5IB20Q|SATA storage / SSD]] | The Kingston-SA400S37-240G has thoroughly proved itself in the Slackware ARM build infrastructure - most build machines use these, but any SSD or spinning hard disk should work | Will contain the Operating System. You can install to other storage, but this documentation covers this particular configuration only. | 
 | [[https://pine64.com/product/rockpro64-1x1-dual-band-wifi-802-11ac-bluetooth-5-0-module/|Wifi and Bluetooth module]] | Pine64's own | Optional | | [[https://pine64.com/product/rockpro64-1x1-dual-band-wifi-802-11ac-bluetooth-5-0-module/|Wifi and Bluetooth module]] | Pine64's own | Optional |
 | [[https://pine64.com/product/rockpro64-10mm-low-profile-heatsink-with-fan/|Heat sink and CPU fan]] | Pine64's own | Either a heat sink or fan are required.  Some of the cases have built-in heat sinks, so check the options | | [[https://pine64.com/product/rockpro64-10mm-low-profile-heatsink-with-fan/|Heat sink and CPU fan]] | Pine64's own | Either a heat sink or fan are required.  Some of the cases have built-in heat sinks, so check the options |
Line 62: Line 58:
 | [[https://pine64.com/product/rtc-backup-battery-holder-2-x-aaa/|Real Time Clock ('RTC') battery holder]] | Pine64's own | An RTC is used to keep the time when the Hardware Model is powered down. This is recommended but optional.  Time can also be set via NTP once the OS has booted. | | [[https://pine64.com/product/rtc-backup-battery-holder-2-x-aaa/|Real Time Clock ('RTC') battery holder]] | Pine64's own | An RTC is used to keep the time when the Hardware Model is powered down. This is recommended but optional.  Time can also be set via NTP once the OS has booted. |
  
 +
 +== Hardware: Storage ==
 +
 +This table provides a list of options that have been tested with Slackware AArch64 on the RockPro64 - you only need one storage controller.
 +
 +^ Item ^ Specification ^ Notes ^
 +| [[https://www.amazon.co.uk/gp/product/B06WWLCYC3|USB to SATA adapter]] | Many models will work, but this one has been tested. | For a simple installation you require either storage attached to a USB interface, or using a SATA PCIe card (see below).|
 +| [[https://www.amazon.co.uk/dp/B099ZCXJLQ?psc=1&ref=ppx_yo2ov_dt_b_product_details|PCIe dual port SATA 3.0 Interface Card]] | JMICRON+JMB582 | Recommended 2-port SATA card |
 +| [[https://www.amazon.co.uk/MZHOU-Adapter-Marvell-chipset-without/dp/B07NT1PWGW|PCIe quad port SATA 3.0 Interface Card]]| MZHOU / Marvell chipset | Recommended 4-port SATA card | 
 +| [[https://www.amazon.co.uk/Kingston-SA400S37-240G-Solid-State/dp/B01N5IB20Q|SATA storage / SSD]] | The Kingston-SA400S37-240G has thoroughly proved itself in the Slackware ARM build infrastructure - most build machines use these, but any SSD or spinning hard disk should work | Will contain the Operating System. You can install to other storage, but this documentation covers this particular configuration only. |
 +
 +<note important>PINE64 have their [[https://pine64.com/product/pcie-to-dual-sata-iii-interface-card/|own dual port PCIe SATA controller]] but two of them have failed for this author, and as such cannot be recommended.  For SATA it's recommended to use one of the two controllers in the table above.</note>
 +
 +<note important>When selecting a USB to SATA adapter it's best to choose one that is powered externally rather than from the USB port.</note>
  
 === Notes on storage setup === === Notes on storage setup ===
Line 106: Line 116:
  
   * Connect the CPU fan or heat sink   * Connect the CPU fan or heat sink
 +
 +
 +<note tip>If you prefer hardware rather than software control for the fan over software, check out [[https://youtu.be/z8z1xO3pJA0|this video]].</note>
 +
 +
   * Connect the Wifi & Bluetooth module (optional)   * Connect the Wifi & Bluetooth module (optional)
   * Connect the storage (the image shows the USB-to-SATA adapter, but you may use the PCI card). If using the USB adapter, connect it to the **blue USB3.0 port**.   * Connect the storage (the image shows the USB-to-SATA adapter, but you may use the PCI card). If using the USB adapter, connect it to the **blue USB3.0 port**.
Line 284: Line 299:
 <code> <code>
 # dd if=/dev/zero of=/dev/XXX count=10 bs=1M    ## Replace /dev/XXX with the correct block device (presented above by the lsblk tool) on your Host Computer # dd if=/dev/zero of=/dev/XXX count=10 bs=1M    ## Replace /dev/XXX with the correct block device (presented above by the lsblk tool) on your Host Computer
-# xzcat flash-spi-pinebookpro.img.xz > /dev/XXX  ## Replace /dev/XXX with the correct block device (presented above by the lsblk tool) on your Host Computer+# xzcat flash-spi-rockpro64.img.xz > /dev/XXX  ## Replace /dev/XXX with the correct block device (presented above by the lsblk tool) on your Host Computer
 # sync # sync
 </code> </code>
Line 415: Line 430:
  
 {{:slackwarearm:04-setkeymap_c.jpg?400|}} {{:slackwarearm:04-setkeymap_c.jpg?400|}}
 +
 +== Font size ==
 +
 +If you're using a smaller monitor, such as one with a screen size less than 20 inches, it may be necessary to adjust the console font size to ensure that menus and other interface elements fit correctly on the screen.  If so, type this into the shell prompt:
 +
 +<code>setfont ter-v18n</code>
 +
  
 == Set the date/time == == Set the date/time ==
Line 578: Line 600:
 {{:slackwarearm:35-ConsoleBootSettings-rpro64.jpg?400|}} {{:slackwarearm:35-ConsoleBootSettings-rpro64.jpg?400|}}
  
-== Install the Boot Loader to SPI flash == 
- 
-If this is the first time you have installed Slackware, you must flash the Boot Loader. 
-The initial Boot Loader flash performed earlier in these instructions typically contains an older version of the Boot Loader, where as the version packaged within the Installer contains the latest tested version. 
- 
-{{:slackwarearm:36-InstallingBootLoader-SPIFlash-rpro64.jpg?400|}} 
- 
-{{:slackwarearm:37-InstallingBootLoader-SPIFlash-readytogo.jpg?400|}} 
- 
-{{:slackwarearm:38-InstallingBootLoader-SPIFlash-inprogress-rpro64.jpg?400|}} 
- 
-{{:slackwarearm:39-InstallingBootLoader-SPIFlash-complete.jpg?400|}} 
  
 == Remove the Slackware Installer from the SD card == == Remove the Slackware Installer from the SD card ==
Line 602: Line 612:
  
 <note tip>You may be tempted to retain the Slackware Installer, but note that the Installer contains Linux Kernel modules for the Kernel that the Installer was originally shipped with. This means that as soon as you upgrade the Slackware Kernel package, the Installer will fail to boot.  The option to retain the Installer is present purely because on a number of occasions, this author only realised that the installation was incorrectly performed upon completion, and needed to reinstall.  Retaining the Installer avoids the requirement to re-deploy the image to the SD card.</note> <note tip>You may be tempted to retain the Slackware Installer, but note that the Installer contains Linux Kernel modules for the Kernel that the Installer was originally shipped with. This means that as soon as you upgrade the Slackware Kernel package, the Installer will fail to boot.  The option to retain the Installer is present purely because on a number of occasions, this author only realised that the installation was incorrectly performed upon completion, and needed to reinstall.  Retaining the Installer avoids the requirement to re-deploy the image to the SD card.</note>
 +
 +== Install the Boot Loader to SPI flash ==
 +
 +The initial Boot Loader flash performed earlier in these instructions typically contains an older version of the Boot Loader, where as the version packaged within the Installer contains the most recent version.
 +
 +When an upgrade is required, in most cases you'll see a screen like this which provides information about the currently installed Boot Loader and the newer version available:
 +
 +{{:slackwarearm:slackarm-flashing-reqd-prevslackrel.jpg?400|}}
 +
 +
 +If the installed Boot Loader matches the currently available version, you will be advised that flashing is unnecessary.  However, you can re-flash it if you wish.
 +
 +{{:slackwarearm:slackarm-flashing-not-required.jpg?400|}}
 +
 +If you proceed with flashing, the work flow looks like this and takes approximately two minutes to complete.
 +<note important>You must ensure the system has sufficient power/is plugged in.  If the machine powers off before flashing completes, you would need to re-flash using the bootable SD card as described earlier within this guide.</note> 
 +
 +{{:slackwarearm:37-InstallingBootLoader-SPIFlash-readytogo.jpg?400|}}
 +
 +{{:slackwarearm:38-InstallingBootLoader-SPIFlash-inprogress-rpro64.jpg?400|}}
 +
 +{{:slackwarearm:39-InstallingBootLoader-SPIFlash-complete.jpg?400|}}
 +
  
 == Post Installation Configuration == == Post Installation Configuration ==
  
 The Slackware Installer will walk you through the standard Slackware setup.  The on-screen instructions will suffice. The Slackware Installer will walk you through the standard Slackware setup.  The on-screen instructions will suffice.
 +
  
 {{:slackwarearm:41-LoadGPMatboot.jpg?400|}} {{:slackwarearm:41-LoadGPMatboot.jpg?400|}}
Line 717: Line 751:
 If your RockPro64 does not have an RTC battery backup, you may wish to configure it to [[https://docs.slackware.com/howtos:network_services:ntp|set time from an NTP Server]]. If your RockPro64 does not have an RTC battery backup, you may wish to configure it to [[https://docs.slackware.com/howtos:network_services:ntp|set time from an NTP Server]].
  
-== Keeping the Slackware OS up to date ==+====== Managing Slackware on the RockPro64 ====== 
 + 
 +===== Keeping the Slackware OS up to date =====
  
 One of the preferred tools to keep your system up to date is [[slackware:slackpkg|slackpkg]]. One of the preferred tools to keep your system up to date is [[slackware:slackpkg|slackpkg]].
Line 723: Line 759:
 <note tip>**Upgrading the Kernel**: in Slackware x86/64 manual steps are required after upgrading the Kernel packages.  In Slackware ARM, you simply upgrade the Kernel packages and reboot.</note> <note tip>**Upgrading the Kernel**: in Slackware x86/64 manual steps are required after upgrading the Kernel packages.  In Slackware ARM, you simply upgrade the Kernel packages and reboot.</note>
  
-== Use a graphical login manager ==+ 
 +===== Loading Additional Linux Kernel Modules within the OS Proper ===== 
 + 
 +Often Kernel modules for discovered hardware will be automatically loaded, but occasionally you will need to manually configure the loading of some modules. 
 + 
 +<code> 
 +/etc/rc.d/rc.modules.local 
 +</code> 
 + 
 +This file is a shell script that is run as one of the last steps before the OS has fully booted.  You can enter ''modprobe'' commands here to load the specific modules you require. 
 + 
 +Configuration files within the directory ''/lib/modprobe.d/'' can be used to configure the parameters of the modules.  Existing files within that directory serve as reference examples should you need them. 
 + 
 +===== Loading Additional Linux Kernel Modules early in the boot sequence ===== 
 + 
 +There are a number of peripherals that may require Kernel modules loading early on in the boot sequence. 
 +An example of this would be RTCs (Real Time Clocks) or storage controllers that are required to access the file systems on which the OS lives. 
 + 
 +<note important>Usually you won't need to load modules early in the boot sequence.  See the previous section about loading modules from within the OS Proper.</note> 
 + 
 +To load Kernel modules during the early boot sequence, read: 
 +<code> 
 +/boot/local/README.txt 
 +</code> 
 + 
 +As root, the easiest way to begin is by renaming the example script: 
 + 
 +<code> 
 +mv /boot/local/load_kernel_modules.post.sample /boot/local/load_kernel_modules.post 
 +</code> 
 + 
 +Then add the appropriate module loading commands to: ''/boot/local/load_kernel_modules.post'' 
 +You can also add shell code here to initialise a peripheral - writing something to the peripheral's Kernel interface, for example. 
 + 
 + 
 +===== Use a graphical login manager =====
  
 If you prefer to use a graphical login manager, you can configure the default runlevel as 4: If you prefer to use a graphical login manager, you can configure the default runlevel as 4:
Line 733: Line 804:
 </code> </code>
  
- +===== Slackware repository partition =====
- +
-=== Slackware repository partition ===+
  
 The Slackware Installer image contains a type ''ext4'' partition labeled ''SLKins_aio-pkgs'' from which the packages are installed.   The Slackware Installer image contains a type ''ext4'' partition labeled ''SLKins_aio-pkgs'' from which the packages are installed.  
Line 753: Line 822:
 <note tip>Most users simply leave the partition alone, as it causes no issues.</note> <note tip>Most users simply leave the partition alone, as it causes no issues.</note>
  
- +===== Customising the Slackware Linux Kernel =====
-== Customising the Slackware Linux Kernel ==+
  
 If you'd like to customise the Linux Kernel, the easiest way is to follow the [[slackwarearm:cstmz_kernel|HOWTO]] guide and use the Slackware ARM Kernel build script to create new packages. If you'd like to customise the Linux Kernel, the easiest way is to follow the [[slackwarearm:cstmz_kernel|HOWTO]] guide and use the Slackware ARM Kernel build script to create new packages.
  
  
-=== Reducing Boot Time ===+===== Reducing Boot Time =====
  
 Slackware ARM ships with a generic OS InitRD (Operating System Initial RAM Disk - the environment that prepares the machine to boot the Operating System Proper), so as to support a wide range of Hardware Models. Slackware ARM ships with a generic OS InitRD (Operating System Initial RAM Disk - the environment that prepares the machine to boot the Operating System Proper), so as to support a wide range of Hardware Models.
Line 786: Line 854:
  
 <note tip>If at any point you want to revert to the generic OS InitRD, simply reinstall the ''a/kernel'' package (and unset the setting if you configured it in ''/etc/os-initrd-mgr.conf'').</note> <note tip>If at any point you want to revert to the generic OS InitRD, simply reinstall the ''a/kernel'' package (and unset the setting if you configured it in ''/etc/os-initrd-mgr.conf'').</note>
 +
 +
 +===== Installing extra Software =====
 +
 +Slackware comes with a good base of software applications, but there are plenty more available in the Open Source Ecosystem.
 +
 +The best way to add new software is to [[slackwarearm:sft-repos|use the build scripts from SlackBuilds.org]].
 +
 +
 +===== Managing the Boot Loader firmware =====
 +
 +During the Slackware installation process, you are offered the opportunity to flash the Boot Loader to the SPI flash.
 +Occasionally, updates will be made available to the Boot Loader to address bug fixes and provide improvements.
 +
 +Slackware provides a package ''hwm-bw-rk3399'' within the ''a'' series that contains the latest Boot Loader firmware and contains the ''bootloader-flash-rk3399'' tool to manage the upgrade life cycle.
 +
 +=== Upgrading the Boot Loader firmware ===
 +
 +  - Upgrade to the latest available version of the package ''hwm-bw-rk3399'' (using ''slackpkg'' as described within this document).
 +  - As root, run the ''bootloader-flash-rk3399'' tool.
 +
 +In this example we'll run the Boot Loader management tool as the ''root'' user using the ''su'' tool:
 +<code>
 +$ su -c 'bootloader-flash-rk3399' -  # You must include the trailing '-' character
 +</code>
 +
 +When an upgrade is required, in most cases you'll see a screen like this which provides information about the currently installed Boot Loader and the newer version available:
 +
 +{{:slackwarearm:slackarm-flashing-reqd-prevslackrel.jpg?400|}}
 +
 +If you've wiped the Boot Loader from SPI flash or have installed a non-Slackware firmware build, you will see a screen like this where the existing installed Boot Loader is unrecognised:
 +
 +
 +{{:slackwarearm:slackarm-flashing-required.jpg?400|}}
 +
 +If the installed Boot Loader matches the currently available version, you will be advised that flashing is unnecessary.  However, you can re-flash it if you wish.
 +
 +{{:slackwarearm:slackarm-flashing-not-required.jpg?400|}}
 +
 +If you proceed with flashing, the work flow looks like this and takes approximately two minutes to complete.
 +<note important>You must ensure the system has sufficient power/is plugged in.  If the machine powers off before flashing completes, you would need to re-flash using the bootable SD card as described in the initial installation instructions.</note> 
 +
 +{{:slackwarearm:37-InstallingBootLoader-SPIFlash-readytogo.jpg?400|}}
 +
 +{{:slackwarearm:38-InstallingBootLoader-SPIFlash-inprogress-rpro64.jpg?400|}}
 +
 +{{:slackwarearm:39-InstallingBootLoader-SPIFlash-complete.jpg?400|}}
 +
  
  
Line 814: Line 930:
 Once wired up, connect the USB end of the adapter into your Linux Host Computer, and use the following command. Once wired up, connect the USB end of the adapter into your Linux Host Computer, and use the following command.
  
-<note tip>This assumes that there are no other similar adapters occupying /dev/ttyUSB0.  If so, you will need to adjust the device name accordingly (e.g. perhaps /dev/ttyUSB1).</note>+<note tip>This assumes that there are no other similar adapters occupying ''/dev/ttyUSB0''.  If so, you will need to adjust the device name accordingly (e.g. perhaps ''/dev/ttyUSB1'').</note>
  
 <code> <code>
 slackwarearm:inst_sa64_rk3399_rockpro64 ()