Re: chroot setup howto
On Tuesday 01 February 2005 11:28, Max Hofer wrote:
> the CVS page it is steaded out clearly that the sources contain potato. the
> question is: is the web-page outdated or are the coders for emdebian really
> working for the stable branch?
My question too.
> > b. Create a chroot environment for target, in nature of end-platform;
> > c. Create a root filesystem (Scratchbox does a, b, & c automatically,
> > although it's not in the form of an image, and also no one here has used
> > it before);
> what is the difference between b) and c)? you have to create only 1 root
> filesystem. the one for the target. how do you put it on the target platform
> (NFS,flash, or whatever) is another question.
You can chroot into any directory; it does not necessarily have to have a
filesystem. And I am actually combining two operations in 'b'.
You'd have to create an image of the right size, mkfs it, mount it, and copy
the embedded filesystem therein. I am about to chuck this project (although
I haven't yet read Phillipe's latest 4 emails because signed emails lock up
KMail, making it necessary to hand-edit-out the messages from the mail file,
so it takes time). I still haven't gotten to learning UML, but if it puts
you in an environment with the file image as filesystem, it would be
convenient, although I don't see the benefit beyond that. Once the
filesystem is set up, kernel compiled, bootstrap set up, and apps compiled, I
infer you just umount the file image, burn it to flash as per my prior email,
and boot the device. Maybe we haven't heard enough about your platform.
> the root file system is created by using debootstrap (downloads a minimal
> packages for sarge, creates the root FS, installes the kernel etc.). then i
> removed manually packages which sarge sees as a "must" but i don't".
This will not be EmDebian, and debootstrap seems to be Woody, but another
poster recommends changing the script fo Sarge? Sounds like you've
hand-modified your system to be embedded, which seems fine if done carefully.
> now i created (not yet done) the kernel for my emedded system.
>
> since my host and target systems are the same i assumed that i could run the
> kernel for the embedded system in the vritual UML machine. (i have no clue
> if i can create an UML machine for another prcessor type and run it on my
> machene).
UML does seem to allow emulation of another machine, although I haven't
studied it yet. Qemu does, but I think you have a hardware platform to test
it on.
> Marc was right, NFS will be used in the next steps. but i can't use NFS atm
> because my BIOS doesn't suport boot over network. and for now i only want to
> know if my kernel works on the hardware machine.
As I say, you don't need bios to support network boot, because bootp
apparently does.
> do i really need a bootloader like lilo or grub for this?
bootp.
Marc likes one called uBoot or something, but that's supposed to be really
painful if your architecture is x86.
> > a /usr/src symlink to outside your UML, putting the kernel source there,
> > and compiling -inside- your UML.
> maybe i was not precise enough. i booted the out of the box the sarge kernel
> in my UML for now. i was focusing to create a rootfs with the right packages
> (files).
>
> why the complicate way? to compile the kernel on my UML machine i would need
> to install the toolchain there (which i want avoid). or create unwanted
> links to outside filesystem (which i have ot remove/add whenevr i want a new
> kernel again).
Difference in philosophy. I think embedded software must be as efficient as
possible, and so compiled specifically to the platform, with compile
optimization flags. Then again, our attempt to set up a comprehensive
compile environment has proven to take well beyond the time I can afford to
budget, and so looks like the project's not worth it if this is the sort of
trouble we're going to have. I have to earn money too, after all. I'm
pretty pissed about this situation at the moment, so that's all I can say.
Reply to: