generic ramdisk support
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
arch/mips/Makefile +10 -0
@@ -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 #
arch/mips/ramdisk/Makefile +22 -0
@@ -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 +
arch/mips/ramdisk/ld.script.in +10 -0
@@ -0,0 +1,10 @@ +OUTPUT_FORMAT("@@OUTPUT_FORMAT@@") +OUTPUT_ARCH(mips) +SECTIONS +{ + .initrd : + { + *(.data) + } +} +
Quoted 7 lines · Pete Popov
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 inarch/mips/ramdiskand 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