The development process involves working with basic libraries, applications and system configuration files. While all files are altered only under the working directory, in order to ensure the PC operating system is not inadvertently damaged from any mistakes made during development please perform all work as a general user and not a root user.
7.1. Building the Bootloader
This section explains the procedure for creating an image file from the source code of the bootloader "U-Boot".
Default configurations for SPI flash memory and SD/eMMC ware merged since u-boot-x1-at16.
手順7.1 Building the Bootloader
Preparing Source Code
Prepare and extract the U-Boot source code archive.
The following shows how to build a Debian GNU/Linux root file system using x1-debian-builder.
x1-debuan-builder is a tool that can be used on Linux running on a PC such as ATDE to build armhf architecture Debian GNU/Linux root file systems for Armadillo-IoTG3.
Depending on how it is used, after starting Armadillo-IoT G3 the first time the ssh secret key, operation log, shell command history, the configuration files associated with the hardware UUID and so on are generated on the root file system. If the root file system is then copied as-is to another Armadillo-IoT G3 , there is a possibility that behavior differences may occur due to key leakage or UUID mismatch. Therefore it is recommended to use x1-debuan-builder and build a new root file system for use in mass production etc.
7.3.1. Creating the Factory Default Root File System Archive
The procedure for building the root file system archive of the factory default state is as follows. As packages are obtained over the internet it will depending on the connection speed, but will generally take around 40 minutes.
図7.1 Procedure for Creating the Factory Default Root File System Archive
7.3.2. Creating a Customized Root File System Archive
The root file system can be modified by altering the files under x1-debian-builder-[VERSION]/aiotg3_resources and executing the build.sh script.
188.8.131.52. Adding Files and Directories
All files and directories under aiotg3_resources except for the resources directory are copied directly to the root file system. Both the UID and GID of the files become "root".
184.108.40.206. Changing Packages
The packages to be installed on the root file system can be customized by altering aiotg3_resources/resources/packages.
One package name is written per line. Please use package names in the form that can be correctly used as the argument to "apt-get install" on Armadillo-IoT G3.
If an incorrect package name is specified, the following error message is displayed in the build log and the archive is generated without the package.
E: Unable to locate package XXXXX
図7.2 Error Message when Incorrect Package Name Specified
Other packages that the package depends on are automatically installed by the apt command without needing to specify them. Also, packages that form the base of Debian GNU/Linux such as apt and dpkg are also automatically installed.
The packages include the lua and ruby interpreters and a web server (lighttpd). If they are not required just delete each package's line.
For packages such as openssh-server that automatically generate private keys when installed, as a general rule do not add them to the packages and instead use "apt-get install" to install them separately after starting Armadillo.
If openssh-server is added to packages, it will be possible to log in to all Armadillo which the built root file system archive is written to using a single public key. If intentionally using the same secret key for multiple Armadillo, understand that it can lead to vulnerabilities and take appropriate measures before using it.