From: Jose V Beneyto Date: Thu, 5 Jul 2012 17:27:12 +0000 (+0000) Subject: Added ramdisk_type as conditional in Makefile to use templates X-Git-Url: http://gitweb/?a=commitdiff_plain;h=9e14102a7cf7aeb9ea2eb0281f6f0e0ac6a0e267;p=bootloader.git Added ramdisk_type as conditional in Makefile to use templates --- diff --git a/devices/efikamx/Makefile b/devices/efikamx/Makefile index 2c604f4..547be27 100644 --- a/devices/efikamx/Makefile +++ b/devices/efikamx/Makefile @@ -7,12 +7,15 @@ WORK = $(PWD)/work MKIMAGE = $(PWD)/../../work/mkimage ZIMAGE = $(PWD)/../../../kernel/efikamx/work/zImage INITRDGZ = $(PWD)/../../../initrd/work/initrd.gz +INITRAMFS = $(PWD)/../../../initramfs/work/initramfs -.PHONY: all clean distclean uImage uInitrd bootscr +RAMDISK_TYPE = uInitramfs # select between uInitramfs or uInitrd -all: uImage uInitrd bootscr +.PHONY: all clean distclean kernel ramdisk bootscr -clean: uImage-clean uInitrd-clean bootscr-clean +all: kernel ramdisk bootscr + +clean: kernel-clean ramdisk-clean bootscr-clean distclean: clean @@ -24,9 +27,9 @@ $(WORK)/uImage: $(WORK) $(MKIMAGE) $(ZIMAGE) -T kernel -C none -n "Linux-2.6.31.14.22-efikamx" \ -d $(ZIMAGE) $(WORK)/uImage -uImage: $(WORK)/uImage +kernel: $(WORK)/uImage -uImage-clean: +kernel-clean: rm -f $(WORK)/uImage $(WORK)/uInitrd: $(WORK) $(MKIMAGE) $(INITRDGZ) @@ -39,11 +42,27 @@ uInitrd: $(WORK)/uInitrd uInitrd-clean: rm -f $(WORK)/uInitrd -$(WORK)/boot-ram.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-ram.script +$(WORK)/uInitramfs: $(WORK) $(MKIMAGE) $(INITRAMFS) + $(MKIMAGE) -A arm -O linux -a 0 -e 0 \ + -T ramdisk -C none -n "CRUX-ARM Initramfs Image" \ + -d $(INITRAMFS) $(WORK)/uInitramfs + +uInitramfs: $(WORK)/uInitramfs + +uInitramfs-clean: + rm -f $(WORK)/uInitramfs + +ramdisk: $(RAMDISK_TYPE) + +ramdisk-clean: uInitrd-clean uInitramfs-clean + +$(WORK)/boot-ramdisk.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-ramdisk.script + sed -e "s|#RAMDISK_TYPE#|$(RAMDISK_TYPE)|" \ + $(PWD)/boot-ramdisk.script > $(WORK)/boot-ramdisk.script $(MKIMAGE) -A arm -O linux -a 0 -e 0 \ - -T script -C none -n "EfikaMX Boot Script (ram)" \ - -d $(PWD)/boot-ram.script \ - $(WORK)/boot-ram.scr + -T script -C none -n "EfikaMX Boot Script (ramdisk)" \ + -d $(WORK)/boot-ramdisk.script \ + $(WORK)/boot-ramdisk.scr $(WORK)/boot-sda.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-sda.script $(MKIMAGE) -A arm -O linux -a 0 -e 0 \ @@ -51,16 +70,15 @@ $(WORK)/boot-sda.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-sda.script -d $(PWD)/boot-sda.script \ $(WORK)/boot-sda.scr -$(WORK)/boot-mmcblk.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-mmcblk.script +$(WORK)/boot-mmc.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-mmc.script $(MKIMAGE) -A arm -O linux -a 0 -e 0 \ - -T script -C none -n "EfikaMX Boot Script (mmcblk)" \ - -d $(PWD)/boot-mmcblk.script \ - $(WORK)/boot-mmcblk.scr + -T script -C none -n "EfikaMX Boot Script (mmc)" \ + -d $(PWD)/boot-mmc.script \ + $(WORK)/boot-mmc.scr -bootscr: $(WORK)/boot-ram.scr $(WORK)/boot-sda.scr $(WORK)/boot-mmcblk.scr +bootscr: $(WORK)/boot-ramdisk.scr $(WORK)/boot-sda.scr $(WORK)/boot-mmc.scr bootscr-clean: - rm -f $(WORK)/boot-*.scr - + rm -f $(WORK)/boot-*.scr* # End of file