generic ramdisk support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any reason why we don't have a single directory for a ramdisk linker 
script and Makefile? I've attached that does that. You just put a 
ramdisk.gz image in arch/mips/ramdisk and turn on initrd support. At 
somepoint I'll upload some useful ramdisks to the sourceforge linux-mips 
anonymous ftp site.


Pete
diff -Naur --exclude=CVS linux-mips-dev-orig/arch/mips/Makefile linux-mips-dev/arch/mips/Makefile
--- linux-mips-dev-orig/arch/mips/Makefile	Thu Jul 12 11:41:14 2001
+++ linux-mips-dev/arch/mips/Makefile	Thu Jul 19 18:54:29 2001
@@ -90,6 +90,16 @@
 CORE_FILES	+=arch/mips/math-emu/fpu_emulator.o
 SUBDIRS		+=arch/mips/math-emu
 
+# 
+# ramdisk/initrd support
+# You need a compressed ramdisk image, named ramdisk.gz in
+# arch/mips/ramdisk
+#
+ifdef CONFIG_BLK_DEV_INITRD 
+CORE_FILES      += arch/mips/ramdisk/ramdisk.o
+SUBDIRS		+= arch/mips/ramdisk
+endif
+
 #
 # Board-dependent options and extra files
 #
diff -Naur --exclude=CVS linux-mips-dev-orig/arch/mips/ramdisk/Makefile linux-mips-dev/arch/mips/ramdisk/Makefile
--- linux-mips-dev-orig/arch/mips/ramdisk/Makefile	Wed Dec 31 16:00:00 1969
+++ linux-mips-dev/arch/mips/ramdisk/Makefile	Thu Jul 19 18:07:46 2001
@@ -0,0 +1,22 @@
+#
+# Makefile for a ramdisk image
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+ifdef CONFIG_CPU_LITTLE_ENDIAN
+output-format   = elf32-tradlittlemips
+else
+output-format   = elf32-tradbigmips
+endif
+
+ramdisk.o: ramdisk.gz ld.script
+	$(LD) -T ld.script -b binary -o $@ ramdisk.gz
+
+ld.script: $(TOPDIR)/arch/$(ARCH)/ramdisk/ld.script.in
+	sed 's/@@OUTPUT_FORMAT@@/$(output-format)/' <$< >$@
+
+include $(TOPDIR)/Rules.make
+
diff -Naur --exclude=CVS linux-mips-dev-orig/arch/mips/ramdisk/ld.script.in linux-mips-dev/arch/mips/ramdisk/ld.script.in
--- linux-mips-dev-orig/arch/mips/ramdisk/ld.script.in	Wed Dec 31 16:00:00 1969
+++ linux-mips-dev/arch/mips/ramdisk/ld.script.in	Thu Jul 19 17:36:10 2001
@@ -0,0 +1,10 @@
+OUTPUT_FORMAT("@@OUTPUT_FORMAT@@")
+OUTPUT_ARCH(mips)
+SECTIONS
+{
+  .initrd :
+  {
+  	*(.data)
+  }
+}
+

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux