[uClibc-cvs] [buildroot 0000283]: setting up buildroot on compact flash fails

bugs at busybox.net bugs at busybox.net
Fri Jun 10 01:13:59 UTC 2005


A NOTE has been added to this issue.
======================================================================
<http://busybox.net/bugs/view.php?id=283> 
======================================================================
Reported By:                pavan
Assigned To:                uClibc
======================================================================
Project:                    buildroot
Issue ID:                   283
Category:                   Architecture Specific
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
======================================================================
Date Submitted:             06-03-2005 04:52 PDT
Last Modified:              06-09-2005 18:13 PDT
======================================================================
Summary:                    setting up buildroot on compact flash fails
Description: 
hello friends.

I am setting up a minimal linux on compact flash.
My host machine to which i have attached compact flash is running mandrake
9.1 kernel 2.4.21-0.13mdk.

Flash disk is accessible as /dev/hdc2 it is ext3.
To setup linux root file systme on this partition i did following.

1)DOwnloaded latest snapshot of buildroot. and bunzipped it to /tmp
directory.
2)Then i ran make menuconfig followed by make.
I selected all the default options and the make ran successfully without
any errors.
3)I copied all the directories generated under
/tmp/buildroot/build_i386/root to /dev/hdc2.

When i try to boot from flash card it gives me following error:
Kernel panic:no init found Try passing INIT= option.

After rebooting to my host machine i mounted flash disk and copied
libc.so.2 and ld-linux.so.2 to lib of root file system of my flash card.
Even i have setuid  my busybox binary.but it gives the same kernel panic
error.

I even downlaod readymade(compiled)buildroot system for i386
architecture.
but in that case also i am getting the same error.
ANy help in this direction are welcome.


======================================================================

----------------------------------------------------------------------
 galdarian - 06-06-05 07:42 
----------------------------------------------------------------------
I am in the process of setting up something similar on an old 16MB card and
have managed to get it running to a large degree. 

What bootloader are you using?
What parameters are you passing to the kernel?
What kernel are you using? (I assume it's the 2.4.21 supplied by MDK)

Optional:
Specs of the intended machine of use?
Size of CompactFlash card?

----------------------------------------------------------------------
 pavan - 06-08-05 04:49 
----------------------------------------------------------------------
i am using syslinux as bootloader.
There are no parameter passed to the kernel.
I am using kernel 2.4.21-0.l3mdk
Size of the flash card is 128 MB.
I want to use this on an intel motherboard with celeron processor.

I have following questions:
I have configured default buildroot.Root file system generated using
buildroot occupies 6.8 MB of space.Is it possible that i get buildroot
working on less than 4 MB space.
Kindly let me know ,how to customize buildroot.

----------------------------------------------------------------------
 galdarian - 06-08-05 08:46 
----------------------------------------------------------------------
Consider being explicit about kernel parameteres until you know that it
boots properly. The way I have managed to get this working is by creating
the root_fs.ext2.gz and running it as a initrd from a vanilla 2.6.11
kernel from grub.

The initrd is necessary for me as the ext2 image is >40MB uncompressed and
obviously doesn't fit on my CF card. The following is from my menu.lst
(config file) for grub.

root (hd0,0)
kernel /boot/bzImage init=/linuxrc root=/dev/ram0 ramdisk=65536
initrd /boot/initrd.gz

when prompted by syslinux just type your kernel name and try appending the
apropriate options for your system. Some reading material on
http://www.tldp.org

http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/BootPrompt-HOWTO.html
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Linux-Init-HOWTO.html#ss5.3
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Linux-i386-Boot-Code-HOWTO.html#init_proc

The fist link there has all the linux kenel parameters you'll ever need
discussed in detail. The latter 2 are discusions about how the kernel
initialises and brings up the system. The second of those two is more in
depth with code snippets.

"Is it possible to get the filesystem image < 4MB?" : I don't know.
Compressed, sure, this should be possible. The system won't have much in
it. Maybe shed the toolchain if you haven't already. I guess you have to
ask yourself what you want / need the system to do. Considering the size
of the flash memory is it necessary to do so?

Personally I would be aiming to get the system to work before trying to
slim it down as you maybe missing important files / aspects of the system.
Eg. Do you have the appropriate filesystem driver built into the kernel (If
you have the image as a ext2 then you're fine but if you've laid out the
files on the CF card then the kernel, i fear, won't have vfat.ko built in)
as the kernel NEEDS a root drive after it initialises (See above links).
Have you copied the appropriate kernel modules from the /lib/modules
directory to the buildroot image?

----------------------------------------------------------------------
 pavan - 06-09-05 02:00 
----------------------------------------------------------------------
I was finally able to boot using buildroot.But still i have following
problem.
It gives me the login prompt,but i cant not log in it.
what are default root passwords?
Is there any built in users in the system?
I still need to know what are default features available with buildroot.
Can i get a detailed document on buildroot and how to customize it ?
My purpose is to setup a minimal linux on flash card with apache and
php..
Do you have any idea regarding any light weight apache that occupies
lesser space than the normal one?

----------------------------------------------------------------------
 galdarian - 06-09-05 18:13 
----------------------------------------------------------------------
The default root password for me was empty. Best bet is to loop mount the
image in Mandrake and chroot into it (man chroot if you're having issues)
to change the password (man passwd).

I think there is a default user (Can't remeber as I have customised the
/etc/passwd file) but more than likely you'll want to add your own user(s)
anyway.

Customizing Buildroot: I would start with the documents on the main site
http://buildroot.busybox.net/docs.html
Light weight Apache: I have no idea. Try http://www.google.com/linux

Issue History
Date Modified  Username       Field                    Change              
======================================================================
06-03-05 04:52 pavan          New Issue                                    
06-06-05 07:32 galdarian      Issue Monitored: galdarian                    
06-06-05 07:42 galdarian      Note Added: 0000231                          
06-08-05 04:49 pavan          Note Added: 0000236                          
06-08-05 08:46 galdarian      Note Added: 0000237                          
06-09-05 02:00 pavan          Note Added: 0000238                          
06-09-05 18:13 galdarian      Note Added: 0000242                          
======================================================================




More information about the uClibc-cvs mailing list