[uClibc]Re: buildroot problems on SuSE8.1

Erik Andersen andersen at codepoet.org
Sat Nov 23 05:51:31 UTC 2002


On Sat Nov 23, 2002 at 01:25:36PM +0900, Tsuyoshi GEMMA wrote:
> I found that I failed to create necessary symlink to /lib/ld-uClibc.so.0.
> Sorry for my carelessness.

No problem.  Glad you finally got it to build...

> After creating symlink and doing 'cvs update', I gave it a try again.
> However, in genext2fs-1.3-orig directory, genext2fs complains that:
> 
> /home/tgem/workbench/buildroot/build/genext2fs-1.3.orig/genext2fs -i 
> 2031 -b 4096 \
>        -d /home/tgem/workbench/buildroot/build/root
> -D /home/tgem/workbench/buildroot/sources/device_table.txt
> /home/tgem/workbench/buildroot/root_fs
> /home/tgem/workbench/buildroot/build/genext2fs-1.3.orig/genext2fs: 
> couldn't allocate a block (no free space)
> make: *** [ext2root] Error 1
> tgem at over128:~/workbench/buildroot>
> 
> I am afraid that block-size is not sufficient. When I ran genext2fs 
> manually with
> block size parameter increased, I got
> 
> ./genext2fs: too big file system

Right.  genext2fs is currently limited to a maximum of 8 MB,
and this filesystem is certainly larger.  This step failed for
me, but it isn't very important.  You can use dd, mke2fs, and
loop mounting to copy everything into a filesystem (just be
sure to add a populated /dev directory!).  Even simpler, you
can simply use chroot to use your new uClibc world, i.e.
    chroot ./build/root
and you will be working inside the uClibc devel system you
just built.

> Of course, there is plenty of free disk space on my machine.
> At this point, I tried to generate root_fs manually with the following 
> steps:
> 
> First, I made a rough estimate of file size needed for root_fs
> by du command like this.
> 
> du -k /home/tgem/workbench/buildroot/build/root/* | gawk 
> 'BEGIN{s=0}{s=s+$1}END{print s}'
> 
> The results was 108975. Then, I proceeded to try.
> 
> dd if=/dev/zero of=/tmp/root_fs bs=1024 count=108975
> /sbin/mke2fs /tmp/root_fs
> /sbin/e2fsck /tmp/root_fs
> su root
> mount -o loop /tmp/root_fs /mnt/
> cp -a /home/tgem/workbench/buildroot/build/root/* /mnt/
> sync
> cd /mnt/
> chroot ./
> 
> This time, it went well. I tried to compile a very short test program
> under chroot'ed environment, like this:
> 
> hello.c :
> #include <stdio.h>
> int main(){
>  printf("Hello BuildRoot!\n");
> }
> 
> gcc -o hello hello.c
> 
> Compiling by gcc was succeeded and ldd command showed that executable was
> linked against uClibc.

Very good.  Also, if you want the system to be able to boot, you
should populate the /dev directory.  With genext2fs, I use a
device_table file (under the buildroot/sources directory) to
populate the /dev directory.

> These trial suggests that other components are successfully built.
> However, it seems that there are something weird in genext2fs and/or
> buildroot/make/ext2root.mk IMHO. But, I have no idea to fix this problem.

I need to modify ext2progs a little bit in order to do what is
needed here.  Its on my todo list, but I just havn't gotten to
it yet....

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list