* [PATCH][2.6] Fix Makefiles for CONFIG_EMBEDDED_RAMDISK
@ 2004-01-06 20:57 Dimitri Torfs
2004-01-07 20:44 ` Charlie Brady
0 siblings, 1 reply; 3+ messages in thread
From: Dimitri Torfs @ 2004-01-06 20:57 UTC (permalink / raw)
To: ralf; +Cc: linux-mips
Hi,
here are patches that fix the arch/mips/Makefile and
arch/mips/ramdisk/Makefile when an embedded ramdisk image needs to
be included through the CONFIG_EMBEDDED_RAMDISK option.
--- linux-mips-2.6.orig/arch/mips/Makefile 2004-01-06 21:17:57.000000000 +0100
+++ linux.work/arch/mips/Makefile 2004-01-06 21:43:33.000000000 +0100
@@ -187,13 +187,11 @@
#
# ramdisk/initrd support
-# You need a compressed ramdisk image, named ramdisk.gz in
-# arch/mips/ramdisk
+# You need a compressed ramdisk image, named
+# CONFIG_EMBEDDED_RAMDISK_IMAGE. Relative pathnames
+# are relative to arch/mips/ramdisk/.
#
-ifdef CONFIG_EMBEDDED_RAMDISK
-CORE_FILES += arch/mips/ramdisk/ramdisk.o
-SUBDIRS += arch/mips/ramdisk
-endif
+core-$(CONFIG_EMBEDDED_RAMDISK) += arch/mips/ramdisk/
#
# Firmware support
--- linux-mips-2.6.orig/arch/mips/ramdisk/Makefile 2003-07-29 16:26:23.000000000 +0200
+++ linux.work/arch/mips/ramdisk/Makefile 2004-01-06 21:40:50.000000000 +0100
@@ -2,8 +2,19 @@
# Makefile for a ramdisk image
#
+obj-y += ramdisk.o
+
+
O_FORMAT = $(shell $(OBJDUMP) -i | head -n 2 | grep elf32)
-img = $(CONFIG_EMBEDDED_RAMDISK_IMAGE)
-ramdisk.o: $(subst ",,$(img)) ld.script
- echo "O_FORMAT: " $(O_FORMAT)
- $(LD) -T ld.script -b binary --oformat $(O_FORMAT) -o $@ $(img)
+img := $(subst ",,$(CONFIG_EMBEDDED_RAMDISK_IMAGE))
+# add $(src) when $(img) is relative
+img := $(subst $(src)//,/,$(src)/$(img))
+
+quiet_cmd_ramdisk = LD $@
+define cmd_ramdisk
+ $(LD) -T $(src)/ld.script -b binary --oformat $(O_FORMAT) -o $@ $(img)
+endef
+
+$(obj)/ramdisk.o: $(img) $(src)/ld.script
+ $(call cmd,ramdisk)
+
--
Dimitri Torfs | NSCE
dimitri.torfs@sonycom.com | Sint Stevens Woluwestraat 55
tel: +32 2 2908451 | 1130 Brussel
fax: +32 2 7262686 | Belgium
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][2.6] Fix Makefiles for CONFIG_EMBEDDED_RAMDISK
2004-01-06 20:57 [PATCH][2.6] Fix Makefiles for CONFIG_EMBEDDED_RAMDISK Dimitri Torfs
@ 2004-01-07 20:44 ` Charlie Brady
2004-01-09 9:07 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Charlie Brady @ 2004-01-07 20:44 UTC (permalink / raw)
To: Dimitri Torfs; +Cc: linux-mips
On Tue, 6 Jan 2004, Dimitri Torfs wrote:
> here are patches that fix the arch/mips/Makefile and
> arch/mips/ramdisk/Makefile when an embedded ramdisk image needs to
> be included through the CONFIG_EMBEDDED_RAMDISK option.
I'm curious as to why this is a mips specific feature. Does anyone know?
--
Charlie
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][2.6] Fix Makefiles for CONFIG_EMBEDDED_RAMDISK
2004-01-07 20:44 ` Charlie Brady
@ 2004-01-09 9:07 ` Ralf Baechle
0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2004-01-09 9:07 UTC (permalink / raw)
To: Charlie Brady; +Cc: Dimitri Torfs, linux-mips
On Wed, Jan 07, 2004 at 03:44:32PM -0500, Charlie Brady wrote:
> > here are patches that fix the arch/mips/Makefile and
> > arch/mips/ramdisk/Makefile when an embedded ramdisk image needs to
> > be included through the CONFIG_EMBEDDED_RAMDISK option.
>
> I'm curious as to why this is a mips specific feature. Does anyone know?
There's little machine dependence as you noticed; just the linker script
would need to be fixed as it's hardwired to mips.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-09 9:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-06 20:57 [PATCH][2.6] Fix Makefiles for CONFIG_EMBEDDED_RAMDISK Dimitri Torfs
2004-01-07 20:44 ` Charlie Brady
2004-01-09 9:07 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox