Merge Official Source
This commit is contained in:
commit
a96fc1036e
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,3 +28,4 @@ TAGS*~
|
||||
git-src
|
||||
.project
|
||||
.cproject
|
||||
.ccache
|
||||
|
8
Makefile
8
Makefile
@ -62,6 +62,11 @@ dirclean: clean
|
||||
rm -rf $(TMP_DIR)
|
||||
$(MAKE) -C $(TOPDIR)/scripts/config clean
|
||||
|
||||
cacheclean:
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
rm -rf $(if $(call qstrip,$(CONFIG_CCACHE_DIR)),$(call qstrip,$(CONFIG_CCACHE_DIR)),$(TOPDIR)/.ccache)
|
||||
endif
|
||||
|
||||
ifndef DUMP_TARGET_DB
|
||||
$(BUILD_DIR)/.prepared: Makefile
|
||||
@mkdir -p $$(dirname $@)
|
||||
@ -119,6 +124,9 @@ world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-
|
||||
$(_SINGLE)$(SUBMAKE) -r package/index
|
||||
$(_SINGLE)$(SUBMAKE) -r json_overview_image_info
|
||||
$(_SINGLE)$(SUBMAKE) -r checksum
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
$(STAGING_DIR_HOST)/bin/ccache -s
|
||||
endif
|
||||
|
||||
.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean
|
||||
|
||||
|
@ -69,6 +69,13 @@ menuconfig DEVEL
|
||||
help
|
||||
Compiler cache; see https://ccache.samba.org/
|
||||
|
||||
config CCACHE_DIR
|
||||
string "Set ccache directory" if CCACHE
|
||||
default ""
|
||||
help
|
||||
Store ccache in this directory.
|
||||
If not set, uses './.ccache'
|
||||
|
||||
config EXTERNAL_KERNEL_TREE
|
||||
string "Use external kernel tree" if DEVEL
|
||||
default ""
|
||||
|
@ -132,7 +132,9 @@ define Host/Exports/Default
|
||||
$(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
|
||||
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
||||
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache)
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_BASEDIR:=$(TOPDIR))
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_DIR:=$(if $(call qstrip,$(CONFIG_CCACHE_DIR)),$(call qstrip,$(CONFIG_CCACHE_DIR)),$(TOPDIR)/.ccache))
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_COMPILERCHECK:=%compiler% -dumpmachine; %compiler% -dumpversion)
|
||||
$(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
|
||||
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
|
||||
endef
|
||||
|
@ -8,11 +8,11 @@ endif
|
||||
|
||||
LINUX_VERSION-4.14 = .187
|
||||
LINUX_VERSION-4.19 = .131
|
||||
LINUX_VERSION-5.4 = .50
|
||||
LINUX_VERSION-5.4 = .51
|
||||
|
||||
LINUX_KERNEL_HASH-4.14.187 = 5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd
|
||||
LINUX_KERNEL_HASH-4.19.131 = 19dfb9f6cc4ba30104b65dcce7d78240a4ae188cb366747d5f8eae35e98964ba
|
||||
LINUX_KERNEL_HASH-5.4.50 = ad10f4c1e900f4e3eb4903b65dbcb4ca74250de63aa9fa7105b9b3c3f9a8a6e2
|
||||
LINUX_KERNEL_HASH-5.4.51 = 9e8bea8b4cd636726b7e495a3b467c8ffe96f8eddc159a45fe4a7e6e07a2069d
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
@ -18,6 +18,18 @@ IPKG_REMOVE:= \
|
||||
|
||||
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
|
||||
|
||||
# Generates a make statement to return a wildcard for candidate ipkg files
|
||||
# 1: package name
|
||||
define gen_ipkg_wildcard
|
||||
$(1)$$(if $$(filter -%,$$(ABIV_$(1))),,[^a-z-])*
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
# 2: candidate ipk files
|
||||
define remove_ipkg_files
|
||||
$(if $(strip $(2)),$(IPKG_REMOVE) $(1) $(2))
|
||||
endef
|
||||
|
||||
# 1: package name
|
||||
# 2: variable name
|
||||
# 3: variable suffix
|
||||
@ -185,7 +197,8 @@ $(_endef)
|
||||
$$(IPKG_$(1)) : export DESCRIPTION=$$(Package/$(1)/description)
|
||||
$$(IPKG_$(1)) : export PATH=$$(TARGET_PATH_PKG)
|
||||
$(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
|
||||
@rm -rf $$(IDIR_$(1)) $$(if $$(call opkg_package_files,$(1)*),; $$(IPKG_REMOVE) $(1) $$(call opkg_package_files,$(1)*))
|
||||
@rm -rf $$(IDIR_$(1)); \
|
||||
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
|
||||
mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
|
||||
$(call Package/$(1)/install,$$(IDIR_$(1)))
|
||||
$(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
|
||||
@ -253,7 +266,7 @@ $(_endef)
|
||||
@[ -f $$(IPKG_$(1)) ]
|
||||
|
||||
$(1)-clean:
|
||||
$$(if $$(call opkg_package_files,$(1)*),$$(IPKG_REMOVE) $(1) $$(call opkg_package_files,$(1)*))
|
||||
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
|
||||
|
||||
clean: $(1)-clean
|
||||
|
||||
|
@ -173,7 +173,9 @@ define Build/Exports/Default
|
||||
$(1) : export CONFIG_SITE:=$$(CONFIG_SITE)
|
||||
$(1) : export PKG_CONFIG_PATH:=$$(PKG_CONFIG_PATH)
|
||||
$(1) : export PKG_CONFIG_LIBDIR:=$$(PKG_CONFIG_PATH)
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_DIR:=$(STAGING_DIR)/ccache)
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_BASEDIR:=$(TOPDIR))
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_DIR:=$(if $(call qstrip,$(CONFIG_CCACHE_DIR)),$(call qstrip,$(CONFIG_CCACHE_DIR)),$(TOPDIR)/.ccache))
|
||||
$(if $(CONFIG_CCACHE),$(1) : export CCACHE_COMPILERCHECK:=%compiler% -dumpmachine; %compiler% -dumpversion)
|
||||
endef
|
||||
Build/Exports=$(Build/Exports/Default)
|
||||
|
||||
|
@ -262,7 +262,7 @@ package/symlinks-clean:
|
||||
help:
|
||||
cat README
|
||||
|
||||
distclean:
|
||||
distclean: cacheclean
|
||||
rm -rf bin build_dir .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp
|
||||
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean
|
||||
|
||||
|
@ -5,7 +5,7 @@ CFG=$1
|
||||
[ -n "$CFG" ] || CFG=/etc/board.json
|
||||
|
||||
[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
|
||||
for a in `ls /etc/board.d/*`; do
|
||||
for a in $(ls /etc/board.d/*); do
|
||||
[ -x $a ] || continue;
|
||||
$(. $a)
|
||||
done
|
||||
|
@ -1,6 +1,6 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do
|
||||
for file in $(grep -sl Require-User /usr/lib/opkg/info/*.control); do
|
||||
file="${file##*/}"
|
||||
file="${file%.control}"
|
||||
add_group_and_user "${file}"
|
||||
|
@ -176,7 +176,7 @@ default_prerm() {
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
local shell="$(which bash)"
|
||||
local shell="$(command -v bash)"
|
||||
for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
|
||||
if [ -n "$root" ]; then
|
||||
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" disable
|
||||
@ -264,7 +264,7 @@ default_postinst() {
|
||||
rm -f /tmp/luci-indexcache
|
||||
fi
|
||||
|
||||
local shell="$(which bash)"
|
||||
local shell="$(command -v bash)"
|
||||
for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do
|
||||
if [ -n "$root" ]; then
|
||||
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" enable
|
||||
|
@ -91,7 +91,7 @@ failsafe_wait() {
|
||||
grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
|
||||
if [ "$FAILSAFE" != "true" ]; then
|
||||
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
|
||||
[ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
|
||||
[ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "$(cat /tmp/failsafe_button)" was pressed -"
|
||||
[ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
|
||||
fi
|
||||
}
|
||||
|
@ -72,14 +72,14 @@ while [ "$1" ]; do
|
||||
fi
|
||||
[ $QUIET = yes ] || echo " * Checking package $1:"
|
||||
ERR=""
|
||||
CHECK="`sha256sum -c /usr/lib/opkg/info/$1.files-sha256sum 2> /dev/null`"
|
||||
CHECK="$(sha256sum -c /usr/lib/opkg/info/$1.files-sha256sum 2> /dev/null)"
|
||||
|
||||
# Are the changed files config files?
|
||||
if [ $? -ne 0 ] && [ "`cat "/usr/lib/opkg/info/$1.files-sha256sum"`" ]; then
|
||||
NEWCHECK="`echo "$CHECK" | grep '^.*: OK$'`"
|
||||
for i in `echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'`; do
|
||||
if [ "`grep "^$i\$" "/usr/lib/opkg/info/$1.conffiles" 2> /dev/null`" ] || \
|
||||
[ "`echo "$i" | grep "^/etc/uci-defaults/"`" ]; then
|
||||
if [ $? -ne 0 ] && [ "$(cat "/usr/lib/opkg/info/$1.files-sha256sum")" ]; then
|
||||
NEWCHECK="$(echo "$CHECK" | grep '^.*: OK$')"
|
||||
for i in $(echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'); do
|
||||
if [ "$(grep "^$i\$" "/usr/lib/opkg/info/$1.conffiles" 2> /dev/null)" ] || \
|
||||
[ "$(echo "$i" | grep "^/etc/uci-defaults/")" ]; then
|
||||
NEWCHECK="${NEWCHECK}${NL}${i}: CONFIGURED"
|
||||
else
|
||||
NEWCHECK="${NEWCHECK}${NL}${i}: FAILED"
|
||||
@ -91,7 +91,7 @@ while [ "$1" ]; do
|
||||
|
||||
# Do we have changed files or not?
|
||||
if [ -z "$ERR" ]; then
|
||||
[ $QUIET = yes ] || [ -z "`cat "/usr/lib/opkg/info/$1.files-sha256sum"`" ] || echo "$CHECK" | sed 's|^| - |'
|
||||
[ $QUIET = yes ] || [ ! -s "/usr/lib/opkg/info/$1.files-sha256sum" ] || echo "$CHECK" | sed 's|^| - |'
|
||||
[ $QUIET = yes ] || echo " * Package $1 is ok"
|
||||
[ $QUIET = yes ] || echo
|
||||
else
|
||||
@ -107,7 +107,7 @@ while [ "$1" ]; do
|
||||
echo "Exiting on first change found!"
|
||||
exit 1
|
||||
fi
|
||||
for i in `echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'`; do
|
||||
for i in $(echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'); do
|
||||
SUMMARY="${SUMMARY}${NL} - $1: $i"
|
||||
done
|
||||
echo
|
||||
|
@ -19,10 +19,6 @@ buffalo,bhr-4grv2|\
|
||||
devolo,magic-2-wifi|\
|
||||
engenius,ecb1750|\
|
||||
etactica,eg200|\
|
||||
glinet,gl-ar300m-lite|\
|
||||
glinet,gl-ar300m-nand|\
|
||||
glinet,gl-ar300m-nor|\
|
||||
glinet,gl-ar300m16|\
|
||||
glinet,gl-ar750s-nor|\
|
||||
glinet,gl-ar750s-nor-nand|\
|
||||
librerouter,librerouter-v1|\
|
||||
@ -52,6 +48,14 @@ domywifi,dw33d)
|
||||
glinet,gl-ar150)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
|
||||
;;
|
||||
glinet,gl-ar300m-lite|\
|
||||
glinet,gl-ar300m-nand|\
|
||||
glinet,gl-ar300m-nor|\
|
||||
glinet,gl-ar300m16)
|
||||
idx="$(find_mtd_index u-boot-env)"
|
||||
[ -n "$idx" ] && \
|
||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
netgear,wndr3700|\
|
||||
netgear,wndr3700-v2|\
|
||||
netgear,wndrmac-v1)
|
||||
|
@ -13,6 +13,7 @@ touch /etc/config/ubootenv
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
checkpoint,l-50|\
|
||||
cloudengines,pogoe02|\
|
||||
cloudengines,pogoplugv4|\
|
||||
iom,ix2-200|\
|
||||
|
@ -24,7 +24,8 @@ globalscale,espressobin|\
|
||||
globalscale,espressobin-emmc|\
|
||||
globalscale,espressobin-v7|\
|
||||
globalscale,espressobin-v7-emmc|\
|
||||
marvell,armada8040-mcbin)
|
||||
marvell,armada8040-mcbin-doubleshot|\
|
||||
marvell,armada8040-mcbin-singleshot)
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
|
||||
;;
|
||||
linksys,wrt1200ac|\
|
||||
|
@ -54,6 +54,11 @@ define U-Boot/iconnect_second_stage
|
||||
BUILD_DEVICES:=iom_iconnect-1.1
|
||||
endef
|
||||
|
||||
define U-Boot/l-50
|
||||
NAME:=CheckPoint L-50
|
||||
BUILD_DEVICES:=checkpoint_l-50
|
||||
endef
|
||||
|
||||
define U-Boot/nsa310
|
||||
NAME:=Zyxel NSA310
|
||||
BUILD_DEVICES:=zyxel_nsa310b
|
||||
@ -89,6 +94,7 @@ UBOOT_TARGETS := \
|
||||
goflexhome \
|
||||
ib62x0 ib62x0_second_stage \
|
||||
iconnect iconnect_second_stage \
|
||||
l-50 \
|
||||
nsa310 \
|
||||
nsa310s \
|
||||
nsa325 \
|
||||
|
@ -0,0 +1,928 @@
|
||||
From 742f780f62ace452b83e2463f1f1afdda4b724ea Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Sun, 26 Jan 2020 07:27:24 +0100
|
||||
Subject: [PATCH] arm: kirkwood: add CheckPoint L-50 device
|
||||
|
||||
This patch adds support for the Check Point L-50 from 600/1100 series
|
||||
routers.
|
||||
|
||||
Specification:
|
||||
-CPU: Marvell Kirkwood 88F6821 1200MHz
|
||||
-RAM: 512MB
|
||||
-Flash: NAND 512MB
|
||||
-WiFi: mPCIe card based on Atheros AR9287 b/g/n
|
||||
-WAN: 1 Gigabit Port (Marvell 88E1116R PHY)
|
||||
-LAN: 9 Gigabit Ports (2x Marvell 88E6171(5+4))
|
||||
-USB: 2x USB2.0
|
||||
-Express card slot
|
||||
-SD card slot
|
||||
-Serial console: RJ-45 115200 8n1
|
||||
-Unsupported DSL
|
||||
|
||||
Known limitations:
|
||||
- In board is used two switches in chain. Second Marvell is not used
|
||||
in u-Boot.
|
||||
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/kirkwood-l-50.dts | 439 +++++++++++++++++++++++++++++
|
||||
arch/arm/mach-kirkwood/Kconfig | 4 +
|
||||
board/checkpoint/l-50/Kconfig | 12 +
|
||||
board/checkpoint/l-50/MAINTAINERS | 6 +
|
||||
board/checkpoint/l-50/Makefile | 11 +
|
||||
board/checkpoint/l-50/kwbimage.cfg | 36 +++
|
||||
board/checkpoint/l-50/l-50.c | 172 +++++++++++
|
||||
board/checkpoint/l-50/l-50.h | 29 ++
|
||||
configs/l-50_defconfig | 59 ++++
|
||||
include/configs/l-50.h | 59 ++++
|
||||
11 files changed, 828 insertions(+)
|
||||
create mode 100644 arch/arm/dts/kirkwood-l-50.dts
|
||||
create mode 100644 board/checkpoint/l-50/Kconfig
|
||||
create mode 100644 board/checkpoint/l-50/MAINTAINERS
|
||||
create mode 100644 board/checkpoint/l-50/Makefile
|
||||
create mode 100644 board/checkpoint/l-50/kwbimage.cfg
|
||||
create mode 100644 board/checkpoint/l-50/l-50.c
|
||||
create mode 100644 board/checkpoint/l-50/l-50.h
|
||||
create mode 100644 configs/l-50_defconfig
|
||||
create mode 100644 include/configs/l-50.h
|
||||
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -51,6 +51,7 @@ dtb-$(CONFIG_KIRKWOOD) += \
|
||||
kirkwood-iconnect.dtb \
|
||||
kirkwood-is2.dtb \
|
||||
kirkwood-km_kirkwood.dtb \
|
||||
+ kirkwood-l-50.dtb \
|
||||
kirkwood-lsxhl.dtb \
|
||||
kirkwood-lschlv2.dtb \
|
||||
kirkwood-net2big.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/kirkwood-l-50.dts
|
||||
@@ -0,0 +1,439 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Check Point L-50 Board Description
|
||||
+ * Copyright 2020 Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "kirkwood.dtsi"
|
||||
+#include "kirkwood-6281.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Check Point L-50";
|
||||
+ compatible = "checkpoint,l-50", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200n8";
|
||||
+ stdout-path = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ ocp@f1000000 {
|
||||
+ pinctrl: pin-controller@10000 {
|
||||
+ pinctrl-0 = <&pmx_led38 &pmx_sysrst &pmx_button29>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ pmx_sysrst: pmx-sysrst {
|
||||
+ marvell,pins = "mpp6";
|
||||
+ marvell,function = "sysrst";
|
||||
+ };
|
||||
+
|
||||
+ pmx_button29: pmx_button29 {
|
||||
+ marvell,pins = "mpp29";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led38: pmx_led38 {
|
||||
+ marvell,pins = "mpp38";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_sdio_cd: pmx-sdio-cd {
|
||||
+ marvell,pins = "mpp46";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ serial@12000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ mvsdio@90000 {
|
||||
+ status = "okay";
|
||||
+ cd-gpios = <&gpio1 14 9>;
|
||||
+ };
|
||||
+
|
||||
+ i2c@11000 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <400000>;
|
||||
+
|
||||
+ gpio2: gpio-expander@20{
|
||||
+ #gpio-cells = <2>;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ compatible = "semtech,sx1505q";
|
||||
+ reg = <0x20>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ };
|
||||
+
|
||||
+ /* Three GPIOs from 0x21 exp. are undescribed in dts:
|
||||
+ * 1: DSL module reset (active low)
|
||||
+ * 5: mPCIE reset (active low)
|
||||
+ * 6: Express card reset (active low)
|
||||
+ */
|
||||
+ gpio3: gpio-expander@21{
|
||||
+ #gpio-cells = <2>;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ compatible = "semtech,sx1505q";
|
||||
+ reg = <0x21>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ };
|
||||
+
|
||||
+ rtc@30 {
|
||||
+ compatible = "s35390a";
|
||||
+ reg = <0x30>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status_green {
|
||||
+ label = "l-50:green:status";
|
||||
+ gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ status_red {
|
||||
+ label = "l-50:red:status";
|
||||
+ gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wifi {
|
||||
+ label = "l-50:green:wifi";
|
||||
+ gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "phy0tpt";
|
||||
+ };
|
||||
+
|
||||
+ internet_green {
|
||||
+ label = "l-50:green:internet";
|
||||
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ internet_red {
|
||||
+ label = "l-50:red:internet";
|
||||
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ usb1_green {
|
||||
+ label = "l-50:green:usb1";
|
||||
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ trigger-sources = <&hub_port3>;
|
||||
+ };
|
||||
+
|
||||
+ usb1_red {
|
||||
+ label = "l-50:red:usb1";
|
||||
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ usb2_green {
|
||||
+ label = "l-50:green:usb2";
|
||||
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ trigger-sources = <&hub_port1>;
|
||||
+ };
|
||||
+
|
||||
+ usb2_red {
|
||||
+ label = "l-50:red:usb2";
|
||||
+ gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb2_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb2_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio3 3 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ usb1_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb1_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio3 4 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ mpcie_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "mpcie_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ express_card_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "express_card_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ factory_defaults {
|
||||
+ label = "factory_defaults";
|
||||
+ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ethphy8: ethernet-phy@8 {
|
||||
+ reg = <0x08>;
|
||||
+ };
|
||||
+
|
||||
+ switch0: switch@10 {
|
||||
+ compatible = "marvell,mv88e6085";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x10>;
|
||||
+ dsa,member = <0 0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan5";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan6";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "lan7";
|
||||
+ };
|
||||
+
|
||||
+ switch0port5: port@5 {
|
||||
+ reg = <5>;
|
||||
+ phy-mode = "rgmii-txid";
|
||||
+ link = <&switch1port5>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <6>;
|
||||
+ label = "cpu";
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ ethernet = <ð1port>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ switch@11 {
|
||||
+ compatible = "marvell,mv88e6085";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x11>;
|
||||
+ dsa,member = <0 1>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan8";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "dmz";
|
||||
+ };
|
||||
+
|
||||
+ switch1port5: port@5 {
|
||||
+ reg = <5>;
|
||||
+ phy-mode = "rgmii-txid";
|
||||
+ link = <&switch0port5>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <6>;
|
||||
+ label = "dsl";
|
||||
+ fixed-link {
|
||||
+ speed = <100>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð0 {
|
||||
+ status = "okay";
|
||||
+ ethernet0-port@0 {
|
||||
+ phy-handle = <ðphy8>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð1 {
|
||||
+ status = "okay";
|
||||
+ ethernet1-port@0 {
|
||||
+ speed = <1000>;
|
||||
+ duplex = <1>;
|
||||
+ phy-handle = <&switch0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&nand {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&pmx_nand>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "u-boot";
|
||||
+ reg = <0x00000000 0x000c0000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@a0000 {
|
||||
+ label = "bootldr-env";
|
||||
+ reg = <0x000c0000 0x00040000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "kernel-1";
|
||||
+ reg = <0x00100000 0x00800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@900000 {
|
||||
+ label = "rootfs-1";
|
||||
+ reg = <0x00900000 0x07100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@7a00000 {
|
||||
+ label = "kernel-2";
|
||||
+ reg = <0x07a00000 0x00800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@8200000 {
|
||||
+ label = "rootfs-2";
|
||||
+ reg = <0x08200000 0x07100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@f300000 {
|
||||
+ label = "default_sw";
|
||||
+ reg = <0x0f300000 0x07900000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@16c00000 {
|
||||
+ label = "logs";
|
||||
+ reg = <0x16c00000 0x01800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18400000 {
|
||||
+ label = "preset_cfg";
|
||||
+ reg = <0x18400000 0x00100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18500000 {
|
||||
+ label = "adsl";
|
||||
+ reg = <0x18500000 0x00100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18600000 {
|
||||
+ label = "storage";
|
||||
+ reg = <0x18600000 0x07a00000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&rtc {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pciec {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sata_phy0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&sata_phy1 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usb0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port@1 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+
|
||||
+ hub_port1: port@1 {
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ hub_port3: port@3 {
|
||||
+ reg = <3>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/mach-kirkwood/Kconfig
|
||||
+++ b/arch/arm/mach-kirkwood/Kconfig
|
||||
@@ -74,6 +74,9 @@ config TARGET_DB_88F6281_BP
|
||||
config TARGET_NSA325
|
||||
bool "Zyxel NSA325 board"
|
||||
|
||||
+config TARGET_L50
|
||||
+ bool "Check Point L-50"
|
||||
+
|
||||
endchoice
|
||||
|
||||
config SYS_SOC
|
||||
@@ -102,5 +105,6 @@ source "board/zyxel/nsa325/Kconfig"
|
||||
source "board/alliedtelesis/SBx81LIFKW/Kconfig"
|
||||
source "board/alliedtelesis/SBx81LIFXCAT/Kconfig"
|
||||
source "board/Marvell/db-88f6281-bp/Kconfig"
|
||||
+source "board/checkpoint/l-50/Kconfig"
|
||||
|
||||
endif
|
||||
--- /dev/null
|
||||
+++ b/board/checkpoint/l-50/Kconfig
|
||||
@@ -0,0 +1,12 @@
|
||||
+if TARGET_L50
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "l-50"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "checkpoint"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "l-50"
|
||||
+
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/board/checkpoint/l-50/MAINTAINERS
|
||||
@@ -0,0 +1,6 @@
|
||||
+L50 BOARD
|
||||
+M: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+S: Maintained
|
||||
+F: board/checkpoint/l-50/
|
||||
+F: include/configs/l-50.h
|
||||
+F: configs/l-50_defconfig
|
||||
--- /dev/null
|
||||
+++ b/board/checkpoint/l-50/Makefile
|
||||
@@ -0,0 +1,11 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+# (C) Copyright 2020
|
||||
+# Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+#
|
||||
+# Based on Kirkwood support:
|
||||
+# (C) Copyright 2009
|
||||
+# Marvell Semiconductor <www.marvell.com>
|
||||
+# Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
+
|
||||
+obj-y := l-50.o
|
||||
--- /dev/null
|
||||
+++ b/board/checkpoint/l-50/kwbimage.cfg
|
||||
@@ -0,0 +1,36 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+# Values taken from original bootloader source.
|
||||
+# Based on:
|
||||
+# dramregs_seattle_400rd_A.txt from uboot_src_CP600_1100.
|
||||
+
|
||||
+# Boot Media configurations
|
||||
+BOOT_FROM nand
|
||||
+NAND_ECC_MODE default
|
||||
+NAND_PAGE_SIZE 0x0800
|
||||
+
|
||||
+DATA 0xFFD100e0 0x1b1b1b9b
|
||||
+DATA 0xFFD01400 0x43000c30
|
||||
+DATA 0xFFD01404 0x39543000
|
||||
+DATA 0xFFD01408 0x22125451
|
||||
+DATA 0xFFD0140C 0x00000833
|
||||
+DATA 0xFFD01410 0x000000cc
|
||||
+DATA 0xFFD01414 0x00000000
|
||||
+DATA 0xFFD01418 0x00000000
|
||||
+DATA 0xFFD0141C 0x00000C52
|
||||
+DATA 0xFFD01420 0x00000004
|
||||
+DATA 0xFFD01424 0x0000F17F
|
||||
+DATA 0xFFD01428 0x00085520
|
||||
+DATA 0xFFD0147C 0x00008552
|
||||
+DATA 0xFFD01504 0x0FFFFFF1
|
||||
+DATA 0xFFD01508 0x10000000
|
||||
+DATA 0xFFD0150C 0x0FFFFFF5
|
||||
+DATA 0xFFD01514 0x00000000
|
||||
+DATA 0xFFD0151C 0x00000000
|
||||
+DATA 0xFFD01494 0x00120012
|
||||
+DATA 0xFFD01498 0x00000000
|
||||
+DATA 0xFFD0149C 0x0000E40F
|
||||
+DATA 0xFFD01480 0x00000001
|
||||
+DATA 0xFFD20134 0x66666666
|
||||
+DATA 0xFFD20138 0x66666666
|
||||
+DATA 0x0 0x0
|
||||
--- /dev/null
|
||||
+++ b/board/checkpoint/l-50/l-50.c
|
||||
@@ -0,0 +1,172 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Copyright (C) 2020
|
||||
+ * Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+ *
|
||||
+ * Based on Kirkwood support:
|
||||
+ * (C) Copyright 2009
|
||||
+ * Marvell Semiconductor <www.marvell.com>
|
||||
+ * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
+#include <dm.h>
|
||||
+#include <i2c.h>
|
||||
+#include <miiphy.h>
|
||||
+#include <netdev.h>
|
||||
+#include <asm/arch/cpu.h>
|
||||
+#include <asm/arch/soc.h>
|
||||
+#include <asm/arch/mpp.h>
|
||||
+#include <asm/arch/gpio.h>
|
||||
+#include "l-50.h"
|
||||
+
|
||||
+DECLARE_GLOBAL_DATA_PTR;
|
||||
+
|
||||
+int board_early_init_f(void)
|
||||
+{
|
||||
+ /* Gpio configuration */
|
||||
+ mvebu_config_gpio(L50_OE_VAL_LOW, L50_OE_VAL_HIGH,
|
||||
+ L50_OE_LOW, L50_OE_HIGH);
|
||||
+
|
||||
+ /* Multi-Purpose Pins Functionality configuration */
|
||||
+ static const u32 kwmpp_config[] = {
|
||||
+ MPP0_NF_IO2,
|
||||
+ MPP1_NF_IO3,
|
||||
+ MPP2_NF_IO4,
|
||||
+ MPP3_NF_IO5,
|
||||
+ MPP4_NF_IO6,
|
||||
+ MPP5_NF_IO7,
|
||||
+ MPP6_SYSRST_OUTn,
|
||||
+ MPP7_SPI_SCn,
|
||||
+ MPP8_TW_SDA,
|
||||
+ MPP9_TW_SCK,
|
||||
+ MPP10_UART0_TXD,
|
||||
+ MPP11_UART0_RXD,
|
||||
+ MPP12_SD_CLK,
|
||||
+ MPP13_SD_CMD,
|
||||
+ MPP14_SD_D0,
|
||||
+ MPP15_SD_D1,
|
||||
+ MPP16_SD_D2,
|
||||
+ MPP17_SD_D3,
|
||||
+ MPP18_NF_IO0,
|
||||
+ MPP19_NF_IO1,
|
||||
+ MPP20_GE1_0,
|
||||
+ MPP21_GE1_1,
|
||||
+ MPP22_GE1_2,
|
||||
+ MPP23_GE1_3,
|
||||
+ MPP24_GE1_4,
|
||||
+ MPP25_GE1_5,
|
||||
+ MPP26_GE1_6,
|
||||
+ MPP27_GE1_7,
|
||||
+ MPP28_GPIO,
|
||||
+ MPP29_GPIO,
|
||||
+ MPP30_GE1_10,
|
||||
+ MPP31_GE1_11,
|
||||
+ MPP32_GE1_12,
|
||||
+ MPP33_GE1_13,
|
||||
+ MPP34_GPIO,
|
||||
+ MPP35_GPIO,
|
||||
+ MPP36_AUDIO_SPDIFI, /* value from stock u-boot */
|
||||
+ MPP37_GPIO,
|
||||
+ MPP38_GPIO,
|
||||
+ MPP39_TDM_SPI_CS0,
|
||||
+ MPP40_GPIO,
|
||||
+ MPP41_GPIO,
|
||||
+ MPP42_TDM_SPI_MOSI,
|
||||
+ MPP43_TDM_CODEC_INTn,
|
||||
+ MPP44_GPIO,
|
||||
+ MPP45_TDM_PCLK,
|
||||
+ MPP46_GPIO,
|
||||
+ MPP47_TDM_DRX,
|
||||
+ MPP48_GPIO,
|
||||
+ MPP49_GPIO,
|
||||
+ 0
|
||||
+ };
|
||||
+ kirkwood_mpp_conf(kwmpp_config, NULL);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void board_gpio_expander_init(void)
|
||||
+{
|
||||
+ struct udevice *dev0, *dev1;
|
||||
+ uchar data_buffer;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = i2c_get_chip_for_busnum(0, L50_GPIO0_I2C_ADDRESS, 1, &dev0);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot find I2C GPIO expander chip 0x02%X\n",
|
||||
+ __func__, L50_GPIO0_I2C_ADDRESS);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ret = i2c_get_chip_for_busnum(0, L50_GPIO1_I2C_ADDRESS, 1, &dev1);
|
||||
+ if (ret) {
|
||||
+ debug("%s: Cannot find I2C GPIO expander chip 0x02%X\n",
|
||||
+ __func__, L50_GPIO1_I2C_ADDRESS);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Set IO as output */
|
||||
+ data_buffer = 0x0;
|
||||
+ dm_i2c_write(dev0, 1, &data_buffer, 1);
|
||||
+ dm_i2c_write(dev1, 1, &data_buffer, 1);
|
||||
+
|
||||
+ /* Set all leds off, reset asserted, pwr off */
|
||||
+ data_buffer = 0xbf;
|
||||
+ dm_i2c_write(dev0, 0, &data_buffer, 1);
|
||||
+ data_buffer = 0x1c;
|
||||
+ dm_i2c_write(dev1, 0, &data_buffer, 1);
|
||||
+
|
||||
+ mdelay(100);
|
||||
+
|
||||
+ /* Set pwr on */
|
||||
+ data_buffer = 0xa5;
|
||||
+ dm_i2c_write(dev1, 0, &data_buffer, 1);
|
||||
+
|
||||
+ mdelay(100);
|
||||
+
|
||||
+ /* Set reset deasserted, status red led enabled*/
|
||||
+ data_buffer = 0xff;
|
||||
+ dm_i2c_write(dev0, 0, &data_buffer, 1);
|
||||
+ data_buffer = 0xe3;
|
||||
+ dm_i2c_write(dev1, 0, &data_buffer, 1);
|
||||
+}
|
||||
+
|
||||
+int board_init(void)
|
||||
+{
|
||||
+ /* Boot parameters address */
|
||||
+ gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
|
||||
+
|
||||
+ board_gpio_expander_init();
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_RESET_PHY_R
|
||||
+/* Configure and initialize PHY */
|
||||
+void reset_phy(void)
|
||||
+{
|
||||
+ u16 devadr;
|
||||
+ char *name = "ethernet-controller@72000";
|
||||
+
|
||||
+ if (miiphy_set_current_dev(name))
|
||||
+ return;
|
||||
+
|
||||
+ /* command to read PHY dev address */
|
||||
+ if (miiphy_read(name, 0xEE, 0xEE, (u16 *)&devadr)) {
|
||||
+ printf("Err..(%s) could not read PHY dev address\n", __func__);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Fix PHY led configuration
|
||||
+ */
|
||||
+ miiphy_write(name, devadr, MV88E1116_PGADR_REG, 3);
|
||||
+ miiphy_write(name, devadr, 0x10, 0x1177);
|
||||
+ miiphy_write(name, devadr, 0x11, 0x4417);
|
||||
+ miiphy_write(name, devadr, MV88E1116_PGADR_REG, 0);
|
||||
+
|
||||
+ debug("88E1116 Initialized on %s\n", name);
|
||||
+}
|
||||
+#endif /* CONFIG_RESET_PHY_R */
|
||||
--- /dev/null
|
||||
+++ b/board/checkpoint/l-50/l-50.h
|
||||
@@ -0,0 +1,29 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2020
|
||||
+ * Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+ *
|
||||
+ * Based on Kirkwood support:
|
||||
+ * (C) Copyright 2009
|
||||
+ * Marvell Semiconductor <www.marvell.com>
|
||||
+ * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
+ */
|
||||
+
|
||||
+#ifndef __L50_H
|
||||
+#define __L50_H
|
||||
+
|
||||
+/* GPIO configuration */
|
||||
+#define L50_OE_LOW 0x30000000
|
||||
+#define L50_OE_HIGH 0x0000004c
|
||||
+#define L50_OE_VAL_LOW 0x00000000
|
||||
+#define L50_OE_VAL_HIGH 0x00000000
|
||||
+
|
||||
+/* Expander GPIO addresses */
|
||||
+
|
||||
+#define L50_GPIO0_I2C_ADDRESS 0x20
|
||||
+#define L50_GPIO1_I2C_ADDRESS 0x21
|
||||
+
|
||||
+/* PHY register */
|
||||
+#define MV88E1116_PGADR_REG 22
|
||||
+
|
||||
+#endif /* __L50_H */
|
||||
--- /dev/null
|
||||
+++ b/configs/l-50_defconfig
|
||||
@@ -0,0 +1,59 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_DCACHE_OFF=y
|
||||
+CONFIG_ARCH_CPU_INIT=y
|
||||
+CONFIG_KIRKWOOD=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x600000
|
||||
+CONFIG_TARGET_L50=y
|
||||
+CONFIG_ENV_SIZE=0x20000
|
||||
+CONFIG_ENV_OFFSET=0xC0000
|
||||
+CONFIG_ENV_SECT_SIZE=0x20000
|
||||
+CONFIG_ENV_ADDR=0xC0000
|
||||
+CONFIG_IDENT_STRING="\nCheck Point L-50"
|
||||
+CONFIG_NR_DRAM_BANKS=2
|
||||
+# CONFIG_SYS_MALLOC_F is not set
|
||||
+CONFIG_BOOTDELAY=1
|
||||
+CONFIG_CONSOLE_MUX=y
|
||||
+CONFIG_DISPLAY_BOARDINFO=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+#CONFIG_CMD_IDE=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_MII=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_EXT2=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_JFFS2=y
|
||||
+CONFIG_CMD_MTDPARTS=y
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_MTD_RAW_NAND=y
|
||||
+CONFIG_MTDIDS_DEFAULT="nand0=orion_nand"
|
||||
+CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xc0000@0x0(u-boot)ro,0x40000@0xc0000(bootldr-env),0x7900000@0x100000(ubi),0x800000@0x7a00000(kernel-2),0x7100000@0x8200000(rootfs-2),0x7900000@0xf300000(default_sw),0x1800000@0x16c00000(logs),0x100000@0x18400000(preset_cfg),0x100000@0x18500000(adsl),-@0x18600000(storage)"
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_ISO_PARTITION=y
|
||||
+CONFIG_OF_CONTROL=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="kirkwood-l-50"
|
||||
+CONFIG_ENV_IS_IN_NAND=y
|
||||
+CONFIG_DM=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+#CONFIG_MVSATA_IDE=y
|
||||
+CONFIG_MMC=y
|
||||
+CONFIG_MVGBE=y
|
||||
+CONFIG_MII=y
|
||||
+CONFIG_PHYLIB=y
|
||||
+CONFIG_PHY_MARVELL=y
|
||||
+CONFIG_MV88E61XX_SWITCH=y
|
||||
+CONFIG_MV88E61XX_CPU_PORT=6
|
||||
+CONFIG_MV88E61XX_PHY_PORTS=0x01f
|
||||
+CONFIG_MV88E61XX_FIXED_PORTS=0
|
||||
+#CONFIG_DM_RTC=y
|
||||
+#CONFIG_RTC_MV=y
|
||||
+CONFIG_SYS_NS16550=y
|
||||
+CONFIG_DM_I2C=y
|
||||
+CONFIG_SYS_I2C_MVTWSI=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
--- /dev/null
|
||||
+++ b/include/configs/l-50.h
|
||||
@@ -0,0 +1,59 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2020
|
||||
+ * Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+ *
|
||||
+ * Based on Kirkwood support:
|
||||
+ * (C) Copyright 2009
|
||||
+ * Marvell Semiconductor <www.marvell.com>
|
||||
+ * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
+ */
|
||||
+
|
||||
+#ifndef _CONFIG_L50_H
|
||||
+#define _CONFIG_L50_H
|
||||
+
|
||||
+/*
|
||||
+ * High Level Configuration Options (easy to change)
|
||||
+ */
|
||||
+#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
|
||||
+#define CONFIG_KW88F6281 /* SOC Name */
|
||||
+#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
|
||||
+
|
||||
+/*
|
||||
+ * mv-common.h should be defined after CMD configs since it used them
|
||||
+ * to enable certain macros
|
||||
+ */
|
||||
+#include "mv-common.h"
|
||||
+
|
||||
+/* Remove or override few declarations from mv-common.h */
|
||||
+
|
||||
+/*
|
||||
+ * Ethernet Driver configuration
|
||||
+ */
|
||||
+#ifdef CONFIG_CMD_NET
|
||||
+#define CONFIG_MVGBE_PORTS {1, 1} /* enable port 0 only */
|
||||
+#define CONFIG_NETCONSOLE
|
||||
+#endif
|
||||
+
|
||||
+#define CONFIG_MV88E61XX_CPU_PORT_RX_DELAY
|
||||
+#define CONFIG_MV88E61XX_CPU_PORT_TX_DELAY
|
||||
+
|
||||
+/*
|
||||
+ * Enable GPI0 support
|
||||
+ */
|
||||
+#define CONFIG_KIRKWOOD_GPIO
|
||||
+
|
||||
+/*
|
||||
+ * Default environment variables
|
||||
+ */
|
||||
+#define CONFIG_BOOTCOMMAND \
|
||||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
+ "bootm 0x800000"
|
||||
+
|
||||
+#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
+ "bootargs=console=ttyS0,115200\0" \
|
||||
+ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
|
||||
+ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
|
||||
+ "bootargs_root=\0"
|
||||
+#endif /* _CONFIG_L50_H */
|
@ -1,8 +1,8 @@
|
||||
--- a/arch/arm/mach-kirkwood/Kconfig
|
||||
+++ b/arch/arm/mach-kirkwood/Kconfig
|
||||
@@ -103,4 +103,7 @@ source "board/alliedtelesis/SBx81LIFKW/K
|
||||
source "board/alliedtelesis/SBx81LIFXCAT/Kconfig"
|
||||
@@ -107,4 +107,7 @@ source "board/alliedtelesis/SBx81LIFXCAT
|
||||
source "board/Marvell/db-88f6281-bp/Kconfig"
|
||||
source "board/checkpoint/l-50/Kconfig"
|
||||
|
||||
+config SECOND_STAGE
|
||||
+ bool "OpenWrt second stage hack"
|
||||
@ -35,6 +35,17 @@
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_ICONNECT_H */
|
||||
--- a/include/configs/l-50.h
|
||||
+++ b/include/configs/l-50.h
|
||||
@@ -12,6 +12,8 @@
|
||||
#ifndef _CONFIG_L50_H
|
||||
#define _CONFIG_L50_H
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
/*
|
||||
* High Level Configuration Options (easy to change)
|
||||
*/
|
||||
--- /dev/null
|
||||
+++ b/include/configs/openwrt-kirkwood-common.h
|
||||
@@ -0,0 +1,31 @@
|
||||
@ -139,6 +150,17 @@
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/configs/l-50_defconfig
|
||||
+++ b/configs/l-50_defconfig
|
||||
@@ -57,3 +57,8 @@ CONFIG_SYS_I2C_MVTWSI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/configs/nsa310_defconfig
|
||||
+++ b/configs/nsa310_defconfig
|
||||
@@ -43,6 +43,9 @@ CONFIG_CMD_UBI=y
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 940e9a5828480e4185c9a276ad7f35a4069a2393 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Thu, 23 Jan 2020 22:04:15 +0100
|
||||
Subject: [PATCH 1/2] phy: mv88e61xx: add support for RGMII TX/RX delay
|
||||
|
||||
Clock delay in RGMII is required for some boards.
|
||||
This patch introduce CONFIG_MV88E61XX_CPU_PORT_TX_DELAY and
|
||||
CONFIG_MV88E61XX_CPU_PORT_RX_DELAY defines, which are setting
|
||||
proper bits in PORT_REG_PHYS_CTRL register.
|
||||
|
||||
Cc: Chris Packham <judge.packham@gmail.com>
|
||||
Cc: Joe Hershberger <joe.hershberger@ni.com>
|
||||
Cc: Anatolij Gustschin <agust@denx.de>
|
||||
Cc: Tim Harvey <tharvey@gateworks.com>
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
drivers/net/phy/mv88e61xx.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
|
||||
index 5aff7ed397..889327639d 100644
|
||||
--- a/drivers/net/phy/mv88e61xx.c
|
||||
+++ b/drivers/net/phy/mv88e61xx.c
|
||||
@@ -94,6 +94,8 @@
|
||||
#define PORT_REG_STATUS_CMODE_1000BASE_X 0x9
|
||||
#define PORT_REG_STATUS_CMODE_SGMII 0xa
|
||||
|
||||
+#define PORT_REG_PHYS_CTRL_RGMII_RX_DELAY BIT(15)
|
||||
+#define PORT_REG_PHYS_CTRL_RGMII_TX_DELAY BIT(14)
|
||||
#define PORT_REG_PHYS_CTRL_PCS_AN_EN BIT(10)
|
||||
#define PORT_REG_PHYS_CTRL_PCS_AN_RST BIT(9)
|
||||
#define PORT_REG_PHYS_CTRL_FC_VALUE BIT(7)
|
||||
@@ -747,9 +749,16 @@ static int mv88e61xx_fixed_port_setup(struct phy_device *phydev, u8 port)
|
||||
PORT_REG_PHYS_CTRL_SPD1000;
|
||||
}
|
||||
|
||||
- if (port == CONFIG_MV88E61XX_CPU_PORT)
|
||||
+ if (port == CONFIG_MV88E61XX_CPU_PORT) {
|
||||
val |= PORT_REG_PHYS_CTRL_LINK_VALUE |
|
||||
PORT_REG_PHYS_CTRL_LINK_FORCE;
|
||||
+#if defined(CONFIG_MV88E61XX_CPU_PORT_RX_DELAY)
|
||||
+ val |= PORT_REG_PHYS_CTRL_RGMII_RX_DELAY;
|
||||
+#endif
|
||||
+#if defined(CONFIG_MV88E61XX_CPU_PORT_TX_DELAY)
|
||||
+ val |= PORT_REG_PHYS_CTRL_RGMII_TX_DELAY;
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
return mv88e61xx_port_write(phydev, port, PORT_REG_PHYS_CTRL,
|
||||
val);
|
||||
--
|
||||
2.20.1
|
||||
|
@ -0,0 +1,67 @@
|
||||
From 7ffab66a99831ce5e3037b608d73565c9d1abd20 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Thu, 23 Jan 2020 22:09:51 +0100
|
||||
Subject: [PATCH 2/2] phy: mv88e61xx: add support for MV88E6171
|
||||
|
||||
This patch add MV88E6171 id to driver data.
|
||||
|
||||
Tested on Checkpoint L-50 board.
|
||||
|
||||
Cc: Chris Packham <judge.packham@gmail.com>
|
||||
Cc: Joe Hershberger <joe.hershberger@ni.com>
|
||||
Cc: Anatolij Gustschin <agust@denx.de>
|
||||
Cc: Tim Harvey <tharvey@gateworks.com>
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
drivers/net/phy/mv88e61xx.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
|
||||
index 889327639d..e0b648a54e 100644
|
||||
--- a/drivers/net/phy/mv88e61xx.c
|
||||
+++ b/drivers/net/phy/mv88e61xx.c
|
||||
@@ -180,6 +180,7 @@
|
||||
#define PORT_SWITCH_ID_6071 0x0710
|
||||
#define PORT_SWITCH_ID_6096 0x0980
|
||||
#define PORT_SWITCH_ID_6097 0x0990
|
||||
+#define PORT_SWITCH_ID_6171 0x1710
|
||||
#define PORT_SWITCH_ID_6172 0x1720
|
||||
#define PORT_SWITCH_ID_6176 0x1760
|
||||
#define PORT_SWITCH_ID_6220 0x2200
|
||||
@@ -997,6 +998,7 @@ static int mv88e61xx_probe(struct phy_device *phydev)
|
||||
switch (priv->id) {
|
||||
case PORT_SWITCH_ID_6096:
|
||||
case PORT_SWITCH_ID_6097:
|
||||
+ case PORT_SWITCH_ID_6171:
|
||||
case PORT_SWITCH_ID_6172:
|
||||
case PORT_SWITCH_ID_6176:
|
||||
case PORT_SWITCH_ID_6240:
|
||||
@@ -1152,6 +1154,17 @@ static struct phy_driver mv88e61xx_driver = {
|
||||
.shutdown = &genphy_shutdown,
|
||||
};
|
||||
|
||||
+static struct phy_driver mv88e617x_driver = {
|
||||
+ .name = "Marvell MV88E617x",
|
||||
+ .uid = 0x01410e70,
|
||||
+ .mask = 0xfffffff0,
|
||||
+ .features = PHY_GBIT_FEATURES,
|
||||
+ .probe = mv88e61xx_probe,
|
||||
+ .config = mv88e61xx_phy_config,
|
||||
+ .startup = mv88e61xx_phy_startup,
|
||||
+ .shutdown = &genphy_shutdown,
|
||||
+};
|
||||
+
|
||||
static struct phy_driver mv88e609x_driver = {
|
||||
.name = "Marvell MV88E609x",
|
||||
.uid = 0x1410c89,
|
||||
@@ -1177,6 +1190,7 @@ static struct phy_driver mv88e6071_driver = {
|
||||
int phy_mv88e61xx_init(void)
|
||||
{
|
||||
phy_register(&mv88e61xx_driver);
|
||||
+ phy_register(&mv88e617x_driver);
|
||||
phy_register(&mv88e609x_driver);
|
||||
phy_register(&mv88e6071_driver);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
@ -3,6 +3,6 @@ loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=ubi.mtd=8 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
|
||||
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware)
|
||||
bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot
|
||||
bootdelay=3
|
||||
|
@ -3,6 +3,6 @@ loadaddr=0x81000000
|
||||
fdt_high=0xffffffff
|
||||
initrd_high=0xffffffff
|
||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs) cma=64M@0x0-0xb0000000
|
||||
bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) cma=64M@0x0-0xb0000000
|
||||
bootcmd=echo starting openwrt ...;run nor_boot
|
||||
bootdelay=3
|
||||
|
@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs)
|
||||
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware)
|
||||
bootcmd=echo starting openwrt ...;run nor_boot
|
||||
bootdelay=3
|
||||
|
@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=ubi.mtd=9 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
|
||||
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware)
|
||||
bootcmd=echo starting openwrt ...;run qspi_boot
|
||||
bootdelay=3
|
||||
|
@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
mc_init=sf probe 0:0;sf read 80000000 a00000 300000;sf read 80300000 e00000 100000;fsl_mc start mc 80000000 80300000;sf read 80400000 d00000 100000;fsl_mc apply dpl 80400000
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=ubi.mtd=10 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(ubifs)
|
||||
bootargs=root=/dev/mtdblock10 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware)
|
||||
bootcmd=echo starting openwrt ...;run mc_init;run qspi_boot
|
||||
bootdelay=3
|
||||
|
@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
mc_init=fsl_mc start mc 580a00000 580e00000;fsl_mc apply dpl 580d00000
|
||||
nor_boot=cp.b 580f00000 $fdtaddr 100000;cp.b 581000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs)
|
||||
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware)
|
||||
bootcmd=echo starting openwrt ...;run mc_init;run nor_boot
|
||||
bootdelay=3
|
||||
|
92
package/ctcgfw/duktape/Makefile
Normal file
92
package/ctcgfw/duktape/Makefile
Normal file
@ -0,0 +1,92 @@
|
||||
#
|
||||
# Copyright (C) 2019 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=duktape
|
||||
PKG_VERSION:=2.99.99-65f1e02
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/svaarala/duktape.git
|
||||
PKG_SOURCE_VERSION:=65f1e02e580796929e92e91ba4776d4b0131beb5
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_DEPENDS:=python2
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/duktape
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
URL:=https://github.com/svaarala/duktape
|
||||
TITLE:=Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint.
|
||||
endef
|
||||
|
||||
define Package/libduktape
|
||||
$(call Package/duktape)
|
||||
SECTION:=lib
|
||||
CATEGORY:=Libraries
|
||||
TITLE+= (Libraries)
|
||||
VARIANT:=lib
|
||||
endef
|
||||
|
||||
define Package/duktape/description
|
||||
Duktape is easy to integrate into a C/C++ project: add duktape.c,
|
||||
duktape.h, and duk_config.h to your build, and use the Duktape API
|
||||
to call ECMAScript functions from C code and vice versa.
|
||||
endef
|
||||
|
||||
define Package/libduktape/description
|
||||
$(call Package/duktape/description)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
( \
|
||||
cd $(PKG_BUILD_DIR); \
|
||||
mkdir dist; \
|
||||
$(STAGING_DIR_HOSTPKG)/bin/pip2 install PyYAML; \
|
||||
$(STAGING_DIR_HOSTPKG)/bin/python2 util/dist.py; \
|
||||
cd dist/source/src; \
|
||||
$(TARGET_CC) -c -O3 -o duktape.o duktape.c; \
|
||||
$(TARGET_CC) -c -O3 -o duk_module_node.o -I. ../extras/module-node/duk_module_node.c; \
|
||||
$(TARGET_AR) cr libduktape.a duktape.o; \
|
||||
$(TARGET_AR) cr libduktape_module.a duk_module_node.o; \
|
||||
cd ../../../..; \
|
||||
env $(call Build/Compile/Default) \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dist/source/src/*.a $(1)/usr/lib/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dist/source/src/duk*.h $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dist/source/extras/module-node/duk_module_node.h $(1)/usr/include/
|
||||
endef
|
||||
|
||||
define Package/duktape/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build/duk $(1)/usr/bin/duk
|
||||
endef
|
||||
|
||||
define Package/libduktape/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dist/source/src/*.a $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,duktape))
|
||||
$(eval $(call BuildPackage,libduktape))
|
@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=subconverter
|
||||
PKG_VERSION:=0.5.2-8385792
|
||||
PKG_VERSION:=0.6.1-081b5ad
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/tindy2013/subconverter.git
|
||||
PKG_SOURCE_VERSION:=8385792fec9c07fb38b594b2dba285bff237ee3f
|
||||
PKG_SOURCE_VERSION:=081b5adb71f9dee918dc0a026d350efe6ff392b5
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
@ -26,7 +26,7 @@ PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=jpcre2 rapidjson
|
||||
PKG_BUILD_DEPENDS:=duktape jpcre2 rapidjson
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
@ -43,6 +43,8 @@ define Package/$(PKG_NAME)/description
|
||||
Utility to convert between various subscription format.
|
||||
endef
|
||||
|
||||
# CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/subconverter $(1)/usr/bin/subconverter
|
||||
|
9
package/firmware/linux-firmware/misc.mk
Normal file
9
package/firmware/linux-firmware/misc.mk
Normal file
@ -0,0 +1,9 @@
|
||||
Package/eip197-mini-firmware = $(call Package/firmware-default,Inside Secure EIP197 mini firmware)
|
||||
define Package/eip197-mini-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/inside-secure/eip197_minifw
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/inside-secure/eip197_minifw/ifpp.bin \
|
||||
$(PKG_BUILD_DIR)/inside-secure/eip197_minifw/ipue.bin \
|
||||
$(1)/lib/firmware/inside-secure/eip197_minifw
|
||||
endef
|
||||
$(eval $(call BuildPackage,eip197-mini-firmware))
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=drv_vmmc
|
||||
PKG_VERSION:=1.9.0
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_HASH:=707f515eb727c032418c4da67d7e86884bb56cdc2a606e8f6ded6057d8767e57
|
||||
@ -170,7 +170,7 @@ endef
|
||||
define KernelPackage/ltq-vmmc/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/$(FW_DIR)
|
||||
$(INSTALL_BIN) ./files/vmmc.init $(1)/etc/init.d/vmmc
|
||||
$(CP) $(PKG_BUILD_DIR)/firmware/$(FW_SOURCE) $(1)/$(FW_DIR)/$(FW_TARGET)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/firmware/$(FW_SOURCE) $(1)/$(FW_DIR)/$(FW_TARGET)
|
||||
ln -s /$(FW_DIR)/$(FW_TARGET) $(1)/$(FW_DIR)/$(FW_TARGET_GENERIC)
|
||||
$(CP) $(PKG_BUILD_DIR)/coef/$(COEF_SRC) $(1)/$(FW_DIR)/$(COEF_TARGET)
|
||||
$(CP) $(PKG_BUILD_DIR)/coef/$(COEF_SRC_FXO) $(1)/$(FW_DIR)/$(COEF_TARGET_FXO)
|
||||
|
@ -5,15 +5,9 @@
|
||||
START=31
|
||||
|
||||
start() {
|
||||
[ ! -c /dev/vmmc10 ] && {
|
||||
mknod /dev/vmmc10 c 122 10
|
||||
mknod /dev/vmmc11 c 122 11
|
||||
mknod /dev/vmmc12 c 122 12
|
||||
mknod /dev/vmmc13 c 122 13
|
||||
mknod /dev/vmmc14 c 122 14
|
||||
mknod /dev/vmmc15 c 122 15
|
||||
mknod /dev/vmmc16 c 122 16
|
||||
mknod /dev/vmmc17 c 122 17
|
||||
mknod /dev/vmmc18 c 122 18
|
||||
}
|
||||
for i in 10 11 12 13 14 15 16 17 18; do
|
||||
if ! [ -e /dev/vmmc$i ]; then
|
||||
mknod -m 664 /dev/vmmc$i c 122 $i
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -276,9 +276,9 @@ define KernelPackage/iscsi-initiator
|
||||
DEPENDS:=+kmod-scsi-core +kmod-crypto-hash
|
||||
KCONFIG:= \
|
||||
CONFIG_INET \
|
||||
CONFIG_SCSI_LOWLEVEL \
|
||||
CONFIG_SCSI_LOWLEVEL=y \
|
||||
CONFIG_ISCSI_TCP \
|
||||
CONFIG_SCSI_ISCSI_ATTRS
|
||||
CONFIG_SCSI_ISCSI_ATTRS=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/iscsi_tcp.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/libiscsi.ko \
|
||||
|
@ -377,7 +377,7 @@ $(eval $(call KernelPackage,crypto-hw-padlock))
|
||||
|
||||
define KernelPackage/crypto-hw-safexcel
|
||||
TITLE:= MVEBU SafeXcel Crypto Engine module
|
||||
DEPENDS:=@!LINUX_4_14 @(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72) \
|
||||
DEPENDS:=@!LINUX_4_14 @(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72) +eip197-mini-firmware \
|
||||
+kmod-crypto-authenc +kmod-crypto-md5 +kmod-crypto-hmac +kmod-crypto-sha256 +kmod-crypto-sha512
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_HW=y \
|
||||
@ -392,9 +392,11 @@ MVEBU's EIP97 and EIP197 Cryptographic Engine driver designed by
|
||||
Inside Secure. This is found on Marvell Armada 37xx/7k/8k SoCs.
|
||||
|
||||
Particular version of these IP (EIP197B and EIP197D) require firmware.
|
||||
Unfortunately it's not freely available and needs signed Non-Disclosure
|
||||
Agreement (NDA) with Marvell. For those who have signed NDA the firmware can be
|
||||
obtained at https://extranet.marvell.com.
|
||||
The mini firmware package provides limited functionality, for most operations
|
||||
a full-featured firmware is required. Unfortunately the "full" firmware is not
|
||||
freely available and needs signed Non-Disclosure Agreement (NDA) with Marvell.
|
||||
For those who have signed NDA the firmware can be obtained at
|
||||
https://extranet.marvell.com.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,crypto-hw-safexcel))
|
||||
|
@ -147,7 +147,6 @@ define KernelPackage/lib-lz4
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=LZ4 support
|
||||
DEPENDS:=+kmod-crypto-acompress
|
||||
HIDDEN:=1
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_LZ4 \
|
||||
CONFIG_LZ4_COMPRESS \
|
||||
|
@ -732,6 +732,23 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-rx8025))
|
||||
|
||||
define KernelPackage/rtc-s35390a
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Seico S-35390A
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_S35390A \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-s35390a.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,rtc-s35390a,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-s35390a/description
|
||||
Kernel module for Seiko Instruments S-35390A I2C RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-s35390a))
|
||||
|
||||
|
||||
define KernelPackage/mtdtests
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
@ -913,15 +930,14 @@ $(eval $(call KernelPackage,ikconfig))
|
||||
define KernelPackage/zram
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=ZRAM
|
||||
DEPENDS:=+kmod-lib-lzo +kmod-lib-lz4
|
||||
DEPENDS:=+kmod-lib-lzo
|
||||
KCONFIG:= \
|
||||
CONFIG_ZSMALLOC \
|
||||
CONFIG_ZRAM \
|
||||
CONFIG_ZRAM_DEBUG=n \
|
||||
CONFIG_PGTABLE_MAPPING=n \
|
||||
CONFIG_ZRAM_WRITEBACK=n \
|
||||
CONFIG_ZSMALLOC_STAT=n \
|
||||
CONFIG_ZRAM_LZ4_COMPRESS=y
|
||||
CONFIG_ZSMALLOC_STAT=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/mm/zsmalloc.ko \
|
||||
$(LINUX_DIR)/drivers/block/zram/zram.ko
|
||||
|
@ -0,0 +1,51 @@
|
||||
From patchwork Thu Dec 27 14:05:26 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Patchwork-Submitter: Tom Psyborg <pozega.tomislav@gmail.com>
|
||||
X-Patchwork-Id: 10743707
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
From: =?utf-8?q?Tomislav_Po=C5=BEega?= <pozega.tomislav@gmail.com>
|
||||
To: linux-wireless@vger.kernel.org
|
||||
Cc: kvalo@codeaurora.org, hauke@hauke-m.de, nbd@nbd.name,
|
||||
john@phrozen.org, sgruszka@redhat.com, daniel@makrotopia.org
|
||||
Subject: [PATCH 2/2] rt2x00: define RF5592 in init_eeprom routine
|
||||
Date: Thu, 27 Dec 2018 15:05:26 +0100
|
||||
Message-Id: <1545919526-4074-2-git-send-email-pozega.tomislav@gmail.com>
|
||||
X-Mailer: git-send-email 1.7.0.4
|
||||
In-Reply-To: <1545919526-4074-1-git-send-email-pozega.tomislav@gmail.com>
|
||||
References: <1545919526-4074-1-git-send-email-pozega.tomislav@gmail.com>
|
||||
MIME-Version: 1.0
|
||||
Sender: linux-wireless-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
This patch fixes following crash on Linksys EA2750 during 5GHz wifi
|
||||
init:
|
||||
|
||||
[ 7.955153] rt2800pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
|
||||
[ 7.962259] rt2800pci 0000:01:00.0: loaded eeprom from mtd device "Factory"
|
||||
[ 7.969435] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
|
||||
[ 7.977348] ieee80211 phy0: rt2800_init_eeprom: Error - Invalid RF chipset 0x0000 detected
|
||||
[ 7.985793] ieee80211 phy0: rt2x00lib_probe_dev: Error - Failed to allocate device
|
||||
[ 7.993569] CPU 0 Unable to handle kernel paging request at virtual address 00000024, epc == 800c8f54, ra == 80249ff8
|
||||
[ 8.004408] Oops[#1]:
|
||||
|
||||
Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
||||
@@ -9416,6 +9416,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rf = RF3853;
|
||||
else if (rt2x00_rt(rt2x00dev, RT5350))
|
||||
rf = RF5350;
|
||||
+ else if (rt2x00_rt(rt2x00dev, RT5592))
|
||||
+ rf = RF5592;
|
||||
else
|
||||
rf = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "rt2x00.h"
|
||||
#include "rt2800lib.h"
|
||||
@@ -9528,6 +9529,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9530,6 +9531,17 @@ static int rt2800_init_eeprom(struct rt2
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
|
||||
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
|
||||
|
||||
|
@ -76,7 +76,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
|
||||
bbp = rt2800_bbp_read(rt2x00dev, 4);
|
||||
rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf));
|
||||
rt2800_bbp_write(rt2x00dev, 4, bbp);
|
||||
@@ -9557,7 +9596,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9559,7 +9598,8 @@ static int rt2800_init_eeprom(struct rt2
|
||||
*/
|
||||
eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
|
||||
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
|
||||
if (rt2x00_get_field16(eeprom,
|
||||
EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
|
||||
__set_bit(CAPABILITY_EXTERNAL_PA_TX0,
|
||||
@@ -9568,6 +9608,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
@@ -9570,6 +9610,18 @@ static int rt2800_init_eeprom(struct rt2
|
||||
&rt2x00dev->cap_flags);
|
||||
}
|
||||
|
||||
|
@ -744,7 +744,7 @@ config MTK_BAND_STEERING
|
||||
|
||||
config MTK_LED_CONTROL_SUPPORT
|
||||
bool "LED Control Support"
|
||||
default n
|
||||
default y
|
||||
|
||||
config MTK_WLAN_HOOK
|
||||
bool "WLAN hook Support"
|
||||
|
@ -5,9 +5,9 @@ PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
||||
PKG_MIRROR_HASH:=3d58def8e415ceda8aacfd8453813d8bf2a05991c0df0c074744639ab04321ba
|
||||
PKG_SOURCE_DATE:=2020-05-25
|
||||
PKG_SOURCE_VERSION:=66195aee50424cbda0c2d858014e4cc58a2dc029
|
||||
PKG_MIRROR_HASH:=cb941cd33f43b38ef1a1f2b4fd212e0bb21c100dcdd2ab1976f8cc2071566d32
|
||||
PKG_SOURCE_DATE:=2020-07-11
|
||||
PKG_SOURCE_VERSION:=f4e9bf73ac5c0ee6b8f240e2a2100e70ca56d705
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
|
@ -9,19 +9,20 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lzo
|
||||
PKG_VERSION:=2.10
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
|
||||
PKG_HASH:=c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
CMAKE_BINARY_SUBDIR:=openwrt-build
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/liblzo
|
||||
SECTION:=libs
|
||||
@ -36,17 +37,18 @@ define Package/liblzo/description
|
||||
in real-time. This means it favours speed over compression ratio.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
MAKE_FLAGS += CFLAGS_O="$(TARGET_CFLAGS)"
|
||||
CMAKE_OPTIONS += \
|
||||
-DENABLE_SHARED=ON \
|
||||
-DENABLE_STATIC=ON \
|
||||
\
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DCMAKE_SKIP_INSTALL_RPATH=ON
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lzo2.pc $(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/liblzo/install
|
||||
|
@ -27,7 +27,7 @@ check_peer_activity() {
|
||||
config_get public_key "${cfg}" "public_key"
|
||||
config_get endpoint_host "${cfg}" "endpoint_host"
|
||||
config_get endpoint_port "${cfg}" "endpoint_port"
|
||||
persistent_keepalive=`wg show ${iface} persistent-keepalive | grep ${public_key} | awk '{print $2}'`
|
||||
persistent_keepalive=$(wg show ${iface} persistent-keepalive | grep ${public_key} | awk '{print $2}')
|
||||
|
||||
# only process peers with endpoints and keepalive set
|
||||
[ -z ${endpoint_host} ] && return 0;
|
||||
@ -42,16 +42,16 @@ check_peer_activity() {
|
||||
[ -n "${IPV4}" -o -n "${IPV6}" ] && return 0;
|
||||
|
||||
# re-resolve endpoint hostname if not responding for too long
|
||||
last_handshake=`wg show ${iface} latest-handshakes | grep ${public_key} | awk '{print $2}'`
|
||||
last_handshake=$(wg show ${iface} latest-handshakes | grep ${public_key} | awk '{print $2}')
|
||||
[ -z ${last_handshake} ] && return 0;
|
||||
idle_seconds=$((`date +%s`-${last_handshake}))
|
||||
idle_seconds=$(($(date +%s)-${last_handshake}))
|
||||
[ ${idle_seconds} -lt 150 ] && return 0;
|
||||
logger -t "wireguard_monitor" "${iface} endpoint ${endpoint_host}:${endpoint_port} is not responding for ${idle_seconds} seconds, trying to re-resolve hostname"
|
||||
wg set ${iface} peer ${public_key} endpoint "${endpoint_host}:${endpoint_port}"
|
||||
}
|
||||
|
||||
# query ubus for all active wireguard interfaces
|
||||
wg_ifaces=`ubus -S call network.interface dump | jsonfilter -e '@.interface[@.up=true]' | jsonfilter -a -e '@[@.proto="wireguard"].interface' | tr "\n" " "`
|
||||
wg_ifaces=$(ubus -S call network.interface dump | jsonfilter -e '@.interface[@.up=true]' | jsonfilter -a -e '@[@.proto="wireguard"].interface' | tr "\n" " ")
|
||||
|
||||
# check every peer in every active wireguard interface
|
||||
config_load network
|
||||
|
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=procd
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||
PKG_SOURCE_DATE:=2020-05-28
|
||||
PKG_SOURCE_VERSION:=b9b39e2061d7035a9d84eecbb4a4613deaf6d03f
|
||||
PKG_MIRROR_HASH:=0d6a96a2fb38f72c72b457a2a8638bee22f91009f9686152fcf4aee97846fc84
|
||||
PKG_SOURCE_DATE:=2020-07-11
|
||||
PKG_SOURCE_VERSION:=3034eaf5ceebc3b8d8461680a2cd3c61e796fc7d
|
||||
PKG_MIRROR_HASH:=2f8f84c273bda817dcb0513c0d3304af98662c3eb26c9bf266da4508db04011d
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
@ -70,6 +70,14 @@ define Package/procd-seccomp
|
||||
TITLE:=OpenWrt process seccomp helper + utrace
|
||||
endef
|
||||
|
||||
define Package/uxc
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
|
||||
TITLE:=OpenWrt container management
|
||||
MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||
endef
|
||||
|
||||
define Package/procd/config
|
||||
menu "Configuration"
|
||||
depends on PACKAGE_procd
|
||||
@ -130,7 +138,19 @@ define Package/procd-seccomp/install
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-trace.so $(1)/lib
|
||||
endef
|
||||
|
||||
define Package/uxc/conffiles
|
||||
/etc/uxc
|
||||
endef
|
||||
|
||||
define Package/uxc/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uxc $(1)/sbin/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/uxc.init $(1)/etc/init.d/uxc
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,procd))
|
||||
$(eval $(call BuildPackage,procd-ujail))
|
||||
$(eval $(call BuildPackage,procd-ujail-console))
|
||||
$(eval $(call BuildPackage,procd-seccomp))
|
||||
$(eval $(call BuildPackage,uxc))
|
||||
|
18
package/system/procd/files/uxc.init
Normal file
18
package/system/procd/files/uxc.init
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
NAME=uxc
|
||||
PROG=/sbin/uxc
|
||||
|
||||
start_service() {
|
||||
[ "${__BOOT_UXC}" = "1" ] || return 0
|
||||
procd_open_instance "uxc"
|
||||
procd_set_param command "$PROG" boot
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
boot() {
|
||||
__BOOT_UXC=1
|
||||
start
|
||||
}
|
@ -18,7 +18,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/zram-swap
|
||||
SECTION:=utils
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+kmod-zram +!(BUSYBOX_DEFAULT_MKSWAP||BUSYBOX_CONFIG_MKSWAP):swap-utils +!((BUSYBOX_DEFAULT_SWAPON||BUSYBOX_CONFIG_SWAPON)&&(BUSYBOX_DEFAULT_SWAPOFF||BUSYBOX_CONFIG_SWAPOFF)):block-mount
|
||||
DEPENDS:=+kmod-zram +!(BUSYBOX_CONFIG_MKSWAP&&BUSYBOX_CONFIG_SWAPON&&BUSYBOX_CONFIG_SWAPOFF):swap-utils
|
||||
TITLE:=ZRAM swap scripts
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
@ -182,7 +182,7 @@ start()
|
||||
zram_comp_streams "$zram_dev"
|
||||
echo $(( $zram_size * 1024 * 1024 )) >"/sys/block/$( basename "$zram_dev" )/disksize"
|
||||
mkswap "$zram_dev"
|
||||
swapon $zram_priority "$zram_dev"
|
||||
swapon -d $zram_priority "$zram_dev"
|
||||
}
|
||||
|
||||
stop()
|
||||
|
@ -24,7 +24,7 @@ config BUSYBOX_DEFAULT_FEATURE_VERBOSE_USAGE
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_COMPRESS_USAGE
|
||||
bool
|
||||
default y
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_LFS
|
||||
bool
|
||||
default y
|
||||
@ -303,7 +303,7 @@ config BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_MONOTONIC_SYSCALL
|
||||
bool
|
||||
default n
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR
|
||||
bool
|
||||
default y
|
||||
|
3
rules.mk
3
rules.mk
@ -298,6 +298,9 @@ ifneq ($(CONFIG_CCACHE),)
|
||||
TARGET_CXX:= ccache_cxx
|
||||
HOSTCC:= ccache $(HOSTCC)
|
||||
HOSTCXX:= ccache $(HOSTCXX)
|
||||
export CCACHE_BASEDIR:=$(TOPDIR)
|
||||
export CCACHE_DIR:=$(if $(call qstrip,$(CONFIG_CCACHE_DIR)),$(call qstrip,$(CONFIG_CCACHE_DIR)),$(TOPDIR)/.ccache)
|
||||
export CCACHE_COMPILERCHECK:=%compiler% -dumpmachine; %compiler% -dumpversion
|
||||
endif
|
||||
|
||||
TARGET_CONFIGURE_OPTS = \
|
||||
|
12
scripts/env
12
scripts/env
@ -22,7 +22,7 @@ Commands:
|
||||
Options:
|
||||
|
||||
EOF
|
||||
exit ${1:-1}
|
||||
exit "${1:-1}"
|
||||
}
|
||||
|
||||
error() {
|
||||
@ -42,7 +42,7 @@ ask_bool() {
|
||||
local VAL
|
||||
|
||||
echo -n "$* ($defstr): "
|
||||
read VAL
|
||||
read -r VAL
|
||||
case "$VAL" in
|
||||
y*|Y*) val=0;;
|
||||
n*|N*) val=1;;
|
||||
@ -57,7 +57,7 @@ env_init() {
|
||||
if [ -z "$CREATE" ]; then
|
||||
[ -d "$ENVDIR" ] || exit 0
|
||||
fi
|
||||
[ -x "$(which git 2>/dev/null)" ] || error "Git is not installed"
|
||||
command -v git || error "Git is not installed"
|
||||
mkdir -p "$ENVDIR" || error "Failed to create the environment directory"
|
||||
cd "$ENVDIR" || error "Failed to switch to the environment directory"
|
||||
[ -d .git ] || {
|
||||
@ -73,7 +73,7 @@ env_init() {
|
||||
}
|
||||
|
||||
env_sync_data() {
|
||||
[ \! -L "$BASEDIR/.config" ] && [ -f "$BASEDIR/.config" ] && mv "$BASEDIR/.config" "$ENVDIR"
|
||||
[ ! -L "$BASEDIR/.config" ] && [ -f "$BASEDIR/.config" ] && mv "$BASEDIR/.config" "$ENVDIR"
|
||||
git add .
|
||||
git add -u
|
||||
}
|
||||
@ -147,7 +147,7 @@ env_clear() {
|
||||
else
|
||||
rm -rf "$BASEDIR/files" "$BASEDIR/.config"
|
||||
fi
|
||||
cd "$BASEDIR"
|
||||
cd "$BASEDIR" || exit 1
|
||||
rm -rf "$ENVDIR"
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ env_new() {
|
||||
git checkout -b "$1" "$from"
|
||||
if [ -f "$BASEDIR/.config" ] || [ -d "$BASEDIR/files" ]; then
|
||||
if ask_bool 1 "Do you want to start your configuration repository with the current configuration?"; then
|
||||
if [ -d "$BASEDIR/files" ] && [ \! -L "$BASEDIR/files" ]; then
|
||||
if [ -d "$BASEDIR/files" ] && [ ! -L "$BASEDIR/files" ]; then
|
||||
mkdir -p "$ENVDIR/files"
|
||||
shopt -s dotglob
|
||||
mv "$BASEDIR/files/"* "$ENVDIR/files/" 2>/dev/null
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2006-2012 OpenWrt.org
|
||||
set -e -x
|
||||
[ $# == 5 -o $# == 6 ] || {
|
||||
if [ $# -ne 5 ] && [ $# -ne 6 ]; then
|
||||
echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
OUTPUT="$1"
|
||||
KERNELSIZE="$2"
|
||||
@ -17,10 +17,9 @@ rm -f "$OUTPUT"
|
||||
|
||||
head=16
|
||||
sect=63
|
||||
cyl=$(( (KERNELSIZE + ROOTFSSIZE) * 1024 * 1024 / (head * sect * 512)))
|
||||
|
||||
# create partition table
|
||||
set $(ptgen -o "$OUTPUT" -h $head -s $sect ${GUID:+-g} -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE} ${GUID:+-G $GUID})
|
||||
set $(ptgen -o "$OUTPUT" -h $head -s $sect ${GUID:+-g} -p "${KERNELSIZE}m" -p "${ROOTFSSIZE}m" ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE} ${GUID:+-G $GUID})
|
||||
|
||||
KERNELOFFSET="$(($1 / 512))"
|
||||
KERNELSIZE="$2"
|
||||
@ -31,8 +30,8 @@ ROOTFSSIZE="$(($4 / 512))"
|
||||
dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc
|
||||
|
||||
if [ -n "$GUID" ]; then
|
||||
[ -n "$PADDING" ] && dd if=/dev/zero of="$OUTPUT" bs=512 seek="$(($ROOTFSOFFSET + $ROOTFSSIZE))" conv=notrunc count="$sect"
|
||||
mkfs.fat -n kernel -C "$OUTPUT.kernel" -S 512 "$(($KERNELSIZE / 1024))"
|
||||
[ -n "$PADDING" ] && dd if=/dev/zero of="$OUTPUT" bs=512 seek="$((ROOTFSOFFSET + ROOTFSSIZE))" conv=notrunc count="$sect"
|
||||
mkfs.fat -n kernel -C "$OUTPUT.kernel" -S 512 "$((KERNELSIZE / 1024))"
|
||||
mcopy -s -i "$OUTPUT.kernel" "$KERNELDIR"/* ::/
|
||||
else
|
||||
make_ext4fs -J -L kernel -l "$KERNELSIZE" "$OUTPUT.kernel" "$KERNELDIR"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# Licensed under the terms of the GNU GPL License version 2 or later.
|
||||
#
|
||||
@ -15,18 +15,19 @@
|
||||
#
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename $0) -A arch -C comp -a addr -e entry" \
|
||||
"-v version -k kernel [-D name -d dtb] -o its_file"
|
||||
echo -e "\t-A ==> set architecture to 'arch'"
|
||||
echo -e "\t-C ==> set compression type 'comp'"
|
||||
echo -e "\t-c ==> set config name 'config'"
|
||||
echo -e "\t-a ==> set load address to 'addr' (hex)"
|
||||
echo -e "\t-e ==> set entry point to 'entry' (hex)"
|
||||
echo -e "\t-v ==> set kernel version to 'version'"
|
||||
echo -e "\t-k ==> include kernel image 'kernel'"
|
||||
echo -e "\t-D ==> human friendly Device Tree Blob 'name'"
|
||||
echo -e "\t-d ==> include Device Tree Blob 'dtb'"
|
||||
echo -e "\t-o ==> create output file 'its_file'"
|
||||
printf "Usage: %s -A arch -C comp -a addr -e entry" "$(basename "$0")"
|
||||
printf " -v version -k kernel [-D name -d dtb] -o its_file"
|
||||
|
||||
printf "\n\t-A ==> set architecture to 'arch'"
|
||||
printf "\n\t-C ==> set compression type 'comp'"
|
||||
printf "\n\t-c ==> set config name 'config'"
|
||||
printf "\n\t-a ==> set load address to 'addr' (hex)"
|
||||
printf "\n\t-e ==> set entry point to 'entry' (hex)"
|
||||
printf "\n\t-v ==> set kernel version to 'version'"
|
||||
printf "\n\t-k ==> include kernel image 'kernel'"
|
||||
printf "\n\t-D ==> human friendly Device Tree Blob 'name'"
|
||||
printf "\n\t-d ==> include Device Tree Blob 'dtb'"
|
||||
printf "\n\t-o ==> create output file 'its_file'\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -43,7 +44,7 @@ do
|
||||
k ) KERNEL=$OPTARG;;
|
||||
o ) OUTPUT=$OPTARG;;
|
||||
v ) VERSION=$OPTARG;;
|
||||
* ) echo "Invalid option passed to '$0' (options:$@)"
|
||||
* ) echo "Invalid option passed to '$0' (options:$*)"
|
||||
usage;;
|
||||
esac
|
||||
done
|
||||
@ -55,7 +56,7 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
|
||||
usage
|
||||
fi
|
||||
|
||||
ARCH_UPPER=$(echo $ARCH | tr '[:lower:]' '[:upper:]')
|
||||
ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
# Conditionally create fdt information
|
||||
if [ -n "${DTB}" ]; then
|
||||
@ -115,4 +116,4 @@ ${FDT_NODE}
|
||||
};"
|
||||
|
||||
# Write .its file to disk
|
||||
echo "$DATA" > ${OUTPUT}
|
||||
echo "$DATA" > "${OUTPUT}"
|
||||
|
9
target/linux/ath79/dts/qca9533_dlink_dap-1330-a1.dts
Normal file
9
target/linux/ath79/dts/qca9533_dlink_dap-1330-a1.dts
Normal file
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "qca9533_dlink_dap-13xx.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "dlink,dap-1330-a1", "qca,qca9533";
|
||||
model = "D-Link DAP-1330 A1";
|
||||
};
|
9
target/linux/ath79/dts/qca9533_dlink_dap-1365-a1.dts
Normal file
9
target/linux/ath79/dts/qca9533_dlink_dap-1365-a1.dts
Normal file
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "qca9533_dlink_dap-13xx.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "dlink,dap-1365-a1", "qca,qca9533";
|
||||
model = "D-Link DAP-1365 A1";
|
||||
};
|
127
target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi
Normal file
127
target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi
Normal file
@ -0,0 +1,127 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "qca953x.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_status;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_status;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
label = "d-link:green:power";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_status: status {
|
||||
label = "d-link:red:status";
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
rssilow {
|
||||
label = "d-link:red:rssilow";
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
rssimediumlow {
|
||||
label = "d-link:green:rssimediumlow";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
rssimediumhigh {
|
||||
label = "d-link:green:rssimediumhigh";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
rssihigh {
|
||||
label = "d-link:green:rssihigh";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
num-cs = <1>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@10000 {
|
||||
label = "art";
|
||||
reg = <0x10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "mp";
|
||||
reg = <0x20000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "config";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "firmware";
|
||||
reg = <0x40000 0x7c0000>;
|
||||
compatible = "denx,uimage";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
};
|
@ -132,6 +132,14 @@ compex,wpj531-16m)
|
||||
devolo,magic-2-wifi)
|
||||
ucidef_set_led_netdev "plcw" "dLAN" "devolo:white:dlan" "eth0.1" "rx"
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "d-link:red:rssilow" "wlan0" "1" "25"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "d-link:green:rssimediumlow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "d-link:green:rssimediumhigh" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "d-link:green:rssihigh" "wlan0" "76" "100"
|
||||
;;
|
||||
dlink,dir-859-a1)
|
||||
ucidef_set_led_switch "internet" "WAN" "$boardname:green:internet" "switch0" "0x20"
|
||||
;;
|
||||
|
@ -23,6 +23,8 @@ ath79_setup_interfaces()
|
||||
devolo,dvl1750c|\
|
||||
devolo,dvl1750i|\
|
||||
devolo,dvl1750x|\
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dir-505|\
|
||||
engenius,ecb1750|\
|
||||
enterasys,ws-ap3705i|\
|
||||
@ -386,13 +388,15 @@ ath79_setup_macs()
|
||||
devolo,magic-2-wifi)
|
||||
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dch-g020-a1)
|
||||
lan_mac=$(mtd_get_mac_text "mp" 0x1)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
|
||||
;;
|
||||
dlink,dir-825-b1)
|
||||
lan_mac=$(mtd_get_mac_text "caldata" 0xffa0)
|
||||
wan_mac=$(mtd_get_mac_text "caldata" 0xffb4)
|
||||
|
@ -17,6 +17,8 @@ case "$board" in
|
||||
adtran,bsap1840)
|
||||
macaddr_add "$(mtd_get_mac_binary 'Board data' 2)" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dch-g020-a1)
|
||||
mtd_get_mac_text "mp" 0x13 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
|
@ -8,6 +8,13 @@ case "$board" in
|
||||
arduino,yun)
|
||||
migrate_leds "arduino:=yun:"
|
||||
;;
|
||||
dlink,dap-1330-a1)
|
||||
migrate_leds ":red:power=:red:status" \
|
||||
":red:wifi=:red:rssilow" \
|
||||
":green:wifi=:green:rssimediumlow" \
|
||||
":green:signal1=:green:rssimediumhigh" \
|
||||
":green:signal2=:green:rssihigh"
|
||||
;;
|
||||
engenius,epg5000)
|
||||
migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g"
|
||||
;;
|
||||
|
@ -565,6 +565,33 @@ define Device/devolo_magic-2-wifi
|
||||
endef
|
||||
TARGET_DEVICES += devolo_magic-2-wifi
|
||||
|
||||
define Device/dlink_dap-13xx
|
||||
SOC := qca9533
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_PACKAGES += rssileds
|
||||
IMAGE_SIZE := 7936k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | check-size | mkdapimg2 0xE0000
|
||||
endef
|
||||
|
||||
define Device/dlink_dap-1330-a1
|
||||
$(Device/dlink_dap-13xx)
|
||||
DEVICE_MODEL := DAP-1330
|
||||
DEVICE_VARIANT := A1
|
||||
DAP_SIGNATURE := HONEYBEE-FIRMWARE-DAP-1330
|
||||
SUPPORTED_DEVICES += dap-1330-a1
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dap-1330-a1
|
||||
|
||||
define Device/dlink_dap-1365-a1
|
||||
$(Device/dlink_dap-13xx)
|
||||
DEVICE_MODEL := DAP-1365
|
||||
DEVICE_VARIANT := A1
|
||||
DAP_SIGNATURE := HONEYBEE-FIRMWARE-DAP-1365
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dap-1365-a1
|
||||
|
||||
define Device/dlink_dap-2695-a1
|
||||
SOC := qca9558
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
|
||||
|
@ -443,7 +443,7 @@ define Device/tplink_tl-wr941-v2
|
||||
TPLINK_HWREV := 2
|
||||
SUPPORTED_DEVICES += tl-wr941nd
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wr941-v2
|
||||
#TARGET_DEVICES += tplink_tl-wr941-v2
|
||||
|
||||
define Device/tplink_tl-wr941-v4
|
||||
$(Device/tplink-4m)
|
||||
|
@ -393,7 +393,6 @@ CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWCOTG=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
|
@ -501,7 +501,6 @@ CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWCOTG=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_LAN78XX=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
|
@ -578,7 +578,6 @@ CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWCOTG=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_LAN78XX=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
|
@ -588,7 +588,6 @@ CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWCOTG=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_PCI=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
|
@ -94,20 +94,20 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe@0 {
|
||||
partition@0 {
|
||||
reg = <0x000000 0x010000>;
|
||||
label = "cfe";
|
||||
read-only;
|
||||
};
|
||||
|
||||
linux@10000 {
|
||||
reg = <0x010000 0x7e0000>;
|
||||
partition@10000 {
|
||||
reg = <0x010000 0xfe0000>;
|
||||
label = "linux";
|
||||
compatible = "brcm,bcm963xx-imagetag";
|
||||
};
|
||||
|
||||
nvram@7f0000 {
|
||||
reg = <0x7f0000 0x010000>;
|
||||
partition@ff0000 {
|
||||
reg = <0xff0000 0x010000>;
|
||||
label = "nvram";
|
||||
};
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/fs/locks.c
|
||||
+++ b/fs/locks.c
|
||||
@@ -2989,6 +2989,8 @@ static const struct seq_operations locks
|
||||
@@ -2992,6 +2992,8 @@ static const struct seq_operations locks
|
||||
|
||||
static int __init proc_locks_init(void)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
selftest.o \
|
||||
--- a/drivers/dma-buf/dma-buf.c
|
||||
+++ b/drivers/dma-buf/dma-buf.c
|
||||
@@ -1299,4 +1299,5 @@ static void __exit dma_buf_deinit(void)
|
||||
@@ -1295,4 +1295,5 @@ static void __exit dma_buf_deinit(void)
|
||||
dma_buf_uninit_debugfs();
|
||||
kern_unmount(dma_buf_mnt);
|
||||
}
|
||||
|
@ -1,61 +0,0 @@
|
||||
From db4603e30effd74d4adb6bcdf73072b2c06fafcd Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Fri, 3 Jul 2020 00:07:15 +0200
|
||||
Subject: [PATCH] MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen
|
||||
|
||||
This resolves the hazard between the mtc0 in the change_c0_status() and
|
||||
the mfc0 in configure_exception_vector(). Without resolving this hazard
|
||||
configure_exception_vector() could read an old value and would restore
|
||||
this old value again. This would revert the changes change_c0_status()
|
||||
did. I checked this by printing out the read_c0_status() at the end of
|
||||
per_cpu_trap_init() and the ST0_MX is not set without this patch.
|
||||
|
||||
The hazard is documented in the MIPS Architecture Reference Manual Vol.
|
||||
III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev
|
||||
6.03 table 8.1 which includes:
|
||||
|
||||
Producer | Consumer | Hazard
|
||||
----------|----------|----------------------------
|
||||
mtc0 | mfc0 | any coprocessor 0 register
|
||||
|
||||
I saw this hazard on an Atheros AR9344 rev 2 SoC with a MIPS 74Kc CPU.
|
||||
There the change_c0_status() function would activate the DSPen by
|
||||
setting ST0_MX in the c0_status register. This was reverted and then the
|
||||
system got a DSP exception when the DSP registers were saved in
|
||||
save_dsp() in the first process switch. The crash looks like this:
|
||||
|
||||
[ 0.089999] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
|
||||
[ 0.097796] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
|
||||
[ 0.107070] Kernel panic - not syncing: Unexpected DSP exception
|
||||
[ 0.113470] Rebooting in 1 seconds..
|
||||
|
||||
We saw this problem in OpenWrt only on the MIPS 74Kc based Atheros SoCs,
|
||||
not on the 24Kc based SoCs. We only saw it with kernel 5.4 not with
|
||||
kernel 4.19, in addition we had to use GCC 8.4 or 9.X, with GCC 8.3 it
|
||||
did not happen.
|
||||
|
||||
In the kernel I bisected this problem to commit 9012d011660e ("compiler:
|
||||
allow all arches to enable CONFIG_OPTIMIZE_INLINING"), but when this was
|
||||
reverted it also happened after commit 172dcd935c34b ("MIPS: Always
|
||||
allocate exception vector for MIPSr2+").
|
||||
|
||||
Commit 0b24cae4d535 ("MIPS: Add missing EHB in mtc0 -> mfc0 sequence.")
|
||||
does similar changes to a different file. I am not sure if there are
|
||||
more places affected by this problem.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
---
|
||||
arch/mips/kernel/traps.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/mips/kernel/traps.c
|
||||
+++ b/arch/mips/kernel/traps.c
|
||||
@@ -2126,6 +2126,7 @@ static void configure_status(void)
|
||||
|
||||
change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
|
||||
status_set);
|
||||
+ back_to_back_c0_hazard();
|
||||
}
|
||||
|
||||
unsigned int hwrena;
|
@ -497,7 +497,6 @@ CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VDSO=y
|
||||
|
@ -530,7 +530,6 @@ CONFIG_UNWINDER_ARM=y
|
||||
# CONFIG_UNWINDER_FRAME_POINTER is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VDSO=y
|
||||
|
@ -37,7 +37,7 @@ linksys,ea7500-v1)
|
||||
linksys,ea8500)
|
||||
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
||||
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
|
||||
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
||||
;;
|
||||
|
@ -493,7 +493,6 @@ CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VDSO=y
|
||||
|
@ -292,6 +292,7 @@
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x00010 0x2613a0 /* PWS_REG */
|
||||
0x000e4 0x6a545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
|
@ -279,6 +279,7 @@
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x00010 0x2613a0 /* PWS_REG */
|
||||
0x000e4 0x6a545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
|
@ -11,6 +11,9 @@ board_config_update
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"checkpoint,l-50")
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 dmz" "eth0"
|
||||
;;
|
||||
"cisco,on100")
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
;;
|
||||
|
18
target/linux/kirkwood/base-files/etc/board.d/03_gpio_switches
Executable file
18
target/linux/kirkwood/base-files/etc/board.d/03_gpio_switches
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
checkpoint,l-50)
|
||||
ucidef_add_gpio_switch "mpcie-rst" "mPCIE Card reset" "502" "1"
|
||||
ucidef_add_gpio_switch "exp-card-rst" "Express Card reset" "497" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
@ -0,0 +1,25 @@
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
preinit_set_mac_address() {
|
||||
local mac
|
||||
|
||||
case $(board_name) in
|
||||
checkpoint,l-50)
|
||||
mac=$(mtd_get_mac_ascii bootldr-env lan1_mac_addr)
|
||||
|
||||
ip link set dev lan1 address $mac 2>/dev/null
|
||||
ip link set dev lan2 address $(macaddr_add $mac 1) 2>/dev/null
|
||||
ip link set dev lan3 address $(macaddr_add $mac 2) 2>/dev/null
|
||||
ip link set dev lan4 address $(macaddr_add $mac 3) 2>/dev/null
|
||||
ip link set dev lan5 address $(macaddr_add $mac 4) 2>/dev/null
|
||||
ip link set dev lan6 address $(macaddr_add $mac 5) 2>/dev/null
|
||||
ip link set dev lan7 address $(macaddr_add $mac 6) 2>/dev/null
|
||||
ip link set dev lan8 address $(macaddr_add $mac 7) 2>/dev/null
|
||||
ip link set dev dmz address $(macaddr_add $mac 8) 2>/dev/null
|
||||
ip link set dev dsl address $(macaddr_add $mac 9) 2>/dev/null
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_set_mac_address
|
@ -282,6 +282,7 @@ CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_KIRKWOOD=y
|
||||
CONFIG_PINCTRL_MVEBU=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_PINCTRL_SX150X=y
|
||||
CONFIG_PLAT_ORION=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_GPIO=y
|
||||
|
@ -28,6 +28,16 @@ define Device/Default
|
||||
SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) $$(BOARD_NAME)
|
||||
endef
|
||||
|
||||
define Device/checkpoint_l-50
|
||||
DEVICE_VENDOR := Check Point
|
||||
DEVICE_MODEL := L-50
|
||||
DEVICE_DTS := kirkwood-l-50
|
||||
DEVICE_PACKAGES := kmod-ath9k kmod-gpio-button-hotplug kmod-mvsdio \
|
||||
kmod-rtc-s35390a kmod-usb-ledtrig-usbport wpad-basic
|
||||
IMAGES := sysupgrade.bin
|
||||
endef
|
||||
TARGET_DEVICES += checkpoint_l-50
|
||||
|
||||
define Device/cisco_on100
|
||||
DEVICE_VENDOR := Cisco Systems
|
||||
DEVICE_MODEL := ON100
|
||||
|
@ -0,0 +1,485 @@
|
||||
From efa968c18abab78c5e0c40a853caf286c3629a59 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Tue, 17 Mar 2020 21:28:01 +0100
|
||||
Subject: [PATCH v3] ARM: dts: kirkwood: Add Check Point L-50 board
|
||||
|
||||
This patch adds dts for the Check Point L-50 from 600/1100 series
|
||||
routers.
|
||||
|
||||
Specification:
|
||||
-CPU: Marvell Kirkwood 88F6821 1200MHz
|
||||
-RAM: 512MB
|
||||
-Flash: NAND 512MB
|
||||
-WiFi: mPCIe card based on Atheros AR9287 b/g/n
|
||||
-WAN: 1 Gigabit Port (Marvell 88E1116R PHY)
|
||||
-LAN: 9 Gigabit Ports (2x Marvell 88E6171(5+3))
|
||||
-USB: 2x USB2.0
|
||||
-Express card slot
|
||||
-SD card slot
|
||||
-Serial console: RJ-45 115200 8n1
|
||||
-Unsupported DSL
|
||||
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
Changes in v3:
|
||||
- fix typo and code style issues pointed by OpenWrt guys
|
||||
Changes in v2:
|
||||
- none
|
||||
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/kirkwood-l-50.dts | 438 ++++++++++++++++++++++++++++
|
||||
2 files changed, 439 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -270,6 +270,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
|
||||
kirkwood-iomega_ix2_200.dtb \
|
||||
kirkwood-is2.dtb \
|
||||
kirkwood-km_kirkwood.dtb \
|
||||
+ kirkwood-l-50.dtb \
|
||||
kirkwood-laplug.dtb \
|
||||
kirkwood-linkstation-lsqvl.dtb \
|
||||
kirkwood-linkstation-lsvl.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
@@ -0,0 +1,438 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Check Point L-50 Board Description
|
||||
+ * Copyright 2020 Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "kirkwood.dtsi"
|
||||
+#include "kirkwood-6281.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Check Point L-50";
|
||||
+ compatible = "checkpoint,l-50", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200n8";
|
||||
+ stdout-path = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ ocp@f1000000 {
|
||||
+ pinctrl: pin-controller@10000 {
|
||||
+ pinctrl-0 = <&pmx_led38 &pmx_sysrst &pmx_button29>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ pmx_sysrst: pmx-sysrst {
|
||||
+ marvell,pins = "mpp6";
|
||||
+ marvell,function = "sysrst";
|
||||
+ };
|
||||
+
|
||||
+ pmx_button29: pmx_button29 {
|
||||
+ marvell,pins = "mpp29";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led38: pmx_led38 {
|
||||
+ marvell,pins = "mpp38";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_sdio_cd: pmx-sdio-cd {
|
||||
+ marvell,pins = "mpp46";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ serial@12000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ mvsdio@90000 {
|
||||
+ status = "okay";
|
||||
+ cd-gpios = <&gpio1 14 9>;
|
||||
+ };
|
||||
+
|
||||
+ i2c@11000 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <400000>;
|
||||
+
|
||||
+ gpio2: gpio-expander@20{
|
||||
+ #gpio-cells = <2>;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ compatible = "semtech,sx1505q";
|
||||
+ reg = <0x20>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ };
|
||||
+
|
||||
+ /* Three GPIOs from 0x21 exp. are undescribed in dts:
|
||||
+ * 1: DSL module reset (active low)
|
||||
+ * 5: mPCIE reset (active low)
|
||||
+ * 6: Express card reset (active low)
|
||||
+ */
|
||||
+ gpio3: gpio-expander@21{
|
||||
+ #gpio-cells = <2>;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ compatible = "semtech,sx1505q";
|
||||
+ reg = <0x21>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ };
|
||||
+
|
||||
+ rtc@30 {
|
||||
+ compatible = "s35390a";
|
||||
+ reg = <0x30>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status_green {
|
||||
+ label = "l-50:green:status";
|
||||
+ gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ status_red {
|
||||
+ label = "l-50:red:status";
|
||||
+ gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wifi {
|
||||
+ label = "l-50:green:wifi";
|
||||
+ gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "phy0tpt";
|
||||
+ };
|
||||
+
|
||||
+ internet_green {
|
||||
+ label = "l-50:green:internet";
|
||||
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ internet_red {
|
||||
+ label = "l-50:red:internet";
|
||||
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ usb1_green {
|
||||
+ label = "l-50:green:usb1";
|
||||
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ trigger-sources = <&hub_port3>;
|
||||
+ };
|
||||
+
|
||||
+ usb1_red {
|
||||
+ label = "l-50:red:usb1";
|
||||
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ usb2_green {
|
||||
+ label = "l-50:green:usb2";
|
||||
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ trigger-sources = <&hub_port1>;
|
||||
+ };
|
||||
+
|
||||
+ usb2_red {
|
||||
+ label = "l-50:red:usb2";
|
||||
+ gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb2_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb2_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio3 3 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ usb1_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb1_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio3 4 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ mpcie_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "mpcie_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ express_card_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "express_card_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ factory_defaults {
|
||||
+ label = "factory_defaults";
|
||||
+ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ethphy8: ethernet-phy@8 {
|
||||
+ reg = <0x08>;
|
||||
+ };
|
||||
+
|
||||
+ switch0: switch@10 {
|
||||
+ compatible = "marvell,mv88e6085";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x10>;
|
||||
+ dsa,member = <0 0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan5";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan6";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "lan7";
|
||||
+ };
|
||||
+
|
||||
+ switch0port5: port@5 {
|
||||
+ reg = <5>;
|
||||
+ phy-mode = "rgmii-txid";
|
||||
+ link = <&switch1port5>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <6>;
|
||||
+ label = "cpu";
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ ethernet = <ð1port>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ switch@11 {
|
||||
+ compatible = "marvell,mv88e6085";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x11>;
|
||||
+ dsa,member = <0 1>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan8";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "dmz";
|
||||
+ };
|
||||
+
|
||||
+ switch1port5: port@5 {
|
||||
+ reg = <5>;
|
||||
+ phy-mode = "rgmii-txid";
|
||||
+ link = <&switch0port5>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <6>;
|
||||
+ label = "dsl";
|
||||
+ fixed-link {
|
||||
+ speed = <100>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð0 {
|
||||
+ status = "okay";
|
||||
+ ethernet0-port@0 {
|
||||
+ phy-handle = <ðphy8>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð1 {
|
||||
+ status = "okay";
|
||||
+ ethernet1-port@0 {
|
||||
+ speed = <1000>;
|
||||
+ duplex = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&nand {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&pmx_nand>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "u-boot";
|
||||
+ reg = <0x00000000 0x000c0000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@a0000 {
|
||||
+ label = "bootldr-env";
|
||||
+ reg = <0x000c0000 0x00040000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "kernel-1";
|
||||
+ reg = <0x00100000 0x00800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@900000 {
|
||||
+ label = "rootfs-1";
|
||||
+ reg = <0x00900000 0x07100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@7a00000 {
|
||||
+ label = "kernel-2";
|
||||
+ reg = <0x07a00000 0x00800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@8200000 {
|
||||
+ label = "rootfs-2";
|
||||
+ reg = <0x08200000 0x07100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@f300000 {
|
||||
+ label = "default_sw";
|
||||
+ reg = <0x0f300000 0x07900000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@16c00000 {
|
||||
+ label = "logs";
|
||||
+ reg = <0x16c00000 0x01800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18400000 {
|
||||
+ label = "preset_cfg";
|
||||
+ reg = <0x18400000 0x00100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18500000 {
|
||||
+ label = "adsl";
|
||||
+ reg = <0x18500000 0x00100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18600000 {
|
||||
+ label = "storage";
|
||||
+ reg = <0x18600000 0x07a00000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&rtc {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pciec {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sata_phy0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&sata_phy1 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usb0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port@1 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+
|
||||
+ hub_port1: port@1 {
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ hub_port3: port@3 {
|
||||
+ reg = <3>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
47
target/linux/kirkwood/patches-5.4/111-l-50.patch
Normal file
47
target/linux/kirkwood/patches-5.4/111-l-50.patch
Normal file
@ -0,0 +1,47 @@
|
||||
--- a/arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
@@ -18,6 +18,13 @@
|
||||
reg = <0x00000000 0x20000000>;
|
||||
};
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &led_status_green;
|
||||
+ led-failsafe = &led_status_red;
|
||||
+ led-running = &led_status_green;
|
||||
+ led-upgrade = &led_status_red;
|
||||
+ };
|
||||
+
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8";
|
||||
stdout-path = &uart0;
|
||||
@@ -95,12 +102,12 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- status_green {
|
||||
+ led_status_green: status_green {
|
||||
label = "l-50:green:status";
|
||||
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- status_red {
|
||||
+ led_status_red: status_red {
|
||||
label = "l-50:red:status";
|
||||
gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@@ -349,13 +356,8 @@
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
- label = "kernel-1";
|
||||
- reg = <0x00100000 0x00800000>;
|
||||
- };
|
||||
-
|
||||
- partition@900000 {
|
||||
- label = "rootfs-1";
|
||||
- reg = <0x00900000 0x07100000>;
|
||||
+ label = "ubi";
|
||||
+ reg = <0x00100000 0x07900000>;
|
||||
};
|
||||
|
||||
partition@7a00000 {
|
@ -19,7 +19,6 @@ CONFIG_SOC_AMAZON_SE=y
|
||||
# CONFIG_SOC_XWAY is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
|
@ -22,7 +22,6 @@ CONFIG_SOC_AMAZON_SE=y
|
||||
CONFIG_TARGET_ISA_REV=1
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
|
@ -112,7 +112,7 @@
|
||||
|
||||
ð0 {
|
||||
pinctrl-0 = <&mdio_pins>,
|
||||
<&gphy0_led0_pins>, <&gphy0_led2_pins>,
|
||||
<&gphy0_led1_pins>, <&gphy0_led2_pins>,
|
||||
<&gphy1_led1_pins>, <&gphy1_led2_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
|
@ -112,7 +112,7 @@
|
||||
|
||||
ð0 {
|
||||
pinctrl-0 = <&mdio_pins>,
|
||||
<&gphy0_led0_pins>, <&gphy0_led2_pins>,
|
||||
<&gphy0_led1_pins>, <&gphy0_led2_pins>,
|
||||
<&gphy1_led1_pins>, <&gphy1_led2_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
|
@ -30,8 +30,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
+ clkdev_add_pmu("1e108000.eth", NULL, 0, 0, PMU_SWITCH |
|
||||
PMU_PPE_DP | PMU_PPE_TC);
|
||||
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
|
||||
- clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
|
||||
- clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
|
||||
- clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY);
|
||||
- clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY);
|
||||
+ clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY);
|
||||
+ clkdev_add_pmu("1f203068.gphy", NULL, 1, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
|
||||
@ -46,8 +46,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
PMU_SWITCH | PMU_PPE_DPLUS | PMU_PPE_DPLUM |
|
||||
PMU_PPE_EMA | PMU_PPE_TC | PMU_PPE_SLL01 |
|
||||
PMU_PPE_QSB | PMU_PPE_TOP);
|
||||
- clkdev_add_pmu("1e108000.gswip", "gphy0", 0, 0, PMU_GPHY);
|
||||
- clkdev_add_pmu("1e108000.gswip", "gphy1", 0, 0, PMU_GPHY);
|
||||
- clkdev_add_pmu("1e108000.switch", "gphy0", 0, 0, PMU_GPHY);
|
||||
- clkdev_add_pmu("1e108000.switch", "gphy1", 0, 0, PMU_GPHY);
|
||||
+ clkdev_add_pmu("1f203020.gphy", NULL, 0, 0, PMU_GPHY);
|
||||
+ clkdev_add_pmu("1f203068.gphy", NULL, 0, 0, PMU_GPHY);
|
||||
clkdev_add_pmu("1e103000.sdio", NULL, 1, 0, PMU_SDIO);
|
||||
|
@ -83,7 +83,6 @@ CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XRX200_PHY_FW=y
|
||||
|
@ -89,7 +89,6 @@ CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_UBIFS_FS_ZSTD=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XRX200_PHY_FW=y
|
||||
|
@ -41,7 +41,6 @@ CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
|
@ -43,5 +43,4 @@ CONFIG_UBIFS_FS_LZO=y
|
||||
# CONFIG_UBIFS_FS_ZSTD is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
|
@ -29,7 +29,6 @@ CONFIG_RTL8367B_PHY=y
|
||||
CONFIG_RTL8367_PHY=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
|
@ -31,7 +31,6 @@ CONFIG_RTL8367_PHY=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
|
@ -18,6 +18,7 @@ endef
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
DEFAULT_PACKAGES += kmod-usb3 kmod-usb-dwc3 kmod-usb-storage
|
||||
DEFAULT_PACKAGES += kmod-usb3 kmod-usb-dwc3 kmod-usb-storage \
|
||||
partx-utils
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
@ -0,0 +1,13 @@
|
||||
do_sysinfo_layerscape_fixup() {
|
||||
[ -e /tmp/sysinfo/board_name ] || return
|
||||
[ -e /proc/cmdline ] || return
|
||||
cmdline=$(strings /proc/cmdline)
|
||||
case "${cmdline}" in
|
||||
*root=/dev/mmcblk*)
|
||||
board="$(strings /tmp/sysinfo/board_name)-sdboot"
|
||||
echo ${board} > /tmp/sysinfo/board_name
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_sysinfo_layerscape_fixup
|
@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright 2015-2019 Traverse Technologies
|
||||
# Copyright 2020 NXP
|
||||
#
|
||||
|
||||
RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /usr/sbin/ubinfo /bin/echo"
|
||||
@ -7,6 +8,85 @@ RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock"
|
||||
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
|
||||
platform_check_image_sdboot() {
|
||||
local diskdev partdev diff
|
||||
|
||||
export_bootdevice && export_partdevice diskdev 0 || {
|
||||
echo "Unable to determine upgrade device"
|
||||
return 1
|
||||
}
|
||||
|
||||
# get partitions table from boot device
|
||||
get_partitions "/dev/$diskdev" bootdisk
|
||||
|
||||
# get partitions table from sysupgrade.bin
|
||||
dd if="$1" of=/tmp/image.bs bs=512b count=1 > /dev/null 2>&1
|
||||
sync
|
||||
get_partitions /tmp/image.bs image
|
||||
|
||||
# compare tables
|
||||
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
|
||||
|
||||
rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
|
||||
|
||||
if [ -n "$diff" ]; then
|
||||
echo "Partition layout has changed. Full image will be written."
|
||||
ask_bool 0 "Abort" && exit 1
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
platform_do_upgrade_sdboot() {
|
||||
local diskdev partdev diff
|
||||
|
||||
export_bootdevice && export_partdevice diskdev 0 || {
|
||||
echo "Unable to determine upgrade device"
|
||||
return 1
|
||||
}
|
||||
|
||||
if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
|
||||
# get partitions table from boot device
|
||||
get_partitions "/dev/$diskdev" bootdisk
|
||||
|
||||
# get partitions table from sysupgrade.bin
|
||||
dd if="$1" of=/tmp/image.bs bs=512b count=1 > /dev/null 2>&1
|
||||
sync
|
||||
get_partitions /tmp/image.bs image
|
||||
|
||||
# compare tables
|
||||
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
|
||||
else
|
||||
diff=1
|
||||
fi
|
||||
|
||||
if [ -n "$diff" ]; then
|
||||
dd if="$1" of="/dev/$diskdev" bs=1024 count=4 > /dev/null 2>&1
|
||||
dd if="$1" of="$diskdev" bs=1024 skip=4 seek=16384 > /dev/null 2>&1
|
||||
sync
|
||||
|
||||
# Separate removal and addtion is necessary; otherwise, partition 1
|
||||
# will be missing if it overlaps with the old partition 2
|
||||
partx -d - "/dev/$diskdev"
|
||||
partx -a - "/dev/$diskdev"
|
||||
|
||||
return 0
|
||||
fi
|
||||
|
||||
# write kernel image
|
||||
dd if="$1" of="$diskdev" bs=1024 skip=4 seek=16384 count=16384 > /dev/null 2>&1
|
||||
sync
|
||||
|
||||
# iterate over each partition from the image and write it to the boot disk
|
||||
while read part start size; do
|
||||
if export_partdevice partdev $part; then
|
||||
echo "Writing image to /dev/$partdev..."
|
||||
dd if="$1" of="/dev/$partdev" bs=512 skip="$start" count="$size" > /dev/null 2>&1
|
||||
sync
|
||||
else
|
||||
echo "Unable to find partition $part device, skipped."
|
||||
fi
|
||||
done < /tmp/partmap.image
|
||||
|
||||
}
|
||||
platform_do_upgrade_traverse_nandubi() {
|
||||
bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}')
|
||||
newbootsys=2
|
||||
@ -24,6 +104,15 @@ platform_do_upgrade_traverse_nandubi() {
|
||||
nand_do_upgrade "$1" || (echo "Upgrade failed, setting bootsys ${bootsys}" && fw_setenv bootsys $bootsys)
|
||||
|
||||
}
|
||||
platform_copy_config() {
|
||||
local partdev parttype=ext4
|
||||
|
||||
if export_partdevice partdev 1; then
|
||||
mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt
|
||||
cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
|
||||
umount /mnt
|
||||
fi
|
||||
}
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
@ -33,7 +122,21 @@ platform_check_image() {
|
||||
nand_do_platform_check "traverse-ls1043" $1
|
||||
return $?
|
||||
;;
|
||||
fsl,ls1012a-frdm)
|
||||
fsl,ls1012a-frdm | \
|
||||
fsl,ls1012a-rdb | \
|
||||
fsl,ls1021a-twr | \
|
||||
fsl,ls1043a-rdb | \
|
||||
fsl,ls1046a-rdb | \
|
||||
fsl,ls1088a-rdb | \
|
||||
fsl,ls2088a-rdb)
|
||||
return 0
|
||||
;;
|
||||
fsl,ls1012a-frwy-sdboot | \
|
||||
fsl,ls1021a-twr-sdboot | \
|
||||
fsl,ls1043a-rdb-sdboot | \
|
||||
fsl,ls1046a-rdb-sdboot | \
|
||||
fsl,ls1088a-rdb-sdboot)
|
||||
platform_check_image_sdboot "$1"
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
@ -55,10 +158,24 @@ platform_do_upgrade() {
|
||||
traverse,ls1043s)
|
||||
platform_do_upgrade_traverse_nandubi "$1"
|
||||
;;
|
||||
fsl,ls1012a-frdm)
|
||||
fsl,ls1012a-frdm | \
|
||||
fsl,ls1012a-rdb | \
|
||||
fsl,ls1021a-twr | \
|
||||
fsl,ls1043a-rdb | \
|
||||
fsl,ls1046a-rdb | \
|
||||
fsl,ls1088a-rdb | \
|
||||
fsl,ls2088a-rdb)
|
||||
PART_NAME=firmware
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
fsl,ls1012a-frwy-sdboot | \
|
||||
fsl,ls1021a-twr-sdboot | \
|
||||
fsl,ls1043a-rdb-sdboot | \
|
||||
fsl,ls1046a-rdb-sdboot | \
|
||||
fsl,ls1088a-rdb-sdboot)
|
||||
platform_do_upgrade_sdboot "$1"
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
echo "Sysupgrade is not currently supported on $board"
|
||||
;;
|
||||
|
@ -11,6 +11,9 @@ LS_SD_ROOTFSPART_OFFSET = 64
|
||||
LS_SD_IMAGE_SIZE = $(shell echo $$((($(LS_SD_ROOTFSPART_OFFSET) + \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE)) * 1024 * 1024)))
|
||||
|
||||
# The limitation of flash sysupgrade.bin is 16MB kernel + 32MB rootfs
|
||||
LS_SYSUPGRADE_IMAGE_SIZE = 48m
|
||||
|
||||
define Build/ls-clean
|
||||
rm -f $@
|
||||
endef
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2018 NXP
|
||||
# Copyright 2018-2020 NXP
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -8,11 +8,15 @@
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGES := firmware.bin
|
||||
IMAGES := firmware.bin sysupgrade.bin
|
||||
KERNEL := kernel-bin | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL_LOADADDR := 0x80008000
|
||||
KERNEL_ENTRY_POINT := 0x80008000
|
||||
IMAGE_SIZE := 64m
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to 16M | \
|
||||
append-rootfs | pad-rootfs | \
|
||||
check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata
|
||||
endef
|
||||
|
||||
define Device/ls1021atwr
|
||||
@ -28,7 +32,8 @@ define Device/ls1021atwr
|
||||
ls-append $(1)-uboot-env.bin | pad-to 15M | \
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to 32M | \
|
||||
append-rootfs | pad-rootfs | check-size 67108865
|
||||
append-rootfs | pad-rootfs | check-size
|
||||
SUPPORTED_DEVICES := fsl,ls1021a-twr
|
||||
endef
|
||||
TARGET_DEVICES += ls1021atwr
|
||||
|
||||
@ -38,7 +43,7 @@ define Device/ls1021atwr-sdboot
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_DTS := ls1021a-twr
|
||||
FILESYSTEMS := ext4
|
||||
IMAGES := sdcard.img
|
||||
IMAGES := sdcard.img sysupgrade.bin
|
||||
IMAGE/sdcard.img := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 4K | \
|
||||
@ -47,6 +52,12 @@ define Device/ls1021atwr-sdboot
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata
|
||||
SUPPORTED_DEVICES := fsl,ls1021a-twr-sdboot
|
||||
endef
|
||||
TARGET_DEVICES += ls1021atwr-sdboot
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2018 NXP
|
||||
# Copyright 2018-2020 NXP
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -7,12 +7,15 @@
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
IMAGES := firmware.bin
|
||||
FILESYSTEMS := ubifs
|
||||
MKUBIFS_OPTS := -m 1 -e 262016 -c 128
|
||||
IMAGES := firmware.bin sysupgrade.bin
|
||||
FILESYSTEMS := squashfs
|
||||
KERNEL := kernel-bin | gzip | uImage gzip
|
||||
KERNEL_LOADADDR := 0x80080000
|
||||
KERNEL_ENTRY_POINT := 0x80080000
|
||||
IMAGE_SIZE := 64m
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to 16M | \
|
||||
append-rootfs | pad-rootfs | \
|
||||
check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata
|
||||
endef
|
||||
|
||||
define Device/ls1012afrdm
|
||||
@ -24,8 +27,6 @@ define Device/ls1012afrdm
|
||||
kmod-ppfe
|
||||
DEVICE_DTS := freescale/fsl-ls1012a-frdm
|
||||
BLOCKSIZE := 256KiB
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGES += sysupgrade.bin
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 1M | \
|
||||
@ -34,9 +35,10 @@ define Device/ls1012afrdm
|
||||
ls-append pfe.itb | pad-to 15M | \
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to $$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | check-size 67108865
|
||||
append-rootfs | pad-rootfs | check-size
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | check-size 50331648 | append-metadata
|
||||
append-rootfs | pad-rootfs | \
|
||||
check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata
|
||||
KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
SUPPORTED_DEVICES := fsl,ls1012a-frdm
|
||||
@ -51,9 +53,6 @@ define Device/ls1012ardb
|
||||
tfa-ls1012ardb \
|
||||
kmod-ppfe
|
||||
DEVICE_DTS := freescale/fsl-ls1012a-rdb
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 256KiB
|
||||
PAGESIZE := 1
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 1M | \
|
||||
@ -62,7 +61,8 @@ define Device/ls1012ardb
|
||||
ls-append pfe.itb | pad-to 15M | \
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to 32M | \
|
||||
append-ubi | check-size 67108865
|
||||
append-rootfs | pad-rootfs | check-size
|
||||
SUPPORTED_DEVICES := fsl,ls1012a-rdb
|
||||
endef
|
||||
TARGET_DEVICES += ls1012ardb
|
||||
|
||||
@ -75,7 +75,7 @@ define Device/ls1012afrwy
|
||||
kmod-ppfe
|
||||
DEVICE_DTS := freescale/fsl-ls1012a-frwy
|
||||
FILESYSTEMS := ext4
|
||||
IMAGES := firmware.bin sdcard.img
|
||||
IMAGES := firmware.bin sdcard.img sysupgrade.bin
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 128K | \
|
||||
@ -89,6 +89,12 @@ define Device/ls1012afrwy
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata
|
||||
SUPPORTED_DEVICES := fsl,ls1012a-frwy-sdboot
|
||||
endef
|
||||
TARGET_DEVICES += ls1012afrwy
|
||||
|
||||
@ -101,7 +107,6 @@ define Device/ls1043ardb
|
||||
tfa-ls1043ardb \
|
||||
fmc fmc-eth-config
|
||||
DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 1M | \
|
||||
@ -110,7 +115,8 @@ define Device/ls1043ardb
|
||||
ls-append $(1)-fman.bin | pad-to 15M | \
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to 32M | \
|
||||
append-rootfs | pad-rootfs | check-size 67108865
|
||||
append-rootfs | pad-rootfs | check-size
|
||||
SUPPORTED_DEVICES := fsl,ls1043a-rdb
|
||||
endef
|
||||
TARGET_DEVICES += ls1043ardb
|
||||
|
||||
@ -124,7 +130,7 @@ define Device/ls1043ardb-sdboot
|
||||
fmc fmc-eth-config
|
||||
DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk
|
||||
FILESYSTEMS := ext4
|
||||
IMAGES := sdcard.img
|
||||
IMAGES := sdcard.img sysupgrade.bin
|
||||
IMAGE/sdcard.img := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 4K | \
|
||||
@ -135,6 +141,12 @@ define Device/ls1043ardb-sdboot
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata
|
||||
SUPPORTED_DEVICES := fsl,ls1043a-rdb-sdboot
|
||||
endef
|
||||
TARGET_DEVICES += ls1043ardb-sdboot
|
||||
|
||||
@ -147,9 +159,6 @@ define Device/ls1046ardb
|
||||
tfa-ls1046ardb \
|
||||
fmc fmc-eth-config
|
||||
DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 256KiB
|
||||
PAGESIZE := 1
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 1M | \
|
||||
@ -158,7 +167,8 @@ define Device/ls1046ardb
|
||||
ls-append $(1)-fman.bin | pad-to 15M | \
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to 32M | \
|
||||
append-ubi | check-size 67108865
|
||||
append-rootfs | pad-rootfs | check-size
|
||||
SUPPORTED_DEVICES := fsl,ls1046a-rdb
|
||||
endef
|
||||
TARGET_DEVICES += ls1046ardb
|
||||
|
||||
@ -172,7 +182,7 @@ define Device/ls1046ardb-sdboot
|
||||
fmc fmc-eth-config
|
||||
DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk
|
||||
FILESYSTEMS := ext4
|
||||
IMAGES := sdcard.img
|
||||
IMAGES := sdcard.img sysupgrade.bin
|
||||
IMAGE/sdcard.img := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 4K | \
|
||||
@ -183,6 +193,12 @@ define Device/ls1046ardb-sdboot
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata
|
||||
SUPPORTED_DEVICES := fsl,ls1046a-rdb-sdboot
|
||||
endef
|
||||
TARGET_DEVICES += ls1046ardb-sdboot
|
||||
|
||||
@ -196,9 +212,6 @@ define Device/ls1088ardb
|
||||
tfa-ls1088ardb \
|
||||
restool
|
||||
DEVICE_DTS := freescale/fsl-ls1088a-rdb
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 256KiB
|
||||
PAGESIZE := 1
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 1M | \
|
||||
@ -209,7 +222,8 @@ define Device/ls1088ardb
|
||||
ls-append $(1)-dpc.dtb | pad-to 15M | \
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to 32M | \
|
||||
append-ubi | check-size 67108865
|
||||
append-rootfs | pad-rootfs | check-size
|
||||
SUPPORTED_DEVICES := fsl,ls1088a-rdb
|
||||
endef
|
||||
TARGET_DEVICES += ls1088ardb
|
||||
|
||||
@ -224,7 +238,7 @@ define Device/ls1088ardb-sdboot
|
||||
restool
|
||||
DEVICE_DTS := freescale/fsl-ls1088a-rdb
|
||||
FILESYSTEMS := ext4
|
||||
IMAGES := sdcard.img
|
||||
IMAGES := sdcard.img sysupgrade.bin
|
||||
IMAGE/sdcard.img := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 4K | \
|
||||
@ -237,6 +251,12 @@ define Device/ls1088ardb-sdboot
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := \
|
||||
ls-clean | \
|
||||
ls-append-sdhead $(1) | pad-to 16M | \
|
||||
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
||||
append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata
|
||||
SUPPORTED_DEVICES := fsl,ls1088a-rdb-sdboot
|
||||
endef
|
||||
TARGET_DEVICES += ls1088ardb-sdboot
|
||||
|
||||
@ -249,7 +269,6 @@ define Device/ls2088ardb
|
||||
tfa-ls2088ardb \
|
||||
restool
|
||||
DEVICE_DTS := freescale/fsl-ls2088a-rdb
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 1M | \
|
||||
@ -260,7 +279,8 @@ define Device/ls2088ardb
|
||||
ls-append $(1)-dpc.dtb | pad-to 15M | \
|
||||
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
||||
append-kernel | pad-to 32M | \
|
||||
append-rootfs | pad-rootfs | check-size 67108865
|
||||
append-rootfs | pad-rootfs | check-size
|
||||
SUPPORTED_DEVICES := fsl,ls2088a-rdb
|
||||
endef
|
||||
TARGET_DEVICES += ls2088ardb
|
||||
|
||||
@ -272,6 +292,7 @@ define Device/traverse-ls1043
|
||||
KERNEL_INSTALL := 1
|
||||
FDT_LOADADDR = 0x90000000
|
||||
FILESYSTEMS := ubifs
|
||||
MKUBIFS_OPTS := -m 1 -e 262016 -c 128
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
uboot-envtools \
|
||||
|
@ -0,0 +1,28 @@
|
||||
From fa578d4e9fbef8928a45edd904dafb1e3334417e Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Thu, 30 Apr 2020 10:56:46 +0800
|
||||
Subject: [PATCH] arm64: dts: ls1043a-rdb: add compatible for board
|
||||
|
||||
Add compatible for board to identify.
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
|
||||
---
|
||||
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
|
||||
index dde50c8..9a93e9a 100644
|
||||
--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
|
||||
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
/ {
|
||||
model = "LS1043A RDB Board";
|
||||
+ compatible = "fsl,ls1043a-rdb", "fsl,ls1043a";
|
||||
|
||||
aliases {
|
||||
serial0 = &duart0;
|
||||
--
|
||||
2.7.4
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user