Homepage Wiki Forum Buy

Gnublin Distribution

From GNUBLIN

Contents


The GNUBLIN distribution provides a common platform for all users of GNUBLIN. As a base we provide Debian Linux with an adapted kernel, bootloader etc.,which should finally be a simple platform for embedded Linux development.

Downloads: GNUBLIN Distribution Versions

GNUBLIN DISTRIBUTION.jpg

There are different possibilities of using the distribution. On the one hand you can use it to easily create a bootable SD card with the gnublin-installer. On the other hand you can create your own customized rootfs.

The distribution contains the following:

  • Debian 6.0 System
  • Adapted kernel for GNUBLIN
  • Bootloader
  • A folder which conatins a lot of examples (scripts, applications etc.)
  • GNUBLIN packages for installing additional modules or hardware spezific applications.


The GNUBLIN package system

An trivial possibility to get use of applications, drivers etc. as a beginner, are the GNUBLIN packages. The package format is basing on the well-known Debian package management (.deb). You can easily install and remove this packages with the dpkg or apt tools.

For now the following GNUBLIN packages are aviable:

Gnublin packages list

Many programs and demos can simple be created by your own as .dep packages. How this works is described here.

Quickinstall on SD card

To set up a new System, it is the best to use the Gnublin-Installer. With that you can create a SD card with any size a Gnublin system including RootFS, kernel and bootloader.

Therefore you start the gnublin-installer, choose the correct files for rootfs, kernel and bootloader and then press start for starting the copy prozess. After 10-20 minutes the card is ready for the first boot.


Gnublin installer1.jpg



Alternatively, upgrade existing card

Is the SD card partitioned already and the boot loader is also present on the SD card you can override only the file system:

rootFS + upgrade matching kernel

First insert SD card

wget http://gnublin.org/downloads/rootfs.tar.gz
sudo tar xzvf gnublin_debian_rootfs.tar.gz -C /media/<SD_CARD_LABEL>

ready.

upgrade Bootloader

wget http://gnublin.org/downloads/apex/apex.bin
sudo dd if=apex.bin of=/dev/<SD_CARD>

For Advanced: Create your own distribution

The first step is to open a terminal and change into the directory in which you want to install the Distribution. If you have done this you can easily download the Distribution with the following command:

git clone https://github.com/embeddedprojects/gnublin-distribution.git

After the download has completed, you can change into the right directory in the terminal, with the following command:

cd gnublin-distribution/lpc3131

In this directory you will find an executable setup-file which you can start with the following command:

./build_GNUBLIN_support_package.sh

This command does the whole installation process.

If you want to cleanup the temporary downloaded files (Kernel,Toolchain, etc.) and your complete build_processes you can start the script with the following command:

./build_GNUBLIN_support_package.sh clean

There are two different options for the debian build.

  1. a complete Debian, with all packages and some example programs (max)
  2. a complete Debian, with a reduced number of packages and without extras (min)

The standrad configuration is the max option with example programs and all packages. If you want to change the option to the min version you only have to edit distro_version="-max" in line 8 of the build_GNUBLIN_support_package script to distro_version="-min"

If you want to add some additional debian packages which are not included in the following list, you should read the part Debian installation of this article.

-min

i2c-tools makedev module-init-tools dhcp3-client netbase ifupdown iproute iputils-ping wget net-tools vim nano hdparm bzip2 p7zip unrar 
unzip zip p7zip-full screen less usbutils psmisc strace info ethtool wireless-tools wpasupplicant python rsyslog whois time procps perl 
parted build-essential ccache bison flex autoconf automake gcc libc6 cpp curl ftp gettext subversion

-max

i2c-tools makedev module-init-tools dhcp3-client netbase ifupdown iproute iputils-ping wget net-tools vim nano hdparm bzip2 p7zip unrar 
unzip zip p7zip-full screen less usbutils psmisc strace info ethtool wireless-tools wpasupplicant python rsyslog whois time procps perl 
parted build-essential ccache bison flex autoconf automake gcc libc6 cpp curl ftp gettext subversion php5 gpsd gpsd-clients fswebcam
uvccapture lm-sensors firmware-linux-free firmware-linux-nonfree firmware-realtek firmware-ralink firmware-linux firmware-brcm80211 
firmware-atheros rcconf cgilib cgiemail cgi-mapserver lrzsz libnss-mdns libpam-modules nscd ssh libpcsclite1 libnl1 nfs-common tree
lighttpd vsftpd rsync ruby git fakeroot picocom

The installation process is running trough the following steps:

  1. Toolchain installation
  2. Bootloader installation
  3. Kernel installation
  4. Debian installation
  5. Gnublin Installer to copy everything to the SD-Card

You can read explanations and tips to each of the steps in this article.

At the end you will also find some explanations to the single steps of the installation progress and how you can repeat steps if something went wrong during the installation process.


Toolchain installation

The first step of the setup is the installation of a toolchain in this case ARM eldkv5. If you already have a working eldk toolchain, the setup will only create a link to the eldk-toolchain in the directory toolchain.

You don't have configuration options for this step of the setup.


Bootloader installation

The second step of the setup is the bootloader installation in this case it's apex. If the setup continues to this step, a graphical menu is shown in the terminal. You can, or better, should set the correct size of your RAM in this menu (old_8MB or new_32MB). You can do this like it is described below:

First you should use the Arrow-Down-Key to navigate to the following entry:

Apex menuconf 1.jpg

After this you schould press ENTER to get into the following menu:

Apex menuconf 2.jpg

There you should use the Arrow-Down-Key again to navigate to the highlighted option and press ENTER again. Now you get the selection menu for your RAM-Size.

Apex menuconf 3.jpg

Here you should choose the right size of your RAM and press ENTER again. After this you must press the Right-Arrow-Key to get to the point EXIT and press ENTER. Repeat the last step, and you will be asked if your configuration is fine and if you want to save it.

Apex menuconf 4.jpg

Press ENTER again and the build process goes on.


Kernel installation

The third step of the setup is the kernel installation. If the setup has reached this step there will popup a graphical menu in the terminal again. In this menu you can edit the kernel configuration and add or remove some modules.

Kernel menuconfig.jpg

NOTE All essential and important drivers are activated in the standard configuration and are build into the kernel or as modules.

If you want to use the standard configuration, you only have to press the Right-Arrow-Key and then ENTER to exit the configuration.But if you want to add some modules which are not in the standard configuration, you can easily activate the module in the menu by navigating through the menu and press the right button (buildin=y, module=m, deactivate=n).


Debian installation

The fourth step of the setup is the debian installation. This step doesn't have a graphical user interface or options to configure the debian after you have started the setup. In this step the previously built kernel and modules will be integrated into the debian-root-filesystem and the debian packages will be downloaded and installed.

If you want to add some additional packages, which are not included in the standard configuration (-min, -max), you only have to add the name of the package into the file gnublin/lpc3131/rootfs/debian/debian_install/generel_settings.sh. This should be done before you start the setup process.

Now you have two options, depending on which installation you want to use

  1. MIN: If you have choosen the minimal-installation you only have to add the name of the package into line 45 add_packages_base="...." without semicolon behind the last package name.
  2. MAX: If you have choosen the maximal-installation you only have to add the name of the package into line 43 add_packages_max="...." without semicolon behind the last package name. (You could also add the package name like it is described above in add_packages_base="....", but this would cause that the additional package will always be installed, if you choose the minimalinstallation too.)


Copy the files to the SD-Card

The fifth and last step of the setup is to copy the created files to the SD-Card. You can do this manually or with a tool called Gnublin Installer.

You have to click on use file for the bootloader, rootfs and kernel and choose the right files.

Option Fileiname
Bootloader apex.bin
Rootfs debian_rootfs_gnublin.tar.gz
Kernel zImage

The files are all located in the same directory. It's the directory output (PathToTheDistro/gnublin-distribution/lpc3131/output)

Please Note: If you won`t use the gnublin-installer, or if the tool does not work properly, you have to copy the files manually to the SD-Card.

You should start with the Debian rootfs (debian_rootfs_gnublin.tar.gz), which you can copy into the root directory of your SD-Card. After this you have to extract the archive by changing into the root directory of your SD-Card in a terminal and execute the following command:

tar -xzvf debian_rootfs_gnublin.tar.gz

After the archive is successfully extracted, you can delete the file debian_rootfs_gnublin.tar.gz from your SD-Card.

Now you have to extract the kernel and modules to the SD card:

tar xzvf kernel.tar.gz -C /path/to/SD-card

In some cases you must copy the bootloader to your SD-Card (e.g. changing the RAM size or other configurations). You can do this like it's described in the article Bootloader compile and installation from the section "Copy the bootloader".

Stage Files

After each step of the setup, an invisible stage-file with the name .stamp_<step> will be crated in the root directory of the Distro (PathToTheDistro/gnublin/lpc3131/). The setup process uses this files to recognize which steps were successfull, already.

Step Filename
Toolchain .stamp_toolchain
Bootloader .stamp_bootloader
Kernel .stamp_kernel
Debian-Rootfs .stamp_rootfs
Post-install .stamp_rootfs_post

If you want to rebuild only the kernel, you just have to delete the file .stamp_kernel. You can do this either with a terminal and the command rm .stamp_kernel or with a file browser of your choise. If you want to use a file browser you should notice that invisible files should be shown in the browser (e.g. Dolphin CTRL+DOT, Nautilus CTRL+H....)

In other languages