Skip to content

Commit

Permalink
Merge branch 'main' into ASUS-LYRA-MINI-MAP1300
Browse files Browse the repository at this point in the history
Signed-off-by: Erkki Hietaranta <[email protected]>
  • Loading branch information
sbeach92 authored Dec 5, 2023
2 parents 9073ea2 + 07765f2 commit fdc8f4a
Show file tree
Hide file tree
Showing 1,809 changed files with 67,447 additions and 22,650 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"]
}
}
}
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ body:
```. /etc/openwrt_release && echo $DISTRIB_REVISION```
validations:
required: true
- type: input
id: release
attributes:
label: OpenWrt release
description: |
The OpenWrt release or commit hash where this bug occurs (use command below).
```. /etc/openwrt_release && echo $DISTRIB_RELEASE```
validations:
required: true
- type: input
id: target
attributes:
Expand Down
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
11 changes: 11 additions & 0 deletions .github/workflows/issue-labeller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Issue Labeller
on:
issues:
types: [ opened ]

jobs:
label-component:
name: Validate and Tag Bug Report
permissions:
issues: write
uses: openwrt/actions-shared-workflows/.github/workflows/issue-labeller.yml@main
3 changes: 2 additions & 1 deletion .github/workflows/push-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
paths:
- 'include/version.mk'
- 'include/cmake.mk'
- 'tools/**'
- '.github/workflows/push-containers.yml'
- 'toolchain/**'
Expand All @@ -14,7 +15,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
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
13 changes: 7 additions & 6 deletions config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,6 @@ menu "Target Images"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default y

config GRUB_SERIAL
string "Serial port device"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "ttyS0"

config GRUB_BAUDRATE
int "Serial port baud rate"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
Expand All @@ -231,7 +226,8 @@ menu "Target Images"

config GRUB_FLOWCONTROL
bool "Use RTE/CTS on serial console"
depends on GRUB_SERIAL != ""
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
depends on TARGET_SERIAL != ""

config GRUB_BOOTOPTS
string "Extra kernel boot options"
Expand Down Expand Up @@ -277,6 +273,11 @@ menu "Target Images"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
select PACKAGE_kmod-e1000

config TARGET_SERIAL
string "Serial port device"
depends on TARGET_x86 || TARGET_armsr
default "ttyS0"

config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta
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
2 changes: 1 addition & 1 deletion include/bpf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers

BPF_KERNEL_INCLUDE := \
-nostdinc -isystem $(TOOLCHAIN_DIR)/include \
-nostdinc -isystem $(TOOLCHAIN_INC_DIRS) \
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \
Expand Down
6 changes: 4 additions & 2 deletions include/cmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ HOST_CMAKE_BINARY_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BI
MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)

ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
cmake_tool=$(TOOLCHAIN_DIR)/bin/$(1)
cmake_tool=$(firstword $(TOOLCHAIN_BIN_DIRS))/$(1)
else
cmake_tool=$(shell command -v $(1))
endif
Expand All @@ -49,7 +49,7 @@ CMAKE_AR:=$(call cmake_tool,$(TARGET_AR))
CMAKE_NM:=$(call cmake_tool,$(TARGET_NM))
CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))

CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_ROOT_DIR)
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
CMAKE_HOST_INSTALL_PREFIX = $(HOST_BUILD_PREFIX)
Expand Down Expand Up @@ -89,6 +89,7 @@ define Build/Configure/Default
CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
cmake \
--no-warn-unused-cli \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_VERSION=1 \
-DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
Expand Down Expand Up @@ -141,6 +142,7 @@ define Host/Configure/Default
CXXFLAGS="$(HOST_CFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
cmake \
--no-warn-unused-cli \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \
-DCMAKE_C_COMPILER="$(CMAKE_HOST_C_COMPILER)" \
Expand Down
30 changes: 23 additions & 7 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ define Build/append-md5sum-ascii-salted
rm $@.salted
endef

UBI_NAND_SIZE_LIMIT = $(IMAGE_SIZE) - ($(NAND_SIZE)*20/1024 + 4*$(BLOCKSIZE))

define Build/append-ubi
sh $(TOPDIR)/scripts/ubinize-image.sh \
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
Expand All @@ -146,6 +148,8 @@ define Build/append-ubi
$(UBINIZE_OPTS)
cat $@.tmp >> $@
rm $@.tmp
$(if $(and $(IMAGE_SIZE),$(NAND_SIZE)),\
$(call Build/check-size,$(UBI_NAND_SIZE_LIMIT)))
endef

define Build/ubinize-kernel
Expand Down Expand Up @@ -215,7 +219,7 @@ endef

define Build/check-size
@imagesize="$$(stat -c%s $@)"; \
limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \
limitsize="$$(($(call exp_units,$(if $(1),$(1),$(IMAGE_SIZE)))))"; \
[ $$limitsize -ge $$imagesize ] || { \
$(call ERROR_MESSAGE, WARNING: Image file $@ is too big: $$imagesize > $$limitsize); \
rm -f $@; \
Expand All @@ -226,6 +230,11 @@ define Build/copy-file
cat "$(1)" > "$@"
endef

define Build/dlink-sge-image
$(STAGING_DIR_HOST)/bin/dlink-sge-image $(1) $@ $@.enc
mv $@.enc $@
endef

define Build/edimax-header
$(STAGING_DIR_HOST)/bin/mkedimaximg -i $@ -o $@.new $(1)
@mv $@.new $@
Expand Down Expand Up @@ -384,10 +393,17 @@ define Build/kernel-bin
endef

define Build/linksys-image
$(TOPDIR)/scripts/linksys-image.sh \
let \
size="$$(stat -c%s $@)" \
pad="$(call exp_units,$(PAGESIZE))" \
offset="256" \
pad="(pad - ((size + offset) % pad)) % pad"; \
dd if=/dev/zero bs=$$pad count=1 | tr '\000' '\377' >> $@
printf ".LINKSYS.01000409%-15s%08X%-8s%-16s" \
"$(call param_get_default,type,$(1),$(DEVICE_NAME))" \
$@ $@.new
mv $@.new $@
"$$(cksum $@ | cut -d ' ' -f1)" \
"0" "K0000000F0246434" >> $@
dd if=/dev/zero bs=192 count=1 >> $@
endef

define Build/lzma
Expand Down Expand Up @@ -461,8 +477,8 @@ endef
define Build/pad-offset
let \
size="$$(stat -c%s $@)" \
pad="$(subst k,* 1024,$(word 1, $(1)))" \
offset="$(subst k,* 1024,$(word 2, $(1)))" \
pad="$(call exp_units,$(word 1, $(1)))" \
offset="$(call exp_units,$(word 2, $(1)))" \
pad="(pad - ((size + offset) % pad)) % pad" \
newsize='size + pad'; \
dd if=$@ of=$@.new bs=$$newsize count=1 conv=sync
Expand Down Expand Up @@ -624,7 +640,7 @@ endef

define Build/zyxel-ras-image
let \
newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
newsize="$(call exp_units,$(RAS_ROOTFS_SIZE))"; \
$(STAGING_DIR_HOST)/bin/mkrasimage \
-b $(RAS_BOARD) \
-v $(RAS_VERSION) \
Expand Down
16 changes: 15 additions & 1 deletion include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ include $(INCLUDE_DIR)/rootfs.mk
override MAKE:=$(_SINGLE)$(SUBMAKE)
override NO_TRACE_MAKE:=$(_SINGLE)$(NO_TRACE_MAKE)

exp_units = $(subst k, * 1024,$(subst m, * 1024k,$(subst g, * 1024m,$(1))))

target_params = $(subst +,$(space),$*)
param_get = $(patsubst $(1)=%,%,$(filter $(1)=%,$(2)))
param_get_default = $(firstword $(call param_get,$(1),$(2)) $(3))
Expand All @@ -40,8 +42,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 +171,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 Expand Up @@ -277,6 +283,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 Expand Up @@ -384,6 +397,7 @@ define Device/Init
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
FACTORY_IMG_NAME :=
IMAGE_SIZE :=
NAND_SIZE :=
KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
KERNEL_SUFFIX := -kernel.bin
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
Expand Down Expand Up @@ -444,7 +458,7 @@ DEFAULT_DEVICE_VARS := \
DEVICE_DTS_DIR DEVICE_DTS_OVERLAY DEVICE_DTS_LOADADDR \
DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
UIMAGE_TIME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
UBOOT_PATH IMAGE_SIZE \
UBOOT_PATH IMAGE_SIZE NAND_SIZE \
FACTORY_IMG_NAME FACTORY_SIZE \
DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
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 = .132
LINUX_KERNEL_HASH-5.15.132 = 4177b5c4d6e749bb8339ac4aa68eb0932ead9490b956a80d9a597089959618ac
LINUX_VERSION-5.15 = .141
LINUX_KERNEL_HASH-5.15.141 = 936d6ac65c692a986b4bde34b7f3d7ad90f7f86f19e4ef320e008d40f07e2cfa
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 = .55
LINUX_KERNEL_HASH-6.1.55 = a87e241ec15d53452c4efe219713a3769d88cc436b5b98cf6efb262c4aff15c0
LINUX_VERSION-6.1 = .65
LINUX_KERNEL_HASH-6.1.65 = 407229936802a44b1e484c2e9ac3bbe53a65d825cc468ccdbd76281b491ab20a
6 changes: 1 addition & 5 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 Expand Up @@ -168,7 +164,7 @@ define Kernel/CompileImage/Initramfs
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),)
ifneq ($(call qstrip,$(CONFIG_EXTERNAL_CPIO)),)
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
else
( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
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
Loading

0 comments on commit fdc8f4a

Please sign in to comment.