Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb

files for SUNXI and TEGRA kernels on the MSDOS partition.
This commit is contained in:
jmcneill 2017-07-06 00:17:04 +00:00
parent 08f67bf5e8
commit fab9db5f7e
3 changed files with 22 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: armv7.conf,v 1.12 2017/04/12 23:35:29 jmcneill Exp $
# $NetBSD: armv7.conf,v 1.13 2017/07/06 00:17:04 jmcneill Exp $
# ARMv7 customization script used by mkimage
#
board=armv7
@ -8,10 +8,11 @@ resize=true
. ${DIR}/conf/evbarm.conf
kernels_beagle="BEAGLEBOARD BEAGLEBONE"
kernels_awin="BPI CUBIEBOARD CUBIETRUCK HUMMINGBIRD_A31"
kernels_awin="BPI CUBIEBOARD CUBIETRUCK"
kernels_rpi="RPI2"
kernels_amlogic="ODROID-C1"
kernels_tegra="TEGRA"
kernels_sunxi="SUNXI"
make_label() {
make_label_evbarm
@ -105,6 +106,9 @@ run bootcmd
EOF
}
populate_sunxi() {
}
populate_tegra() {
tegra_kernelimg=netbsd-TEGRA.ub
tegra_loadaddr=0x90000000
@ -124,7 +128,7 @@ populate() {
echo "${bar} looking for kernels in ${kernel} ${bar}"
kernels=""
# .ub kernels
for k in $kernels_beagle $kernels_awin $kernels_amlogic $kernels_tegra; do
for k in $kernels_beagle $kernels_awin $kernels_sunxi $kernels_amlogic $kernels_tegra; do
f="${kernel}/netbsd-${k}.ub.gz"
test -f "${f}" && kernels="${kernels} ${f}"
done
@ -133,6 +137,14 @@ populate() {
f="${kernel}/netbsd-${k}.bin.gz"
test -f "${f}" && kernels="${kernels} ${f}"
done
# .dtb files
for k in $kernels_sunxi $kernels_tegra; do
dtbs="$(${MAKE} -C ${KERNOBJDIR}/${k} -v DTB)"
for dtb in $dtbs; do
f="${kernel}/${dtb}.gz"
test -f "${f}" && kernels="${kernels} ${f}"
done
done
# install kernels to /boot partition
for k in ${kernels}; do
@ -154,4 +166,5 @@ populate() {
populate_rpi
populate_amlogic
populate_tegra
populate_sunxi
}

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: mkimage,v 1.65 2017/06/10 23:26:32 christos Exp $
# $NetBSD: mkimage,v 1.66 2017/07/06 00:17:04 jmcneill Exp $
#
# Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
# All rights reserved.
@ -51,6 +51,7 @@ set -e
DIR="$(cd "$(dirname "$0")" && pwd)"
PROG="$(basename "$0")"
MAKE=${TOOL_MAKE:-make}
DISKLABEL=${TOOL_DISKLABEL:-disklabel}
FDISK=${TOOL_FDISK:-fdisk}
MAKEFS=${TOOL_MAKEFS:-makefs}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.87 2017/07/05 19:50:49 jmcneill Exp $
# $NetBSD: Makefile.inc,v 1.88 2017/07/06 00:17:04 jmcneill Exp $
#
# etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
#
@ -134,6 +134,7 @@ IMAGE.kern= ${IMAGE.rel}/binary/kernel
IMAGE.instk= ${IMAGE.rel}/installation/instkernel
__mkimage: .USE
TOOL_MAKE=${MAKE} \
TOOL_MAKEFS=${TOOL_MAKEFS} \
TOOL_DISKLABEL=${TOOL_DISKLABEL} \
TOOL_FDISK=${TOOL_FDISK} \
@ -143,6 +144,8 @@ __mkimage: .USE
TOOL_MKUBOOTIMAGE=${TOOL_MKUBOOTIMAGE} \
TOOL_MTREE=${TOOL_MTREE} \
HOST_SH=${HOST_SH} \
KERNOBJDIR=${KERNOBJDIR} \
MACHINE=${MACHINE} \
${HOST_SH} ${MKIMAGE} -x -h ${.TARGET:S/smp_//} -D ${DESTDIR} \
-S ${NETBSDSRCDIR} -B ${IMAGEENDIAN} ${MKI_OPTS.${.TARGET}} \
${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz