* [Buildroot] Advice on buildroot implementation
@ 2013-02-19 23:03 Gregory Perry
2013-02-19 23:18 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Gregory Perry @ 2013-02-19 23:03 UTC (permalink / raw)
To: buildroot
Hello again,
Does anyone have some advice on using buildroot to create a LiveCD filesystem?
Here are the requirements:
1) Universal boot support on any x86 hardware platform;
2) Read only (UnionFS or OverlayFS); and
2) NFS root capabilities after kernel/initrd launch (if the ISO is PXE-boostrapped)
The problems I am seeing with this approach so far (at least from the NFS
root perspective) is that things like /lib/firmware are not accessible during the
boot process which hangs the boot process.
Has anyone successfully created a buildroot install that can be used over a
read only NFS mount? How did you get around issues like eth0 firmware not
being accessible during the initial boot?
Thanks in advance
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Advice on buildroot implementation
2013-02-19 23:03 [Buildroot] Advice on buildroot implementation Gregory Perry
@ 2013-02-19 23:18 ` Arnout Vandecappelle
2013-02-20 1:24 ` Gregory Perry
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-02-19 23:18 UTC (permalink / raw)
To: buildroot
On 20/02/13 00:03, Gregory Perry wrote:
> Hello again,
>
> Does anyone have some advice on using buildroot to create a LiveCD filesystem?
>
> Here are the requirements:
>
> 1) Universal boot support on any x86 hardware platform;
> 2) Read only (UnionFS or OverlayFS); and
> 2) NFS root capabilities after kernel/initrd launch (if the ISO is PXE-boostrapped)
On x86, I find the easiest approach to use a cpio initramfs, with a
syslinux boot loader. But if universal boot is required, it means you
have to stuff all the modules bloat in the cpio image...
For basic boot you don't need unionfs. The NFS root you can have by
combining the cpio initramfs with a unionfs overlay (assuming the
initramfs contains all the modules and firmware). I posted a script
recently [1] to mount a unionfs-root early in init. Don't forget to
select the unionfs-fuse package.
Regards,
Arnout
[1] http://lists.busybox.net/pipermail/buildroot/2013-January/066146.html
> The problems I am seeing with this approach so far (at least from the NFS
> root perspective) is that things like /lib/firmware are not accessible during the
> boot process which hangs the boot process.
>
> Has anyone successfully created a buildroot install that can be used over a
> read only NFS mount? How did you get around issues like eth0 firmware not
> being accessible during the initial boot?
>
> Thanks in advance
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Advice on buildroot implementation
2013-02-19 23:18 ` Arnout Vandecappelle
@ 2013-02-20 1:24 ` Gregory Perry
2013-02-20 11:08 ` Stefan Fröberg
0 siblings, 1 reply; 6+ messages in thread
From: Gregory Perry @ 2013-02-20 1:24 UTC (permalink / raw)
To: buildroot
Thank you Arnout!
________________________________________
From: Arnout Vandecappelle [arnout at mind.be]
Sent: Tuesday, February 19, 2013 6:18 PM
To: Gregory Perry
Cc: buildroot at busybox.net
Subject: Re: [Buildroot] Advice on buildroot implementation
On 20/02/13 00:03, Gregory Perry wrote:
> Hello again,
>
> Does anyone have some advice on using buildroot to create a LiveCD filesystem?
>
> Here are the requirements:
>
> 1) Universal boot support on any x86 hardware platform;
> 2) Read only (UnionFS or OverlayFS); and
> 2) NFS root capabilities after kernel/initrd launch (if the ISO is PXE-boostrapped)
On x86, I find the easiest approach to use a cpio initramfs, with a
syslinux boot loader. But if universal boot is required, it means you
have to stuff all the modules bloat in the cpio image...
For basic boot you don't need unionfs. The NFS root you can have by
combining the cpio initramfs with a unionfs overlay (assuming the
initramfs contains all the modules and firmware). I posted a script
recently [1] to mount a unionfs-root early in init. Don't forget to
select the unionfs-fuse package.
Regards,
Arnout
[1] http://lists.busybox.net/pipermail/buildroot/2013-January/066146.html
> The problems I am seeing with this approach so far (at least from the NFS
> root perspective) is that things like /lib/firmware are not accessible during the
> boot process which hangs the boot process.
>
> Has anyone successfully created a buildroot install that can be used over a
> read only NFS mount? How did you get around issues like eth0 firmware not
> being accessible during the initial boot?
>
> Thanks in advance
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Advice on buildroot implementation
2013-02-20 1:24 ` Gregory Perry
@ 2013-02-20 11:08 ` Stefan Fröberg
2013-02-20 17:38 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Fröberg @ 2013-02-20 11:08 UTC (permalink / raw)
To: buildroot
20.2.2013 3:24, Gregory Perry kirjoitti:
> Thank you Arnout!
> ________________________________________
> From: Arnout Vandecappelle [arnout at mind.be]
> Sent: Tuesday, February 19, 2013 6:18 PM
> To: Gregory Perry
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] Advice on buildroot implementation
>
> On 20/02/13 00:03, Gregory Perry wrote:
>> Hello again,
>>
>> Does anyone have some advice on using buildroot to create a LiveCD filesystem?
>>
>> Here are the requirements:
>>
>> 1) Universal boot support on any x86 hardware platform;
>> 2) Read only (UnionFS or OverlayFS); and
>> 2) NFS root capabilities after kernel/initrd launch (if the ISO is PXE-boostrapped)
> On x86, I find the easiest approach to use a cpio initramfs, with a
> syslinux boot loader. But if universal boot is required, it means you
> have to stuff all the modules bloat in the cpio image...
Grub is nice bootloader too ;-)
If every kernel module is needed it will take about 50 MB and if every
firmware is needed then it will take another 60 MB.
However, there is a git-tree of using LTO (Link time optimization) with
Linux kernel to make at least modules smaller.
https://github.com/andikleen/linux-misc/commits/lto
Besides those patches you need at least gcc 4.7.2 or greater and buld
with --enable-gold=yes --enable-lto and
also H.J. Lu's (man who had his part of doing glibc ABI specification,
or so I read) version of binutils (latest version is 2.23.51.0.9)
https://www.kernel.org/pub/linux/devel/binutils/
which also needs to be compiled with --enable-gold=yes --enable-lto
Then after those three requirements (patched kernel, latest gcc with
proper configure switches and HJ Lu's binutils with configure switches)
are met then activating LTO compiling by giving the following CFLAGS and
LDFLAGS:
CFLAGS = -flto -fwhole-program
LDFLAGS= -flto -fuse-linker-plugin
It could be also possible to compile whole system to make it smaller but
it is very delicate and experimental process and some packages
don't like some flags at all (For example zlib 1.2.7 does not like
-fwhole-program).
So Im asking everyone here:
How can I filter out flags-per-package ?
And also enable flags-per-package?
I would like to enable globally those LTO flags and filter some/all
flags from problematic packages.
Regards
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Advice on buildroot implementation
2013-02-20 11:08 ` Stefan Fröberg
@ 2013-02-20 17:38 ` Arnout Vandecappelle
2013-02-21 10:38 ` Stefan Fröberg
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-02-20 17:38 UTC (permalink / raw)
To: buildroot
On 20/02/13 12:08, Stefan Fr?berg wrote:
[snip]
> CFLAGS = -flto -fwhole-program
> LDFLAGS= -flto -fuse-linker-plugin
>
> It could be also possible to compile whole system to make it smaller but
> it is very delicate and experimental process and some packages
> don't like some flags at all (For example zlib 1.2.7 does not like
> -fwhole-program).
>
> So Im asking everyone here:
>
> How can I filter out flags-per-package ?
For most gcc -f and -W options, there's a no- variant. So
ZLIB_CFLAGS = -fno-lto -fno-while-program
ZLIB_LDFLAGS = -fno-lto -fno-use-linker-plugin
> And also enable flags-per-package?
> I would like to enable globally those LTO flags and filter some/all
> flags from problematic packages.
You can only do that by changing the package .mk file. I don't think we
want to add infrastructure for per-package CFLAGS configuration...
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Advice on buildroot implementation
2013-02-20 17:38 ` Arnout Vandecappelle
@ 2013-02-21 10:38 ` Stefan Fröberg
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Fröberg @ 2013-02-21 10:38 UTC (permalink / raw)
To: buildroot
20.2.2013 19:38, Arnout Vandecappelle kirjoitti:
> On 20/02/13 12:08, Stefan Fr?berg wrote:
> [snip]
>> CFLAGS = -flto -fwhole-program
>> LDFLAGS= -flto -fuse-linker-plugin
>>
>> It could be also possible to compile whole system to make it smaller but
>> it is very delicate and experimental process and some packages
>> don't like some flags at all (For example zlib 1.2.7 does not like
>> -fwhole-program).
>>
>> So Im asking everyone here:
>>
>> How can I filter out flags-per-package ?
>
> For most gcc -f and -W options, there's a no- variant. So
>
> ZLIB_CFLAGS = -fno-lto -fno-while-program
> ZLIB_LDFLAGS = -fno-lto -fno-use-linker-plugin
>
>> And also enable flags-per-package?
>> I would like to enable globally those LTO flags and filter some/all
>> flags from problematic packages.
>
> You can only do that by changing the package .mk file. I don't think
> we want to add infrastructure for per-package CFLAGS configuration...
>
> Regards,
> Arnout
Well, if there are no-variants for those lto flags then I will be
perfectly happy to try full shrinking test of my system with lto.
Regards
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-21 10:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 23:03 [Buildroot] Advice on buildroot implementation Gregory Perry
2013-02-19 23:18 ` Arnout Vandecappelle
2013-02-20 1:24 ` Gregory Perry
2013-02-20 11:08 ` Stefan Fröberg
2013-02-20 17:38 ` Arnout Vandecappelle
2013-02-21 10:38 ` Stefan Fröberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox