On Mon, 22 Jun 2009 17:50:09 +0200 Pierre Pronchery <khorben@hackable1.org> wrote: > I have just written this paper about strap1, a component of hackable:1 > (also described below). I think it can be of interest for both the > -embedded and -boot lists, my apologies otherwise. Have you had a look at multistrap which is already in Debian? (multistrap supports multiple repositories but does so for foreign architectures as well as native.) http://packages.debian.org/sid/multistrap > strap1 addresses this exact problem, generating final, ready to run > software images from a number of Debian repositories. Does it support foreign architectures? (Very important for Emdebian, not necessarily for -boot.) > strap1 should run as-is on any GNU/Linux distribution, and even on other > Unix systems (like BSD). It depends on these specific packages in > particular: > > - binutils (for ar and strip) then it looks like a native tool, not cross- or foreign (which would need binutils-multiarch and other support). > There is no official release of strap1 yet. As above, multistrap is already in Debian. Feel free to compare the two. > As packages are simply extracted into the staging directory before > building the actual image, they are configured with their default > settings, or sometimes not at all. Each package can be configured inside > the packages directory, within a shell script of the same name. i.e. native with no foreign support. You cannot configure foreign packages prior to creating the image on the build machine without using an emulator. > 1. Resolve and cache dependencies Although not recursively, as described later. multistrap can create a full package set, including userspace packages and customised environments like Maemo, with full dependency resolution, via normal apt. > 2. Extract the required packages > 3. Create the device nodes > 4. Configure the packages installed > 5. Clean up the filesystem as required > 6. Generate the final image Although multistrap doesn't explicitly do things like device nodes for you, it does support adding in whatever scripts are needed to fully customise such support. Clean-up is supported - specifically including the clean up of the $dir/var/cache/apt/archives and $dir/var/lib/apt/ directories. Image creation (as with debootstrap) is left to other scripts to achieve. (device nodes are too specific to particular machines to be particularly useful to encode directly within multistrap.) > Debian packages consist of an ar archive, with a meta-data archive > member, and an optional archive to decompress. The extraction is > performed without the dpkg tool, using the ar, gzip, bzip2 and tar > utilities as required. That could be problematic. It is better to use the real dpkg, even if you don't use apt. > 4.2 Limitations of debootstrap > ------------------------------ > - it can use multiple source repositories at once multistrap already does that. (I think you mean multiple binary repositories, neither script actually builds binary packages.) > - it can configure packages cross-platform I'm assuming you mean cross-distributions and not cross-architecture. Lack of usable --foreign support in debootstrap is a *huge* problem for Emdebian and one that strap1 doesn't seem to resolve. > Dependencies are not resolved recursively at the moment (this problem is > also found in debootstrap). The images generated may therefore be > incomplete in some cases. That is a *major* flaw. multistrap is designed specifically with this requirement in mind. It depends on the use case but debootstrap can resolve dependencies recursively. -boot may well know more about the detail but it is possible to give debootstrap a fairly long list of packages and it will find the missing dependencies. What debootstrap does *not* do is proceed with the rest of the process only to end up with unresolved dependencies - that would be a complete waste of time and effort. > Device nodes creation is not portable across Unix systems. Then that may be better done as a separate stage, rather than claiming that the script can do something that is not always relevant. > The stock Debian packages may not always fit in an embedded environment. > More cooperation with the Emdebian project is certainly desirable. Have a look at emsandbox as well - that does the rootfs role (using code modified from debootstrap) for the modified packages in Emdebian Crush. multistrap is primarily for Emdebian Grip. Emdebian isn't that concerned with not using tools that exist within Debian - the primary goal is to be Embedded Debian so more Debian dependencies isn't a bad thing. multistrap requires Debian dpkg and Debian apt but probably works with the dpkg and apt in Ubuntu etc. emsandbox has lower dependency requirements but the ability to use emsandbox with multiple repositories could be useful - although it is imperative that emsandbox works with foreign packages. Whether multistrap is useful for -boot I have no idea - probably the reliance on a working apt setup would be problematic, however as that is only required on the build system, it could still be of some use. I'm not sure whether -boot actually need multiple repository support though - comments from -boot? -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgpuHjqlKhDJm.pgp
Description: PGP signature