GithubHelp home page GithubHelp logo

risca / bluetooth-speakers-buildroot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gamaral/rpi-buildroot

2.0 2.0 0.0 67.64 MB

Buildroot overlay with a few personal tweaks for the Raspberry Pi

License: Other

Makefile 72.18% Arc 0.05% Shell 6.55% Tcl 0.27% Batchfile 0.08% M4 1.76% C 10.31% Assembly 0.39% Dockerfile 0.03% C++ 1.33% Perl 1.03% Lex 0.17% Yacc 0.39% CMake 0.09% Ruby 0.04% Python 4.52% PHP 0.82%

bluetooth-speakers-buildroot's Introduction

Buildroot for Raspberry Pi

This buildroot overlay will produce a bleeding-edge, light-weight and trimmed down toolchain, rootfs and kernel for the Raspberry Pi. It's intended for advanced users and specific embedded applications.

Before You Begin

  • If you're not familiar with Buildroot and what it can and can't do, please take the time to read the manual.

  • You must be pretty comfortable with cross-compilation in order to use rpi-buildroot.

Test Drive

You can test drive rpi-buildroot by following the instructions below:

wget http://dl.guillermoamaral.com/rpi/sdcard.img.xz
xz -d sdcard.img.xz
sudo dd if=sdcard.img of=/dev/sdx # replace *sdx* with your actual sdcard device node

There's now also a test drive image for the Raspberry Pi 2:

wget http://dl.guillermoamaral.com/rpi/sdcard2.img.xz
xz -d sdcard2.img.xz
sudo dd if=sdcard2.img of=/dev/sdx # replace *sdx* with your actual sdcard device node

The default user is root, no password is required.

Building

git clone --depth 1 git://github.com/gamaral/rpi-buildroot.git
cd rpi-buildroot
make raspberrypi_defconfig # if your target is a Raspberry Pi 2, use 'raspberrypi2_defconfig'
make nconfig         # if you want to add packages or fiddle around with it
make                 # build (NOTICE: Don't use the **-j** switch, it's set to auto-detect)

Deploying

Flash

Flash output/images/sdcard.img onto an SD card with "dd" as root:

Notice you will need to replace sdX in the following commands with the actual device node for your sdcard.

Automatic

board/raspberrypi/flashsdcard /dev/sdX

This will resize the root partition to fill up the whole SD card.

Manual

dd if=output/images/sdcard.img of=/dev/sdX

Resize the partition (if needed)

parted /dev/sdX
> print         # prints partition table
> resizepart 2  # resize the root partition
> 100%          # make it fill up the whole SD card
> print         # prints partition table
> quit          # exit program

Then resize the filesystem

resize2fs /dev/sdx2

Manual

You will need to create two partitions in your sdcard, the first (boot) needs to be a small W95 FAT16 (LBA) patition (that's partition id e), about 32 MB will do.

Notice you will need to replace sdx in the following commands with the actual device node for your sdcard.

Create the partitions on the SD card. Run the following as root.

Notice all data on the SD card will be lost.

fdisk /dev/sdx
> p             # prints partition table
> d             # repeat until all partitions are deleted
> n             # create a new partition
> p             # create primary
> 1             # make it the first partition
> <enter>       # use the default sector
> +32M          # create a boot partition with 32MB of space
> n             # create rootfs partition
> p
> 2
> <enter>
> <enter>       # fill the remaining disk, adjust size to fit your needs
> t             # change partition type
> 1             # select first partition
> e             # use type 'e' (FAT16)
> a             # make partition bootable
> 1             # select first partition
> p             # double check everything looks right
> w             # write partition table to disk.

Now format the boot partition as FAT 16

# run the following as root
mkfs.vfat -F16 -n BOOT /dev/sdx1
mkdir -p /media/boot
mount /dev/sdx1 /media/boot

You will need to copy all the files in output/images/boot to your boot partition.

# run the following as root
cp output/images/rpi-firmware/bootcode.bin /media/boot
cp output/images/rpi-firmware/fixup.dat /media/boot
cp output/images/rpi-firmware/start.elf /media/boot
cp output/images/zImage /media/boot/kernel.img
cp output/images/*.dtb /media/boot
umount /media/boot

The second (rootfs) can be as big as you want, but with a 200 MB minimum, and formated as ext4.

# run the following as root
mkfs.ext4 -L rootfs /dev/sdx2
mkdir -p /media/rootfs
mount /dev/sdx2 /media/rootfs

You will need to extract output/images/rootfs.tar onto the partition, as root.

# run the following as root
tar -xvpsf output/images/rootfs.tar -C /media/rootfs # replace with your mount directory
umount /media/rootfs

bluetooth-speakers-buildroot's People

Contributors

aduskett avatar aldot avatar arnout avatar baruchsiach avatar bkuhls avatar culssw avatar danomimanchego123 avatar erikbandersen avatar fabio-porcedda avatar fperrad avatar gamaral avatar gibsson avatar gustavoz avatar jacmet avatar joerg-krause avatar lucaceresoli avatar martinbark avatar maximeh avatar patrickdepinguin avatar pauliuszaleckas avatar pseiderer avatar romainnaour avatar sjhill71 avatar spdawson avatar tpetazzoni avatar tsed avatar vapier avatar wbx-github avatar yann-morin-1998 avatar yegorich avatar

Stargazers

 avatar  avatar

Watchers

 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.