The objective of this project is to provide an SDK and root file system for the Raspberry Pi that is lightweight and takes full advantage of the hardware available. The resulting image produced is small distro known as Bsquask (linux). The Bsquask SDK provides a GCC 4.6.3 toolchain for building armv6 binaries with the hardfloat ABI, as well as bootloaders, kernel image, rootfs, and development sysroot for the Raspberry Pi.
The objective of this project is to provide an SDK and root file system for the Raspberry Pi that is lightweight and takes full advantage of the hardware available. The resulting image produced is small Linux distribution known as Bsquask.
The Bsquask SDK provides a GCC 4.6.3 toolchain for building armv6 binaries with the hard-float ABI, as well as bootloaders, kernel image, rootfs, and development sysroot for the Raspberry Pi.
Clone the RaspberryPi-BuildRoot project into your local code directory:
git clone git://github.com/nezticle/RaspberryPi-BuildRoot.git BuildRoot
Create the directory where you want your SDK to be built:
mkdir -p $BSQUASK_DIR
Enter the BuildRoot directory and generate a Makefile for your SDK:
make raspberrypi_defconfig O=$BSQUASK_DIR
sudo apt-get install flex bison texinfo mercurial git-core
Change to your SDK directory and and start the build (this can take a few hours the first time).
First you need to obtain an SD card that has the correct partitions setup. It needs to be setup as follows:
- 75MB fat32 partition - 500MB or greater ext4 partition (ideally using the remainder of the card)
If you need help with this, the Raspberry Pi wiki has a guide that's pretty close (make sure to use ext4 instead of ext3).
When you have this setup, mount the the two partitions (assuming /media/BOOT for the fat32 partiion, and /media/rootfs for the ext4). The run the following commands to install the rootfs:
tar -zxvf boot.tar.gz -C /media/BOOT
sudo tar -zxvf rootfs.tar.gz -C /media/rootfs
Now place the SD card in your Raspberry Pi and power on. If everything went as planned, you should get a login prompt for Bsquask (linux).
Lets set a few more environment variables to make things easier:
$BSQUASK_HOST_DIRis the directory containing the native built tools for your machine like your cross compiler. If you want to make use these tools then you will want to add these them to your path:
$BSQUASK_STAGING_DIRis the location of your sysroot. This is where you install everything that you've built for your device, including development headers and debug symbols.
$BSQUASK_TARGET_DIRis the location you use to build images. This is what you are deploying to your device, so only things you want to be in your images (like stripped binaries).
./autogen.sh --host arm-raspberrypi-linux-gnueabi --prefix=$BSQUASK_STAGING_DIR/usr