2 # bootloader/devices/cubox/Makefile
7 MKIMAGE
= $(PWD
)/..
/..
/work
/mkimage
8 ZIMAGE
= $(PWD
)/..
/..
/..
/kernel
/cubox
/work
/zImage
9 INITRDGZ
= $(PWD
)/..
/..
/..
/initrd
/work
/initrd-hardfp.gz
11 KERNEL_VERSION_STRING
= $(shell readlink
$(ZIMAGE
) | sed s
/zImage-
//)
13 RAMDISK_TYPE
= uInitrd
14 #RAMDISK_TYPE = uInitramfs
17 #CONSOLE_DEVICE = ttymxc0,115200
20 .PHONY
: all clean distclean uImage uInitrd bootscr
22 all: uImage uInitrd bootscr
24 clean: uImage-clean uInitrd-clean bootscr-clean
31 $(WORK
)/uImage
: $(WORK
) $(MKIMAGE
) $(ZIMAGE
)
32 $(MKIMAGE
) -A arm
-O linux
-a
0x1a000000 -e
0x1a000000 \
33 -T kernel
-C none
-n
"Linux-$(KERNEL_VERSION_STRING)" \
34 -d
$(ZIMAGE
) $(WORK
)/uImage
36 uImage
: $(WORK
)/uImage
41 $(WORK
)/uInitrd
: $(WORK
) $(MKIMAGE
) $(INITRDGZ
)
42 $(MKIMAGE
) -A arm
-O linux
-a
0 -e
0 \
43 -T ramdisk
-C none
-n
"CRUX-ARM Initrd Image" \
44 -d
$(INITRDGZ
) $(WORK
)/uInitrd
46 uInitrd
: $(WORK
)/uInitrd
53 $(WORK
)/boot-ram.scr
: $(WORK
) $(MKIMAGE
) $(PWD
)/boot-ram.script
54 $(MKIMAGE
) -A arm
-O linux
-a
0 -e
0 \
55 -T script
-C none
-n
"CuBox Boot Script (ramdisk)" \
56 -d
$(PWD
)/boot-ram.script \
59 $(WORK
)/boot-mmcblk.scr
: $(WORK
) $(MKIMAGE
) $(PWD
)/boot-mmcblk.script
60 $(MKIMAGE
) -A arm
-O linux
-a
0 -e
0 \
61 -T script
-C none
-n
"CuBox Boot Script (mmc)" \
62 -d
$(PWD
)/boot-mmcblk.script \
63 $(WORK
)/boot-mmcblk.scr
65 bootscr
: $(WORK
)/boot-ram.scr
$(WORK
)/boot-mmcblk.scr
68 rm -f
$(WORK
)/boot-
*.scr