diff --git a/distrib/utils/embedded/conf/beagleboard.conf b/distrib/utils/embedded/conf/beagleboard.conf index 38c720b8ce2b..0727215bb7fa 100644 --- a/distrib/utils/embedded/conf/beagleboard.conf +++ b/distrib/utils/embedded/conf/beagleboard.conf @@ -1,13 +1,17 @@ -# $NetBSD: beagleboard.conf,v 1.11 2013/02/20 18:33:37 riz Exp $ +# $NetBSD: beagleboard.conf,v 1.12 2013/08/16 00:03:01 jmcneill Exp $ # BeagleBoard customization script used by mkimage # board=beagleboard -kernel="$src/sys/arch/evbarm/compile/obj/BEAGLEBOARD/netbsd.ub" + +bboard_kernel="$src/sys/arch/evbarm/compile/obj/BEAGLEBOARD/netbsd.ub" +bbone_kernel="$src/sys/arch/evbarm/compile/obj/BEAGLEBONE/netbsd.ub" . ${DIR}/conf/evbarm.conf -kernelimg=netbsd.ub -loadaddr=81000000 +bboard_kernelimg=bboard.ub +bboard_loadaddr=81000000 +bbone_kernelimg=bbone.ub +bbone_loadaddr=82000000 make_filesystems() { make_filesystems_evbarm @@ -30,20 +34,34 @@ EOF populate() { cat > ${mnt}/boot/uEnv.txt << EOF -loaduimage=fatload mmc 0 ${loadaddr} ${kernelimg}; bootm ${loadaddr} root=ld0a +loaduimage=if test $board = am335x; then fatload mmc 0 ${bbone_loadaddr} ${bbone_kernelimg}; bootm ${bbone_loadaddr} root=ld0a; else fatload mmc 0 ${bboard_loadaddr} ${bboard_kernelimg}; bootm ${bboard_loadaddr} root=ld0a; fi EOF - if [ ! -f "${kernel}" ]; then - echo ${PROG}: Missing ${kernel} 1>&2 + if [ ! -f "${bboard_kernel}" ]; then + echo ${PROG}: Missing ${bboard_kernel} 1>&2 + exit 1 + fi + if [ ! -f "${bbone_kernel}" ]; then + echo ${PROG}: Missing ${bbone_kernel} 1>&2 exit 1 fi echo "${bar} installing BEAGLEBOARD kernel to /boot ${bar}" - case "${kernel}" in + case "${bboard_kernel}" in *.gz) - gzip -dc "${kernel}" > "${mnt}/boot/${kernelimg}" + gzip -dc "${bboard_kernel}" > "${mnt}/boot/${bboard_kernelimg}" ;; *) - cp "${kernel}" "${mnt}/boot/${kernelimg}" + cp "${bboard_kernel}" "${mnt}/boot/${bboard_kernelimg}" + ;; + esac + + echo "${bar} installing BEAGLEBONE kernel to /boot ${bar}" + case "${bbone_kernel}" in + *.gz) + gzip -dc "${bbone_kernel}" > "${mnt}/boot/${bbone_kernelimg}" + ;; + *) + cp "${bbone_kernel}" "${mnt}/boot/${bbone_kernelimg}" ;; esac }