This is an old revision of the document!
Warning: Declaration of syntax_plugin_pagebox::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/customer/www/wiki.solid-run.com/public_html/lib/plugins/pagebox/syntax.php on line 32
Warning: Declaration of syntax_plugin_pagebox::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/customer/www/wiki.solid-run.com/public_html/lib/plugins/pagebox/syntax.php on line 43
Debian
Overview
Name: | Debian |
---|---|
Picture: | ![]() |
Active | Yes |
Purpose | General Linux |
Ignition install | Yes |
Compatibility | All A38x MicroSoms |
More information | |
Maintained by | Debian-ARM team |
Forum | |
Website | debian.org |
Description
Debian and its derivatives are a large family of Linux operating systems. This includes Debian, Ubuntu, Xubuntu, Kubuntu, and many specialised distributions. All distributions share the same package management structure. Packages available for one version are very likely to be compatible with other versions.
The Debian family of operating systems are very versatile. As a result there are many ways to install and set-up one of these systems.
Debian focuses on stability and security of its releases. As a result, new features are not added to existing installations, and new releases are not frequent. Software packages are updated for security releases only. There are also testing and unstable versions. These are development versions, which could become the next main version. Testing and unstable versions are updated frequently, but may be unstable.
Official SolidRun Images
Images for Jessie and Stretch are available here. However as upstream support for the Clearfog has progressed quite far, we plan to discontinue custom images with the release of Buster. Please refer to the next section for details.
Default username: debian Default password: debian
There is no root password! If you really need one, you can run sudo passwd root to create your own password.
Working on the image
The debian image is produced from a custom build system. The sources are available on github. To add software packages, configuration files or any other modifications: Look at configs/sr-a38x-debian-jessie.inc
# How to build the image: ./mktarball.sh configs/sr-a38x-debian-jessie.inc ./mkimage.sh sr-a38x-debian-jessie.tar 1000M
Upstream (Buster)
Debian Buster (Testing) can be installed using the official debian-installer by correctly deploying it to a block device such as microSD or USB drive.
The block device must have a valid partition table either GPT or MBR, and at least one partition formatted with a filesystem known by both U-Boot and debian-installer, and big enough to hold the bootable files and an installer ISO image! We suggest using either FAT or ext4.
Getting the Files
All files required are available on the download page for buster:
- hd-media (other images → armhf → hd-media): hd-media.tar.gz
- ISO (CD → armhf):
Preparing the block-device
- Unpack hd-media.tar.gz to a partition on the drive
- Copy the downloaded ISO to a (/the same) partition on the drive
Add U-Boot (optional)
U-Boot for the Clearfog devices is not part of Debian! That means it needs to be installed and managed seperately.
If the installation media is a microSD, then it can be wise to now install U-Boot to that card by following our instructions on the U-Boot page.
Otherwise U-Boot has to be loaded via UART or be already available on one of eMMC, microSD, SPI Flash and SSD.
Add a preseed.cfg (optional)
A preseed file can be used to fully automate the installation. The Debian project maintains a sample for its current stable release at https://www.debian.org/releases/stable/example-preseed.txt.
Below is a sample for installing Buster to an M.2 SSD:
# Localization d-i debian-installer/locale select en_GB.UTF-8 d-i debian-installer/language string en d-i localechooser/preferred-locale select en_GB.UTF-8 # Networking d-i netcfg/choose_interface select eth0 d-i netcfg/get_hostname string clearfog d-i netcfg/get_domain string unassigned-domain # Debian Mirror d-i mirror/country string manual d-i mirror/http/hostname string deb.debian.org d-i mirror/http/directory string /debian d-i mirror/http/proxy string # Users and Passwords d-i passwd/root-login boolean false d-i passwd/user-fullname string Debian User d-i passwd/username string debian d-i passwd/user-password password debian d-i passwd/user-password-again password debian # Time d-i clock-setup/utc boolean true d-i time/zone string Israel d-i clock-setup/ntp boolean true # Partitioning d-i partman-auto/disk string /dev/sda d-i partman-auto/method string regular d-i partman-auto/choose_recipe atomic d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true # Package Selection tasksel tasksel/first multiselect standard, ssh-server # Package Survey popularity-contest popularity-contest/participate boolean false # Exit Installer d-i finish-install/reboot_in_progress note
Another method for acquiring a preseed.cfg file is to run the installer by hand, then ask debconf for the settings that the installer had been using:
sudo debconf-get-selections --installer > preseed.cfg
The preseed.cfg file should be placed on the installation drive next to the iso image. In addition the automatic install has to be explicitly enabled through the kernel commandline from the U-Boot console:
setenv bootargs "auto file=/hd-media/preseed.cfg" # boot into installer, e.g. usb run bootcmd_usb0
Starting the Install
All that is left to do is attaching the block storage to the Clearfog board and powering it up. The text based installer will show up on the serial console if boot succeeds.
The boot order is controlled by the boot_targets U-Boot environment variable. By default it says:
1. scsi0 2. mmc0 3. usb0 4. pxe 5. dhcp
In case the installer isn't started automatically because an existing system is found and started first, booting from the installer drive can be forced by invoking the corresponding boot command on the U-Boot console:
# for USB run bootcmd_usb0 # for microSD run bootcmd_mmc0 # for SSD run bootcmd_scsi0
Known Issues
EXPKEYSIG on repo.solid-build.xyz
Up to April 2018 we did not have a facility in place to update our repository signing key. While the key has been renewed on our build server, it did expire on any images from before October 22th 2017.
You know that you are affected when apt-get update shows an error message such as:
debian@clearfog:~$ sudo apt update ... Err:6 https://repo.solid-build.xyz/debian/stretch/bsp-imx6 ./ Release.gpg The following signatures were invalid: EXPKEYSIG A86C36D7E45C02CD BSP:IMX6 OBS Project <BSP:IMX6@mxobs> ... W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.solid-build.xyz/debian/stretch/bsp-imx6 ./ Release: The following signatures were invalid: EXPKEYSIG A86C36D7E45C02CD BSP:IMX6 OBS Project <BSP:IMX6@mxobs> W: Failed to fetch https://repo.solid-build.xyz/debian/stretch/bsp-imx6/./Release.gpg The following signatures were invalid: EXPKEYSIG A86C36D7E45C02CD BSP:IMX6 OBS Project <BSP:IMX6@mxobs> W: Some index files failed to download. They have been ignored, or old ones used instead.
It is suggested that you install our solidrun-keyring package from our repos by hand. In the future this package will be used to roll out key extensions in the future. Navigate to stretch, jessie or wheezy; Find the deb by name of solidrun-keyring_*_all.deb and install. Now apt should once againm be happy about our key.
systemd[1]: Time has been changed
When the rtc has an invalid state, this error message can render debian unusable. In this case the rtc eneds to be reset. Enter u-boot console by pressing any key at the u-boot prompt, then reset the rtc twice and reboot:
date reset date reset reset
eMMC Software Installation
Installing software on a ClearFog SOM with eMMC is a little tricky. You can not use the eMMC and the SD card simultaneously. The software for both initial boot, and the eMMC installation must be loaded from some other interface. Fortunately, the Armada 388 chip can boot from UART, so we can use that for initial boot.
This section describes a relatively painless procedure for installing the SolidRun provided Debian image on the eMMC. You will need to following items:
- USB storage device (Disk-on-Key), FAT formatted
- x86 PC running any flavor of Linux
Installation instructions follow.
- Download an installation images and utilities archive from here.
- Connect your x86 PC host to the ClearFog UART console on the micro-USB
- Copy the following files from the archive to the x86 PC:
- kwboot
- u-boot-clearfog-base-uart.kwb
- Copy the following files from the archive to the USB storage device:
- u-boot-clearfog-base-mmc.kwb
- zImage
- armada-388-clearfog.dtb
- Create a directory named
extlinux
in the USB storage device - Copy the file
extlinux.conf
from the archive into theextlinux
directory - Copy the latest Debian image (
.img.gz
suffix) from here to the USB storage device - Set the Clearfog boot select DIP switches to UART boot:
- For Clearfog Pro set to 11110
- For Clearfog Base set to 01001
- Plug the USB storage device into the Clearfog
- Run the following command on the x86 PC:
./kwboot -t -b u-boot-clearfog-base-uart.kwb /dev/ttyUSB0
- Power up the Clearfog
- Wait a few minutes of the U-Boot image to download
- Hit a key to stop autoboot
- Configure the eMMC to boot from hardware boot partition:
mmc partconf 0 1 1 0
- Reset the RTC block
date reset
- Boot initial installation Linux image
boot
- Type
root
at thebuildroot login:
prompt - Mount the USB storage device
mount /dev/sda1 /mnt
- Install the bootloader
echo 0 > /sys/block/mmcblk0boot0/force_ro dd if=/mnt/u-boot-clearfog-base-mmc.kwb of=/dev/mmcblk0boot0
- Install the Debian filesystem
xzcat /mnt/sr-a38x-debian-stretch-20180406.img.xz \ | dd of=/dev/mmcblk0 bs=1M conv=fsync
- Unmount the USB storage device
umount /mnt
- Power off the Clearfog
- Set the DIP switches back to boot from SD/eMMC: 00111
- Power on the Clearfog
- Debian should boot to the
login:
prompt