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

@@ -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')))