initramfs: update help text
PATCH 1/1 initramfs: update help text
commit: http://git.buildroot.net/buildroot/commit/?id=c2a44f158eedf40be3ab3bc3c76f61fe032d7b34
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
--- fs/initramfs/Config.in | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-)
fs/initramfs/Config.in +13 -11
@@ -2,17 +2,19 @@ config BR2_TARGET_ROOTFS_INITRAMFS bool "initramfs for initial ramdisk of linux kernel" depends on BR2_LINUX_KERNEL help - Build a file which is usable for the gen_init_cpio tool - at linux kernel build. - This file is normally called initramfs_list and can be - generated with gen_initramfs_list.sh script from the root - directory structure. - The file is then used in the kernel build process to generate - the cpio filesystem for the initial ramdisk. Make sure that - you configure this file in kernel build configuration. - The location in the kernel build configuration menu is - Device Drivers -> Block devices -> Initramfs source file(s). - The configuration variable is CONFIG_INITRAMFS_SOURCE + Integrate the root filesystem generated by Buildroot as an + initramfs inside the kernel image. This integration will + take place automatically. + + The rootfs.initramfs file generated in the images/ directory + is only a text file describing the contents of the initramfs + in a format understood by the CONFIG_INITRAMFS_SOURCE kernel + configuration option. + + Note that enabling initramfs together with other filesystem + formats doesn't make sense: you would end up having two + identical root filesystems, one embedded inside the kernel + image, and one separatly. comment "initramfs requires a Linux kernel to be built" depends on !BR2_LINUX_KERNEL
Signature · 1 line
1.7.1
PATCH 1/1 initramfs: update help text
Quoted 5 lines · Peter Korsgaard
commit: http://git.buildroot.net/buildroot/commit/?id=c2a44f158eedf40be3ab3bc3c76f61fe032d7b34
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/mastercomment "initramfs requires a Linux kernel to be built"
depends on !BR2_LINUX_KERNEL
Hey, wait a minute.
I use this option and I don't use Buildroot to build my kernel.
Can somebody explain why this functionality is being removed?
Signature · 1 line
Grant
PATCH 1/1 initramfs: update help text
Hi,
Quoted 11 lines · On Sat, 26 Jun 2010 14:21:29 +0000 (UTC) Grant Edwards…
Quoted 5 lines
commit: http://git.buildroot.net/buildroot/commit/?id=c2a44f158eedf40be3ab3bc3c76f61fe032d7b34
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/mastercomment "initramfs requires a Linux kernel to be built"
depends on !BR2_LINUX_KERNELHey, wait a minute.
I use this option and I don't use Buildroot to build my kernel.
Can somebody explain why this functionality is being removed?
How are you using this functionality without using Buildroot to build your kernel ? Are you pointing your kernel configuration to the rootfs.initramfs file generated by Buildroot ?
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 initramfs: update help text
Quoted 10 lines · Thomas Petazzoni
Quoted 8 lines · Grant Edwards
Quoted 5 lines
commit: http://git.buildroot.net/buildroot/commit/?id=c2a44f158eedf40be3ab3bc3c76f61fe032d7b34
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/mastercomment "initramfs requires a Linux kernel to be built"
depends on !BR2_LINUX_KERNELHey, wait a minute.
Quoted 7 lines
Quoted 3 lines
I use this option and I don't use Buildroot to build my kernel.
Can somebody explain why this functionality is being removed?
How are you using this functionality without using Buildroot to build your kernel ? Are you pointing your kernel configuration to the rootfs.initramfs file generated by Buildroot ?
To the rootfs.initramfs_list file, yes.
I suppose I could have buildroot make the cpio archive and point the kernel at that.
Signature · 1 line
Grant
PATCH 1/1 initramfs: update help text
In reply to Grant EdwardsQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Grant" == Grant Edwards <[email protected]> writes:
Hi,
Quoted 2 lines
Quoted 2 lines
comment "initramfs requires a Linux kernel to be built" depends on !BR2_LINUX_KERNEL
Grant> Hey, wait a minute.
Grant> I use this option and I don't use Buildroot to build my kernel.
Grant> Can somebody explain why this functionality is being removed?
How about just using the tarball output instead?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 initramfs: update help text
Quoted 10 lines · Peter Korsgaard
Quoted 2 lines
Quoted 2 lines
comment "initramfs requires a Linux kernel to be built" depends on !BR2_LINUX_KERNEL
Grant> Hey, wait a minute.
Grant> I use this option and I don't use Buildroot to build my kernel.
Grant> Can somebody explain why this functionality is being removed?
How about just using the tarball output instead?
When building an initramfs into a kernel, a tarball isn't one of the options that's accepted by the kernel build system.
Signature · 1 line
Grant
PATCH 1/1 initramfs: update help text
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Grant" == Grant Edwards <[email protected]> writes:
How about just using the tarball output instead?
Grant> When building an initramfs into a kernel, a tarball isn't one of the Grant> options that's accepted by the kernel build system.
No, but you could extract the tarball (as root or using fakeroot) and point CONFIG_INITRAMFS_SOURCE to it.
But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 initramfs: update help text
Quoted 5 lines · On Sun, 27 Jun 2010 08:22:56 +0200 Peter Korsgaard <[email protected]> wrote:
No, but you could extract the tarball (as root or using fakeroot) and point
CONFIG_INITRAMFS_SOURCEto it.But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
Well, a cpio archive can be generated by Buildroot without having to build a kernel, see fs/cpio/Config.in. What Grant was complaining about originally was the fs/initramfs case. However, last time I tried pointing CONFIG_INITRAMFS_SOURCE to a cpio archive, it didn't work.
Instead of my original solution, another solution would be to *not* make initramfs depend on BR2_LINUX_KERNEL, and to remove the dependency initramfs->kernel so that the kernel doesn't try to be built as soon as initramfs is selected. If kernel is selected, it will anyway be built *before* going through the initramfs code.
Would this be ok ?
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 initramfs: update help text
Quoted 6 lines · Thomas Petazzoni
Quoted 3 lines · On Sun, 27 Jun 2010 08:22:56 +0200 Peter Korsgaard <[email protected]> wrote:
No, but you could extract the tarball (as root or using fakeroot) and point
CONFIG_INITRAMFS_SOURCEto it.
Quoted 7 lines
Quoted 2 lines
But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
Well, a cpio archive can be generated by Buildroot without having to build a kernel, see
fs/cpio/Config.in. What Grant was complaining about originally was the fs/initramfs case. However, last time I tried pointingCONFIG_INITRAMFS_SOURCEto a cpio archive, it didn't work.
I tried it, and it appeared to build OK -- but I haven't had a chance to test the resulting image.
Quoted 7 lines
Instead of my original solution, another solution would be to *not* make initramfs depend on
BR2_LINUX_KERNEL, and to remove the dependencyinitramfs->kernelso that the kernel doesn't try to be built as soon as initramfs is selected. If kernel is selected, it will anyway be built *before* going through the initramfs code.Would this be ok ?
That would be fine for me, but if somebody is building both rootfs and kernel, the initramfs source list (or the cpio archive) needs to be built before the kernel.
Signature · 1 line
Grant
PATCH 1/1 initramfs: update help text
In reply to Thomas PetazzoniQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> On Sun, 27 Jun 2010 08:22:56 +0200
Quoted 5 lines · Thomas> Peter Korsgaard <[email protected]> wrote:
Quoted 5 lines
No, but you could extract the tarball (as root or using fakeroot) and point
CONFIG_INITRAMFS_SOURCEto it.But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
Thomas> Well, a cpio archive can be generated by Buildroot without having to Thomas> build a kernel, see fs/cpio/Config.in. What Grant was complaining about Thomas> originally was the fs/initramfs case. However, last time I tried Thomas> pointing CONFIG_INITRAMFS_SOURCE to a cpio archive, it didn't work.
So what is the difference between initramfs and cpio? Just the integration with the kernel build for the first? Maybe the initramfs stuff should simply be a 'embed in kernel' question on the cpio package if the internal kernel build is enabled?
Thomas> Instead of my original solution, another solution would be to Thomas> *not* make initramfs depend on BR2_LINUX_KERNEL, and to remove Thomas> the dependency initramfs-> kernel so that the kernel doesn't Thomas> try to be built as soon as initramfs is selected. If kernel is Thomas> selected, it will anyway be built *before* going through the Thomas> initramfs code.
Thomas> Would this be ok ?
What would then be the difference between this and the cpio target?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 initramfs: update help text
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Korsgaard <[email protected]> writes:
Hi,
Thomas> Well, a cpio archive can be generated by Buildroot without having to Thomas> build a kernel, see fs/cpio/Config.in. What Grant was complaining about Thomas> originally was the fs/initramfs case. However, last time I tried Thomas> pointing CONFIG_INITRAMFS_SOURCE to a cpio archive, it didn't work.
Peter> So what is the difference between initramfs and cpio? Just the Peter> integration with the kernel build for the first? Maybe the initramfs Peter> stuff should simply be a 'embed in kernel' question on the cpio package Peter> if the internal kernel build is enabled?
Ok, looked a bit closer and noticed that the initramfs target doesn't actually create a cpio, but a command file for gen_init_cpio.
Nevertheless, is there any advantage to use that instead of just creating a cpio archive (besides it not working for you somehow)?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 initramfs: update help text
Quoted 9 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Korsgaard <[email protected]> writes:
Hi,
Thomas> Well, a cpio archive can be generated by Buildroot without having to Thomas> build a kernel, see
fs/cpio/Config.in. What Grant was complaining about Thomas> originally was the fs/initramfs case. However, last time I tried Thomas> pointingCONFIG_INITRAMFS_SOURCEto a cpio archive, it didn't work.
Quoted 7 lines
Peter> So what is the difference between initramfs and cpio? Just the Peter> integration with the kernel build for the first? Maybe the initramfs Peter> stuff should simply be a 'embed in kernel' question on the cpio package Peter> if the internal kernel build is enabled?
Ok, looked a bit closer and noticed that the initramfs target doesn't actually create a cpio, but a command file for
gen_init_cpio.
Right. But why does that require building a kernel? It's just a list of files/nodes that goes into the cpio archive. If you're allowed to build a cpio archive or a tar archive, surely you should be allowed to build the list of files that goes into the archive?
Quoted 2 lines
Nevertheless, is there any advantage to use that instead of just creating a cpio archive (besides it not working for you somehow)?
If the cpio archive works, then I'm happy. For no particular reason I've always used the file-list method in the past. I tried building the kernel with the cpio archive instead, and the build worked fine. But, my target HW seems go have gone walkabout for a few days, so I haven't been able to test the impage built with the cpio archive instead of the source file list.
You can point the kernel at an unpacked directory tree, but that's undesirable since the unpacking has to be done as root (right?). At least that's what I remember.
Signature · 1 line
Grant
PATCH 1/1 initramfs: update help text
Quoted 23 lines · Grant Edwards
Quoted 5 lines · Peter Korsgaard
Thomas> Well, a cpio archive can be generated by Buildroot without having to Thomas> build a kernel, see
fs/cpio/Config.in. What Grant was complaining about Thomas> originally was the fs/initramfs case. However, last time I tried Thomas> pointingCONFIG_INITRAMFS_SOURCEto a cpio archive, it didn't work.Quoted 7 lines
Peter> So what is the difference between initramfs and cpio? Just the Peter> integration with the kernel build for the first? Maybe the initramfs Peter> stuff should simply be a 'embed in kernel' question on the cpio package Peter> if the internal kernel build is enabled?
Ok, looked a bit closer and noticed that the initramfs target doesn't actually create a cpio, but a command file for
gen_init_cpio.Right. But why does that require building a kernel? It's just a list of files/nodes that goes into the cpio archive. If you're allowed to build a cpio archive or a tar archive, surely you should be allowed to build the list of files that goes into the archive?
Quoted 2 lines
Nevertheless, is there any advantage to use that instead of just creating a cpio archive (besides it not working for you somehow)?
Quoted 6 lines
If the cpio archive works, then I'm happy. For no particular reason I've always used the file-list method in the past. I tried building the kernel with the cpio archive instead, and the build worked fine. But, my target HW seems to have gone walkabout for a few days, so I haven't been able to test the impage built with the cpio archive instead of the source file list.
I've got target HW again, and building the kernel using a cpio archive instead of the cpio-file-list seems to work fine, so that's what I'll plan on doing.
I still don't understand why one can build a cpio archive without building a kernel, but in order to create a list of what's in the cpio archive a kernel must be built.
Signature · 4 lines
Grant Edwards grant.b.edwards Yow! I'm sitting on my
at SPEED QUEEN ... To me,
gmail.com it's ENJOYABLE ... I'm WARM
... I'm VIBRATORY ...PATCH 1/1 initramfs: update help text
Quoted 3 lines · On Mon, 28 Jun 2010 15:13:04 +0000 (UTC) Grant Edwards…
I still don't understand why one can build a cpio archive without building a kernel, but in order to create a list of what's in the cpio archive a kernel must be built.
I think I've already said that it was just one choice to solve bug #2119, but that there was also other ways to solve the same bug (for example by enabling the dependency from initramfs to the kernel only when the kernel build is enabled).
So there's nothing to understand: it was one way to fix the bug, and it later turned out that this way was too restrictive and that the bug must therefore be fixed another way. Which will be done.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 initramfs: update help text
In reply to Peter KorsgaardQuoted 9 lines · Peter Korsgaard
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Grant" == Grant Edwards <[email protected]> writes:
How about just using the tarball output instead?
Grant> When building an initramfs into a kernel, a tarball isn't one of the Grant> options that's accepted by the kernel build system.
No, but you could extract the tarball (as root or using fakeroot) and point
CONFIG_INITRAMFS_SOURCEto it.
An extracted tarball isn't one of the options either. CONFIG_INITRAMFS_SOURCE can be pointed at either a cpio archive or the source file list.
Quoted 2 lines
But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
It works fine the way it is. What's the reason for disabling the buildign of a cpio file source list?
Signature · 1 line
Grant
PATCH 1/1 initramfs: update help text
Quoted 6 lines · On Sun, 27 Jun 2010 13:42:34 +0000 (UTC) Grant Edwards…
Quoted 2 lines
No, but you could extract the tarball (as root or using fakeroot) and point
CONFIG_INITRAMFS_SOURCEto it.An extracted tarball isn't one of the options either.
CONFIG_INITRAMFS_SOURCEcan be pointed at either a cpio archive or the source file list.
Or a directory containing the hierarchy of files/directories to include in the initramfs.
Quoted 5 lines
Quoted 2 lines
But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
It works fine the way it is. What's the reason for disabling the buildign of a cpio file source list?
It was to fix bug #2119.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 initramfs: update help text
Quoted 6 lines · Thomas Petazzoni
Quoted 3 lines · On Sun, 27 Jun 2010 13:42:34 +0000 (UTC) Grant Edwards…
Quoted 2 lines
No, but you could extract the tarball (as root or using fakeroot) and point
CONFIG_INITRAMFS_SOURCEto it.
Quoted 6 lines
Quoted 3 lines
An extracted tarball isn't one of the options either.
CONFIG_INITRAMFS_SOURCEcan be pointed at either a cpio archive or the source file list.Or a directory containing the hierarchy of files/directories to include in the initramfs.
You're right. I'd mis-read the help for the initramfs option.
Doesn't that means you have to do one step of the build as root?
I don't think I that's a viable option.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
It works fine the way it is. What's the reason for disabling the buildign of a cpio file source list?
It was to fix bug #2119.
I currently build with the initramfs option without having to build a kernel. Isn't there some way to fix bug 2119 without breaking a use case for existing users?
Signature · 1 line
Grant
PATCH 1/1 initramfs: update help text
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Grant" == Grant Edwards <[email protected]> writes:
Hi,
Quoted 2 lines
Quoted 2 lines
Or a directory containing the hierarchy of files/directories to include in the initramfs.
Grant> You're right. I'd mis-read the help for the initramfs option. Grant> Doesn't that means you have to do one step of the build as root? Grant> I don't think I that's a viable option.
Either that, use fakeroot or use the cpio target.
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
But yes, providing a way to generate the cpio archive without building a kernel would be nicer.
It works fine the way it is. What's the reason for disabling the buildign of a cpio file source list?
It was to fix bug #2119.
Grant> I currently build with the initramfs option without having to build a Grant> kernel. Isn't there some way to fix bug 2119 without breaking a use Grant> case for existing users?
Yes, we could make the:
ROOTFS_INITRAMFS_POST_TARGETS += linux26-rebuild-with-initramfs
conditional on the kernel being built or not, but why are we having both a cpio and initramfs target in the first place?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 initramfs: update help text
In reply to Grant EdwardsQuoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Grant" == Grant Edwards <[email protected]> writes:
No, but you could extract the tarball (as root or using fakeroot) and point
CONFIG_INITRAMFS_SOURCEto it.
Grant> An extracted tarball isn't one of the options either. Grant> CONFIG_INITRAMFS_SOURCE can be pointed at either a cpio archive or the Grant> source file list.
No? I haven't used initramfs in years, but I'm pretty sure you can simply point CONFIG_INITRAMFS_SOURCE at a directory to make it use that.
The help text and documentation seems to agree with me:
config INITRAMFS_SOURCE
string "Initramfs source file(s)"
default ""
help
This can be either a single cpio archive with a .cpio suffix or a space-separated list of directories and files for building the initramfs image. A cpio archive should contain a filesystem archive to be used as an initramfs image. Directories should contain a filesystem layout to be included in the initramfs image. Files should contain entries according to the format described by the "usr/gen_init_cpio" program in the kernel tree.
When multiple directories and files are specified then the initramfs image will be the aggregate of all of them.
Grant> It works fine the way it is. What's the reason for disabling the Grant> buildign of a cpio file source list?
Is there any advantage to using a source file for gen_init_cpio instead of just building a cpio archive?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 initramfs: update help text
Quoted 2 lines · Peter Korsgaard
Is there any advantage to using a source file for
gen_init_cpioinstead of just building a cpio archive?
No, I don't think so. But if you're not allowed to build the list of files/nodes to go into a cpio archive, surely building the cpio archive is out of the question?
Signature · 1 line
Grant