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

bugs at busybox.net bugs at busybox.net
Wed Jun 8 15:46:15 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-08-2005 08:46 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?

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                          
======================================================================




More information about the uClibc-cvs mailing list