From: Pete Popov <ppopov@pacbell.net>
To: linux-mips-kernel@lists.sourceforge.net, linux-mips@oss.sgi.com
Subject: generic ramdisk support
Date: Thu, 19 Jul 2001 19:10:07 -0700 [thread overview]
Message-ID: <3B5792FF.1030808@pacbell.net> (raw)
[-- 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)
+ }
+}
+
next reply other threads:[~2001-07-20 2:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-20 2:10 Pete Popov [this message]
2001-07-20 18:11 ` generic ramdisk support Jun Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B5792FF.1030808@pacbell.net \
--to=ppopov@pacbell.net \
--cc=linux-mips-kernel@lists.sourceforge.net \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox