Skip to content

Commit

Permalink
Merge branch 'main' into TahomaSoft-rk3568-t5
Browse files Browse the repository at this point in the history
Updating merge to track upstream main.
  • Loading branch information
TahomaSoft committed Nov 9, 2023
2 parents f9b4dfc + 4fb8e68 commit 5538afc
Show file tree
Hide file tree
Showing 233 changed files with 8,901 additions and 1,097 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/ci-env/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "CI build container",
"image": "ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v9",
"features": {
},
"remoteUser": "buildbot",
"customizations": {
"vscode": {
"extensions": ["ms-vscode.cpptools", "plorefice.devicetree"]
}
}
}
24 changes: 24 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Create GitHub release

permissions:
contents: write

on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir

world:

DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1)
DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -e '/usr' -e '/nix/store' -m 1)

export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH))
export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH)
Expand Down
8 changes: 8 additions & 0 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ menu "Global build settings"
directory containing machine readable list of built profiles
and resulting images.

config JSON_CYCLONEDX_SBOM
bool "Create CycloneDX SBOM JSON"
default BUILDBOT
help
Create a JSON files *.bom.cdx.json in the build
directory containing Software Bill Of Materials in CycloneDX
format.

config ALL_NONSHARED
bool "Select all target specific packages by default"
select ALL_KMODS
Expand Down
17 changes: 15 additions & 2 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,23 @@ config KERNEL_PRINTK_TIME
default y

config KERNEL_SLUB_DEBUG
bool
bool "Enable SLUB debugging support"
help
This enables various debugging features:
- Accepts "slub_debug" kernel parameter
- Provides caches debugging options (e.g. tracing, validating)
- Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
- Enables /proc/slabinfo support
- Prints info when running out of memory

Enabling this can result in a significant increase of code size.

config KERNEL_SLUB_DEBUG_ON
bool
depends on KERNEL_SLUB_DEBUG
bool "Boot kernel with basic caches debugging enabled"
help
This enables by default sanity_checks, red_zone, poison and store_user
debugging options for all caches.

config KERNEL_SLABINFO
select KERNEL_SLUB_DEBUG
Expand Down
7 changes: 7 additions & 0 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ endef
define Image/Manifest
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
ifndef IB
$(if $(CONFIG_JSON_CYCLONEDX_SBOM), \
$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
$(TMP_DIR)/.packageinfo \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json)
endif
endef

define Image/gzip-ext4-padded-squashfs
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .135
LINUX_KERNEL_HASH-5.15.135 = 14835e629e237f136cfed484fdb533c95242429809bdcdb2a2d66dfcb7447170
LINUX_VERSION-5.15 = .137
LINUX_KERNEL_HASH-5.15.137 = 9749b21609f9e7ad9c46160c2c107db823b99cef77fa6cb080b6c2dc685fb2f7
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .60
LINUX_KERNEL_HASH-6.1.60 = 58520e7ae5a6af254ddf7ddbfc42e4373b0d36c67d467f6e35a3bd1672f5fb0a
LINUX_VERSION-6.1 = .61
LINUX_KERNEL_HASH-6.1.61 = ad2c9d12fc36e2dde4796a3eec8f4ddca2e278098f4e555b6e6f5f03ef6964ce
4 changes: 0 additions & 4 deletions include/kernel-defaults.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ endif

INITRAMFS_EXTRA_FILES ?= $(GENERIC_PLATFORM_DIR)/image/initramfs-base-files.txt

ifneq (,$(KERNEL_CC))
KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
endif

export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include

# defined in quilt.mk
Expand Down
4 changes: 4 additions & 0 deletions include/kernel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ KERNEL_MAKE_FLAGS = \
cmd_syscalls= \
$(if $(__package_mk),KBUILD_EXTRA_SYMBOLS="$(wildcard $(PKG_SYMVERS_DIR)/*.symvers)")

ifneq (,$(KERNEL_CC))
KERNEL_MAKE_FLAGS += CC="$(KERNEL_CC)"
endif

