Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Coolkids committed Nov 24, 2023
2 parents f6771a5 + f9e851a commit 965e834
Show file tree
Hide file tree
Showing 226 changed files with 5,636 additions and 2,987 deletions.
4 changes: 4 additions & 0 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERS
IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
IMG_COMBINED:=$(IMG_PREFIX)-combined
ifeq ($(DUMP),)
IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | cut -b1-8)
IMG_PART_DISKGUID:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/')
endif

MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt

Expand Down Expand Up @@ -167,7 +169,9 @@ define Image/pad-to
mv $(1).new $(1)
endef

ifeq ($(DUMP),)
ROOTFS_PARTSIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
endif

define Image/pad-root-squashfs
$(call Image/pad-to,$(KDIR)/root.squashfs,$(if $(1),$(1),$(ROOTFS_PARTSIZE)))
Expand Down
2 changes: 0 additions & 2 deletions include/prereq-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
perl --version | grep "perl.*v5"))

$(eval $(call SetupHostCommand,python,Please install Python >= 3.7, \
python3.12 -V 2>&1 | grep 'Python 3', \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \
Expand All @@ -191,7 +190,6 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.7, \
python3 -V 2>&1 | grep -E 'Python 3\.([7-9]|[0-9][0-9])\.?'))

$(eval $(call SetupHostCommand,python3,Please install Python >= 3.7, \
python3.12 -V 2>&1 | grep 'Python 3', \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \
Expand Down
3 changes: 2 additions & 1 deletion include/scan.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ define PackageDir
$$(call progress,Collecting $(SCAN_NAME) info: $(SCAN_DIR)/$(2)) \
echo Source-Makefile: $(SCAN_DIR)/$(2)/Makefile; \
$(if $(3),echo Override: $(3),true); \
$(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 FEED="$(call feedname,$(2))" -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) 2>/dev/null || { \
$(if $(findstring c,$(OPENWRT_VERBOSE)),$(MAKE),$(NO_TRACE_MAKE) --no-print-dir) -r DUMP=1 FEED="$(call feedname,$(2))" -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) \
$(if $(findstring c,$(OPENWRT_VERBOSE)),,2>/dev/null) || { \
mkdir -p "$(TOPDIR)/logs/$(SCAN_DIR)/$(2)"; \
$(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 FEED="$(call feedname,$(2))" -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) > $(TOPDIR)/logs/$(SCAN_DIR)/$(2)/dump.txt 2>&1; \
$$(call progress,ERROR: please fix $(SCAN_DIR)/$(2)/Makefile - see logs/$(SCAN_DIR)/$(2)/dump.txt for details\n) \
Expand Down
2 changes: 1 addition & 1 deletion include/u-boot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PKG_FLAGS:=nonshared
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README

PKG_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL ?= 1

ifdef UBOOT_USE_BINMAN
$(eval $(call TestHostCommand,python3-pyelftools, \
Expand Down
20 changes: 10 additions & 10 deletions package/base-files/files/bin/ipcalc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ function compl32(v) {

BEGIN {
slpos=index(ARGV[1],"/")
if (slpos == 0) {
ipaddr=ip2int(ARGV[1])
dotpos=index(ARGV[2],".")
if (dotpos == 0)
netmask=compl32(2**(32-int(ARGV[2]))-1)
else
netmask=ip2int(ARGV[2])
} else {
ipaddr=ip2int(substr(ARGV[1],0,slpos-1))
netmask=compl32(2**(32-int(substr(ARGV[1],slpos+1)))-1)
if (slpos != 0) {
# rearrange arguments to not use compound notation
ARGV[4]=ARGV[3]
ARGV[3]=ARGV[2]
ARGV[2]=substr(ARGV[1],slpos+1)
ARGV[1]=substr(ARGV[1],0,slpos-1)
}
ipaddr=ip2int(ARGV[1])
dotpos=index(ARGV[2],".")
if (dotpos == 0)
netmask=compl32(2**(32-int(ARGV[2]))-1)
else
netmask=ip2int(ARGV[2])

network=and(ipaddr,netmask)
prefix=32-bitcount(compl32(netmask))
Expand Down
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/mediatek_filogic
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ xiaomi,redmi-router-ax6000-stock)
;;
h3c,magic-nx30-pro|\
h3c,magic-nx30-pro-nmbm|\
jcg,q30|\
qihoo,360t7|\
tplink,tl-xdr4288|\
tplink,tl-xdr6086|\
Expand Down
4 changes: 4 additions & 0 deletions package/boot/uboot-envtools/files/mvebu
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ methode,edpu)
ubootenv_add_uci_config "/dev/mtd0" "0x180000" "0x10000" "0x10000"
fi
;;
synology,ds213j)
idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
;;
esac

config_load ubootenv
Expand Down
13 changes: 13 additions & 0 deletions package/boot/uboot-mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@ define U-Boot/mt7981_h3c_magic-nx30-pro
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef

define U-Boot/mt7981_jcg_q30
NAME:=JCG Q30
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=jcg_q30
UBOOT_CONFIG:=mt7981_jcg_q30
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=spim-nand
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef

define U-Boot/mt7981_rfb-spim-nand
NAME:=MT7981 Reference Board
BUILD_SUBTARGET:=filogic
Expand Down Expand Up @@ -547,6 +559,7 @@ UBOOT_TARGETS := \
mt7981_cmcc_rax3000m-emmc \
mt7981_cmcc_rax3000m-nand \
mt7981_h3c_magic-nx30-pro \
mt7981_jcg_q30 \
mt7981_rfb-spim-nand \
mt7981_rfb-emmc \
mt7981_rfb-nor \
Expand Down
2 changes: 1 addition & 1 deletion package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@
+ubi_init_emmc_install=run sdmmc_read_emmc_install && run ubi_write_emmc_install
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+ubi_write_emmc_install=ubi check emmc_install && ubi remote emmc_install ; ubi create emmc_install 0x800000 dynamic ; ubi write $loadaddr emmc_install 0x800000
+ubi_write_emmc_install=ubi check emmc_install && ubi remove emmc_install ; ubi create emmc_install 0x800000 dynamic ; ubi write $loadaddr emmc_install 0x800000
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
+_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
Expand Down
Loading

0 comments on commit 965e834

Please sign in to comment.