Giter Club home page Giter Club logo

joyxu / raspberrypi-buildroot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nezticle/raspberrypi-buildroot

0.0 2.0 0.0 33.2 MB

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.

Home Page: http://bsquask.com

License: GNU General Public License v2.0

Makefile 60.40% Shell 5.47% M4 3.45% C 25.51% Roff 0.24% C++ 2.63% Perl 0.51% Lex 0.34% Yacc 0.79% Python 0.66%

raspberrypi-buildroot's Introduction

RaspberryPi-Buildroot (aka the Bsquask SDK)

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.

Getting and building the Bsquask SDK

Clone the RaspberryPi-BuildRoot project into your local code directory:
cd ~/Code/
git clone git://github.com/nezticle/RaspberryPi-BuildRoot.git BuildRoot

Create the directory where you want your SDK to be built:
export BSQUASK_DIR=/opt/bsquask
mkdir -p $BSQUASK_DIR

Enter the BuildRoot directory and generate a Makefile for your SDK:
cd BuildRoot
make raspberrypi_defconfig O=$BSQUASK_DIR
You may be missing some build dependancies (flex, bison, etc...) but you will be warned about what packages you need to install if this is the case. If you are using ubuntu the following command should install all needed dependancies:
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).
cd $BSQUASK_DIR
make
*Do not use the -j option with this Makefile! The optimum number of make jobs is determined by BuildRoot, and overriding this with the -j flag here breaks the build system.

Using Generated Image on the Raspberry Pi

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:
cd $BSQUASK_DIR/images
tar -zxvf boot.tar.gz -C /media/BOOT
sudo tar -zxvf rootfs.tar.gz -C /media/rootfs
Make sure you are root(sudo) when extracting rootfs.tar.gz, or you will have problems on boot

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).

Login information:

username: root
password: root

Basics of Using the SDK

Lets set a few more environment variables to make things easier:
export BSQUASK_HOST_DIR=$BSQUASK_DIR/host
export BSQUASK_STAGING_DIR=$BSQUASK_DIR/staging
export BSQUASK_TARGET_DIR=$BSQUASK_DIR/target

$BSQUASK_HOST_DIR is 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:
export PATH=$BSQUASK_HOST_DIR/usr/bin:$PATH

$BSQUASK_STAGING_DIR is 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_DIR is 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).

Building Qt 5 based applications

$BSQUASK_HOST_DIR/usr/bin/qmake yourproject.pro
make

Building automake based projects

./autogen.sh --host arm-raspberrypi-linux-gnueabi --prefix=$BSQUASK_STAGING_DIR/usr
make

Building cmake based projects

cmake -DCMAKE_TOOLCHAIN_FILE=$BSQUASK_HOST_DIR/usr/share/buildroot/toolchainfile.cmake
make

The Bsquask SDK is based on BuildRoot 2013.02

raspberrypi-buildroot's People

Contributors

jacmet avatar tpetazzoni avatar gustavoz avatar erikbandersen avatar culssw avatar aldot avatar vapier avatar pauliuszaleckas avatar arnout avatar sjhill71 avatar tsed avatar yegorich avatar spdawson avatar djdeath avatar nkukard avatar lucaceresoli avatar yann-morin-1998 avatar mripard avatar correa avatar allannielsen avatar martinbanky avatar willnewton avatar danomimanchego123 avatar fperrad avatar patrickdepinguin avatar nezticle avatar cmchao avatar mrothnet avatar sagaertj avatar baruchsiach avatar

Watchers

Joy Xu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.