KERNEL_NOSTDINC_FLAGS = \
-nostdinc $(if $(DUMP),, -isystem $(shell $(TARGET_CC) -print-file-name=include))

Expand Down
2 changes: 2 additions & 0 deletions include/package-dumpinfo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ $(if $(USERID),Require-User: $(USERID)
)Source: $(PKG_SOURCE)
$(if $(LICENSE),License: $(LICENSE)
)$(if $(LICENSE_FILES),LicenseFiles: $(LICENSE_FILES)
)$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID)
)$(if $(ABI_VERSION),ABI-Version: $(ABI_VERSION)
)Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
$(if $(KCONFIG),Kernel-Config: $(KCONFIG)
)$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
Expand Down
2 changes: 1 addition & 1 deletion include/prereq-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash $(STAGING_DIR_HOST)/bin/xxd

# Install ldconfig stub
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
$(LN) $(firstword $(wildcard /bin/true /usr/bin/true)) $(STAGING_DIR_HOST)/bin/ldconfig))
$(LN) $(SCRIPT_DIR)/noop.sh $(STAGING_DIR_HOST)/bin/ldconfig))
8 changes: 8 additions & 0 deletions package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ ifdef CONFIG_SIGNED_PACKAGES
$(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY); \
); done
endif
ifdef CONFIG_JSON_CYCLONEDX_SBOM
@echo Creating CycloneDX package SBOMs...
@for d in $(PACKAGE_SUBDIRS); do ( \
[ -d $$d ] && \
cd $$d || continue; \
$(SCRIPT_DIR)/package-metadata.pl pkgcyclonedxsbom Packages.manifest > Packages.bom.cdx.json || true; \
); done
endif

$(curdir)/flags-install:= -j1

Expand Down
26 changes: 22 additions & 4 deletions package/boot/arm-trusted-firmware-mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=arm-trusted-firmware-mediatek
PKG_RELEASE:=2
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
PKG_SOURCE_DATE:=2023-07-24
PKG_SOURCE_VERSION:=00ac6db375b76e57e1f5e9e9bffa033e907c3581
PKG_MIRROR_HASH:=74fc18395532c4292f530da8d00fa1873ada4e05e600c0077a7b7f85ace0d913
PKG_SOURCE_DATE:=2023-10-13
PKG_SOURCE_VERSION:=0ea67d76ae8be127c91caa3fcdf449b1fe533175
PKG_MIRROR_HASH:=b102f6ffaa7cd2202161c44cab4d27f426d9d74c311ea9eb4d2f371ea2af4a2e

PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>

Expand Down Expand Up @@ -94,6 +94,22 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr
DDR3_FLYBY:=1
endef

define Trusted-Firmware-A/mt7981-emmc-ddr4
NAME:=MediaTek MT7981 (eMMC, DDR4)
BOOT_DEVICE:=emmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef

define Trusted-Firmware-A/mt7981-spim-nand-ddr4
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef

define Trusted-Firmware-A/mt7981-nor-ddr3
NAME:=MediaTek MT7981 (SPI-NOR, DDR3)
BOOT_DEVICE:=nor
Expand Down Expand Up @@ -349,6 +365,8 @@ TFA_TARGETS:= \
mt7981-sdmmc-ddr3 \
mt7981-snand-ddr3 \
mt7981-spim-nand-ddr3 \
mt7981-emmc-ddr4 \
mt7981-spim-nand-ddr4 \
mt7986-emmc-ddr3 \
mt7986-nor-ddr3 \
mt7986-sdmmc-ddr3 \
Expand Down

This file was deleted.

This file was deleted.

4 changes: 3 additions & 1 deletion package/boot/uboot-envtools/files/ath79
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ dongwon,dw02-412h-128m|\
glinet,gl-ar300m-lite|\
glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor|\
glinet,gl-ar300m16)
glinet,gl-ar300m16|\
glinet,gl-s200-nor|\
glinet,gl-s200-nor-nand)
idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
Expand Down
17 changes: 17 additions & 0 deletions package/boot/uboot-envtools/files/mediatek_filogic
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ bananapi,bpi-r3)
;;
esac
;;
cmcc,rax3000m)
case "$(cmdline_get_var root)" in
/dev/mmc*)
local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
;;
*)
. /lib/upgrade/nand.sh
local envubi=$(nand_find_ubi ubi)
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
;;
esac
;;
glinet,gl-mt3000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
;;
Expand Down
3 changes: 2 additions & 1 deletion package/boot/uboot-envtools/files/qualcommax_ipq807x
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ case "$board" in
dynalink,dl-wrx36|\
netgear,rax120v2|\
netgear,wax218|\
netgear,wax620)
netgear,wax620|\
netgear,wax630)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
Expand Down
2 changes: 2 additions & 0 deletions package/boot/uboot-envtools/files/ramips
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ alfa-network,tube-e4g|\
engenius,epg600|\
engenius,esr600h|\
linksys,re7000|\
meig,slt866|\
sitecom,wlr-4100-v1-002|\
zyxel,keenetic-lite-iii-a)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
Expand Down Expand Up @@ -127,6 +128,7 @@ xiaomi,redmi-router-ac2100)
zyxel,lte3301-plus)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
;;
zyxel,lte5398-m904|\
zyxel,nr7101)
idx="$(find_mtd_index Config)"
[ -n "$idx" ] && \
Expand Down
26 changes: 26 additions & 0 deletions package/boot/uboot-mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,30 @@ define U-Boot/mt7629_rfb
UBOOT_CONFIG:=mt7629_rfb
endef

define U-Boot/mt7981_cmcc_rax3000m-emmc
NAME:=CMCC RAX3000M
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cmcc_rax3000m
UBOOT_CONFIG:=mt7981_cmcc_rax3000m-emmc
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=emmc
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr4
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr4
endef

define U-Boot/mt7981_cmcc_rax3000m-nand
NAME:=CMCC RAX3000M
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cmcc_rax3000m
UBOOT_CONFIG:=mt7981_cmcc_rax3000m-nand
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=spim-nand
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr4
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr4
endef

define U-Boot/mt7981_h3c_magic-nx30-pro
NAME:=H3C Magic NX30 Pro
BUILD_SUBTARGET:=filogic
Expand Down Expand Up @@ -496,6 +520,8 @@ UBOOT_TARGETS := \
mt7628_rfb \
ravpower_rp-wd009 \
mt7629_rfb \
mt7981_cmcc_rax3000m-emmc \
mt7981_cmcc_rax3000m-nand \
mt7981_h3c_magic-nx30-pro \
mt7981_rfb-spim-nand \
mt7981_rfb-emmc \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
{
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -2051,6 +2051,49 @@ static const char *fit_get_image_type_pr
@@ -2051,6 +2051,47 @@ static const char *fit_get_image_type_pr
return "unknown";
}

Expand All @@ -93,11 +93,8 @@
+ max_size = hdrsize;
+
+ images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
+ if (images_noffset < 0) {
+ printf("Can't find images parent node '%s' (%s)\n",
+ FIT_IMAGES_PATH, fdt_strerror(images_noffset));
+ return 0;
+ }
+ if (images_noffset < 0)
+ goto out;
+
+ for (ndepth = 0,
+ noffset = fdt_next_node(fit, images_noffset, &ndepth);
Expand All @@ -106,14 +103,15 @@
+ if (ndepth == 1) {
+ ret = fit_image_get_data_and_size(fit, noffset, &data, &data_size);
+ if (ret)
+ return 0;
+ goto out;
+
+ img_total = data_size + (data - fit);
+
+ max_size = (max_size > img_total) ? max_size : img_total;
+ }
+ }
+
+out:
+ return max_size;
+}
+
Expand Down
Loading

0 comments on commit 5538afc

Please sign in to comment.