Skip to content

Commit

Permalink
Merge branch 'openwrt:main' into mx4300-foss
Browse files Browse the repository at this point in the history
  • Loading branch information
arix00 authored Nov 16, 2024
2 parents bc4a6f6 + afffcd0 commit fa06d08
Show file tree
Hide file tree
Showing 74 changed files with 1,781 additions and 415 deletions.
4 changes: 2 additions & 2 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ endef
define Image/Manifest
$(if $(CONFIG_USE_APK), \
$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network \
--repositories-file /dev/zero | sort | sed 's/ / - /' > \
--repositories-file /dev/null | sort | sed 's/ / - /' > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest, \
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest \
Expand Down Expand Up @@ -365,7 +365,7 @@ opkg_target = \

apk_target = \
$(call apk,$(mkfs_cur_target_dir)) --no-scripts \
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb


target-dir-%: FORCE
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .60
LINUX_KERNEL_HASH-6.6.60 = 52f9e32d5082ab94253447fd66670d0c3bb765cfcb99b0bf61d1b8eae25952ef
LINUX_VERSION-6.6 = .61
LINUX_KERNEL_HASH-6.6.61 = 418fc24df9190f1c3ed9906dc3b7651c2a2eae5c1cb9ab4a6348e20faf047c0b
3 changes: 2 additions & 1 deletion package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ ifneq ($(CONFIG_USE_APK),)
$(file >$(TMP_DIR)/apk_install_list,\
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
$(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
$$(cat $(TMP_DIR)/apk_install_list)
rm -rf $(TARGET_DIR)/run
else
$(file >$(TMP_DIR)/opkg_install_list,\
$(call opkg_package_files,\
Expand Down
12 changes: 8 additions & 4 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ endif
define Package/base-files
SECTION:=base
CATEGORY:=Base system
DEPENDS:=+netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
DEPENDS:= \
+netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring \
+NAND_SUPPORT:ubi-utils +fstools +fwtool \
+SELINUX:procd-selinux +!SELINUX:procd +SECCOMP:procd-seccomp \
+SELINUX:busybox-selinux +!SELINUX:busybox
TITLE:=Base filesystem for OpenWrt
URL:=http://openwrt.org/
VERSION:=$(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION)))
Expand Down Expand Up @@ -246,9 +250,9 @@ endif
rm -f $(1)/etc/banner.failsafe,)

ifneq ($(CONFIG_USE_APK),)
mkdir -p $(1)/etc/apk/
$(call FeedSourcesAppendAPK,$(1)/etc/apk/repositories)
$(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories
mkdir -p $(1)/etc/apk/repositories.d
$(call FeedSourcesAppendAPK,$(1)/etc/apk/repositories.d/distfeeds.list)
$(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories.d/distfeeds.list

rm -f $(1)/etc/uci-defaults/13_fix-group-user
rm -f $(1)/sbin/pkg_check
Expand Down
6 changes: 4 additions & 2 deletions package/base-files/files/etc/init.d/boot
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ boot() {
chmod 1777 /var/lock
mkdir -p /var/log
mkdir -p /var/run
ln -s /var/run /run
ln -s /var/lock /run/lock
mkdir -p /var/state
mkdir -p /var/tmp
mkdir -p /tmp/.uci
Expand All @@ -33,9 +35,9 @@ boot() {
mkdir -p /tmp/resolv.conf.d
touch /tmp/resolv.conf.d/resolv.conf.auto
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
grep -q debugfs /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime -t debugfs debugfs /sys/kernel/debug
grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf
grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore
grep -q pstore /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime -t pstore pstore /sys/fs/pstore
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe

touch /tmp/.config_pending
Expand Down
18 changes: 12 additions & 6 deletions package/base-files/files/etc/uci-defaults/50-root-passwd
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
json_init
json_load "$(cat /etc/board.json)"

json_select credentials
json_get_vars root_password_hash root_password_hash
[ -z "$root_password_hash" ] || sed -i "s|^root:[^:]*|root:$root_password_hash|g" /etc/shadow
if json_is_a credentials object; then
json_select credentials
json_get_vars root_password_hash root_password_hash
if [ -n "$root_password_hash" ]; then
sed -i "s|^root:[^:]*|root:$root_password_hash|g" /etc/shadow
fi

json_get_vars root_password_plain root_password_plain
[ -z "$root_password_plain" ] || { (echo "$root_password_plain"; sleep 1; echo "$root_password_plain") | passwd root }
json_select ..
json_get_vars root_password_plain root_password_plain
if [ -n "$root_password_plain" ]; then
(echo "$root_password_plain"; sleep 1; echo "$root_password_plain") | passwd root
fi
json_select ..
fi
3 changes: 3 additions & 0 deletions package/boot/uboot-envtools/files/mediatek_filogic
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ zbtlink,zbt-z8103ax)
dlink,aquila-pro-ai-m30-a1)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
;;
gatonetworks,gdsp)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;;
glinet,gl-x3000|\
glinet,gl-xe3000|\
glinet,gl-mt2500|\
Expand Down
14 changes: 14 additions & 0 deletions package/boot/uboot-mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,19 @@ define U-Boot/mt7981_rfb-emmc
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr3
endef

define U-Boot/mt7981_gatonetworks_gdsp
NAME:=GatoNetworks GDSP
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=gatonetworks_gdsp
UBOOT_CONFIG:=mt7981_gatonetworks_gdsp
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=nor
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-nor-ddr3
FIP_COMPRESS:=1
endef

define U-Boot/mt7981_rfb-nor
NAME:=MT7981 Reference Board
BUILD_SUBTARGET:=filogic
Expand Down Expand Up @@ -797,6 +810,7 @@ UBOOT_TARGETS := \
mt7981_abt_asr3000 \
mt7981_cmcc_rax3000m-emmc \
mt7981_cmcc_rax3000m-nand \
mt7981_gatonetworks_gdsp \
mt7981_glinet_gl-x3000 \
mt7981_glinet_gl-xe3000 \
mt7981_h3c_magic-nx30-pro \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From 9c1ad8a18ac1a20aee7a617964bcae3e90dac700 Mon Sep 17 00:00:00 2001
From: Enrico Mioso <[email protected]>
Date: Wed, 23 Oct 2024 17:46:35 +0200
Subject: [PATCH] uboot-mediatek: initialized the watchdog subsystem later

Initialize the watchdog subsystem later during initialization, to allow for
the gpio-wdt driver to work.

Signed-off-by: Enrico Mioso <[email protected]>
---
common/board_r.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

--- a/common/board_r.c
+++ b/common/board_r.c
@@ -663,19 +663,13 @@ static init_fnc_t init_sequence_r[] = {
serial_initialize,
initr_announce,
dm_announce,
-#if CONFIG_IS_ENABLED(WDT)
- initr_watchdog,
-#endif
- INIT_FUNC_WATCHDOG_RESET
arch_initr_trap,
#if defined(CONFIG_BOARD_EARLY_INIT_R)
board_early_init_r,
#endif
- INIT_FUNC_WATCHDOG_RESET
#ifdef CONFIG_POST
post_output_backlog,
#endif
- INIT_FUNC_WATCHDOG_RESET
#if defined(CONFIG_PCI_INIT_R) && defined(CONFIG_SYS_EARLY_PCI_INIT)
/*
* Do early PCI configuration _before_ the flash gets initialised,
@@ -690,7 +684,6 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_MTD_NOR_FLASH
initr_flash,
#endif
- INIT_FUNC_WATCHDOG_RESET
#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_X86)
/* initialize higher level parts of CPU like time base and timers */
cpu_init_r,
@@ -719,6 +712,10 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_PVBLOCK
initr_pvblock,
#endif
+#if CONFIG_IS_ENABLED(WDT)
+ initr_watchdog,
+#endif
+ INIT_FUNC_WATCHDOG_RESET
initr_env,
#ifdef CONFIG_SYS_MALLOC_BOOTPARAMS
initr_malloc_bootparams,
Loading

0 comments on commit fa06d08

Please sign in to comment.