Loredo
Posts: 5
Joined: Fri Oct 26, 2012 5:49 pm

Building own images

Sun Feb 17, 2013 12:32 pm

Hi,

I would like to port our PBX appliance (Gemeinschaft5) which is currently based on Debian Wheezy to RaspberryPi.
We use Debian Live and Jenkins to auto-build ISO hybrid images.

My first thought was to just use the Wheezy armhf repository and adjust Debian Live to build hard drive images. At least this should give us 90% of what we need (beside the FreeSwitch packages I need to build and include separately). However, Raspbian seems to have quite better support für the RaspberryPi platform, especially when it comes to hard float ABI which we might want to have for performance reasons (and of course all the other Pi related stuff to improve performance).

Of course I would like to keep going with Debian Live but using another way for the integration is still an option.

Unfortunately there is still no information available on how you are doing continuous integration for the standard Raspbian image, I would like to know more ;-)
Is it possible for somebody to shortly explain this in only a few sentences so I get a first impression and can decide which way to go for my porting?

Thanks!


Regards,
Julian

Loredo
Posts: 5
Joined: Fri Oct 26, 2012 5:49 pm

Re: Building own images

Tue Feb 19, 2013 11:19 am

Hm, nobody to comment on this? :(

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Building own images

Tue Feb 19, 2013 11:40 am

I'd rather strip down Raspbian instead ...
has been done multiple times and re-published here on the forums (as SD Card images)
Anyway , a visit to http://www.raspbian.org might give more insights .


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: Building own images

Tue Feb 19, 2013 11:42 am

Search the forums, there have been several posts regarding creating striped down Linux Distro's etal
I know everything about nothing"

alexlist
Posts: 1
Joined: Wed Feb 20, 2013 10:10 am

Re: Building own images

Wed Feb 20, 2013 10:18 am

Is it possible for somebody to shortly explain this in only a few sentences so I get a first impression and can decide which way to go for my porting?
None of the answers seem to answer the OP's question regarding the CI/build system.

Of course one can take the compiled raspbian and strip it down, and of course there are many ways to Rome, i.e. build your own distro.

But the OP (and I) would like to know

a) how the Raspbian CI/Build system is set up, e.g. in comparison to the Debian autobuilder network or Canonical's Launchpad or a Jenkins setup ...
b) where is the SCM repository for Raspbian? I looked in Google, Raspbian website, RPi website and all I find is the repository with .debs and sources for the .debs, but no version control ... I cannot believe you're not using git/svn/bzr or something comparable.

Thanks for any hints in that direction!

Alex

plugwash
Forum Moderator
Forum Moderator
Posts: 3630
Joined: Wed Dec 28, 2011 11:45 pm

Re: Building own images

Wed Feb 20, 2013 12:17 pm

There is a need to distinguish between building the packages that go into the repository and building an image from the repository.

Raspbian was started by taking debian armhf, altering the compiler packages to produce code suitable for the pi and then rebuilding stuff (by hand at first). Sometimes due to static libraries etc it took multiple attempts to free a package of armv7 code. Once we got enough packages rebuilt we imported everything into a repository, set up an autobuilder system and imported the rest of the source packages and arch all packages from debian wheezy. This was followed by a tedious period of manually dealing with packages that were blocked from building by dependency loops. Gradually other parts of the infrastructure were enhanced too.

The current setup is that source packages and arch all packages are imported from debian wheezy into raspbian wheezy-staging. Automatic imports for a package are blocked if there is a raspbian specific version (identified by +rpi in the version number) in the repository already and we can and do occasionally also place import blocks manually. Our autobuilders take source packages from here and produce the architecture dependent packages. There is then a migrator program that checks if all the binaries from a source package are in sync and does a few other sanity checks and when the binaries are in sync and the other checks pass migrates the packages from raspbian wheezy-staging to raspbian wheezy. We also have a script that checks all required source packages are present in the repository (unfortunately reprepro which we use to manage the repository doesn't have any understanding of built-using :) ) before the private repository is pushed to the public one.

The autobuiler system is based on debian stuff (wanna-build, buildd, sbuild etc) but it's a pretty horrible hack. Due to a lack of documentation and being unable to find some peices mike failed to setup the git version of wanna-build so he ended up taking the version of wanna-build that was last packaged in debian (and was kicked out for being broken) and hacking it until it mostly worked. Since that time far more documentation has been written for the current versions of wanna-build and I would strongly suggest going in this direction if setting up a new autobuilder network. The buildds themselves work much like debian ones taking build jobs from wanna-build and building them using sbuild. The build hardware is currently eight freescale imx53 quickstart boards. We plan a major overhaul of our autobuild setup when we start work on raspbian jessie.

Currently merging of our own modifications with new versions of the corresponding debian source packages is a manual process. It is certainly something I plan to try and automate later though. No vcs is currently used but when I write the automated forward porting stuff I may well drive it from a vcs.

Images are built by various parties out of packages from the repository with a few extra Pi specific bits (kernel, firmware, videocore libs etc) added in. Asb builds the raspberry pi foundation debian armel and raspbian armhf images using a set of scripts he wrote called "spindle". He maintains this on github at https://github.com/asb/spindle . Other image builders may use other tools.

As for what the OP needs to do
1: build your package(s) for raspbian (building them on a raspbian system is the easiest way to achived this) and set up a repository with them in
2: get spindle, get it up and running (not sure how difficult it is, I don't get involved in image building myself) and then add a "stage" to build an image with your packages and repository included
P.S. debian armhf won't run on the Pi, that is why raspbian exists in the first place.

Return to “Raspberry Pi OS”