Skip to contentSkip to conversation

improved initramfs and iso target support

PATCH New heiko at zuerker.org 2 participants 3 messages Dec 5, 2010 – Dec 6, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 improved initramfs and iso target support

From: Heiko Zuerker <[email protected]>

A small initramfs is now supported in order to initialize the system (like initrd).
New options to create a bootable CD with optional support for a minimal initramfs, isolinux boot loader and zisofs have been added.

The iso filesystem doesn't need the ext2 image anymore, but the old functionality is still available.

---
 fs/initramfs/Config.in    |   57 ++++++++++++++++++++++++++++++++++++++++++++-
 fs/initramfs/initramfs.mk |   41 ++++++++++++++++++++++++++++++++
 fs/iso9660/Config.in      |   44 +++++++++++++++++++++++++++++++++-
 fs/iso9660/iso9660.mk     |   50 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 189 insertions(+), 3 deletions(-)
fs/initramfs/Config.in +56 -1
index abb3c0c..f8462f5 100644
@@ -1,6 +1,19 @@
-config BR2_TARGET_ROOTFS_INITRAMFS
+config BR2_TARGET_DO_INITRAMFS
 	bool "initramfs for initial ramdisk of linux kernel"
 	depends on BR2_LINUX_KERNEL
+
+menu "initramfs options"
+depends on BR2_TARGET_DO_INITRAMFS
+
+choice
+	prompt "initramfs type"
+	default BR2_TARGET_ROOTFS_INITRAMFS
+	depends on BR2_TARGET_DO_INITRAMFS
+	help
+	  Select compressor for ext2 filesystem of the root filesystem
+
+config BR2_TARGET_ROOTFS_INITRAMFS
+	bool "full"
 	help
 	  Integrate the root filesystem generated by Buildroot as an
 	  initramfs inside the kernel image. This integration will
@@ -16,5 +29,47 @@ config BR2_TARGET_ROOTFS_INITRAMFS
 	  identical root filesystems, one embedded inside the kernel
 	  image, and one separatly.
 
+config BR2_TARGET_ROOTFS_MINI_INITRAMFS
+	bool "minimal"
+	help
+	  Only create a minimal initramfs to prepare system for boot.
+	  This is just like a initrd (initial ram disk).
+
+endchoice
+
+config BR2_TARGET_ROOTFS_MINI_INITRAMFS_COPYLIST
+	string "List with files to be copied"
+	depends on BR2_TARGET_DO_INITRAMFS
+	depends on BR2_TARGET_ROOTFS_MINI_INITRAMFS
+	default ""
+	help
+	  The contents of this file list the files and directories
+	  to be copied from the target file system.
+	  All path names are relativ to the output/target directory.
+	  This is an optional parameter.
+
+config BR2_TARGET_ROOTFS_MINI_INITRAMFS_SKELETON
+	string "initramfs skeleton"
+	depends on BR2_TARGET_DO_INITRAMFS
+	depends on BR2_TARGET_ROOTFS_MINI_INITRAMFS
+	default ""
+	help
+	  A skeleton directory which is copied before any files
+	  from the target filesystem are copied into the initramfs
+	  directory structure.
+	  This is an optional parameter.
+
+config BR2_TARGET_ROOTFS_MINI_INITRAMFS_INSTALL_BUSYBOX
+	bool "copy and install busybox"
+	depends on BR2_TARGET_DO_INITRAMFS
+	depends on BR2_TARGET_ROOTFS_MINI_INITRAMFS
+	help
+	  Copy the busybox binary into the initramfs and create all
+	  symlinks.
+	  Busybox should be statically compiled for this.
+
+endmenu
+	  
 comment "initramfs requires a Linux kernel to be built"
 	depends on !BR2_LINUX_KERNEL
+
fs/initramfs/initramfs.mk +41 -0

50 lines not on this page · raw message

fs/iso9660/Config.in +42 -2

57 lines not on this page · raw message

fs/iso9660/iso9660.mk +50 -0

63 lines not on this page · raw message

Signature · 1 line
1.7.3.2
#1 lore raw

PATCH 1/1 improved initramfs and iso target support

Quoted 6 lines · On Sunday, December 05, 2010 16:40:51 heiko at zuerker.org wrote:

A small initramfs is now supported in order to initialize the system (like initrd). New options to create a bootable CD with optional support for a minimal initramfs, isolinux boot loader and zisofs have been added.

The iso filesystem doesn't need the ext2 image anymore, but the old functionality is still available.

please word wrap your changelog

fs/initramfs/Config.in line 13

Quoted 9 lines
fs/initramfs/Config.in +9 -0
+menu "initramfs options"
+depends on BR2_TARGET_DO_INITRAMFS
+
+choice
+	prompt "initramfs type"
+	default BR2_TARGET_ROOTFS_INITRAMFS
+	depends on BR2_TARGET_DO_INITRAMFS
+	help
+	  Select compressor for ext2 filesystem of the root filesystem

initramfs is not ext2 by definition, but ignoring that, this is not selecting compression.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101206/4a412c99/attachment.pgp>

#2 lore raw

PATCH 1/1 improved initramfs and iso target support

Hey,

Quoting Mike Frysinger <[email protected]>:

Quoted 9 lines · On Sunday, December 05, 2010 16:40:51 heiko at zuerker.org wrote:
Quoted 6 lines

A small initramfs is now supported in order to initialize the system (like initrd). New options to create a bootable CD with optional support for a minimal initramfs, isolinux boot loader and zisofs have been added.

The iso filesystem doesn't need the ext2 image anymore, but the old functionality is still available.

please word wrap your changelog

done

Quoted 4 lines
Quoted 4 lines
fs/initramfs/Config.in +4 -0
+menu "initramfs options"
+depends on BR2_TARGET_DO_INITRAMFS
+
+choice
Quoted 8 lines

fs/initramfs/Config.in line 13

Quoted 5 lines
fs/initramfs/Config.in +5 -0
+	prompt "initramfs type"
+	default BR2_TARGET_ROOTFS_INITRAMFS
+	depends on BR2_TARGET_DO_INITRAMFS
+	help
+	  Select compressor for ext2 filesystem of the root filesystem

initramfs is not ext2 by definition, but ignoring that, this is not selecting compression.

That's what I get for copy'n'pasting.... ;-)

I sent in a revised patch.

Signature · 7 lines
Regards
   Heiko Zuerker
   http://www.devil-linux.org


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.