Home | History | Annotate | Line # | Download | only in gzimg
      1  1.28  thorpej #	$NetBSD: Makefile,v 1.28 2019/06/02 17:18:57 thorpej 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.22      bsh #
      9  1.26     matt # `make' or `make all' builds all gzimg files defined in ${ARCH_TARGETS}.
     10  1.22      bsh # `make _KERNELNAME_' builds all gzimg files for specified kernels.
     11  1.22      bsh #
     12  1.22      bsh 
     13  1.22      bsh 
     14   1.1    lukem 
     15  1.26     matt #	ARCH_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.28  thorpej .if ${MACHINE_ARCH} == "arm" || \
     20  1.28  thorpej     ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmv4"
     21  1.28  thorpej # Little endian ARMv4 platforms.
     22  1.28  thorpej ARCH_TARGETS=	GEMINI		GEMINI		GEMINI		\
     23  1.28  thorpej 		0x01600000	netbsd				\
     24  1.28  thorpej 								\
     25  1.28  thorpej 		TS7200		TS7200		TS7200_wd0	\
     26  1.28  thorpej 		0x60660000	netbsd-wd0			\
     27  1.28  thorpej 								\
     28  1.28  thorpej 		SMDK2800	SMDK2800	SMDK2800	\
     29  1.28  thorpej 		0x00000000	netbsd
     30  1.28  thorpej .elif ${MACHINE_ARCH} == "arm" || \
     31  1.28  thorpej       ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmv5"
     32  1.28  thorpej # Little endian ARMv5 platforms.
     33  1.26     matt ARCH_TARGETS=	ADI_BRH		ADI_BRH		ADI_BRH_sd0	\
     34  1.12  thorpej 		0x00140000	netbsd-sd0			\
     35  1.12  thorpej 								\
     36  1.12  thorpej 		ADI_BRH		ADI_BRH		ADI_BRH_wd0	\
     37  1.12  thorpej 		0x00140000	netbsd-wd0			\
     38  1.12  thorpej 								\
     39  1.18      scw 		CP3100		IQ80321		CP3100_sd0	\
     40  1.18      scw 		0xf0080000	netbsd-sd0			\
     41  1.18      scw 								\
     42  1.18      scw 		CP3100		IQ80321		CP3100_wd0	\
     43  1.18      scw 		0xf0080000	netbsd-wd0			\
     44  1.18      scw 								\
     45  1.12  thorpej 		IQ80310		IQ80310		IQ80310_sd0	\
     46  1.12  thorpej 		0x00080000	netbsd-sd0			\
     47  1.12  thorpej 								\
     48  1.12  thorpej 		IQ80310		IQ80310		IQ80310_wd0	\
     49  1.12  thorpej 		0x00080000	netbsd-wd0			\
     50  1.12  thorpej 								\
     51  1.12  thorpej 		IQ80321		IQ80321		IQ80321_sd0	\
     52  1.12  thorpej 		0xf0080000	netbsd-sd0			\
     53  1.12  thorpej 								\
     54  1.12  thorpej 		IQ80321		IQ80321		IQ80321_wd0	\
     55  1.12  thorpej 		0xf0080000	netbsd-wd0			\
     56  1.12  thorpej 								\
     57  1.13  thorpej 		TEAMASA_NPWR	IQ80310		TEAMASA_NPWR_sd0 \
     58  1.28  thorpej 		0x00080000	netbsd-sd0
     59  1.28  thorpej .elif ${MACHINE_ARCH} == "armeb" || \
     60  1.28  thorpej       ${MACHINE_ARCH} == "earmeb" || ${MACHINE_ARCH} == "earmv5eb"
     61  1.28  thorpej # Big endian ARMv5 platforms.
     62  1.26     matt ARCH_TARGETS=	ADI_BRH		ADI_BRH		ADI_BRH_sd0	\
     63  1.14  thorpej 		0x00140000	netbsd-sd0			\
     64  1.14  thorpej 								\
     65  1.14  thorpej 		ADI_BRH		ADI_BRH		ADI_BRH_wd0	\
     66  1.14  thorpej 		0x00140000	netbsd-wd0
     67  1.14  thorpej .endif
     68   1.1    lukem 
     69  1.26     matt # Default is to build for all ARCH_TARGETS
     70  1.24       he ALL_KERNELS?= +
     71  1.24       he 
     72  1.26     matt .for K G I R W in ${ARCH_TARGETS}			# {
     73  1.23  mlelstv .for configsel in ${ALL_KERNELS}			# {
     74  1.23  mlelstv .if ${configsel} == "+" || ${configsel} == ${K}
     75   1.1    lukem 
     76  1.13  thorpej GZB${G}=	${DESTDIR}/usr/mdec/gzboot_${G}_${R}.bin
     77   1.1    lukem 
     78  1.12  thorpej GZIMGS+=	gzimg_${I}_flash_${R}.gz
     79   1.1    lukem 
     80  1.12  thorpej gzimg_${I}_flash_${R}: .NOTMAIN ${GZB${G}} ${KERNOBJDIR}/${K}/${W}.bin
     81   1.1    lukem 	@echo "Populating ${.TARGET}"
     82   1.9    lukem 	-rm -f ${.TARGET}.kern.gz
     83  1.27      apb 	${TOOL_GZIP_N} -9c ${KERNOBJDIR}/${K}/${W}.bin > ${.TARGET}.kern.gz
     84  1.15    lukem 	${TOOL_CAT} ${GZB${G}} ${.TARGET}.kern.gz > ${.TARGET}
     85   1.9    lukem 
     86  1.12  thorpej gzimg_${I}_flash_${R}.gz: .NOTMAIN gzimg_${I}_flash_${R}
     87   1.9    lukem 	-rm -f ${.TARGET}
     88  1.27      apb 	${TOOL_GZIP_N} -9c ${.ALLSRC} > ${.TARGET}
     89   1.8    lukem 
     90  1.12  thorpej CLEANFILES+=	gzimg_${I}_flash_${R}.kern gzimg_${I}_flash_${R}.kern.gz \
     91  1.12  thorpej 		gzimg_${I}_flash_${R}
     92   1.1    lukem 
     93  1.22      bsh .if empty(GZKERNELS:M${K})
     94  1.22      bsh GZKERNELS+=	$K
     95  1.22      bsh .endif
     96  1.22      bsh KZ${K}+=	gzimg_${I}_flash_${R}.gz
     97  1.22      bsh 
     98  1.23  mlelstv .endif
     99  1.23  mlelstv .endfor							# }
    100   1.1    lukem .endfor							# }
    101   1.1    lukem 
    102  1.22      bsh .for K in ${GZKERNELS}
    103  1.22      bsh ${K}: .PHONY ${KZ${K}}
    104  1.22      bsh .endfor
    105  1.22      bsh 
    106   1.8    lukem CLEANFILES+=	${GZIMGS}
    107   1.1    lukem 
    108   1.1    lukem 
    109   1.1    lukem realall: ${GZIMGS}
    110   1.3  thorpej 
    111   1.7    lukem release: check_RELEASEDIR .WAIT ${GZIMGS}
    112   1.3  thorpej .for img in ${GZIMGS}
    113  1.19     matt 	${RELEASE_INSTALL} ${img} ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg
    114   1.3  thorpej .endfor
    115   1.1    lukem 
    116   1.1    lukem .include <bsd.prog.mk>
    117