Homepage Wiki Forum Buy

Bootloader compile and installation

From GNUBLIN

Contents

Apex Bootloader(8MB and 32MB Support) with gnublin-distribution

The bootloader is the first code, which the processor executes after the reset. Main task of the bootloader is to load the Linux-Kernel from the SD-Card into the RAM and then execute the Kernel.

To compile the Apex bootloader for the GNUBLIN you need the Gnublin Distribution.

The bootloader will be automatically compiled with the start of the build_GNUBLIN_support_package.sh script.

The configuration for the bootloader is also opened automatically.

Picking the right RAM

First you start the build_GNUBLIN_support_package.sh. The menuconfig of the bootloader opens automatically

If you run the script before, just delete .stamp_bootloader and run then the build_GNUBLIN_support_package.sh script.

After opening the menuconfig you go to Platform Setup -> Choose RAM size ' and pick the correct RAM size.

Precise information on this step you find here: Gnublin Distribution.


Apex Bootloader(8MB und 32MB Support) manual from code

First of all you download the file apex-1.6.8.tar.gz. This is in Gnublin distribution Git repository. With

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

you can clone the whole gnublin-distribution. The apex-1.6.8.tar.gz file is located in the path

gnublin-distribution/lpc3131/bootloader/apex/1.6.8

You do not want to download the complete distribution, you can also just get the single file with

wget https://github.com/embeddedprojects/gnublin-distribution/raw/master/lpc3131/bootloader/apex/1.6.8/apex-1.6.8.tar.gz


Now unpack the file:

tar xfvz apex-1.6.8.tar.gz
cd apex-1.6.8

Start the configuration:

make menuconfig

Here several configs can be made, e.g. Platform Setup -> Choose RAM size for the right RAM size, or Environment -> Default kernel command line change the default kernel command line. Close the menuconfig with 2x[ESC].

After you have saved the new .config, bootloader can be compiled:

make

When the process has completed successfully, a soft link to the apex.bin(the bootloader) is located in the same directory.

Now the bootloader only needs to be copied to the SD card as shown in the next section.


Copying the bootloader

sudo dd if=/dev/zero of=/dev/<partition of the bootloaders>
sudo dd if=apex.bin of=/dev/<partition of the bootloaders>

Which partition is the bootloader

If you are unsure which one is the right partition on the SD-Card you just follow these instructions:

sudo gparted

Then gparted is starting and top right you see the possible devices. If you have a 2GB SD-Card it looks like this:

Bootloader.png

Usually there are two partitions on the SD-Card. One for the Rootfs and one for the bootloader. The filesystem for the partition of the bootloader always displays unknown In this case the partition sdd2.

So, to copy the bootloader onto the SD-Card in this case you must proceed as follows:

sudo dd if=/dev/zero of=/dev/sdd2
sudo dd if=apex.bin of=/dev/sdd2
In other languages