+++ Paul Boddie [2012-09-02 01:07 +0200]: > Hello, > > I've recently been looking into using Emdebian on the Ben NanoNote, > > However, to get to this point, I have to rely on the existing OpenWrt > distribution to boot the device, log in, and then enter the Emdebian system > root using chroot in order to run "dpkg --configure -a". Once this has been > done, the device will boot into the Emdebian system. > > This configuration step appears to be the necessary measure to permit the > init > mechanism and various related activities to function. I suppose that not all > packages need to be configured, but some configuration seems to make the > difference between a functioning and non-functioning system. > > ... > > Obviously, in my situation, I can't boot into Emdebian without > having first performed the configuration step, so this supposedly leaves me > with the fairly undesirable option of using qemu. > > I did wonder, however, whether there are any known techniques for configuring > just enough of a system on the build host so that the init mechanism can > complete its work on the target system and then allow the proper > configuration to occur.
Multistrap provides a (fairly low-tech) mechanism for this. In your multistrap config provide a setupscript=/path/to/setup.sh which does any tweaking necessary to make the image bootable (e.g. setting /etc/fstab, inittab, /etc/modules to something useful). > Alternatively, I wondered whether there might be any way of deploying a > "first > boot" script to perform configuration on the target system. That doesn't help if it won't even boot. So there is a second option: configscript=/path/to/config.sh which specifies a script to copy into the image for 'first run' use. There are examples of these scripts in the package. Some details are given in the 'Machine:variant support' and 'Root Filesystem Configuration' sections of the multistrap man page. And also on http://wiki.debian.org/Multistrap/CustomisingRootfs > I see a script > apparently suggested for this kind of thing... > > http://wiki.debian.org/Multistrap#Debconf_and_pre-seeding That is a typical example of a first-run 'configscript'. An alternative approach is to use the 'polystrap' wrapper, which uses qemu to cross-configure the packages (after running multistrap) so that the image has already had dpkg --configure -a run. This may or not be easier/better depending on your circumstances and how closely the qemu device resembles the one you are trying to configure for... http://lists.debian.org/debian-embedded/2011/07/msg00019.html > I would certainly appreciate any advice on this topic. Emdebian promises to > make a lot of things easier when developing for embedded devices like the > NanoNote - just the availability of numerous packages for different > architectures is a real time-saver - and I'd like to be able to offer some > concrete documentation to help people start using it without there being too > many complications involved. HTH Wookey -- Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM http://wookware.org/ -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

