Skip to content

Commit

Permalink
uboot-envtools: update patch
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Dec 11, 2019
1 parent a70a719 commit 19d7f61
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 19 deletions.
15 changes: 5 additions & 10 deletions package/boot/uboot-envtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,11 @@ define Build/Configure
touch $(PKG_BUILD_DIR)/include/generated/autoconf.h
endef

TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include

define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CROSS_COMPILE="$(TARGET_CROSS)" \
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
HOSTLDFLAGS= \
no-dot-config-targets=envtools \
envtools
endef
MAKE_FLAGS += \
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
no-dot-config-targets=envtools \
envtools

define Package/uboot-envtools/conffiles
/etc/config/ubootenv
Expand Down
11 changes: 10 additions & 1 deletion package/boot/uboot-envtools/files/ar71xx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ sr3200|\
t830|\
tube2h|\
wam250|\
wndr3700|\
wnr1000-v2|\
wnr2000-v3|\
wnr2200|\
wnr612-v2|\
xd3200)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;;
Expand Down Expand Up @@ -92,6 +95,12 @@ qihoo-c301)
wi2a-ac200i)
ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000"
;;
wndr3700)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
;;
wndr4300)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
;;
esac

config_load ubootenv
Expand Down
11 changes: 10 additions & 1 deletion package/boot/uboot-envtools/files/ath79
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,24 @@ buffalo,wzr-hp-ag300h)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
;;
buffalo,bhr-4grv2|\
engenius,ecb1750|\
glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor|\
librerouter,librerouter-v1|\
netgear,ex6400|\
netgear,ex7300|\
netgear,wnr612-v2|\
ocedo,koala|\
ocedo,raccoon|\
openmesh,om5p-ac-v2|\
yuncore,a770)
yuncore,a770|\
yuncore,a782|\
yuncore,xd4200)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;;
netgear,wndr3700)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
;;
esac

config_load ubootenv
Expand Down
4 changes: 4 additions & 0 deletions package/boot/uboot-envtools/files/imx6
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@

touch /etc/config/ubootenv

. /lib/imx6.sh
. /lib/uboot-envtools.sh
. /lib/functions.sh

board=$(board_name)

case "$board" in
apalis*)
ubootenv_add_uci_config $(bootdev_from_uuid)boot0 -0x2200 0x2000 0x200 10
;;
*gw5*)
if [ -c /dev/mtd1 ]; then
# board boots from NAND
Expand Down
3 changes: 3 additions & 0 deletions package/boot/uboot-envtools/files/ipq40xx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ openmesh,a62)
linksys,ea6350v3)
ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x20000"
;;
linksys,ea8300)
ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x40000" "0x20000"
;;
zyxel,nbg6617)
ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x10000" "0x10000"
;;
Expand Down
3 changes: 0 additions & 3 deletions package/boot/uboot-envtools/files/mvebu
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ linksys,rango|\
linksys,venom)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
methode,udpu)
ubootenv_add_uci_config "/dev/mtd0" "0x180000" "0x10000" "0x10000"
;;
esac

config_load ubootenv
Expand Down
4 changes: 3 additions & 1 deletion package/boot/uboot-envtools/files/oxnas
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ board=$(board_name)

case "$board" in
"cloudengines,pogoplug"* | \
"mitrastar,stg-212" | \
"shuttle,kd20")
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x2000" "0x2000" "1"
;;
"mitrastar,stg-212")
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000" "1"
;;
esac

config_load ubootenv
Expand Down
5 changes: 3 additions & 2 deletions package/boot/uboot-envtools/files/ramips
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ board=$(board_name)
case "$board" in
alfa-network,ac1200rm|\
alfa-network,awusfree1|\
alfa-network,quad-e4g|\
alfa-network,r36m-e4g|\
alfa-network,tube-e4g)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
;;
Expand All @@ -32,8 +34,7 @@ zbt-wg2626)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
;;
xiaomi,mir3p|\
xiaomi,miwifi-r3|\
mir3g)
xiaomi,mir3g)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
;;
esac
Expand Down
5 changes: 4 additions & 1 deletion package/boot/uboot-envtools/patches/001-compile.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -10,6 +10,10 @@
@@ -10,6 +10,13 @@
# with "CC" here for the maximum code reuse of scripts/Makefile.host.
override HOSTCC = $(CC)

+ifneq ($(TARGET_CFLAGS),)
+HOSTCFLAGS = $(TARGET_CFLAGS)
+endif
+ifneq ($(TARGET_LDFLAGS),)
+HOSTLDFLAGS = $(TARGET_LDFLAGS)
+endif
+
# Compile for a hosted environment on the target
HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \
Expand Down

0 comments on commit 19d7f61

Please sign in to comment.