FPGARM4ULinux Boot

From Fpga4u

Jump to: navigation, search

Boot

The first boot is used to install a basic system on the fpgarm4u card.

The second boot is used to improve the system by installing correctly each packet and add useful others (like compiler, ssh server, ...).


Do not forget to connect the USB key in case of autonomous system and the Ethernet wire in case of Ethernet system.

First Boot

Plug the power supply on the card and the serial wire. In case of an autonomous system, do not plug the Ethernet wire.

The boot sequence will be displayed on the terminal.

Once the prompt is displayed, mount the /proc directory and finalise the installation of the system.

# mount -t proc proc /proc
# cd /root/
# sh install_fpgarm4u.sh | tee install.log

Errors due to time are not serious. The clock system is not up to date so the system thinks it is on Jan 1st 1970.

The installation (tzdata) will ask you for the timezone, answer : 8, Zurich

When the system is installed, you have to entrer a root password. But before doing that, the system date has to be changed (command date -u MMDDhhmmYYYY) for avoid a password problem during next logins. You can choose any password you would like, but an easy password to remember is fpgarm4u.

# date -u 101315452008
# passwd

Finally, reboot the FPGARM4U card.

# reboot -f

When the system is halted ("Power off" written on the terminal), unplug the power supply.

Second boot

Before booting the second time, you have to do again the manipulation Upload the software to the FPGARM4U card. This time, remove init=/bin/bash from the bootargs argument of u_boot_variables. The argument should only contain "bootargs=mem=64M console=ttyS0,115200 root=/dev/sda1 rw rootdelay=5". Do not forget to avoid booting from the data flash to be able to reload the programs on the card.

Once you have done that, plug the power supply on the card and the Ethernet wire. During the boot sequence, the USB key will be checked because it was not be unmounted correctly. It is normal. The reboot -f command did not halted the system really correctly. When the boot sequence ends, a prompt should appear.

After being loged in (root//fpgarm4u), the system should be updated. We will also installed new programs, clean the root file system/packages, etc.

Firstly, the install script is no longer needed.

# rm -f /root/install_fpgarm4u.sh

Secondly, update de list of packets.

# apt-get update

Verify that the installation (during the first boot) has been made correctly (otherwise, valid with [y]).

# apt-get -f install

Install a program which allows to update the clock system(valid with [y]).

# apt-get install ntpdate
# ntpdate pool.ntp.org

Then, look for the packages which can be updated and install some useful programs.

# apt-get update
# apt-get upgrade
# apt-get install openssh-server openssh-client openssh-blacklist screen vim build-essential bzip2 mount pmount dbus less locales
# apt-get clean

The translation of the system should be checked. To do that, execute the following command.

# dpkg-reconfigure locales

In the list, check the following lines or any other languages you would like, but do not check to much : translations take a lot of space.

en_GB ISO-8859-1
en_GB.ISO-8859-15 ISO-8859-15
en_GB.UTF-8 UTF-8

Once the language(s) has/have been chosen, define the default one.

Last detail, it is recommended to create a normal user for not always be loged in as administrator. For doing that, you just have to execute the following command (replace XXX by the username of the new user) and answer to some questions.

# adduser XXX

Configuration files for screen, vim and bash exist in the root directory. You may be interested in copy these files to the home directory of your new user.

# cp .screenrc /home/XXX/
# cp .vimrc /home/XXX/
# cp .bashrc /home/XXX/
# chown XXX:XXX /home/XXX/ -R

The system is now ready to be used ! Nevertheless, a reboot of the system is required to finish the configuration of certain packages, one of which is "locales".

Note :

The udev package will not be installed. The nods in /dev have to be created and configured manually, if necessary. The manual is always the same for a partition in the hard disk (or usb key). Firstly, create a nod for the entire disk.

# mknod /dev/sdX b 8 Z

Then, create a nod for each partition you would like to use.

# mknod /dev/sdXY b 8 Z

where :

- X is the letter of the peripheral : b, c, d, e, ... (a is used by the hard disk of the root file system)

- Y is the number of the peripheral : 1, 2, 3, ...

- Z is the minor number of mknod. It is calculated with the following maner : f(X)*16+Y where [f(a)=0], f(b)=1, f(c)=2, ...

These operations have to be done only once, the nods stay in /dev. But you have to be vigilant to not access them when the hard disk is not pluged.

Other boots

For the other boots, it is sufficient to plug the USB disk where is the root file system into the FPGARM4U and the power supply.

If you would like to use your network through the USB to avoid to use a serial wire and a RJ-45 wire, it is possible to set up the network through the USB port. Follow this guide.

Personal tools