Chrooting into a newly created toolchain.
Posted: Wed Feb 13, 2008 2:11 pm
I have been playing around with different approaches to creating an operating system. I have decided to start with creating a standalone toolchain to begin with. The problem I have run into is that I cannot for some reason chroot into it.
I have compiled gcc-4.2.3 with a livecd onto the hard drive, then compiled binutils using the new gcc. Using the new toolchain I compiled busybox. All this was compiled so it was in /larry. When I use the command: chroot /larry /bin/sh , I get a message saying that /bin/sh does not exist. It is dynamically linked to ../../usr/bin/busybox so its inside the chroot.
But at the same time, I can use /larry/usr/bin/busybox sh, and get a sh prompt. Any suggestions on a different way to create a toolchain would be great.
Robert Keizer
-----edit------
Just to be clear here is my directory listing
/larry - new hd root
/larry/toolchain - where everything about the toolchain is stored
/larry/toolchain/gcc-round1/ - gcc-4.2.3 compiled with the livecd stuff
/larry/toolchain/binutils-round1/ - binutils compiled with gcc-round1
/larry/toolchain/busybox-1.9.0/ - busybox compiled with binutils and gcc above
I have compiled gcc-4.2.3 with a livecd onto the hard drive, then compiled binutils using the new gcc. Using the new toolchain I compiled busybox. All this was compiled so it was in /larry. When I use the command: chroot /larry /bin/sh , I get a message saying that /bin/sh does not exist. It is dynamically linked to ../../usr/bin/busybox so its inside the chroot.
But at the same time, I can use /larry/usr/bin/busybox sh, and get a sh prompt. Any suggestions on a different way to create a toolchain would be great.
Robert Keizer
-----edit------
Just to be clear here is my directory listing
/larry - new hd root
/larry/toolchain - where everything about the toolchain is stored
/larry/toolchain/gcc-round1/ - gcc-4.2.3 compiled with the livecd stuff
/larry/toolchain/binutils-round1/ - binutils compiled with gcc-round1
/larry/toolchain/busybox-1.9.0/ - busybox compiled with binutils and gcc above