aboutsummaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-11-04 04:04:44 -0600
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-11-04 04:04:44 -0600
commit25bb11a43eef6c4d86fdb35c3cf342419efb5385 (patch)
tree4462689c50821d33b570a5995451e906d580fcae /usr
parent9589f34f61debbe3d05fb84852aa126126082072 (diff)
downloadhistory-25bb11a43eef6c4d86fdb35c3cf342419efb5385.tar.gz
kbuild: initramfs updates
Use ld to link the cpio archive into the image, build was broken due to requiring a recent version of objcopy before, plus assorted cleanups: o Don't include arch/$(ARCH)/Makefile, export the needed arch-specific flags instead. o Name the generated section consistently .init.ramfs everywhere.
Diffstat (limited to 'usr')
-rw-r--r--usr/Makefile14
-rw-r--r--usr/initramfs_data.scr4
2 files changed, 10 insertions, 8 deletions
diff --git a/usr/Makefile b/usr/Makefile
index d3c2c0bb8773b6..60858e804d465e 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,18 +1,16 @@
-include arch/$(ARCH)/Makefile
-
obj-y := initramfs_data.o
host-progs := gen_init_cpio
clean-files := initramfs_data.cpio.gz
-$(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz
- $(OBJCOPY) $(ARCHBLOBLFLAGS) \
- --rename-section .data=.init.initramfs \
- $(obj)/initramfs_data.cpio.gz $(obj)/initramfs_data.o
- $(STRIP) -s $(obj)/initramfs_data.o
+LDFLAGS_initramfs_data.o := $(LDFLAGS_BLOB) -r -T
+
+$(obj)/initramfs_data.o: $(src)/initramfs_data.scr $(obj)/initramfs_data.cpio.gz FORCE
+ $(call if_changed,ld)
$(obj)/initramfs_data.cpio.gz: $(obj)/gen_init_cpio
- ( cd $(obj) ; ./gen_init_cpio | gzip -9c > initramfs_data.cpio.gz )
+ ( cd $(obj) ; ./$< | gzip -9c > $@ )
+
diff --git a/usr/initramfs_data.scr b/usr/initramfs_data.scr
new file mode 100644
index 00000000000000..bf6d172329e0f2
--- /dev/null
+++ b/usr/initramfs_data.scr
@@ -0,0 +1,4 @@
+SECTIONS
+{
+ .init.ramfs : { *(.data) }
+}