Problems after building rootfs.i386.ext2
Hello all,
after the rootfs ist built, i discoverd some problems which i can not solve by myself.
Here are some infos about my environment:
It is a Thinkpad R60 Laptop with Core2 Duo and 2GiB RAM. Operating system is Kubuntu 7.10 and this is the way i tried to make my own buildroot.
I do not work as root (except the loop mount and chroot). I set LANG to C before starting the whole building.
svn co svn://uclibc.org/trunk/buildroot
cd buildroot
make menuconfig
These are the main settings i choose:
Target Architecture (i386)
Target Architecture Variant (i386)
Target filesystem options EXT2
Linux Kernel Version (Linux 2.6.24)
The other settings are left on standard settings.
The run make
Aborting. 'target/device/x86/i386/kernel-patches-2.6.24/' is not a directory.
make: *** [/home/development/uclibc/buildroot/project_build_i386/uclibc/linux-2.6.24/.patched] Error 1
I made the dir and started make again
mkdir -p target/device/x86/i386/kernel-patches-2.6.24/
You should create a .config for your kernel
and install it as target/device/x86/i386/linux-2.6.24.config
OK, jump to the dir and...
pushd project_build_i386/uclibc/linux-2.6.24 cp /boot/config-2.6.22-14-386 .config make oldconfig
popd
cp project_build_i386/uclibc/linux-2.6.24/.config target/device/x86/i386/linux-2.6.24.config make
make: *** No rule to make target `package/busybox/busybox-1.9.0.config', needed by /home/development/uclibc/buildroot/project_build_i386/uclibc/busybox-1.9.1/.configured'. Stop.
OK, jump to the dir and...
pushd project_build_i386/uclibc/busybox-1.9.1 make menuconfig
popd
cp project_build_i386/uclibc/busybox-1.9.1/.config package/busybox/busybox-1.9.0.config
make
After a long time, the rootfs was built. I run make menuconfig again and switch on
[*] native toolchain in the target filesystem
[*] make
and built the rootfs again.
I mount it at loop device and chroot in to it. I could chdir and run some programs. ls produces the known output but ls -al said:
# ls -al
rupt (core dumped)
and ls -l keep stcuking without any output as long as i do not hit CTRL-C.
The next i tried to compile the gawk sources. In another console (not chroot) i extract the sources into the mounted rootfs and run ./configure --help.
This stucks also.
I searched using google and the list archives but could not find an answer. What have i did wrong? I also read the docs/buildrott.html.
If anyone is willing to give me a hint or a link, it is very appreceated.
Best regards and thanks in adcance,
Micha Holzmann
Signature · 2 lines
GPG Public-Key: send a Mail with Subject: GPG-KEY Key fingerprint = 6FEF 16C5 17EF 9573 892B D810 66B9 8FBD 0EBA 820F
I think when you chroot you need to remount /proc. That can cause weird problems like you describe. Also try using strace on commands that fail or freeze up. This can be very enlightening (or confusing). You might not even be able to chroot into it since you are using uClibc instead of glibc. I don't know for sure. Does anyone else?
John Voltz
Quoted 107 lines · Micha Holzmann
Hello all,
after the rootfs ist built, i discoverd some problems which i can not solve by myself.
Here are some infos about my environment:
It is a Thinkpad R60 Laptop with Core2 Duo and 2GiB RAM. Operating system is Kubuntu 7.10 and this is the way i tried to make my own buildroot.
I do not work as root (except the loop mount and chroot). I set LANG to C before starting the whole building.svn co svn://uclibc.org/trunk/buildroot
cd buildroot
make menuconfigThese are the main settings i choose:
Target Architecture (i386)
Target Architecture Variant (i386)
Target filesystem options EXT2
Linux Kernel Version (Linux 2.6.24)The other settings are left on standard settings.
The run make
Aborting. 'target/device/x86/i386/kernel-patches-2.6.24/' is not a directory.
make: *** [/home/development/uclibc/buildroot/project_build_i386/uclibc/linux-2.6.24/.patched] Error 1I made the dir and started make again
mkdir -p target/device/x86/i386/kernel-patches-2.6.24/
You should create a .config for your kernel
and install it astarget/device/x86/i386/linux-2.6.24.configOK, jump to the dir and...
pushd project_build_i386/uclibc/linux-2.6.24 cp
/boot/config-2.6.22-14-386.config make oldconfig
popd
cp project_build_i386/uclibc/linux-2.6.24/.configtarget/device/x86/i386/linux-2.6.24.configmakemake: *** No rule to make target `package/busybox/busybox-1.9.0.config', needed by
/home/development/uclibc/buildroot/project_build_i386/uclibc/busybox-1.9.1/.configured'.
Stop.OK, jump to the dir and...
pushd project_build_i386/uclibc/busybox-1.9.1 make menuconfig
popd
cp project_build_i386/uclibc/busybox-1.9.1/.configpackage/busybox/busybox-1.9.0.config
makeAfter a long time, the rootfs was built. I run make menuconfig again and switch on
[*] native toolchain in the target filesystem
[*] makeand built the rootfs again.
I mount it at loop device and chroot in to it. I could chdir and run some programs.
ls produces the known output but ls -al said:# ls -alrupt (core dumped)
and ls -l keep stcuking without any output as long as i do not hit CTRL-C.
The next i tried to compile the gawk sources. In another console (not chroot) i extract the sources into the mounted rootfs and run ./configure --help.
This stucks also.
I searched using google and the list archives but could not find an answer. What have i did wrong? I also read the docs/buildrott.html.
If anyone is willing to give me a hint or a link, it is very appreceated.
Best regards and thanks in adcance,
Micha Holzmann
Quoted 8 lines
--
GPG Public-Key: send a Mail with Subject: GPG-KEY
Key fingerprint = 6FEF 16C5 17EF 9573 892B D810 66B9 8FBD 0EBA 820F
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080313/cc1919d7/attachment.htm
Hi,
i did what you recommended. I chrooted and tried to mount proc with several methods.
mount -t proc proc /proc
mount -t proc none /prot
proc was not mounted. mount said, to mount it needs proc mounted. At this moment mount is a symlink to busybox. I left the chroot and mounted proc to the proc inside the rootfs and do chroot again. mount without options shows me infos. But ls -al still stucks until i press CTRL-C. No change in the behavior.
The second hint you gave me, was to use strace. I activated strace in the menuconfig. The compiler gives me errors for two lines:
net.c: In function ?printsock?:
net.c:958: error: field ?ll? has incomplete type
net.c:961: error: field ?nl? has incomplete type
make[2]: *** [net.o] Fehler 1
In this case i have no strace which runs inside the chroot.
I tried to build buildroot the last two weeks over 30+ times.
Now i am running out of ideas what to do. :-)
May you have any further idea(s)?
Quoting John Voltz:
Quoted 7 lines
I think when you chroot you need to remount /proc. That can cause weird problems like you describe. Also try using strace on commands that fail or freeze up. This can be very enlightening (or confusing). You might not even be able to chroot into it since you are using uClibc instead of glibc. I don't know for sure. Does anyone else?
John Voltz
Best regards,
Micha Holzmann
In the latest buildroot, there is a shell script located in the scripts directory called build-ext3-img. It will build a bootable ext3 image that can be run using qemu or vmware (you have to convert the image to vmdk to use it with vmware, see qemu-img). You might try this instead. Take a look inside the script to see how it works.
John
Quoted 42 lines · Micha Holzmann
Hi,
i did what you recommended. I chrooted and tried to mount proc with several methods.
mount -t proc proc /proc
mount -t proc none /protproc was not mounted. mount said, to mount it needs proc mounted. At this moment mount is a symlink to busybox. I left the chroot and mounted proc to the proc inside the rootfs and do chroot again. mount without options shows me infos. But ls -al still stucks until i press CTRL-C. No change in the behavior.
The second hint you gave me, was to use strace. I activated strace in the menuconfig. The compiler gives me errors for two lines:
net.c: In function ?printsock?:
net.c:958: error: field ?ll? has incomplete type
net.c:961: error: field ?nl? has incomplete type
make[2]: *** [net.o] Fehler 1In this case i have no strace which runs inside the chroot.
I tried to build buildroot the last two weeks over 30+ times.
Now i am running out of ideas what to do. :-)May you have any further idea(s)?
Quoting John Voltz:
Quoted 2 lines
I think when you chroot you need to remount /proc. That can cause weird problems like you describe. Also try using strace on commands that fail
or
Quoted 1 line
freeze up. This can be very enlightening (or confusing). You might not
even
Quoted 4 lines
be able to chroot into it since you are using uClibc instead of glibc. I don't know for sure. Does anyone else?
John Voltz
Quoted 9 lines
Best regards,
Micha Holzmann_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080314/67258a31/attachment.htm
Hello,
Quoted 5 lines · John Voltz
In the latest buildroot, there is a shell script located in the scripts directory called build-ext3-img. It will build a bootable ext3 image that can be run using qemu or vmware (you have to convert the image to vmdk to use it with vmware, see qemu-img). You might try this instead. Take a look inside the script to see how it works.
this helps a lot. At least i assume it was a broken g++ installation on my machine. After reinstalling the package and check the links the decribed behavior has gone.
Many thanks for your hints.
Best regards,
Micha Holzmann
Signature · 2 lines
$> man woman $> Segmentation fault (core dumped)