Kerge Official Source
This commit is contained in:
commit
e7bc8c2181
112
package/boot/arm-trusted-firmware-mvebu/Makefile
Normal file
112
package/boot/arm-trusted-firmware-mvebu/Makefile
Normal file
@ -0,0 +1,112 @@
|
||||
#
|
||||
# Copyright (C) 2019 Sartura Ltd.
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=arm-trusted-firmware-mvebu
|
||||
PKG_VERSION:=2.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_RELEASE).tar.xz
|
||||
PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
|
||||
PKG_SOURCE_DATE:=2019-10-22
|
||||
PKG_SOURCE_VERSION:=a04808c16cfc126d9fe572ae7c4b5a3d39de5796
|
||||
PKG_MIRROR_HASH:=ff93aad67227ca96db54e92288f61b4ff3abbaad291fc88ad95c29cd3dd3588c
|
||||
|
||||
PKG_MAINTAINER:=Vladimir Vid <vladimir.vid@sartura.hr>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/arm-trusted-firmware-mvebu
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=ARM Trusted Firmware for mvebu devices
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-mvebu/uDPU
|
||||
$(call Package/arm-trusted-firmware-mvebu)
|
||||
BOARDNAME:=uDPU
|
||||
TITLE:=ARM Trusted Firmware for Methode uDPU
|
||||
DEPENDS:=+u-boot-uDPU
|
||||
UBOOT:=uDPU
|
||||
CLOCKSPRESET:=CPU_1000_DDR_800
|
||||
PLAT:=a3700
|
||||
endef
|
||||
|
||||
A3700_UTILS_NAME:=a3700-utils
|
||||
A3700_UTILS_RELEASE:=18.12.1
|
||||
A3700_UTILS_SOURCE=$(A3700_UTILS_NAME)-$(A3700_UTILS_RELEASE).tar.bz2
|
||||
|
||||
define Download/a3700-utils
|
||||
FILE:=$(A3700_UTILS_SOURCE)
|
||||
PROTO:=git
|
||||
URL:=https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell.git
|
||||
VERSION:=e6bb176fb9936d9160e53ae09275000dc6440686
|
||||
MIRROR_HASH:=c3edf71cbf1fc2e5482d36e36a34c79d682d2c87fdfb909b4dc6327a171e7bd4
|
||||
SUBDIR:=$(A3700_UTILS_NAME)
|
||||
endef
|
||||
|
||||
MV_DDR_NAME:=mv-ddr-marvell
|
||||
MV_DDR_RELEASE:=mainline
|
||||
MV_DDR_SOURCE:=$(MV_DDR_NAME)-$(MV_DDR_RELEASE).tar.bz2
|
||||
|
||||
define Download/mv-ddr-marvell
|
||||
FILE:=$(MV_DDR_SOURCE)
|
||||
PROTO:=git
|
||||
URL:=https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git
|
||||
VERSION:=a881467ef0f0185e6570dd0483023fde93cbb5f5
|
||||
MIRROR_HASH:=19f34817616c583b2b5f2612705857cf2120f6c2132355217899b1403c3fd336
|
||||
SUBDIR:=$(MV_DDR_NAME)
|
||||
endef
|
||||
|
||||
LINARO_NAME:=gcc-linaro
|
||||
LINARO_RELEASE:=6
|
||||
LINARO_VERSION:=5.0-2018.12-$(HOST_ARCH)_arm-linux-gnueabi
|
||||
LINARO_SOURCE=$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION).tar.xz
|
||||
|
||||
define Download/gcc-linaro
|
||||
FILE:=$(LINARO_SOURCE)
|
||||
URL:=https://releases.linaro.org/components/toolchain/binaries/latest-$(LINARO_RELEASE)/arm-linux-gnueabi/
|
||||
HASH:=2d4a92d6c8b384ae404b2e02c1c412e3ec18f9b714135acf046b2b1b510e9ace
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
# Download sources
|
||||
$(eval $(call Download,a3700-utils))
|
||||
$(eval $(call Download,mv-ddr-marvell))
|
||||
$(eval $(call Download,gcc-linaro))
|
||||
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
$(TAR) -C $(BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE)
|
||||
|
||||
mkdir -p $(STAGING_DIR_IMAGE)
|
||||
$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(A3700_UTILS_SOURCE)
|
||||
$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(MV_DDR_SOURCE)
|
||||
$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(LINARO_SOURCE)
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS = ""
|
||||
|
||||
MAKE_VARS= \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)"
|
||||
|
||||
MAKE_FLAGS = \
|
||||
CROSS_CM3=$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)/bin/arm-linux-gnueabi- \
|
||||
BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
|
||||
MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
|
||||
WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
|
||||
CLOCKSPRESET=$(CLOCKSPRESET) \
|
||||
PLAT=$(PLAT) \
|
||||
all \
|
||||
fip
|
||||
|
||||
define Build/InstallDev
|
||||
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/flash-image.bin $(BIN_DIR)/u-boot-$(BOARDNAME)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-mvebu/uDPU))
|
||||
@ -29,8 +29,15 @@ define U-Boot/clearfog
|
||||
UBOOT_IMAGE:=u-boot-spl.kwb
|
||||
endef
|
||||
|
||||
define U-Boot/uDPU
|
||||
NAME:=Methode uDPU
|
||||
BUILD_DEVICES:=methode_udpu
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS:= \
|
||||
clearfog
|
||||
clearfog \
|
||||
uDPU
|
||||
|
||||
Build/Exports:=$(Host/Exports)
|
||||
|
||||
@ -44,7 +51,7 @@ endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-spl.kwb
|
||||
$(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
Increase max gunzip size in mvebu_armada-37xx.h.
|
||||
This is required in order to boot itb images.
|
||||
|
||||
--- a/include/configs/mvebu_armada-37xx.h
|
||||
+++ b/include/configs/mvebu_armada-37xx.h
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* additions for new ARM relocation support */
|
||||
#define CONFIG_SYS_SDRAM_BASE 0x00000000
|
||||
+#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
|
||||
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
From 651e39dee8605995b736b6056c6f7dc5c5a9c948 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Thu, 22 Aug 2019 21:46:27 +0200
|
||||
Subject: [PATCH] regdb: fix compatibility with python2
|
||||
|
||||
Various changes in the commit mentioned below broke
|
||||
compatibility with python2. Restore it in a way that
|
||||
makes it worth with both versions.
|
||||
|
||||
Fixes: f3c4969c2485 ("wireless-regdb: make scripts compatible with Python 3")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
|
||||
---
|
||||
db2bin.py | 2 +-
|
||||
db2fw.py | 2 +-
|
||||
dbparse.py | 3 +--
|
||||
3 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/db2bin.py
|
||||
+++ b/db2bin.py
|
||||
@@ -118,7 +118,7 @@ reg_country_ptr.set()
|
||||
for alpha2 in countrynames:
|
||||
coll = countries[alpha2]
|
||||
# struct regdb_file_reg_country
|
||||
- output.write(struct.pack('>BBxBI', alpha2[0], alpha2[1], coll.dfs_region, reg_rules_collections[coll.permissions]))
|
||||
+ output.write(struct.pack('>2sxBI', alpha2, coll.dfs_region, reg_rules_collections[coll.permissions]))
|
||||
|
||||
|
||||
if len(sys.argv) > 3:
|
||||
--- a/db2fw.py
|
||||
+++ b/db2fw.py
|
||||
@@ -85,7 +85,7 @@ countrynames = list(countries)
|
||||
countrynames.sort()
|
||||
for alpha2 in countrynames:
|
||||
coll = countries[alpha2]
|
||||
- output.write(struct.pack('>BB', alpha2[0], alpha2[1]))
|
||||
+ output.write(struct.pack('>2s', alpha2))
|
||||
country_ptrs[alpha2] = PTR(output)
|
||||
output.write(b'\x00' * 4)
|
||||
|
||||
--- a/dbparse.py
|
||||
+++ b/dbparse.py
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
-from builtins import bytes
|
||||
from functools import total_ordering
|
||||
import sys, math
|
||||
from math import ceil, log
|
||||
@@ -359,7 +358,7 @@ class DBParser(object):
|
||||
for cname in cnames:
|
||||
if len(cname) != 2:
|
||||
self._warn("country '%s' not alpha2" % cname)
|
||||
- cname = bytes(cname, 'ascii')
|
||||
+ cname = cname.encode('ascii')
|
||||
if not cname in self._countries:
|
||||
self._countries[cname] = Country(dfs_region, comments=self._comments)
|
||||
self._current_countries[cname] = self._countries[cname]
|
||||
@ -56,7 +56,7 @@ endef
|
||||
|
||||
define Device/ubnt-xm
|
||||
$(Device/ubnt)
|
||||
DEVICE_PACKAGES += kmod-usb-ohci rssileds
|
||||
DEVICE_PACKAGES += kmod-usb-ohci
|
||||
UBNT_TYPE := XM
|
||||
UBNT_CHIP := ar7240
|
||||
KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma | uImage lzma
|
||||
@ -64,7 +64,6 @@ endef
|
||||
|
||||
define Device/ubnt-xw
|
||||
$(Device/ubnt)
|
||||
DEVICE_PACKAGES += rssileds
|
||||
UBNT_TYPE := XW
|
||||
UBNT_CHIP := ar934x
|
||||
UBNT_VERSION := 6.0.4
|
||||
@ -94,6 +93,7 @@ TARGET_DEVICES += ubnt-airrouter
|
||||
define Device/ubnt-bullet-m
|
||||
$(Device/ubnt-xm)
|
||||
DEVICE_TITLE := Ubiquiti Bullet-M
|
||||
DEVICE_PACKAGES += rssileds
|
||||
BOARDNAME := UBNT-BM
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-bullet-m
|
||||
@ -101,6 +101,7 @@ TARGET_DEVICES += ubnt-bullet-m
|
||||
define Device/ubnt-rocket-m
|
||||
$(Device/ubnt-xm)
|
||||
DEVICE_TITLE := Ubiquiti Rocket-M
|
||||
DEVICE_PACKAGES += rssileds
|
||||
BOARDNAME := UBNT-RM
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-rocket-m
|
||||
@ -108,6 +109,7 @@ TARGET_DEVICES += ubnt-rocket-m
|
||||
define Device/ubnt-nano-m
|
||||
$(Device/ubnt-xm)
|
||||
DEVICE_TITLE := Ubiquiti Nano-M
|
||||
DEVICE_PACKAGES += rssileds
|
||||
BOARDNAME := UBNT-NM
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-nano-m
|
||||
@ -176,6 +178,7 @@ TARGET_DEVICES += ubnt-unifi-outdoor
|
||||
define Device/ubnt-nano-m-xw
|
||||
$(Device/ubnt-xw)
|
||||
DEVICE_TITLE := Ubiquiti Nano M XW
|
||||
DEVICE_PACKAGES += rssileds
|
||||
BOARDNAME := UBNT-NM-XW
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-nano-m-xw
|
||||
@ -190,6 +193,7 @@ TARGET_DEVICES += ubnt-lbe-m5
|
||||
define Device/ubnt-loco-m-xw
|
||||
$(Device/ubnt-xw)
|
||||
DEVICE_TITLE := Ubiquiti Loco XW
|
||||
DEVICE_PACKAGES += rssileds
|
||||
BOARDNAME := UBNT-LOCO-XW
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-loco-m-xw
|
||||
@ -197,6 +201,7 @@ TARGET_DEVICES += ubnt-loco-m-xw
|
||||
define Device/ubnt-bullet-m-xw
|
||||
$(Device/ubnt-xw)
|
||||
DEVICE_TITLE := Ubiquiti Bullet-M XW
|
||||
DEVICE_PACKAGES += rssileds
|
||||
BOARDNAME := UBNT-BM-XW
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-bullet-m-xw
|
||||
@ -204,6 +209,7 @@ TARGET_DEVICES += ubnt-bullet-m-xw
|
||||
define Device/ubnt-rocket-m-xw
|
||||
$(Device/ubnt-xw)
|
||||
DEVICE_TITLE := Ubiquiti Rocket M XW
|
||||
DEVICE_PACKAGES += rssileds
|
||||
BOARDNAME := UBNT-RM-XW
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-rocket-m-xw
|
||||
|
||||
@ -52,6 +52,12 @@ tplink,wbs210-v2)
|
||||
ubnt,nanostation-ac)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3"
|
||||
;;
|
||||
ubnt,nanostation-m)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
|
||||
;;
|
||||
ubnt,nanostation-m-xw)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
|
||||
;;
|
||||
ubnt,acb-isp)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11"
|
||||
;;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user