* [Buildroot] Trying to build in an usual place: /opt instead of /
@ 2009-12-01 13:10 Olivier Perron
2009-12-01 13:21 ` Lionel Landwerlin
0 siblings, 1 reply; 10+ messages in thread
From: Olivier Perron @ 2009-12-01 13:10 UTC (permalink / raw)
To: buildroot
Hello all,
I'm trying to build a basic buildroot system that would go in /opt on
the target. I'm doing this just because there is already another linux
system running from / and I want to add my own "enhanced" one that has
to be fully independent from the original one. Hence everything has to
go in another folder: /opt for instance.
So far, I've tweaked some config files and some .mk files to reach my
goal. I have managed to get uclibc installed in /opt/lib and some
userland binaries in /opt/usr/bin.
But, yes there is a but... all my dynamically linked binaries try to
find the dynamic linker in /lib (e.g. /lib/ld-uClibc.so.0) where as
the linker is /opt/lib/ld-uClibc.so.
I had a look at the generated libc and ld-uClibc and they all have
/opt/lib/ld-uClibc.so hardcoded in them as I was expecting. So I'm
quite not so sure where to look now to resolve that issue.
It looks like I have configured uclibc correctly but the linked
binaries are still wrong.
Maybe I also have to adapt the configuration for gcc or binutils ? I
had a look at the .mk files but cannot find easily what to change...
So I'd be very grateful if someone could point me to the right direction !
Regards
Olivier
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-01 13:10 [Buildroot] Trying to build in an usual place: /opt instead of / Olivier Perron
@ 2009-12-01 13:21 ` Lionel Landwerlin
2009-12-01 14:10 ` Olivier Perron
0 siblings, 1 reply; 10+ messages in thread
From: Lionel Landwerlin @ 2009-12-01 13:21 UTC (permalink / raw)
To: buildroot
On Tue, Dec 1, 2009 at 2:10 PM, Olivier Perron
<olivier.perron12@gmail.com> wrote:
> Hello all,
>
> I'm trying to build a basic buildroot system that would go in /opt on
> the target. I'm doing this just because there is already another linux
> system running from / and I want to add my own "enhanced" one that has
> to be fully independent from the original one. Hence everything has to
> go in another folder: /opt for instance.
>
> So far, I've tweaked some config files and some .mk files to reach my
> goal. I have managed to get uclibc installed in /opt/lib and some
> userland binaries in /opt/usr/bin.
> But, yes there is a but... all my dynamically linked binaries try to
> find the dynamic linker in /lib (e.g. /lib/ld-uClibc.so.0) where as
> the linker is /opt/lib/ld-uClibc.so.
> I had a look at the generated libc and ld-uClibc and they all have
> /opt/lib/ld-uClibc.so hardcoded in them as I was expecting. So I'm
> quite not so sure where to look now to resolve that issue.
> It looks like I have configured uclibc correctly but the linked
> binaries are still wrong.
> Maybe I also have to adapt the configuration for gcc or binutils ? I
> had a look at the .mk files but cannot find easily what to change...
> So I'd be very grateful if someone could point me to the right direction !
>
Why not using chroot ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-01 13:21 ` Lionel Landwerlin
@ 2009-12-01 14:10 ` Olivier Perron
2009-12-01 14:18 ` Olivier Perron
0 siblings, 1 reply; 10+ messages in thread
From: Olivier Perron @ 2009-12-01 14:10 UTC (permalink / raw)
To: buildroot
On Tue, Dec 1, 2009 at 2:21 PM, Lionel Landwerlin <llandwerlin@gmail.com> wrote:
> On Tue, Dec 1, 2009 at 2:10 PM, Olivier Perron
> <olivier.perron12@gmail.com> wrote:
>> Hello all,
>>
>> I'm trying to build a basic buildroot system that would go in /opt on
>> the target. I'm doing this just because there is already another linux
>> system running from / and I want to add my own "enhanced" one that has
>> to be fully independent from the original one. Hence everything has to
>> go in another folder: /opt for instance.
>>
>> So far, I've tweaked some config files and some .mk files to reach my
>> goal. I have managed to get uclibc installed in /opt/lib and some
>> userland binaries in /opt/usr/bin.
>> But, yes there is a but... all my dynamically linked binaries try to
>> find the dynamic linker in /lib (e.g. /lib/ld-uClibc.so.0) where as
>> the linker is /opt/lib/ld-uClibc.so.
>> I had a look at the generated libc and ld-uClibc and they all have
>> /opt/lib/ld-uClibc.so hardcoded in them as I was expecting. So I'm
>> quite not so sure where to look now to resolve that issue.
>> It looks like I have configured uclibc correctly but the linked
>> binaries are still wrong.
>> Maybe I also have to adapt the configuration for gcc or binutils ? I
>> had a look at the .mk files but cannot find easily what to change...
>> So I'd be very grateful if someone could point me to the right direction !
>>
>
> Why not using chroot ?
>
Because I still need to access /dev ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-01 14:10 ` Olivier Perron
@ 2009-12-01 14:18 ` Olivier Perron
2009-12-01 14:23 ` Lionel Landwerlin
2009-12-01 18:42 ` Michael S. Zick
0 siblings, 2 replies; 10+ messages in thread
From: Olivier Perron @ 2009-12-01 14:18 UTC (permalink / raw)
To: buildroot
[...]
>>>
>>
>> Why not using chroot ?
>>
>
> Because I still need to access /dev ?
>
Hum... bad answer !
# mkdir /opt/dev
# mount -o bind /dev /opt/dev
before chrooting should do the trick.
Yes, I will try the chroot route then.
Anyway, if someone knows how to do what I wanted to do in first place,
please tell me: I'd love to learn what I failed to do !
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-01 14:18 ` Olivier Perron
@ 2009-12-01 14:23 ` Lionel Landwerlin
2009-12-01 18:42 ` Michael S. Zick
1 sibling, 0 replies; 10+ messages in thread
From: Lionel Landwerlin @ 2009-12-01 14:23 UTC (permalink / raw)
To: buildroot
I don't have the answer to your first question, but you should look at
the way debian provides ia32 emulation on amd64 systems.
They probably add some flags at compilation to use the correct loader.
--
Regards
On Tue, Dec 1, 2009 at 3:18 PM, Olivier Perron
<olivier.perron12@gmail.com> wrote:
> [...]
>>>>
>>>
>>> Why not using chroot ?
>>>
>>
>> Because I still need to access /dev ?
>>
>
> Hum... bad answer !
> # mkdir /opt/dev
> # mount -o bind /dev /opt/dev
> before chrooting should do the trick.
>
> Yes, I will try the chroot route then.
>
> Anyway, if someone knows how to do what I wanted to do in first place,
> please tell me: I'd love to learn what I failed to do !
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-01 14:18 ` Olivier Perron
2009-12-01 14:23 ` Lionel Landwerlin
@ 2009-12-01 18:42 ` Michael S. Zick
2009-12-04 15:49 ` Olivier Perron
1 sibling, 1 reply; 10+ messages in thread
From: Michael S. Zick @ 2009-12-01 18:42 UTC (permalink / raw)
To: buildroot
On Tue December 1 2009, Olivier Perron wrote:
> [...]
> >>>
> >>
> >> Why not using chroot ?
> >>
> >
> > Because I still need to access /dev ?
> >
>
> Hum... bad answer !
> # mkdir /opt/dev
> # mount -o bind /dev /opt/dev
> before chrooting should do the trick.
>
You don't need that, unless you want the changes made in
the chroot/dev to show up outside of the chroot.
Just initialize the device nodes in chroot/dev, they will
work just fine there (the kernel uses the device numbers,
not the path).
Presuming a bare busybox in chroot/bin - (/opt/test/bin)
Here is the short version:
mount -t proc proc /opt/test/proc
mount -t sysfs sysfs /opt/test/sys
chroot /opt/test /bin/busybox sh
/bin/busybox --install -s
mdev -s
Your done. Have fun.
Mike
> Yes, I will try the chroot route then.
>
> Anyway, if someone knows how to do what I wanted to do in first place,
> please tell me: I'd love to learn what I failed to do !
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-01 18:42 ` Michael S. Zick
@ 2009-12-04 15:49 ` Olivier Perron
2009-12-04 16:12 ` Michael S. Zick
0 siblings, 1 reply; 10+ messages in thread
From: Olivier Perron @ 2009-12-04 15:49 UTC (permalink / raw)
To: buildroot
On Tue, Dec 1, 2009 at 7:42 PM, Michael S. Zick <minimod@morethan.org> wrote:
> On Tue December 1 2009, Olivier Perron wrote:
>> [...]
>> >>>
>> >>
>> >> Why not using chroot ?
>> >>
>> >
>> > Because I still need to access /dev ?
>> >
>>
>> Hum... bad answer !
>> # mkdir /opt/dev
>> # mount -o bind /dev /opt/dev
>> before chrooting should do the trick.
>>
>
> You don't need that, unless you want the changes made in
> the chroot/dev to show up outside of the chroot.
>
> Just initialize the device nodes in chroot/dev, they will
> work just fine there (the kernel uses the device numbers,
> not the path).
>
> Presuming a bare busybox in chroot/bin - (/opt/test/bin)
> Here is the short version:
>
> mount -t proc proc /opt/test/proc
> mount -t sysfs sysfs /opt/test/sys
> chroot /opt/test /bin/busybox sh
> /bin/busybox --install -s
> mdev -s
>
> Your done. ?Have fun.
>
> Mike
Mike,
this doesn't work (well not completely).
Once chrooted, when I want to start X I got an error which says:
Fatal server error:
xf86OpenConsole: Cannot find a free VT: Inappropriate ioctl for device
My solution (to mount with the -bind option) works ok.
Cheers
Olivier
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-04 15:49 ` Olivier Perron
@ 2009-12-04 16:12 ` Michael S. Zick
2009-12-04 16:30 ` Olivier Perron
0 siblings, 1 reply; 10+ messages in thread
From: Michael S. Zick @ 2009-12-04 16:12 UTC (permalink / raw)
To: buildroot
On Fri December 4 2009, Olivier Perron wrote:
> On Tue, Dec 1, 2009 at 7:42 PM, Michael S. Zick <minimod@morethan.org> wrote:
> > On Tue December 1 2009, Olivier Perron wrote:
> >> [...]
> >> >>>
> >> >>
> >> >> Why not using chroot ?
> >> >>
> >> >
> >> > Because I still need to access /dev ?
> >> >
> >>
> >> Hum... bad answer !
> >> # mkdir /opt/dev
> >> # mount -o bind /dev /opt/dev
> >> before chrooting should do the trick.
> >>
> >
> > You don't need that, unless you want the changes made in
> > the chroot/dev to show up outside of the chroot.
> >
> > Just initialize the device nodes in chroot/dev, they will
> > work just fine there (the kernel uses the device numbers,
> > not the path).
> >
> > Presuming a bare busybox in chroot/bin - (/opt/test/bin)
> > Here is the short version:
> >
> > mount -t proc proc /opt/test/proc
> > mount -t sysfs sysfs /opt/test/sys
> > chroot /opt/test /bin/busybox sh
> > /bin/busybox --install -s
> > mdev -s
> >
> > Your done. ?Have fun.
> >
> > Mike
>
> Mike,
>
> this doesn't work (well not completely).
> Once chrooted, when I want to start X I got an error which says:
> Fatal server error:
> xf86OpenConsole: Cannot find a free VT: Inappropriate ioctl for device
>
> My solution (to mount with the -bind option) works ok.
>
Allow me to repeat myself:
> > Here is the short version:
Now, I can't see where you mentioned that you wanted anything
*other than* the minimum set of devices.
So, the longer answer:
http://minimodding.com/tiki-index.php?page=FirmwareEvalSystem
And if you really want to learn about what you are trying to do:
http://www.linuxfromscratch.org/
And remember that Google is your friend if the system turns out
to be missing the VT (virtual terminals). ;)
Mike
> Cheers
> Olivier
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Trying to build in an usual place: /opt instead of /
2009-12-04 16:12 ` Michael S. Zick
@ 2009-12-04 16:30 ` Olivier Perron
2009-12-04 17:23 ` Michael S. Zick
0 siblings, 1 reply; 10+ messages in thread
From: Olivier Perron @ 2009-12-04 16:30 UTC (permalink / raw)
To: buildroot
>
> Allow me to repeat myself:
>> > Here is the short version:
>
> Now, I can't see where you mentioned that you wanted anything
> *other than* the minimum set of devices.
>
I didn't say it: it was explicit (in my head :-)
> So, the longer answer:
> http://minimodding.com/tiki-index.php?page=FirmwareEvalSystem
>
Thanks for this pointer, it's very valuable !
> And if you really want to learn about what you are trying to do:
> http://www.linuxfromscratch.org/
>
Not really from scratch as I'm still using the running kernel that
comes with the original firmware. I just need some better userland
along side the existing one.
> And remember that Google is your friend if the system turns out
> to be missing the VT (virtual terminals). ?;)
>
Yes, I could have do some googling on it... but as my bind solution
was working, it was enough for enable me to continue my testing. I'll
go googling now that I have some spare time to do it.
Anyway Mike, thank you for your support that has been really very much
appreciated !
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-12-04 17:23 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 13:10 [Buildroot] Trying to build in an usual place: /opt instead of / Olivier Perron
2009-12-01 13:21 ` Lionel Landwerlin
2009-12-01 14:10 ` Olivier Perron
2009-12-01 14:18 ` Olivier Perron
2009-12-01 14:23 ` Lionel Landwerlin
2009-12-01 18:42 ` Michael S. Zick
2009-12-04 15:49 ` Olivier Perron
2009-12-04 16:12 ` Michael S. Zick
2009-12-04 16:30 ` Olivier Perron
2009-12-04 17:23 ` Michael S. Zick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox