Tool updates to support armhf.

This commit is contained in:
Jeffrey Townsend
2018-12-25 15:42:07 +00:00
parent ce19018897
commit 96a697bdcc
8 changed files with 23 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ if test "$ARCH" != "$IARCH"; then
# identify mappings between kernel arch and debian arch
case "$IARCH:$ARCH" in
armel:armv7l) ;;
armhf:armv7l) ;;
arm64:aarch64) ;;
powerpc:ppc) ;;
*)

12
make/config.armhf.mk Normal file
View File

@@ -0,0 +1,12 @@
############################################################
#
# Open Network Linux
#
############################################################
include $(ONL)/make/config.mk
export TOOLCHAIN := arm-linux-gnueabihf
export CROSS_COMPILER := $(TOOLCHAIN)-
export ARCH := armhf
export UARCH := ARMHF
export ARCH_BOOT := uboot
export __$(ARCH)__ := 1

View File

@@ -14,7 +14,7 @@ include $(ONL)/make/config.mk
# directory tree.
#
ifndef ARCHES
ARCHES := amd64 powerpc armel arm64 all
ARCHES := amd64 powerpc armel armhf arm64 all
endif
ONLPM_ENVIRONMENT = \

View File

@@ -138,7 +138,7 @@ case $(uname -m) in
ARCH_LIST="x86_64 amd64"
;;
armv7l)
ARCH_LIST="armel"
ARCH_LIST="armel armhf"
;;
aarch64)
ARCH_LIST="arm64"

View File

@@ -33,6 +33,7 @@ def baseconfig():
'i386-linux-gnu',
'x86_64-linux-gnu',
'arm-linux-gnueabi',
'arm-linux-gnueabihf',
'aarch64-linux-gnu',
]

View File

@@ -66,7 +66,7 @@ class Image(object):
self.wl(""" description = "%s";""" % self.description)
self.wl(""" type = "%s";""" % self.type)
self.wl(""" data = /incbin/("%s");""" % self.data)
self.wl(""" arch = "%s";""" % ("arm" if ops.arch == 'armel' else ops.arch))
self.wl(""" arch = "%s";""" % ("arm" if ops.arch in [ 'armel', 'armhf' ] else ops.arch))
self.wl(""" compression = "%s";""" % self.compression)
if self.os:
self.wl(""" os = %s;""" % self.os)
@@ -95,7 +95,7 @@ class KernelImage(Image):
if arch == 'powerpc':
self.load = "<0x0>"
self.entry = "<0x0>"
elif arch == 'armel':
elif arch in [ 'armel', 'armhf' ]:
self.load = "<0x61008000>"
self.entry = "<0x61008000>"
elif arch == 'arm64':
@@ -117,7 +117,7 @@ class InitrdImage(Image):
if arch == 'powerpc':
self.load = "<0x1000000>"
self.entry ="<0x1000000>"
elif arch == 'armel':
elif arch in [ 'armel', 'armhf' ]:
self.load = "<0x0000000>"
self.entry ="<0x0000000>"
elif arch == 'arm64':
@@ -306,7 +306,7 @@ if __name__ == '__main__':
ap.add_argument("--desc", nargs=1, help="Flat Image Tree description", default="ONL Flat Image Tree.")
ap.add_argument("--itb", metavar='itb-file', help="Compile result to an image tree blob file.")
ap.add_argument("--its", metavar='its-file', help="Write result to an image tree source file.")
ap.add_argument("--arch", choices=['powerpc', 'armel', 'arm64'], required=True)
ap.add_argument("--arch", choices=['powerpc', 'armel', 'armhf', 'arm64'], required=True)
ops=ap.parse_args()
fit = FlatImageTree(ops.desc)

View File

@@ -175,7 +175,7 @@ if __name__ == '__main__':
ap = argparse.ArgumentParser(NAME)
ap.add_argument("--arch", help="Installer Architecture.", required=True,
choices = ['amd64', 'powerpc', 'armel', 'arm64'])
choices = ['amd64', 'powerpc', 'armel', 'armhf', 'arm64'])
ap.add_argument("--initrd", nargs=2, help="The system initrd.")
ap.add_argument("--fit", nargs=2, help="The system FIT image.")
ap.add_argument("--boot-config", help="The boot-config source.")

View File

@@ -334,7 +334,7 @@ class OnlRfsBuilder(object):
if not os.path.exists(self.QEMU_PPC):
raise OnlRfsError("%s is missing." % self.QEMU_PPC)
if self.arch == 'armel':
if self.arch in [ 'armel', 'armhf' ]:
if not os.path.exists(self.QEMU_ARM):
raise OnlRfsError("%s is missing." % self.QEMU_ARM)
@@ -378,7 +378,7 @@ class OnlRfsBuilder(object):
def dpkg_configure(self, dir_):
if self.arch == 'powerpc':
onlu.execute('sudo cp %s %s' % (self.QEMU_PPC, os.path.join(dir_, 'usr/bin')))
if self.arch == 'armel':
if self.arch in [ 'armel', 'armhf' ]:
onlu.execute('sudo cp %s %s' % (self.QEMU_ARM, os.path.join(dir_, 'usr/bin')))
if self.arch == 'arm64':
onlu.execute('sudo cp %s %s' % (self.QEMU_ARM64, os.path.join(dir_, 'usr/bin')))