1 1.21.6.1 yamt # $NetBSD: Makefile,v 1.21.6.1 2012/04/17 00:02:33 yamt Exp $ 2 1.1 lukem 3 1.1 lukem .include <bsd.own.mk> 4 1.7 lukem .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 5 1.1 lukem 6 1.1 lukem .include <bsd.kernobj.mk> 7 1.1 lukem 8 1.21.6.1 yamt # 9 1.21.6.1 yamt # `make' or `make all' builds all gzimg files defined in ${TARGETS}. 10 1.21.6.1 yamt # `make _KERNELNAME_' builds all gzimg files for specified kernels. 11 1.21.6.1 yamt # 12 1.21.6.1 yamt 13 1.21.6.1 yamt 14 1.1 lukem 15 1.1 lukem # TARGETS is a list of: 16 1.12 thorpej # KERNEL_name GZBOOT_name GZIMG_name 17 1.12 thorpej # RELOC_ADDR WHICH_kernel 18 1.1 lukem # 19 1.14 thorpej .if ${MACHINE_ARCH} == "arm" 20 1.14 thorpej # Little endian platforms. 21 1.12 thorpej TARGETS= ADI_BRH ADI_BRH ADI_BRH_sd0 \ 22 1.12 thorpej 0x00140000 netbsd-sd0 \ 23 1.12 thorpej \ 24 1.12 thorpej ADI_BRH ADI_BRH ADI_BRH_wd0 \ 25 1.12 thorpej 0x00140000 netbsd-wd0 \ 26 1.12 thorpej \ 27 1.18 scw CP3100 IQ80321 CP3100_sd0 \ 28 1.18 scw 0xf0080000 netbsd-sd0 \ 29 1.18 scw \ 30 1.18 scw CP3100 IQ80321 CP3100_wd0 \ 31 1.18 scw 0xf0080000 netbsd-wd0 \ 32 1.18 scw \ 33 1.20 cliff GEMINI GEMINI GEMINI \ 34 1.20 cliff 0x01600000 netbsd \ 35 1.20 cliff \ 36 1.12 thorpej IQ80310 IQ80310 IQ80310_sd0 \ 37 1.12 thorpej 0x00080000 netbsd-sd0 \ 38 1.12 thorpej \ 39 1.12 thorpej IQ80310 IQ80310 IQ80310_wd0 \ 40 1.12 thorpej 0x00080000 netbsd-wd0 \ 41 1.12 thorpej \ 42 1.12 thorpej IQ80321 IQ80321 IQ80321_sd0 \ 43 1.12 thorpej 0xf0080000 netbsd-sd0 \ 44 1.12 thorpej \ 45 1.12 thorpej IQ80321 IQ80321 IQ80321_wd0 \ 46 1.12 thorpej 0xf0080000 netbsd-wd0 \ 47 1.12 thorpej \ 48 1.13 thorpej TEAMASA_NPWR IQ80310 TEAMASA_NPWR_sd0 \ 49 1.16 bsh 0x00080000 netbsd-sd0 \ 50 1.16 bsh \ 51 1.17 joff TS7200 TS7200 TS7200_wd0 \ 52 1.17 joff 0x60660000 netbsd-wd0 \ 53 1.17 joff \ 54 1.16 bsh SMDK2800 SMDK2800 SMDK2800 \ 55 1.16 bsh 0x00000000 netbsd 56 1.14 thorpej .else 57 1.14 thorpej # Big endian platforms. 58 1.14 thorpej TARGETS= ADI_BRH ADI_BRH ADI_BRH_sd0 \ 59 1.14 thorpej 0x00140000 netbsd-sd0 \ 60 1.14 thorpej \ 61 1.14 thorpej ADI_BRH ADI_BRH ADI_BRH_wd0 \ 62 1.14 thorpej 0x00140000 netbsd-wd0 63 1.14 thorpej .endif 64 1.1 lukem 65 1.12 thorpej .for K G I R W in ${TARGETS} # { 66 1.1 lukem 67 1.13 thorpej GZB${G}= ${DESTDIR}/usr/mdec/gzboot_${G}_${R}.bin 68 1.1 lukem 69 1.12 thorpej GZIMGS+= gzimg_${I}_flash_${R}.gz 70 1.1 lukem 71 1.12 thorpej gzimg_${I}_flash_${R}: .NOTMAIN ${GZB${G}} ${KERNOBJDIR}/${K}/${W}.bin 72 1.1 lukem @echo "Populating ${.TARGET}" 73 1.9 lukem -rm -f ${.TARGET}.kern.gz 74 1.21 perry gzip -9nc ${KERNOBJDIR}/${K}/${W}.bin > ${.TARGET}.kern.gz 75 1.15 lukem ${TOOL_CAT} ${GZB${G}} ${.TARGET}.kern.gz > ${.TARGET} 76 1.9 lukem 77 1.12 thorpej gzimg_${I}_flash_${R}.gz: .NOTMAIN gzimg_${I}_flash_${R} 78 1.9 lukem -rm -f ${.TARGET} 79 1.21 perry gzip -9nc ${.ALLSRC} > ${.TARGET} 80 1.8 lukem 81 1.12 thorpej CLEANFILES+= gzimg_${I}_flash_${R}.kern gzimg_${I}_flash_${R}.kern.gz \ 82 1.12 thorpej gzimg_${I}_flash_${R} 83 1.1 lukem 84 1.21.6.1 yamt .if empty(GZKERNELS:M${K}) 85 1.21.6.1 yamt GZKERNELS+= $K 86 1.21.6.1 yamt .endif 87 1.21.6.1 yamt KZ${K}+= gzimg_${I}_flash_${R}.gz 88 1.21.6.1 yamt 89 1.1 lukem .endfor # } 90 1.1 lukem 91 1.21.6.1 yamt .for K in ${GZKERNELS} 92 1.21.6.1 yamt ${K}: .PHONY ${KZ${K}} 93 1.21.6.1 yamt .endfor 94 1.21.6.1 yamt 95 1.8 lukem CLEANFILES+= ${GZIMGS} 96 1.1 lukem 97 1.1 lukem 98 1.1 lukem realall: ${GZIMGS} 99 1.3 thorpej 100 1.7 lukem release: check_RELEASEDIR .WAIT ${GZIMGS} 101 1.3 thorpej .for img in ${GZIMGS} 102 1.19 matt ${RELEASE_INSTALL} ${img} ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg 103 1.3 thorpej .endfor 104 1.1 lukem 105 1.1 lukem .include <bsd.prog.mk> 106