This article describes how to proceed to the autonomous creation of an image for the BeagleBone Black /Green using the Omap Image Builder. In this specific example we create the image for the BeagleBone Black Rev. C.
The informations on the procedure to be followed are available on the site
As a prerequisite to the creation of the image there is the need to perform the operations on arm hardware; with other systems it is possible to have issues. To this end, we will proceed to perform tasks on a Orange PI PC with Armbian operating system. After preparing the Armbian system for Orange PI PC, as described in
log in ssh on Orange PI PC; in our case we used the sviluppo/password credentials
It is possible also to connect by enabling Remote Desktop
Remote desktop setup for Armbian on Orange PI PC
Create a folder named beaglebone
1 2 |
mkdir beaglebone cd beaglebone |
Clone the code to create the image
1 |
git clone git://github.com/beagleboard/image-builder.git |
The folder tree is the following
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
image-builder ├── configs ├── docs ├── emacs ├── machinekit ├── publish ├── scripts ├── target │ ├── boot │ ├── chroot │ ├── init_scripts │ ├── keyring │ └── other └── tools └── hwpack |
We proceed first to the creation of a standard Debian 8 image for Beaglebone Black
1 2 |
cd image-builder sudo ./beagleboard.org_jessie_image.sh |
The task takes a long time and creates other folders including the deploy folder within which we will find the images. At the end go into deploy /image folder and run
1 |
sudo ./setup_sdcard.sh --img-4gb BBB-debian-8.6-lxqt-aaaa-mm-dd --dtb beaglebone --enable-systemd --boot_label BEAGLEBONE --bbb-old-bootloader-in-emmc --hostname beaglebone |
Compress the created image with the command
1 |
sudo xz -z -8 -v BBB-debian-8.6-lxqt-aaaa-mm-dd-4gb.img |
To create a customized image proceed as follows:
- Go into the image-builder/configs folder and copy a configuration as base named custom-debian.conf. We have used as a base configuration bb.org-debian-jessie-lxqt-4gb-v4.1.conf. In custom-debian.conf add the following changes in the deb_include section; as example we add the vsftpd server; change the chroot_script value too
1234567deb_include==" \alsa-utils \.......xserver-xorg-video-modesetting \vsftpd \"
1chroot_script="custom-debian.sh"
To exclude packages to be installed use the deb_exclude section. In the script are commented the various sections, among which we find those about the definition of the hostname, passwords, user name creation, etc. - Navigate to the image-builder/target/chroot folder and copy beagleboard.org-jessie.sh as custom-debian.sh.
- If you want to add python packages edit the custom-debian.sh file and add the other packages in install_pip_pkgs function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
install_pip_pkgs () { if [ -f /usr/bin/python ] ; then wget https://bootstrap.pypa.io/get-pip.py || true if [ -f get-pip.py ] ; then python get-pip.py rm -f get-pip.py || true if [ -f /usr/local/bin/pip ] ; then echo "Installing pip packages" #Fixed in git, however not pushed to pip yet...(use git and install) #libpython2.7-dev #pip install Adafruit_BBIO git_repo="https://github.com/adafruit/adafruit-beaglebone-io-python.git" git_target_dir="/opt/source/adafruit-beaglebone-io-python" git_clone if [ -f ${git_target_dir}/.git/config ] ; then cd ${git_target_dir}/ python setup.py install fi pip install --upgrade PyBBIO pip install iw_parse #Add other python packages here fi fi fi } |
In this example we added only the ftp server. Go into the image-builder folder and run the command
1 |
sudo ./RootStock-NG.sh -c custom-debian |
The task takes a long time. At the end access to the deploy/imagename folder and run
1 |
sudo ./setup_sdcard.sh --img-4gb BBB-custom-debian-8.6-aaa-mm-dd --dtb beaglebone --enable-systemd --boot_label BEAGLEBONE --bbb-old-bootloader-in-emmc --hostname beagleboneblack |
Compress the created image with the command
1 |
sudo xz -z -8 -v BBB-custom-debian-8.6-aaa-mm-dd-4gb.img |
You can create now the micro sd card with the FTP server available in the image and the hostname changed in beagleboneblack.
The microSD burning is already described in the article
Debian sdcard setup for Beaglebone Black
On Omap image builder site you’ll find other images types among which we highlight those for BeagleBone Black, Green, Iot, Machine Kit (image to manage Machinekit CNC machines), etc.