Home | History | Annotate | Line # | Download | only in gzimg
Makefile revision 1.21.6.2
      1  1.21.6.2     yamt #	$NetBSD: Makefile,v 1.21.6.2 2013/01/23 00:04:09 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.21.6.2     yamt ALL_KERNELS?= "+"
     66      1.12  thorpej .for K G I R W in ${TARGETS}				# {
     67  1.21.6.2     yamt .for configsel in ${ALL_KERNELS}			# {
     68  1.21.6.2     yamt .if ${configsel} == "+" || ${configsel} == ${K}
     69       1.1    lukem 
     70      1.13  thorpej GZB${G}=	${DESTDIR}/usr/mdec/gzboot_${G}_${R}.bin
     71       1.1    lukem 
     72      1.12  thorpej GZIMGS+=	gzimg_${I}_flash_${R}.gz
     73       1.1    lukem 
     74      1.12  thorpej gzimg_${I}_flash_${R}: .NOTMAIN ${GZB${G}} ${KERNOBJDIR}/${K}/${W}.bin
     75       1.1    lukem 	@echo "Populating ${.TARGET}"
     76       1.9    lukem 	-rm -f ${.TARGET}.kern.gz
     77      1.21    perry 	gzip -9nc ${KERNOBJDIR}/${K}/${W}.bin > ${.TARGET}.kern.gz
     78      1.15    lukem 	${TOOL_CAT} ${GZB${G}} ${.TARGET}.kern.gz > ${.TARGET}
     79       1.9    lukem 
     80      1.12  thorpej gzimg_${I}_flash_${R}.gz: .NOTMAIN gzimg_${I}_flash_${R}
     81       1.9    lukem 	-rm -f ${.TARGET}
     82      1.21    perry 	gzip -9nc ${.ALLSRC} > ${.TARGET}
     83       1.8    lukem 
     84      1.12  thorpej CLEANFILES+=	gzimg_${I}_flash_${R}.kern gzimg_${I}_flash_${R}.kern.gz \
     85      1.12  thorpej 		gzimg_${I}_flash_${R}
     86       1.1    lukem 
     87  1.21.6.1     yamt .if empty(GZKERNELS:M${K})
     88  1.21.6.1     yamt GZKERNELS+=	$K
     89  1.21.6.1     yamt .endif
     90  1.21.6.1     yamt KZ${K}+=	gzimg_${I}_flash_${R}.gz
     91  1.21.6.1     yamt 
     92  1.21.6.2     yamt .endif
     93  1.21.6.2     yamt .endfor							# }
     94       1.1    lukem .endfor							# }
     95       1.1    lukem 
     96  1.21.6.1     yamt .for K in ${GZKERNELS}
     97  1.21.6.1     yamt ${K}: .PHONY ${KZ${K}}
     98  1.21.6.1     yamt .endfor
     99  1.21.6.1     yamt 
    100       1.8    lukem CLEANFILES+=	${GZIMGS}
    101       1.1    lukem 
    102       1.1    lukem 
    103       1.1    lukem realall: ${GZIMGS}
    104       1.3  thorpej 
    105       1.7    lukem release: check_RELEASEDIR .WAIT ${GZIMGS}
    106       1.3  thorpej .for img in ${GZIMGS}
    107      1.19     matt 	${RELEASE_INSTALL} ${img} ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg
    108       1.3  thorpej .endfor
    109       1.1    lukem 
    110       1.1    lukem .include <bsd.prog.mk>
    111