Add arm64 support for initrds and buildroot

This commit is contained in:
Shengzhou Liu
2016-07-06 00:36:41 +08:00
parent 1ed3041b9d
commit 479247cf7c
16 changed files with 1221 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ fi
#
msg_info "Configuring Interfaces"
if ! ifup; then
if ! /bin/ifup; then
msg_error "The network settings indicated in the boot-config could not be applied."
echo $(cat /etc/onl/NET)
echo

View File

@@ -140,6 +140,9 @@ case $(uname -m) in
armv7l)
ARCH_LIST="armel"
;;
aarch64)
ARCH_LIST="arm64"
;;
*)
q;;
esac

View File

@@ -117,7 +117,7 @@ if __name__ == '__main__':
arch = platform.machine()
klass = None
if arch in [ 'ppc', 'armv7l' ]:
if arch in [ 'ppc', 'armv7l', 'aarch64', 'arm64' ]:
klass = Loader_Upgrade_FIT
elif arch == 'x86_64':
klass = Loader_Upgrade_x86_64

View File

@@ -2,3 +2,4 @@
buildroot-powerpc
buildroot-x86_64
buildroot-arm
buildroot-arm64

View File

@@ -16,7 +16,7 @@ include $(ONL)/make/config.mk
#
# We build for these architectures
#
ARCHS := powerpc x86_64 arm
ARCHS := powerpc x86_64 arm arm64
BUILDROOT_ARCHDIRS := $(foreach a,$(ARCHS),buildroot-$(a))
BUILDROOT_SOURCE := buildroot-mirror
@@ -32,7 +32,10 @@ setup: setup-pyroute2 setup-dnspython setup-libyaml setup-pyyaml setup-jq setup-
cp $(wildcard patches/busybox*.patch) $(BUILDROOT_SOURCE)/package/busybox/
cp $(wildcard patches/kexec*.patch) $(BUILDROOT_SOURCE)/package/kexec/
cp $(wildcard patches/openssl*.patch) $(BUILDROOT_SOURCE)/package/openssl/
rm $(BUILDROOT_SOURCE)/package/openssl/openssl-do-not-build-docs.patch
rm -f $(BUILDROOT_SOURCE)/package/openssl/openssl-do-not-build-docs.patch
ifeq ($(BUILDROOT_ARCH),arm64)
cp $(wildcard patches/uboot*.patch) $(BUILDROOT_SOURCE)/package/uboot-tools/
endif
sed -i 's%^DOSFSTOOLS_SITE =.*%DOSFSTOOLS_SITE = http://downloads.openwrt.org/sources%' $(BUILDROOT_SOURCE)/package/dosfstools/dosfstools.mk
sed -i 's%^UEMACS_SITE =.*%UEMACS_SITE = http://www.kernel.org/pub/linux/kernel/uemacs%;s%^UEMACS_SOURCE =.*%UEMACS_SOURCE = em-$$(UEMACS_VERSION).tar.gz%' $(BUILDROOT_SOURCE)/package/uemacs/uemacs.mk
mkdir -p $(BUILDROOT_ARCHDIRS)
@@ -65,6 +68,7 @@ setup-pyyaml:
cp patches/python-yaml.Config.in $(BUILDROOT_SOURCE)/package/python-yaml/Config.in
sed -i '/[/]python-yaml[/]/d' $(BUILDROOT_SOURCE)/package/Config.in
sed -i '/[/]python-setuptools[/]/a\source "package/python-yaml/Config.in"' $(BUILDROOT_SOURCE)/package/Config.in
sed -i 's/pyyaml\//pyyaml/g' $(BUILDROOT_SOURCE)/package/python-yaml/python-yaml.mk
setup-libyaml:
sed -i.bak -e '/LIBYAML_INSTALL_TARGET/d' $(BUILDROOT_SOURCE)/package/libyaml/libyaml.mk

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
From 0cbe6513c200e006061d1573228b970c42d0f414 Mon Sep 17 00:00:00 2001
From: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Date: Tue, 26 Jul 2016 00:07:01 +0800
Subject: [PATCH] fix error unknown type name u8 for arm64 arch
---
include/aes.h | 1 +
1 file changed, 1 insertion(+)
diff -Nura u-boot-2013.01.orig/include/aes.h u-boot-2013.01/include/aes.h
--- u-boot-2013.01.orig/include/aes.h
+++ u-boot-2013.01/include/aes.h
@@ -24,6 +24,7 @@
#ifndef _AES_REF_H_
#define _AES_REF_H_
+typedef unsigned char u8;
/*
* AES encryption library, with small code size, supporting only 128-bit AES
*
--
1.9.1

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1 @@
!include $ONL/packages/base/any/initrds/buildroot/APKG.yml ARCH=arm64

View File

@@ -0,0 +1 @@
makedevs

View File

@@ -0,0 +1,28 @@
# -*- Makefile -*-
############################################################
# <bsn.cl fy=2016 v=onl>
#
# Copyright 2013, 2014 Big Switch Networks, Inc.
# Copyright 2016 NXP Semiconductor, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.eclipse.org/legal/epl-v10.html
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the
# License.
#
# </bsn.cl>
############################################################
#
#
############################################################
include $(ONL)/make/config.arm64.mk
export BUILDROOT_ARCH := arm64
include $(ONL)/packages/base/any/initrds/buildroot/Makefile.any

View File

@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk

View File

@@ -0,0 +1 @@
!include $ONL/packages/base/any/initrds/loader/APKG.yml ARCH=arm64

View File

@@ -0,0 +1,3 @@
loader-rootfs
buildroot-makedevs
manifest.json

View File

@@ -0,0 +1,2 @@
include $(ONL)/make/config.arm64.mk
include $(ONL)/packages/base/any/initrds/loader/builds/Makefile