* generic ramdisk support
@ 2001-07-20 2:10 Pete Popov
2001-07-20 18:11 ` Jun Sun
0 siblings, 1 reply; 2+ messages in thread
From: Pete Popov @ 2001-07-20 2:10 UTC (permalink / raw)
To: linux-mips-kernel, linux-mips
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
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
[-- Attachment #2: ramdisk.patch --]
[-- Type: text/plain, Size: 1879 bytes --]
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)
+ }
+}
+
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: generic ramdisk support
2001-07-20 2:10 generic ramdisk support Pete Popov
@ 2001-07-20 18:11 ` Jun Sun
0 siblings, 0 replies; 2+ messages in thread
From: Jun Sun @ 2001-07-20 18:11 UTC (permalink / raw)
To: ppopov; +Cc: linux-mips-kernel, linux-mips
Pete Popov wrote:
>
> 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.
>
This is a good idea. People don't have to maintain a separate script to
generate the ram root fs.
BTW, I created 1.4 MB busybox ram fs for mips-le. You can find it at
http://65.5.25.179/linux.
Jun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-20 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-20 2:10 generic ramdisk support Pete Popov
2001-07-20 18:11 ` Jun Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox