[uClibc]Re: buildroot problems on SuSE8.1

Tsuyoshi GEMMA tgem at ecodacs.or.jp
Sat Nov 23 04:25:36 UTC 2002


Erik Andersen wrote:

>On Tue Nov 19, 2002 at 10:48:58PM +0900, Tsuyoshi GEMMA wrote:
>
>>Hello,
>>
>>I tried to compile buildroot on my SuSE 8.1 box but failed unfortunately.
>>I got the following error:
>>
>
>Please read the README file in buildroot and make the needed
>symlink.  Also, please do a 'cvs up' on buildroot, since I have
>fixed several build problems.
>
I found that I failed to create necessary symlink to /lib/ld-uClibc.so.0.
Sorry for my carelessness.
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

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

Any suggestion are appreciated.

---
Tsuyoshi GEMMA / <Gem>





More information about the uClibc mailing list