Help Needed : Custom built debian image

Hi,

I am trying to build custom minimal debian images for my beaglebone black. I have downloaded the image builder from git and tried executing it after commenting out some packagenames in beagleboard.org_image.sh. But when the image is built, all the packages including the packages that I commented out are also installed. There is no information about which file to edit or any other instruction provided in the readme file.

Please help me in building the custom images.

Regards

Base package list:
https://github.com/beagleboard/image-builder/blob/master/var/pkg_list.sh

Packages specific to the "beagleboard.org" debian image:
https://github.com/beagleboard/image-builder/blob/master/beagleboard.org_image.sh#L43

comment out what you don't need, but remember Debian package
dependence are complex, so something might get installed anyways.

Patches welcome on improving the readme.

Regards,

Hi Robert,

Thanks for the fast reply. I have gone through the scripts and I noticed that you are the author of the scripts. I really thank you for making those awesome scripts to make our lives easier.

Just have a suggestion, Please add bit more information in the readme file about the customisation and all which will be helpful while making customized images.

I have commented some lines to disable installation of GUI, Lxde, apache, etc and currently the script is running on my BBB. Will post the result once it finishes.

I have one more question. I noticed that debian image comes with apache-2 installed in it. What’s the purpose of having apache 2 here?

Regards
viraniac

HI Robert,

The script is still running but what I can see is it just installed nodejs packages. I guess this is because the script was installing the beaglebone package. I don’t require node.js installed. Please confirm the features provided by beaglebone package so I can decide whether to include or exclude it from the build.

Regards
viraniac

The "beaglebone" meta package currently pulls in:
acpi-support-base, am335x-pru-package, libsoc2, nodejs, nodejs-legacy,
npm, xinput-calibrator, xserver-xorg-video-modesetting

from the beagleboard.org debian repo:
http://beagle.s3.amazonaws.com/debian (there's a new domain being
setup using beagleboard.org)

If you don't want these package, just disable:
https://github.com/beagleboard/image-builder/blob/master/beagleboard.org_image.sh#L424

Then you'll still have access to the beagleboard.org repo.

Regards,

viraniac,

why don’t you just use a “bare” image and add in packages that you need? What you do now is going from the end to the beginning. I would go from the smallest “bare” image to functionality required

Hi lisarden,

I am tried to make the bare minimum image but that takes too long to boot while compared to the image supplied by the Beagleboard community. Also if you see all the questions that I posted were about customizing the image using the image-builder script. So its not that I am going from end to the beginning. I am at the extreme begininning of creating a customized OS.

Let me tell you my requirement.

I need a OS that shows a splash screen at boot. Once the OS is booted it will run a Java program instead of lxde to show the UI.

I had no luck with splash till now though I know that I have to use psplash. Also I tried changing the /etc/lightdm/lightdm.conf and /usr/share/xsession/LXDE.desktop file to invoke the java program but had no luck with it. I tried disabling the lightdm service by removing the /etc/rc5.d/lightdm symlink but still lightdm starts and shows LXDE at boot up.

Please Robert and lisarden, help me with this so that I can complete the image.

PS: I have customized the target/chroot/beagleboard.org.sh file to add the oracle_jdk into the image and to remove chromium from the image. the rest of the packages are left as it is.

The issue with launching custom application at boot is fixed. Now the only problem remaining is optimizing the boot process for faster starting and to enable boot splash which I am working on currently. I have ordered a FTDI cable to get the details of the boot process over serial console.

Hi Robert,

Could you please provide some checklist or suggestions that can help optimizing the boot process.

Regards,
viraniac

Install systemd

add this to your boot args:

optargs=quiet init=/lib/systemd/systemd

install either conman/wicd to make network connection over
(/etc/network/interfaces)

This should get you within 10-15seconds bootup time.

Regards,

Hi Robert,

The defualt init process is systemd. I added connman and wicd, still no improvement in boot time. The image takes about a minute to boot.

So instead of removing packages from the image-builder script, I am now adding chkconfig and xinit package to the image-builder script. Also I have added code to disable lightdm, apache2, xrdp, bonescript, bonescript-autorun and cloud9 service and added code to launch my custom java program and disable screen blanking.

When I test it using the image provided by beagleboard.org, the system was booting in 15 seconds. Currently image builder is running and it will take about 7 to 10 hours to get the new images to test.

I want to add a boot splash screen to BBB. Would you suggest going for psplash or plymouth?

Regards
viraniac

Hi Robert,

The defualt init process is systemd. I added connman and wicd, still no
improvement in boot time. The image takes about a minute to boot.

dump your serial console log to pastebin. (dmesg | pastebinit)

So instead of removing packages from the image-builder script, I am now
adding chkconfig and xinit package to the image-builder script. Also I have
added code to disable lightdm, apache2, xrdp, bonescript, bonescript-autorun
and cloud9 service and added code to launch my custom java program and
disable screen blanking.

When I test it using the image provided by beagleboard.org, the system was
booting in 15 seconds. Currently image builder is running and it will take
about 7 to 10 hours to get the new images to test.

I want to add a boot splash screen to BBB. Would you suggest going for
psplash or plymouth?

probally plymouth, just never personally tried..

Regards,

Hi Robert,

Currently the BBB is booted from the beagleboard provided image and the image build is in process. I will upload my logs in 10 hours.

Even for the beagleboard.org provided images, the following error message is being displayed quite often which is little bit annoying.

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

I tried setting up the locale but the message is still persists. Is there a way to disable this?

That is taken care of by here:
https://github.com/beagleboard/image-builder/blob/master/scripts/chroot.sh#L438

did you change locals?

To save space, i'm stripping all the non en locales:
https://github.com/beagleboard/image-builder/blob/master/scripts/chroot.sh#L211

If you need yours kept, add it here:

https://github.com/beagleboard/image-builder/blob/master/scripts/chroot.sh#L214

Regards,

Hi Robert,

I am not setting any myself. I only make changes in packages and in target/chroot/beagleboard.org.sh to add java and configure xinit. May be once the latest image gets ready, the error might be gone. Is this fixed recently?

Also when I run the gift-wrap-images(doesn’t actaully remember the actual file name), it creates 4 files having names as BBB--blank-.img.xz, bone-.img.xz, BBB.img.xz and one tar.gz file. As of now for testing purpose I am only using the bone-*.img.gz file and the flasher file. Whats the purpose of the Blank and the tar.gz file?

Regards,
viraniac

Hi Robert,

I am not setting any myself. I only make changes in packages and in
target/chroot/beagleboard.org.sh to add java and configure xinit. May be
once the latest image gets ready, the error might be gone. Is this fixed
recently?

No, that fix has been in for awhile now.. I'm guessing java/xinit may
upset something.. Try running:

dpkg --list | pastebinit

and copying us the pastebin url, so i can try to replicate it and see
if we can fix it.

Also when I run the gift-wrap-images(doesn't actaully remember the actual
file name), it creates 4 files having names as BBB-*-blank-*.img.xz,
bone-*.img.xz, BBB*.img.xz and one tar.gz file. As of now for testing
purpose I am only using the bone-*.img.gz file and the flasher file. Whats
the purpose of the Blank and the tar.gz file?

The blank *img, has a specially patched u-boot, to ignore lack of
specific eeprom information, such that CircuitCo/oem can flash a empty
board. Note it requires a special board connector to un-write-protect
the factory eeprom.

The *.tar.gz is a compressed form of the base rootfs, used to generate
all the *.img files..

Regards,

Hi,

this is a pastbin from the beagleboard.org image. http://paste.debian.net/92548/

My script is still running so can’t restart the system with custom built images. Will update in 2 hours.

Regards,
viraniac

Hi Robert,

The new image is built now. I tried giving “apt-get install parted” and got the following output.

So with the image's on rcn-ee.net....

root@beaglebone:~# apt-get install parted
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  parted-doc
The following NEW packages will be installed:
  parted
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 156 kB of archives.
After this operation, 247 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ wheezy/main parted armhf 2.3-12 [156 kB]
Fetched 156 kB in 1s (126 kB/s)
Selecting previously unselected package parted.
(Reading database ... 58347 files and directories currently installed.)
Unpacking parted (from .../parted_2.3-12_armhf.deb) ...
Processing triggers for man-db ...
Setting up parted (2.3-12) ...

Did you change LANG yourself? Or i wonder if the script is copying
your "build" LANG settings???

Regards,

Hi Robert,

As already mentioned in the previous comment, I am not setting lang myself. Its automatically coming as en_IN

If i disable the line that is removing extra locales, how much more space will be required.

Regards,
Viraniac

Hi Robert,

As already mentioned in the previous comment, I am not setting lang myself.
Its automatically coming as en_IN

Weird, i should setup another vm, with a different locale and see if i
can fix that..

If i disable the line that is removing extra locales, how much more space
will be required.

I'm not really sure anymore, been doing that for awhile.. So here's a
quick disable option:

https://github.com/beagleboard/image-builder/blob/master/beagleboard.org_image.sh#L418

rfs_strip_locales="${rfs_strip_locales:-enable}"

Just comment it out to disable..

Regards,