Skip to contentSkip to conversation

Repair initramfs dependancies after move to fs

PATCH New Will Wagner 3 participants 5 messages Apr 19, 2010 – Nov 4, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Repair initramfs dependancies after move to fs

The restructure for building root filesystems changed the target name for the initramfs file, to build the file the trget is now initramfs-root but the generated file is rootfs.initramfs

---
 fs/initramfs/initramfs.mk         |    6 ++++++
 target/linux/Makefile.in          |    2 +-
 target/linux/Makefile.in.advanced |    2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)
fs/initramfs/initramfs.mk +6 -0
index 4a205d1..9aaf1b0 100644
@@ -6,6 +6,12 @@
 #
 #############################################################
 
+ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
+INITRAMFS_TARGET:=initramfs-root
+else
+INITRAMFS_TARGET:= #nothing
+endif
+
 define ROOTFS_INITRAMFS_INIT_SYMLINK
 	rm -f $(TARGET_DIR)/init
 	ln -s sbin/init $(TARGET_DIR)/init
target/linux/Makefile.in +1 -1
index f3c7807..41e4821 100644
@@ -153,7 +153,7 @@ endif
 	$(SED) '/CONFIG_INITRAMFS_SOURCE/d' $(LINUX26_DIR)/.config
 	$(SED) '/INITRAMFS_ROOT_.ID/d' $(LINUX26_DIR)/.config
 ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
-	echo "CONFIG_INITRAMFS_SOURCE=\"$(INITRAMFS_TARGET)\"" >> \
+	echo "CONFIG_INITRAMFS_SOURCE=\"$(BINARIES_DIR)/rootfs.initramfs\"" >> \
 		$(LINUX26_DIR)/.config
 	echo "CONFIG_INITRAMFS_ROOT_UID=0" >> $(LINUX26_DIR)/.config
 	echo "CONFIG_INITRAMFS_ROOT_GID=0" >> $(LINUX26_DIR)/.config
target/linux/Makefile.in.advanced +1 -1
index 0eb1b82..99f3f45 100644
@@ -354,7 +354,7 @@ endif
 	$(SED) '/CONFIG_INITRAMFS_SOURCE/d' $(LINUX26_DIR)/.config
 	$(SED) '/INITRAMFS_ROOT_.ID/d' $(LINUX26_DIR)/.config
 ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
-	echo "CONFIG_INITRAMFS_SOURCE=\"$(INITRAMFS_TARGET)\"" >> \
+	echo "CONFIG_INITRAMFS_SOURCE=\"$(BINARIES_DIR)/rootfs.initramfs\"" >> \
 		$(LINUX26_DIR)/.config
 	echo "CONFIG_INITRAMFS_ROOT_UID=0" >> $(LINUX26_DIR)/.config
 	echo "CONFIG_INITRAMFS_ROOT_GID=0" >> $(LINUX26_DIR)/.config
Signature · 1 line
1.7.0
#1 lore raw

PATCH 1/1 Repair initramfs dependancies after move to fs

Quoted 5 lines · On Mon, 19 Apr 2010 15:34:49 +0100 Will Wagner <[email protected]> wrote:

The restructure for building root filesystems changed the target name for the initramfs file, to build the file the trget is now initramfs-root but the generated file is rootfs.initramfs

I'm not a big fan of this "hidden" dependencies, but I believe in the case of the kernel and its initramfs there isn't a lot of choice. Therefore:

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 Repair initramfs dependancies after move to fs

In reply to Will Wagner
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Will" == Will Wagner <[email protected]> writes:

Will> The restructure for building root filesystems changed the target name Will> for the initramfs file, to build the file the trget is now Will> initramfs-root but the generated file is rootfs.initramfs

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 Repair initramfs dependancies after move to fs

In reply to Will Wagner

Hello Will,

I'm replying on this old patch that I acked back in April. But I now have one question. While I still agree on the changes on target/linux/Makefile* (now linux/linux.mk), I don't understand why the following change was needed:

fs/initramfs/initramfs.mk line 13

Quoted 13 lines
fs/initramfs/initramfs.mk +5 -0
index 4a205d1..9aaf1b0 100644
@@ -6,6 +6,12 @@
 #
 #############################################################
 
+ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
+INITRAMFS_TARGET:=initramfs-root
+else
+INITRAMFS_TARGET:= #nothing
+endif

the INITRAMFS_TARGET variable isn't used anywhere in the current git. Isn't this code useless ? (I think it is, but I'd like to be sure).

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 1/1 Repair initramfs dependancies after move to fs

Quoted 15 lines · Thomas Petazzoni

Hello Will,

I'm replying on this old patch that I acked back in April. But I now have one question. While I still agree on the changes on target/linux/Makefile* (now linux/linux.mk), I don't understand why the following change was needed:

Quoted 8 lines
fs/initramfs/initramfs.mk +0 -0
index 4a205d1..9aaf1b0 100644
@@ -6,6 +6,12 @@
  #
  #############################################################
 
Quoted 7 lines

fs/initramfs/initramfs.mk line 13

Quoted 5 lines
fs/initramfs/initramfs.mk +5 -0
+ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
+INITRAMFS_TARGET:=initramfs-root
+else
+INITRAMFS_TARGET:= #nothing
+endif

the INITRAMFS_TARGET variable isn't used anywhere in the current git. Isn't this code useless ? (I think it is, but I'd like to be sure).

Yes I think you are right. It looks like this was only needed with the old kernel build sequence, the new linux/linux.mk doesn't need it.

Will

Signature · 5 lines
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------