Simply and deal with all the various earm MACHINE_ARCH variants

This commit is contained in:
matt 2013-08-06 05:57:37 +00:00
parent aef0332e31
commit 7732e16eb9
1 changed files with 86 additions and 39 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.52 2013/06/16 13:47:42 jakllsch Exp $
# $NetBSD: Makefile.inc,v 1.53 2013/08/06 05:57:37 matt Exp $
#
# etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
#
@ -8,15 +8,76 @@ MKIMAGE= ${NETBSDSRCDIR}/distrib/utils/embedded/mkimage
# If you change the list of distributed kernels, don't forget
# to update the release documentation in distrib/notes/common/contents
EVBARM_BOARDS=
.for i in armv4 xscale armv5t armv6 armv7
EVBARM_BOARDS.${i}=
.endfor
.if ${MACHINE_ARCH} == "arm"
# Little endian platforms (armv4 or pre-armv5t)
EVBARM_BOARDS+= ADI_BRH CP3100 GEMINI GUMSTIX INTEGRATOR \
IQ80310 IQ80321 MINI2440 MV2120 SMDK2410 \
SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL KUROBOX_PRO
.if !empty(MACHINE_ARCH:M*eb)
# big endian boards
KERNEL_SETS.armv4+= IMX1200
EVBARM_BOARDS.xscale+= ADI_BRH
KERNEL_SETS.xscale+= NSLU2
EVBARM_BOARDS.armv7+= BCM5301X
.else
# little endian boards
#EVBARM_BOARDS.armv4+= ARMADILLO210
#EVBARM_BOARDS.armv4+= ARMADILLO9
EVBARM_BOARDS.armv4+= GEMINI
EVBARM_BOARDS.armv4+= INTEGRATOR
KERNEL_SETS.armv4+= INTEGRATOR_CP
KERNEL_SETS.armv4+= IMX1200
#EVBARM_BOARDS.armv4+= MINI2440
#EVBARM_BOARDS.armv4+= MPCSA_GENERIC
#EVBARM_BOARDS.armv4+= NAPPI
EVBARM_BOARDS.armv4+= SMDK2410
EVBARM_BOARDS.armv4+= SMDK2800
EVBARM_BOARDS.armv4+= TS7200
EVBARM_BOARDS.xscale+= ADI_BRH
EVBARM_BOARDS.xscale+= CP3100
EVBARM_BOARDS.xscale+= GUMSTIX
KERNEL_SETS.xscale+= HDL_G
EVBARM_BOARDS.xscale+= IQ80310
EVBARM_BOARDS.xscale+= IQ80321
#EVBARM_BOARDS.xscale+= LUBBOCK
EVBARM_BOARDS.xscale+= TEAMASA_NPWR
EVBARM_BOARDS.xscale+= TWINTAIL
#EVBARM_BOARDS.xscale+= VIPER
#EVBARM_BOARDS.xscale+= ZAO425
#EVBARM_BOARDS.armv5t+= DNS323
#EVBARM_BOARDS.armv5t+= HPT5325
#EVBARM_BOARDS.armv5t+= IMX21_OLINUXINO
EVBARM_BOARDS.armv5t+= KUROBOX_PRO
#EVBARM_BOARDS.armv5t+= MARVELL_NAS
#EVBARM_BOARDS.armv5t+= MMNET_GENERIC
EVBARM_BOARDS.armv5t+= MV2120
#EVBARM_BOARDS.armv5t+= OPENBLOCKS_A6
EVBARM_BOARDS.armv5t+= OPENRD
#EVBARM_BOARDS.armv5t+= OSK5912
EVBARM_BOARDS.armv5t+= SHEEVAPLUG
#EVBARM_BOARDS.armv6+= IMX31LITE
#EVBARM_BOARDS.armv6hf+= IMX31LITE
EVBARM_BOARDS.armv6+= RPI
EVBARM_BOARDS.armv6hf+= RPI
EVBARM_BOARDS.armv6+= TIDSP2420
EVBARM_BOARDS.armv6hf+= TIDSP2420
EVBARM_BOARDS.armv6+= TIDSP2430
EVBARM_BOARDS.armv7+= ARMADAXP
EVBARM_BOARDS.armv7+= BCM5301X
EVBARM_BOARDS.armv7hf+= BCM5301X
EVBARM_BOARDS.armv7+= BEAGLEBOARD
EVBARM_BOARDS.armv7hf+= BEAGLEBOARD
EVBARM_BOARDS.armv7+= BEAGLEBOARDXM
EVBARM_BOARDS.armv7hf+= BEAGLEBOARDXM
EVBARM_BOARDS.armv7+= BEAGLEBONE
EVBARM_BOARDS.armv7hf+= BEAGLEBONE
#EVBARM_BOARDS.armv7+= IGEPV2
#EVBARM_BOARDS.armv7+= N900
#EVBARM_BOARDS.armv7+= NETWALKER
#EVBARM_BOARDS.armv7+= OVERO
#EVBARM_BOARDS.armv7+= PANDABOARD
#EVBARM_BOARDS.armv7hf+= PANDABOARD
.endif
IMAGE.rel= ${RELEASEDIR}/${RELEASEMACHINEDIR}
IMAGE.dir= ${IMAGE.rel}/binary/gzimg
IMAGE.kern= ${IMAGE.rel}/binary/kernel
@ -35,39 +96,30 @@ __mkimage: .USE
-K ${.ALLSRC} -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \
${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earm" \
|| ${MACHINE_ARCH} == "earmhf"
# Little endian platforms with VFP
EVBARM_BOARDS+= BCM5301X BEAGLEBOARD BEAGLEBOARDXM BEAGLEBONE TISDP2420
ARCHES.arm= armv4 xscale armv5t armv6 armv7
ARCHES.earm= xscale armv5t armv6 armv7
ARCHES.earmhf= armv6hf armv7hf
ARCHES.earmv4= armv4
ARCHES.earmv6= armv6
ARCHES.earmv6hf= armv6hf
ARCHES.earmv7= armv7
ARCHES.earmv7hf= armv7hf
.for arch in ${ARCHES.${MACHINE_ARCH:S/eb//}}
.for board in ${EVBARM_BOARDS.${arch}}
KERNEL_SETS+= ${board}
BUILD_KERNELS+= ${board}_INSTALL
.endfor
KERNEL_SETS+= ${KERNEL_SETS.${arch}}
.endfor
.if !empty(KERNEL_SETS:MBEAGLEBOARD)
smp_beagleboard: ${IMAGE.kern}/netbsd-BEAGLEBOARD.ub.gz __mkimage
.if empty(ALL_KERNELS) || !empty(ALL_KERNELS:MBEAGLEBOARD)
SNAP_MD_POST_DEPS+= smp_beagleboard
.endif
.endif
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earm"
# Little endian platforms (armv5t+)
EVBARM_BOARDS+= OPENRD SHEEVAPLUG
.endif
.if ${MACHINE_ARCH} == "armeb"
# Big endian platforms
EVBARM_BOARDS+= ADI_BRH
.endif
.for board in ${EVBARM_BOARDS}
KERNEL_SETS+= ${board}
BUILD_KERNELS+= ${board}_INSTALL
.endfor
.if ${MACHINE_ARCH} == "arm"
# Little endian platforms.
KERNEL_SETS+= HDL_G INTEGRATOR_CP IXM1200
.endif
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earm" \
|| ${MACHINE_ARCH} == "earmhf"
KERNEL_SETS+= RPI
BUILD_KERNELS+= RPI_INSTALL
.if !empty(KERNEL_SETS:MRPI)
smp_rpi: ${IMAGE.kern}/netbsd-RPI.bin.gz __mkimage
.if empty(ALL_KERNELS) || !empty(ALL_KERNELS:MRPI)
SNAP_MD_POST_DEPS+= smp_rpi
@ -79,11 +131,6 @@ SNAP_MD_POST_DEPS+= smp_rpi_inst
.endif
.endif
.if ${MACHINE_ARCH} == "armeb"
# Big endian platforms.
KERNEL_SETS+= IXM1200 NSLU2
.endif
snap_md_post: check_DESTDIR check_RELEASEDIR snap_post .WAIT ${SNAP_MD_POST_DEPS}
KERNEL_SUFFIXES= bin srec ub