Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add a new endianes flag to mkimage and pass it on big endian...
details: https://anonhg.NetBSD.org/src/rev/fbe36b32f821
branches: trunk
changeset: 339346:fbe36b32f821
user: martin <martin%NetBSD.org@localhost>
date: Wed Jul 15 11:27:13 2015 +0000
description:
Add a new endianes flag to mkimage and pass it on big endian arm builds.
>From Rin Okuyama.
diffstat:
distrib/utils/embedded/mkimage | 10 ++++++----
etc/etc.evbarm/Makefile.inc | 6 ++++--
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (85 lines):
diff -r 975cd496cfe4 -r fbe36b32f821 distrib/utils/embedded/mkimage
--- a/distrib/utils/embedded/mkimage Wed Jul 15 11:24:03 2015 +0000
+++ b/distrib/utils/embedded/mkimage Wed Jul 15 11:27:13 2015 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mkimage,v 1.59 2015/05/24 17:08:21 christos Exp $
+# $NetBSD: mkimage,v 1.60 2015/07/15 11:27:13 martin Exp $
#
# Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -84,7 +84,7 @@
usage() {
cat << EOF 1>&2
-Usage: $PROG -h <host-arch> [-bdmx] [-K <kerneldir>] [-S <srcdir>] [-D <destdir>] [-c <custom-files-dir>] [-s <Mb size>] [<image>]
+Usage: $PROG -h <host-arch> [-bdmx] [-B <byte-order>] [-K <kerneldir>] [-S <srcdir>] [-D <destdir>] [-c <custom-files-dir>] [-s <Mb size>] [<image>]
-b Boot only, no sets loaded
-r root device kind (sd, wd, ld)
@@ -96,7 +96,7 @@
}
# First pass for options to get the host and src directories
-OPTS="K:D:S:bc:dh:mr:s:x"
+OPTS="B:D:K:S:bc:dh:mr:s:x"
while getopts "$OPTS" f
do
case $f in
@@ -127,11 +127,13 @@
xsets_p=false
minwrites=false
rootdev=ld
+endian=
OPTIND=1
while getopts "$OPTS" f
do
case $f in
+ B) endian="-B $OPTARG";;
D) release="$OPTARG";;
K) kernel="$OPTARG";;
S) ;;
@@ -193,7 +195,7 @@
if [ -z "${bootonly}" ]; then
echo ${bar} Populating ffs filesystem ${bar}
- ${MAKEFS} -r -N ${release}/etc -t ffs -rx \
+ ${MAKEFS} -rx ${endian} -N ${release}/etc -t ffs \
-O ${ffsoffset} \
-o d=4096,f=2048,b=16384 -b $((${extra}))m \
-F "$tmp/selected_sets" ${image} "${release}" "${mnt}"
diff -r 975cd496cfe4 -r fbe36b32f821 etc/etc.evbarm/Makefile.inc
--- a/etc/etc.evbarm/Makefile.inc Wed Jul 15 11:24:03 2015 +0000
+++ b/etc/etc.evbarm/Makefile.inc Wed Jul 15 11:27:13 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.76 2015/05/22 01:18:05 jmcneill Exp $
+# $NetBSD: Makefile.inc,v 1.77 2015/07/15 11:27:13 martin Exp $
#
# etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
#
@@ -13,6 +13,7 @@
.endfor
.if !empty(MACHINE_ARCH:M*eb)
+IMAGEENDIAN= be
# big endian boards
KERNEL_SETS.armv4+= IXM1200
EVBARM_BOARDS.xscale+= ADI_BRH
@@ -32,6 +33,7 @@
EVBARM_BOARDS.armv7+= HUMMINGBIRD_A31
EVBARM_BOARDS.armv7hf+= HUMMINGBIRD_A31
.else
+IMAGEENDIAN= le
# little endian boards
#EVBARM_BOARDS.armv4+= ARMADILLO210
#EVBARM_BOARDS.armv4+= ARMADILLO9
@@ -136,7 +138,7 @@
TOOL_MTREE=${TOOL_MTREE} \
HOST_SH=${HOST_SH} \
${HOST_SH} ${MKIMAGE} -x -h ${.TARGET:S/smp_//} -D ${DESTDIR} \
- -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \
+ -S ${NETBSDSRCDIR} -B ${IMAGEENDIAN} ${MKI_OPTS.${.TARGET}} \
${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz
ARCHES.arm= armv4 xscale armv5t armv6 armv7
Home |
Main Index |
Thread Index |
Old Index