[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Creating a rootfs with grip packages



Below are my requirements and thoughts for creating a rootfs, _without_ having to execute anything on the target embedded system.

Do they make sense?
Am I reinventing the wheel? i.e. are there existing tools that do a similar thing (eg. emsandbox).
Any thoughts or suggestions are welcome :)

NOTE: I am coming from the perspective of using a configuration management system to control and build my target application/rootfs, and that it should be repeatable and reliable, even if going back to an old revision and be able to produce the exact same application/rootfs :)


I want to be able to create a root for an embedded system _without_ having to execute anything on the embedded system.

I am focusing on Grip packages as they do not need to be cross-compiled. i.e. I can use the pre-compiled 'gripped' binary packages for the target architecture.

The rootfs should be NFS mountable/executable.

I want to be able to specify all packages and versions to install.

I do _not_ want the debian database files, etc, in the rootfs - only the files required to execute on the embedded system.

I want an ordinary user to be able to generate the rootfs. i.e. not have to be root. If root privileges are required, then it should be done in a chroot (so as to protect the host os).

I was thinking about using dpkg directly (rather than apt-get or aptitude), primarily because it supports switches to specify various directories (--admindir=dir, --instdir=dir, --root=dir).

I guess enforcing dependencies would have to be done manually, which loses some of the benefits of using a distribution :(
Build scripts could deduce dependencies.

Another alternative would be to use apt-get/aptitude in a chroot, but the install would be 'polluted' with debian database files, but I guess they could be removed at the end. Specifying specific package versions would require specifying _all_ packages on the command line, or generating specific distributions (packages file ?) with the desired version combination.

Each _build_ of _my_ application, shall create the rootfs with the specified packages and _my_ applications, libraries, etc. Changes to the 'makefiles' may include the version of one/some/all of the debian packages, therefore this implies that a new/fresh install is required for _each_ build to ensure the rootfs is not tainted with old builds.

Not sure what the speed would be of doing a dpkg --install on all packages for each build, but I suspect it would be slowish ??? I was thinking of 'installing' each version of each package in it's own directories, and then the build would just have to copy all the files from the relevant directories into the rootfs staging directory.
eg.
/usr/local/myinstalls/bash_3.2-4_powerpc/
/usr/local/myinstalls/bash_3.2-5_powerpc/
/usr/local/myinstalls/bash_4.0-1_powerpc/
/usr/local/myinstalls/bash_4.0-2_powerpc/
/usr/local/myinstalls/util-linux_2.14~rc2_powerpc/
/usr/local/myinstalls/util-linux_2.13.1.1-1_powerpc/
...

Would that work ???

The other thing is to specify various configuration files. That can be done manually, or possibly with some kind of pre-seeding info to dpkg/apt-get/aptitude ???

Thanks any thoughts.
Brendan.


Reply to: