Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed May 1, 2023
1 parent a764a5d commit 88545da
Show file tree
Hide file tree
Showing 17 changed files with 193 additions and 205 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ jobs:
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "mediatek_gl_mt7981 ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_gl_mt7981"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "ramips_mt7621 ${{ github.event.inputs.param }}", "client_payload": {"target": "ramips_mt7621"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
Expand All @@ -157,11 +152,6 @@ jobs:
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "bcm4908_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm4908_generic"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "kirkwood_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "kirkwood_generic"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
Expand Down
2 changes: 2 additions & 0 deletions devices/armvirt_64/.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ CONFIG_PACKAGE_kmod-brcmfmac=y
CONFIG_BRCMFMAC_SDIO=y
CONFIG_TARGET_ROOTFS_TARGZ=y

CONFIG_TARGET_ROOTFS_INITRAMFS=n

CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

Expand Down
11 changes: 0 additions & 11 deletions devices/bcm4908_generic/.config

This file was deleted.

10 changes: 0 additions & 10 deletions devices/bcm4908_generic/diy.sh

This file was deleted.

2 changes: 1 addition & 1 deletion devices/common/kernel_5.15.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ svn export --force https://github.com/openwrt/packages/trunk/net/xtables-addons
svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/hack-5.15 target/linux/generic/hack-5.15
svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/backport-5.15 target/linux/generic/backport-5.15
find target/linux/generic/backport-5.15 -name "[0-9][0-9][0-9]-[a-z][a-z]*" -exec rm -f {} \;
rm -rf target/linux/generic/backport-5.15/{802-v6.1-nvmem*,803-v5.19-nvmem*,733-v6.2-02-net-mediatek-sgmii-ensure*,733-v6.2-03-net-mediatek*,733-v6.2-04-mtk_sgmii-enable*,730-11-v6.3-net-ethernet-mtk_eth*,775-v5.16-net-phylink*,776-v5.16-net-ethernet-*}
rm -rf target/linux/generic/backport-5.15/{802-v6.1-nvmem*,803-v5.19-nvmem*,733-v6.2-02-net-mediatek-sgmii-ensure*,733-v6.2-03-net-mediatek*,733-v6.2-04-mtk_sgmii-enable*,730-11-v6.3-net-ethernet-mtk_eth*,775-v5.16-net-phylink*,776-v5.16-net-ethernet-*,612-v6.3-skbuff-Fix*}
curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch

sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab
Expand Down
58 changes: 37 additions & 21 deletions devices/common/patches/fix.patch
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,49 @@
ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
define Image/Build/cpiogz
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz )
@@ -367,6 +405,7 @@ define Device/Init
@@ -367,12 +405,13 @@ define Device/Init
DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1)
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
IMAGE_SIZE :=
+ ROOTFSTZ = $$(DEVICE_IMG_PREFIX)-rootfs.tar.gz
KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
KERNEL_SUFFIX := -kernel.bin
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX)
KERNEL_INITRAMFS_PREFIX = $$(DEVICE_IMG_PREFIX)-initramfs
- KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_INITRAMFS_SUFFIX)
+ KERNEL_INITRAMFS_IMAGE = $(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(1)-initramfs$$(KERNEL_INITRAMFS_SUFFIX)
KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs
KERNEL_INSTALL :=
KERNEL_NAME := vmlinux
@@ -472,7 +511,6 @@ define Device/Check
endif
endef

-ifndef IB
define Device/Build/initramfs
$(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1))
$$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) \
@@ -483,9 +521,11 @@ define Device/Build/initramfs
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
cp $$^ $$@

+ ifndef IB
$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare
@rm -f $$@
$$(call concat_cmd,$$(KERNEL_INITRAMFS))
+ endif

$(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1))

@@ -519,7 +559,6 @@ define Device/Build/initramfs
SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \
$(TOPDIR)/scripts/json_add_image_info.py $$@
endef
-endif

define Device/Build/compile
$$(_COMPILE_TARGET): $(KDIR)/$(1)
@@ -568,7 +607,7 @@ define Device/Build/kernel
endef

Expand All @@ -62,15 +97,7 @@
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json, \
$(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX))
@@ -606,6 +645,7 @@ define Device/Build/image
FILE_TYPE=$(word 1,$(subst ., ,$(2))) \
FILE_FILESYSTEM="$(1)" \
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
+ KERNEL_INITRAMFS="$(KERNEL_INITRAMFS)" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
@@ -678,6 +718,8 @@ define Device/Build
@@ -678,6 +717,8 @@ define Device/Build
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1)))
$(call Device/Build/kernel,$(1))

Expand Down Expand Up @@ -99,14 +126,3 @@
],
stdout=PIPE,
stderr=PIPE,

--- a/scripts/json_add_image_info.py
+++ b/scripts/json_add_image_info.py
@@ -55,6 +55,7 @@ def get_titles():
"profiles": {
device_id: {
"image_prefix": getenv("DEVICE_IMG_PREFIX"),
+ "kernel_initramfs": getenv("KERNEL_INITRAMFS"),
"images": [
{
"type": getenv("FILE_TYPE"),
19 changes: 18 additions & 1 deletion devices/common/patches/imagebuilder.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -26,7 +26,7 @@ all: compile

$(BIN_DIR)/$(IB_NAME).tar.xz: clean
rm -rf $(PKG_BUILD_DIR)
- mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
+ mkdir -p $(IB_KDIR)/tmp $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
$(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
-cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
$(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER is not set/' $(PKG_BUILD_DIR)/.config
@@ -38,13 +38,16 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
./files/repositories.conf \
$(TMP_DIR)/.targetinfo \
Expand All @@ -20,6 +29,14 @@

$(INSTALL_DIR) $(PKG_BUILD_DIR)/packages
# create an empty package index so `opkg` doesn't report an error
@@ -79,6 +82,7 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
endif

$(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
+ $(CP) -L $(KERNEL_BUILD_DIR)/tmp/*initramfs* $(IB_KDIR)/tmp/ || true
if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
fi

--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
Expand Down Expand Up @@ -51,7 +68,7 @@
$(MAKE) -s build_image
$(MAKE) -s json_overview_image_info
$(MAKE) -s checksum
+ rm -rf $(KERNEL_BUILD_DIR)/tmp
+ rm -rf $(KERNEL_BUILD_DIR)/tmp/openwrt-20.*
+ rm -rf $(KERNEL_BUILD_DIR)/root.*

_call_manifest: FORCE
Expand Down
2 changes: 2 additions & 0 deletions devices/ipq60xx_generic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ CONFIG_TARGET_ALL_PROFILES=y
CONFIG_TARGET_DEVICE_ipq60xx_generic_DEVICE_glinet_gl-ax1800=n
CONFIG_TARGET_DEVICE_ipq60xx_generic_DEVICE_glinet_gl-axt1800=n

CONFIG_TARGET_ROOTFS_INITRAMFS=n

CONFIG_PACKAGE_dockerd=n

CONFIG_GCC_USE_VERSION_7=y
Expand Down
2 changes: 2 additions & 0 deletions devices/ipq807x_generic/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ svn co https://github.com/robimarko/nss-packages/trunk/qca/qca-ssdk-shell packag

sh -c "curl -sfL https://github.com/robimarko/openwrt/commit/23fa931934151f72c1655ffa62ff1a979575f07e.patch | patch -d './' -p1 --forward"

sed -i '/rm -rf $(KDIR)\/tmp/d' include/image.mk

rm -rf feeds/kiddin9/{rtl8821cu,rtl88x2bu} package/kernel/mt76
5 changes: 4 additions & 1 deletion devices/ipq807x_ipq60xx/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ CONFIG_FEED_ipq807x=n
CONFIG_FEED_wifi_ax=n
" >> devices/common/.config

rm -rf target/imagebuilder
svn co https://github.com/openwrt/openwrt/branches/openwrt-21.02/target/imagebuilder target/imagebuilder

rm -rf feeds/kiddin9/{rtl*,base-files,netifd,fullconenat-nft,mbedtls,oaf,shortcut-fe,fullconenat}
svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/network/services/fullconenat feeds/kiddin9/fullconenat

Expand All @@ -28,7 +31,7 @@ rm -rf feeds/packages/net/xtables-addons package/feeds/packages/{openvswitch,ksm

rm -rf package/kernel/exfat

rm -rf devices/common/patches/{glinet,imagebuilder.patch,fix.patch,iptables.patch,targets.patch,kernel-defaults.patch,disable_flock.patch}
rm -rf devices/common/patches/{glinet,fix.patch,iptables.patch,targets.patch,kernel-defaults.patch,disable_flock.patch}

rm -rf toolchain/musl

Expand Down
50 changes: 50 additions & 0 deletions devices/ipq807x_ipq60xx/patches/fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
--- a/include/image.mk
+++ b/include/image.mk
@@ -469,7 +469,6 @@ define Device/Check
endif
endef

-ifndef IB
define Device/Build/initramfs
$(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1))
$$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) \
@@ -479,9 +478,11 @@ define Device/Build/initramfs
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
cp $$^ $$@

+ ifndef IB
$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare
@rm -f $$@
$$(call concat_cmd,$$(KERNEL_INITRAMFS))
+ endif

$(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1))

@@ -515,7 +516,6 @@ define Device/Build/initramfs
SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \
$(TOPDIR)/scripts/json_add_image_info.py $$@
endef
-endif

define Device/Build/compile
$$(_COMPILE_TARGET): $(KDIR)/$(1)

--- a/scripts/json_overview_image_info.py
+++ b/scripts/json_overview_image_info.py
@@ -47,7 +47,7 @@ def get_initial_output(image_info):


if output:
- default_packages, output["arch_packages"] = run(
+ default_packages, output["arch_packages"], output["kernel_version"] = run(
[
"make",
"--no-print-directory",
@@ -55,6 +55,7 @@ def get_initial_output(image_info):
"target/linux/",
"val.DEFAULT_PACKAGES",
"val.ARCH_PACKAGES",
+ "val.LINUX_VERSION",
],
stdout=PIPE,
stderr=PIPE,
110 changes: 0 additions & 110 deletions devices/ipq807x_ipq60xx/patches/imagebuilder.patch

This file was deleted.

2 changes: 2 additions & 0 deletions devices/kirkwood_generic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ CONFIG_TARGET_kirkwood_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_e4200-v2=y
CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_ea4500=y
CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_ea3500=y
CONFIG_TARGET_DEVICE_kirkwood_DEVICE_checkpoint_l-50=y
CONFIG_TARGET_DEVICE_kirkwood_DEVICE_netgear_readynas-duo-v2=y

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

Expand Down
Loading

0 comments on commit 88545da

Please sign in to comment.