* [Buildroot] Creating initrd
@ 2012-10-11 14:05 Chris Wilkinson
2012-10-11 14:48 ` Thomas Petazzoni
0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilkinson @ 2012-10-11 14:05 UTC (permalink / raw)
To: buildroot
I haven't been able to figure out how to get BR to create an initial
ramdisk.
I selected initramfs in Filesystem images. What I end up with is
-rw-r--r-- 1 chrisw chrisw 38356992 Oct 11 09:00 rootfs.cpio
-rw-r--r-- 1 chrisw chrisw 13666196 Oct 11 09:00 rootfs.cpio.gz
-rw-r--r-- 1 chrisw chrisw 48346112 Oct 11 09:00 rootfs.ext2
-rw-r--r-- 1 chrisw chrisw 13990321 Oct 11 09:00 rootfs.ext2.gz
-rwxr-xr-x 1 chrisw chrisw 1422576 Oct 11 09:01 zImage
There is no initrd and the rootfs is way too big for flash.
Chris
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-11 14:05 [Buildroot] Creating initrd Chris Wilkinson
@ 2012-10-11 14:48 ` Thomas Petazzoni
2012-10-11 15:16 ` Chris Wilkinson
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2012-10-11 14:48 UTC (permalink / raw)
To: buildroot
Dear Chris Wilkinson,
On Thu, 11 Oct 2012 10:05:03 -0400, Chris Wilkinson wrote:
> I haven't been able to figure out how to get BR to create an initial
> ramdisk.
>
> I selected initramfs in Filesystem images. What I end up with is
>
> -rw-r--r-- 1 chrisw chrisw 38356992 Oct 11 09:00 rootfs.cpio
> -rw-r--r-- 1 chrisw chrisw 13666196 Oct 11 09:00 rootfs.cpio.gz
> -rw-r--r-- 1 chrisw chrisw 48346112 Oct 11 09:00 rootfs.ext2
> -rw-r--r-- 1 chrisw chrisw 13990321 Oct 11 09:00 rootfs.ext2.gz
> -rwxr-xr-x 1 chrisw chrisw 1422576 Oct 11 09:01 zImage
>
> There is no initrd and the rootfs is way too big for flash.
Forget about initrd, nobody uses that anymore.
Can you post your entire .config?
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-11 14:48 ` Thomas Petazzoni
@ 2012-10-11 15:16 ` Chris Wilkinson
2012-10-11 15:23 ` Thomas Petazzoni
0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilkinson @ 2012-10-11 15:16 UTC (permalink / raw)
To: buildroot
The .config is here
http://pastebin.com/84LqnBXS
This shows what I'm trying to achieve.
http://d-i.alioth.debian.org/manual/en.armel/ch05s01.html#boot-firmware.
The output on the serial console goes like this on power up.
>>
No network interfaces found
EM-7210 ver.T04 2005-12-12 (For ver.AA)
== Executing boot script in 1.000 seconds - enter ^C to abort
At this point, hit Control-C to interrupt the boot loader[4]. This will
give you the RedBoot prompt. Enter the following commands:
> load -v -r -b 0x01800000 -m ymodem ramdisk.gz
> load -v -r -b 0x01008000 -m ymodem zImage
> exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M at 0xa0000000" -r
0x01800000
Chris
On Thu, 2012-10-11 at 16:48 +0200, Thomas Petazzoni wrote:
> Dear Chris Wilkinson,
>
> On Thu, 11 Oct 2012 10:05:03 -0400, Chris Wilkinson wrote:
> > I haven't been able to figure out how to get BR to create an initial
> > ramdisk.
> >
> > I selected initramfs in Filesystem images. What I end up with is
> >
> > -rw-r--r-- 1 chrisw chrisw 38356992 Oct 11 09:00 rootfs.cpio
> > -rw-r--r-- 1 chrisw chrisw 13666196 Oct 11 09:00 rootfs.cpio.gz
> > -rw-r--r-- 1 chrisw chrisw 48346112 Oct 11 09:00 rootfs.ext2
> > -rw-r--r-- 1 chrisw chrisw 13990321 Oct 11 09:00 rootfs.ext2.gz
> > -rwxr-xr-x 1 chrisw chrisw 1422576 Oct 11 09:01 zImage
> >
> > There is no initrd and the rootfs is way too big for flash.
>
> Forget about initrd, nobody uses that anymore.
>
> Can you post your entire .config?
>
> Thanks,
>
> Thomas
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-11 15:16 ` Chris Wilkinson
@ 2012-10-11 15:23 ` Thomas Petazzoni
2012-10-11 17:28 ` Chris Wilkinson
2012-10-11 21:45 ` Chris Wilkinson
0 siblings, 2 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2012-10-11 15:23 UTC (permalink / raw)
To: buildroot
On Thu, 11 Oct 2012 11:16:09 -0400, Chris Wilkinson wrote:
> The .config is here
>
> http://pastebin.com/84LqnBXS
Are you sure you did a "make clean; make" after doing all your
configuration changes? Your configuration has almost no packages
enabled, the generated root filesystem definitely shouldn't be that big.
> This shows what I'm trying to achieve.
>
> http://d-i.alioth.debian.org/manual/en.armel/ch05s01.html#boot-firmware.
>
> The output on the serial console goes like this on power up.
>
> >>
> No network interfaces found
>
> EM-7210 ver.T04 2005-12-12 (For ver.AA)
> == Executing boot script in 1.000 seconds - enter ^C to abort
>
> At this point, hit Control-C to interrupt the boot loader[4]. This
> will give you the RedBoot prompt. Enter the following commands:
>
> > load -v -r -b 0x01800000 -m ymodem ramdisk.gz
> > load -v -r -b 0x01008000 -m ymodem zImage
> > exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M at 0xa0000000" -r 0x01800000
You have two choices:
1 Use an initramfs embedded inside the kernel image. This is what
Buildroot does when you enable the BR2_TARGET_ROOTFS_INITRAMFS
option. In that case, you only need to load zImage to RAM, and
execute it, it already contains the initramfs.
2 Use an initramfs outside the kernel image. In that case, don't
enable the BR2_TARGET_ROOTFS_INITRAMFS Buildroot option, and simply
generated a compressed cpio archive for the root filesystem, thanks
to BR2_TARGET_ROOTFS_CPIO + BR2_TARGET_ROOTFS_CPIO_GZIP. Then, make
sure your kernel as the support for initramfs enabled.
I am quite familiar with choice 1, but I haven't tested choice 2 with
Buildroot.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-11 15:23 ` Thomas Petazzoni
@ 2012-10-11 17:28 ` Chris Wilkinson
2012-10-11 18:53 ` Thomas Petazzoni
2012-10-11 21:45 ` Chris Wilkinson
1 sibling, 1 reply; 11+ messages in thread
From: Chris Wilkinson @ 2012-10-11 17:28 UTC (permalink / raw)
To: buildroot
I had not done 'make clean' first. Having done that and rebuilt with the
same config I now have,
-rw-r--r-- 1 chrisw chrisw 49223680 Oct 11 13:14 rootfs.cpio
-rw-r--r-- 1 chrisw chrisw 17878125 Oct 11 13:15 rootfs.cpio.gz
-rwxr-xr-x 1 chrisw chrisw 19337904 Oct 11 13:17 zImage
It would appear that the initramfs has been embedded within zImage.
Still way too big. This is a puzzle since as you say I took care to not
enable any but the most basic of packages.
Chris
On Thu, 2012-10-11 at 17:23 +0200, Thomas Petazzoni wrote:
> On Thu, 11 Oct 2012 11:16:09 -0400, Chris Wilkinson wrote:
> > The .config is here
> >
> > http://pastebin.com/84LqnBXS
>
> Are you sure you did a "make clean; make" after doing all your
> configuration changes? Your configuration has almost no packages
> enabled, the generated root filesystem definitely shouldn't be that big.
>
> > This shows what I'm trying to achieve.
> >
> > http://d-i.alioth.debian.org/manual/en.armel/ch05s01.html#boot-firmware.
> >
> > The output on the serial console goes like this on power up.
> >
> > >>
> > No network interfaces found
> >
> > EM-7210 ver.T04 2005-12-12 (For ver.AA)
> > == Executing boot script in 1.000 seconds - enter ^C to abort
> >
> > At this point, hit Control-C to interrupt the boot loader[4]. This
> > will give you the RedBoot prompt. Enter the following commands:
> >
> > > load -v -r -b 0x01800000 -m ymodem ramdisk.gz
> > > load -v -r -b 0x01008000 -m ymodem zImage
> > > exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M at 0xa0000000" -r 0x01800000
>
> You have two choices:
>
> 1 Use an initramfs embedded inside the kernel image. This is what
> Buildroot does when you enable the BR2_TARGET_ROOTFS_INITRAMFS
> option. In that case, you only need to load zImage to RAM, and
> execute it, it already contains the initramfs.
>
> 2 Use an initramfs outside the kernel image. In that case, don't
> enable the BR2_TARGET_ROOTFS_INITRAMFS Buildroot option, and simply
> generated a compressed cpio archive for the root filesystem, thanks
> to BR2_TARGET_ROOTFS_CPIO + BR2_TARGET_ROOTFS_CPIO_GZIP. Then, make
> sure your kernel as the support for initramfs enabled.
>
> I am quite familiar with choice 1, but I haven't tested choice 2 with
> Buildroot.
>
> Best regards,
>
> Thomas
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-11 17:28 ` Chris Wilkinson
@ 2012-10-11 18:53 ` Thomas Petazzoni
[not found] ` <1349988968.14474.34.camel@Homeserver>
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2012-10-11 18:53 UTC (permalink / raw)
To: buildroot
Dear Chris Wilkinson,
On Thu, 11 Oct 2012 13:28:04 -0400, Chris Wilkinson wrote:
> I had not done 'make clean' first. Having done that and rebuilt with
> the same config I now have,
>
> -rw-r--r-- 1 chrisw chrisw 49223680 Oct 11 13:14 rootfs.cpio
> -rw-r--r-- 1 chrisw chrisw 17878125 Oct 11 13:15 rootfs.cpio.gz
> -rwxr-xr-x 1 chrisw chrisw 19337904 Oct 11 13:17 zImage
>
> It would appear that the initramfs has been embedded within zImage.
> Still way too big. This is a puzzle since as you say I took care to
> not enable any but the most basic of packages.
Can you put online somewhere your kernel tarball and your kernel config
so that I can build your Buildroot configuration and try to reproduce
the problem?
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-11 15:23 ` Thomas Petazzoni
2012-10-11 17:28 ` Chris Wilkinson
@ 2012-10-11 21:45 ` Chris Wilkinson
2012-10-12 7:10 ` Thomas Petazzoni
1 sibling, 1 reply; 11+ messages in thread
From: Chris Wilkinson @ 2012-10-11 21:45 UTC (permalink / raw)
To: buildroot
Clean/make on a stock v3.4.7 kernel gives the following
-rw-r--r-- 1 chrisw chrisw 1.5M Oct 11 17:19 rootfs.cpio
-rw-r--r-- 1 chrisw chrisw 718K Oct 11 17:19 rootfs.cpio.gz
-rwxr-xr-x 1 chrisw chrisw 2.7M Oct 11 17:18 zImage
So it seems that the size problem originates in my customized kernel.
2.7MB is still too big so I need to investigate the config settings in
both my customized kernel and the stock one.
Chris
On Thu, 2012-10-11 at 17:23 +0200, Thomas Petazzoni wrote:
> On Thu, 11 Oct 2012 11:16:09 -0400, Chris Wilkinson wrote:
> > The .config is here
> >
> > http://pastebin.com/84LqnBXS
>
> Are you sure you did a "make clean; make" after doing all your
> configuration changes? Your configuration has almost no packages
> enabled, the generated root filesystem definitely shouldn't be that big.
>
> > This shows what I'm trying to achieve.
> >
> > http://d-i.alioth.debian.org/manual/en.armel/ch05s01.html#boot-firmware.
> >
> > The output on the serial console goes like this on power up.
> >
> > >>
> > No network interfaces found
> >
> > EM-7210 ver.T04 2005-12-12 (For ver.AA)
> > == Executing boot script in 1.000 seconds - enter ^C to abort
> >
> > At this point, hit Control-C to interrupt the boot loader[4]. This
> > will give you the RedBoot prompt. Enter the following commands:
> >
> > > load -v -r -b 0x01800000 -m ymodem ramdisk.gz
> > > load -v -r -b 0x01008000 -m ymodem zImage
> > > exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M at 0xa0000000" -r 0x01800000
>
> You have two choices:
>
> 1 Use an initramfs embedded inside the kernel image. This is what
> Buildroot does when you enable the BR2_TARGET_ROOTFS_INITRAMFS
> option. In that case, you only need to load zImage to RAM, and
> execute it, it already contains the initramfs.
>
> 2 Use an initramfs outside the kernel image. In that case, don't
> enable the BR2_TARGET_ROOTFS_INITRAMFS Buildroot option, and simply
> generated a compressed cpio archive for the root filesystem, thanks
> to BR2_TARGET_ROOTFS_CPIO + BR2_TARGET_ROOTFS_CPIO_GZIP. Then, make
> sure your kernel as the support for initramfs enabled.
>
> I am quite familiar with choice 1, but I haven't tested choice 2 with
> Buildroot.
>
> Best regards,
>
> Thomas
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-11 21:45 ` Chris Wilkinson
@ 2012-10-12 7:10 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2012-10-12 7:10 UTC (permalink / raw)
To: buildroot
Dear Chris Wilkinson,
On Thu, 11 Oct 2012 17:45:31 -0400, Chris Wilkinson wrote:
> Clean/make on a stock v3.4.7 kernel gives the following
>
> -rw-r--r-- 1 chrisw chrisw 1.5M Oct 11 17:19 rootfs.cpio
> -rw-r--r-- 1 chrisw chrisw 718K Oct 11 17:19 rootfs.cpio.gz
> -rwxr-xr-x 1 chrisw chrisw 2.7M Oct 11 17:18 zImage
>
> So it seems that the size problem originates in my customized kernel.
> 2.7MB is still too big so I need to investigate the config settings in
> both my customized kernel and the stock one.
Ah, maybe your customized kernel configuration has gazillions of kernel
modules enabled, which make the size of the root filesystem enormous.
Could you pastebin your kernel config so we can confirm this?
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
[not found] ` <1350049738.14474.52.camel@Homeserver>
@ 2012-10-12 14:12 ` Thomas Petazzoni
2012-10-12 15:19 ` Chris Wilkinson
2012-10-12 14:23 ` Thomas Petazzoni
1 sibling, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2012-10-12 14:12 UTC (permalink / raw)
To: buildroot
Dear Chris Wilkinson,
Please don't reply to me directly: keep the Buildroot list Cc'ed.
On Fri, 12 Oct 2012 09:48:58 -0400, Chris Wilkinson wrote:
> I had been using crosstool to build the kernel but now I see that BR
> can do that and using crosstool is unnecessary. I cleaned the kernel
> tree and the tar.bz2 is now 89MB. It is here
>
> https://skydrive.live.com/redir?resid=834D8577B5544D4E!169&authkey=!
> AGZIOn-ye6O3anc
By crosstool, do you mean crosstool-ng? Or something else?
Both the old crosstool (that no-one should be using) and crosstool-ng
do *NOT* build the kernel, so what you're saying doesn't make sense
here. They use kernel /headers/ to build a toolchain, but that's all
they do with the kernel.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
[not found] ` <1350049738.14474.52.camel@Homeserver>
2012-10-12 14:12 ` Thomas Petazzoni
@ 2012-10-12 14:23 ` Thomas Petazzoni
1 sibling, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2012-10-12 14:23 UTC (permalink / raw)
To: buildroot
Dear Chris Wilkinson,
On Fri, 12 Oct 2012 09:48:58 -0400, Chris Wilkinson wrote:
> I had been using crosstool to build the kernel but now I see that BR
> can do that and using crosstool is unnecessary. I cleaned the kernel
> tree and the tar.bz2 is now 89MB. It is here
>
> https://skydrive.live.com/redir?resid=834D8577B5544D4E!169&authkey=!
> AGZIOn-ye6O3anc
The .config file in this kernel tarball (which I assume is the kernel
configuration you're using) has gazillions of kernel modules enabled.
99.999999% of them are most likely useless in your setup. Those kernel
modules are the one that are causing your root filesystem to be 30+MB.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Creating initrd
2012-10-12 14:12 ` Thomas Petazzoni
@ 2012-10-12 15:19 ` Chris Wilkinson
0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilkinson @ 2012-10-12 15:19 UTC (permalink / raw)
To: buildroot
Yes, sorry.
CT-NG was used to build an ARM x-compiler which in turn was used to build
the kernel. Sorry I didn't explain that too well.
Chris
-----Original Message-----
From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
Sent: Friday, October 12, 2012 10:13 AM
To: Chris Wilkinson; buildroot at uclibc.org
Subject: Re: [Buildroot] Creating initrd
Dear Chris Wilkinson,
Please don't reply to me directly: keep the Buildroot list Cc'ed.
On Fri, 12 Oct 2012 09:48:58 -0400, Chris Wilkinson wrote:
> I had been using crosstool to build the kernel but now I see that BR
> can do that and using crosstool is unnecessary. I cleaned the kernel
> tree and the tar.bz2 is now 89MB. It is here
>
> https://skydrive.live.com/redir?resid=834D8577B5544D4E!169&authkey=!
> AGZIOn-ye6O3anc
By crosstool, do you mean crosstool-ng? Or something else?
Both the old crosstool (that no-one should be using) and crosstool-ng
do *NOT* build the kernel, so what you're saying doesn't make sense
here. They use kernel /headers/ to build a toolchain, but that's all
they do with the kernel.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-10-12 15:19 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 14:05 [Buildroot] Creating initrd Chris Wilkinson
2012-10-11 14:48 ` Thomas Petazzoni
2012-10-11 15:16 ` Chris Wilkinson
2012-10-11 15:23 ` Thomas Petazzoni
2012-10-11 17:28 ` Chris Wilkinson
2012-10-11 18:53 ` Thomas Petazzoni
[not found] ` <1349988968.14474.34.camel@Homeserver>
[not found] ` <20121012091408.6184bb9f@skate>
[not found] ` <1350049738.14474.52.camel@Homeserver>
2012-10-12 14:12 ` Thomas Petazzoni
2012-10-12 15:19 ` Chris Wilkinson
2012-10-12 14:23 ` Thomas Petazzoni
2012-10-11 21:45 ` Chris Wilkinson
2012-10-12 7:10 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox