Raspbian Custom Operating System Build¶
Raspbian is a Debian based operating system for the Raspberry Pi.
Build Instructions¶
The instructions will produce a bare minimal operating system.
Note
It is assumed a Debian based operating system is being used to preform the build and to be done via the shell or terminal.
- Install the following packages.
$ sudo apt-get install binfmt-support debootstrap kpartx qemu qemu-user-static
- Create directory.
$ mkdir -p ~/raspbianos
- Change directory. 1.
$ cd ~/raspbianos
1.$ sudo qemu-debootstrap --arch armhf --variant=minbase jessie chroot-raspbian-armhf http://archive.raspbian.org/raspbian
$ sudo mkdir chroot-raspbian-armhf/proc/ chroot-raspbian-armhf/sys/ chroot-raspbian-armhf/dev/
- Mount.
$ sudo mount -t proc proc ~/raspberry.tips/chroot-raspbian-armhf/proc $ sudo mount -t sysfs sysfs ~/raspberry.tips/chroot-raspbian-armhf/sys $ sudo mount -o bind /dev ~/raspberry.tips/chroot-raspbian-armhf/dev
- Clone git repository.
$ git clone https://github.com/raspberrypi/firmware.git
- Create directory.
$ mkdir bootfs
- Create directories.
$ sudo mkdir chroot-raspbian-armhf/lib chroot-raspbian-armhf/lib/modules
- Copy files.
$ sudo cp -R firmware/hardfp/opt/* chroot-raspbian-armhf/opt/ $ sudo cp -R firmware/modules/* chroot-raspbian-armhf/lib/modules/ $ sudo cp -R firmware/boot/* bootfs/
External Links¶
- Debootstrap - Debian Wiki
- Installing new Debian systems with debootstrap
- Raspbian (minimal) unattended netinstaller - GitHub (Wheezy and can't upgrade to Jessie)
- A Raspberry Pi operating system maker - GitHub
- ev3dev / brickstrap - GitHub
- niklasf / build-raspbian-image - GitHub
- b-s101 / build-raspberrypi-image - GitHub (doesn't appear to work and quite dated)
- wokis / rasberrypi - GitHub
- wanglihe / rpi2rootfs - GitHub
- RaspberryPi - Debian Wiki
- Raspbian - eLinux.org