第7章 Kernel and Userland PlacementOn the Armadillo-400 Series, by default the kernel and userland images are stored in flash memory and loaded to RAM by the bootloader before the kernel is booted. It is also possible to have the kernel and userland images loaded from places other than flash memory on the Armadillo-400 Series. This chapter explains how to load images from other places as well as the boot options required to do so. 7.1. Loading From A TFTP ServerThe tftpboot function of the Hermit-At bootloader can download kernel and userland image files from a TFTP server, load the images to RAM and then boot them. As images are booted without first writing them to flash memory, the tftpboot function can help development efficiency during stages when the images are updated regularly. Place the kernel and userland images in the root directory of the TFTP server. ![[ティップ]](images/tip.png) | |
---|
A TFTP server (atftpd) is started by default on ATDE v3.0 and later. Files placed in the /var/lib/tftpboot/ directory will be accessible via TFTP. |
Set the jumpers on the target Armadillo appropriately for maintenance mode and power on the board. Using the serial console software on the work PC, enter the following command[14]. Either one or both of the kernel and userland images may be specified. Where the TFTP server has the IP address 192.168.10.1, the Armadillo has the IP address 192.168.10.10, the kernel image filename is linux.bin.gz and the userland image filename is romfs.img.gz , the command[] will be as shown below. When the TFTP configuration is set with the setbootdevice command, the settings are saved and the kernel and userland images will be loaded from the TFTP server on all future boots. 7.2. Loading From StorageThe kernel image can be loaded from a microSD card and the userland root filesystem can be stored on either a microSD card or USB memory on the Armadillo-400 Series. The following explains how to load a kernel image and root filesystem both stored on a microSD card. In this example one partition is created on a microSD card and formatted as an EXT3 filesystem. A root filesystem is then created there and the kernel image placed under the /boot/ directory. The device from which the kernel image will be loaded is specified with Hermit-At's boot options. The placement of the root filesystem is specified with kernel parameters. ![[警告]](images/warning.png) | |
---|
The steps described here apply when using versions 2.0.3 and later of the Hermit-At bootloader. As versions 2.0.2 and earlier are not compatible with EXT3 formatted boot partitions, these steps will not be usable. If version 2.0.2 or earlier of the Hermit-At bootloader must be used for some reason, please refer to the explanation in version 1.2.0 of the Armadillo-400 Series Software Manual. |
First, make one primary partition on the microSD card. Insert the microSD card into the slot[] and create the partition as shown in 図7.3「Partitioning Procedure」.
| First, delete a pre-existing partition. If there is more than one pre-existing partition, please delete them all. |
| Make the new primary partition on the microSD card. |
| Press enter to use the default value (1) for the first cylinder. |
| Press enter to use the default value (124277) for the last cylinder also. |
| Write the changes to the microSD card. |
![[ティップ]](images/tip.png) | |
---|
As the number of cylinders depends on the specifications of the microSD card being used, the number may not be the same as that displayed in the procedure above. |
7.2.3. Kernel Image PlacementWhen booting from a microSD card, the kernel image must be stored in the /boot directory on the boot partition. Both uncompressed kernel images (Image, linux.bin) and compressed images (Image.gz, linux.bin.gz) are supported. In the following example the wget command is used to obtain the kernel image. The URL that should be specified with the wget command differs depending on the product. Please refer to the table below for the correct URL. 表7.1 Kernel Image Download URLs Product | URL |
---|
Armadillo-420 | http://download.atmark-techno.com/armadillo-420/image/linux-a400-[version] .bin.gz | Armadillo-440 | http://download.atmark-techno.com/armadillo-440/image/linux-a400-[version] .bin.gz |
The following example shows the kernel placement for Armadillo-440. 7.2.4. Creating A Root FilesystemThe following explains how to create a root filesystem on a microSD card. Either Debian/GNU Linux or a filesystem created with Atmark-Dist can be used for the root filesystem. 7.2.4.1. Installing Debian GNU/LinuxTo install Debian GNU/Linux, first obtain the archive files from either the debian directory on the included DVD or from the download site. These are files from a standard Debian GNU/Linux install which have been divided up and compressed into a number of archives. The installation can be performed by just extracting the archives to the root filesystem. ![[警告]](images/warning.png) | |
---|
A partition with at least 1GB of free space is required when installing Debian GNU/Linux as the root filesystem. |
In the following example the wget command is used to obtain the debian archives. The URLs that should be specified with the wget command differ depending on the product. Please refer to the table below for the correct URLs. 表7.2 Debian Archive Download URLs Product | URL |
---|
Both Armadillo-420 and Armadillo-440 | http://download.atmark-techno.com/armadillo-4x0/debian/debian-lenny-armel-#.tgz[] | http://download.atmark-techno.com/armadillo-4x0/debian/debian-lenny-armel-a4x0.tgz |
7.2.4.2. Using an Atmark-Dist ImageThe following explains how to create a root filesystem on a microSD card by using a root filesystem produced with Atmark-Dist. It is possible to use a microSD with a smaller storage capacity than when installing Debian. In the following example the wget command is used to obtain the initrd image containing the root filesystem produced with Atmark-Dist. The URL that should be specified with the wget command differs depending on the product. Please refer to the table below for the correct URL. 表7.3 Atmark-Dist Image Download URL Product | URL |
---|
Armadillo-420 | http://download.atmark-techno.com/armadillo-420/image/romfs-a420-[version] .img.gz | Armadillo-440 | http://download.atmark-techno.com/armadillo-440/image/romfs-a440-[version] .img.gz |
7.2.5. Boot Device and Kernel Parameter SettingsThe place from which the kernel image will be loaded is selected with Hermit-At's boot device configuration. The placement of the root filesystem is specified with kernel parameters. Set the jumpers for maintenance mode and reboot the board. Execute the command shown in 図7.8「Boot Device Designation」 in order to boot from a kernel image stored in the first partition on a microSD card. Execute the command shown in 図7.9「Root Filesystem Designation Example」 in order to use a root filesystem stored in the first partition on a microSD card. 7.3. Return Settings To DefaultsEnter the command shown in 図7.10「Assigning Flash Memory As Boot Device」 to return to using flash memory as the boot device. To return kernel parameters set with setenv to their default state, execute the clearenv command. | |
|