diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-26 23:42:30 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-26 23:42:30 -0400 |
commit | f45727d52d1581e9ff4df9d1a12a60789ad2d1eb (patch) | |
tree | 773ae25f98542e6d382c688f7e85e8137d065614 /arch/xtensa/boot/ramdisk/Makefile | |
parent | 4c925f452cfd16c690209e96821ee094e09a2404 (diff) | |
parent | 5696c1944a33b4434a9a1ebb6383b906afd43a10 (diff) |
Merge /spare/repo/netdev-2.6/ branch 'ieee80211'
Diffstat (limited to 'arch/xtensa/boot/ramdisk/Makefile')
-rw-r--r-- | arch/xtensa/boot/ramdisk/Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/xtensa/boot/ramdisk/Makefile b/arch/xtensa/boot/ramdisk/Makefile new file mode 100644 index 000000000000..b12f76352438 --- /dev/null +++ b/arch/xtensa/boot/ramdisk/Makefile @@ -0,0 +1,23 @@ +# +# Makefile for a ramdisk image +# + +BIG_ENDIAN := $(shell echo -e "\#ifdef __XTENSA_EL__\nint little;\n\#else\nint big;\n\#endif" | $(CC) -E -|grep -c big) + +ifeq ($(BIG_ENDIAN),1) +OBJCOPY_ARGS := -O elf32-xtensa-be +else +OBJCOPY_ARGS := -O elf32-xtensa-le +endif + +obj-y = ramdisk.o + +RAMDISK_IMAGE = arch/$(ARCH)/boot/ramdisk/$(CONFIG_EMBEDDED_RAMDISK_IMAGE) + +arch/$(ARCH)/boot/ramdisk/ramdisk.o: + $(Q)echo -e "dummy:" | $(AS) -o $@; + $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) \ + --add-section .initrd=$(RAMDISK_IMAGE) \ + --set-section-flags .initrd=contents,alloc,load,load,data \ + arch/$(ARCH)/boot/ramdisk/ramdisk.o $@ + |