Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Jun 8, 2024
1 parent 7edf61c commit 34f3bcf
Show file tree
Hide file tree
Showing 49 changed files with 1,057 additions and 1,555 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
echo "MTARGET=arm_cortex-a7" >> $GITHUB_ENV
elif [[ ${{matrix.target}} =~ (ipq40xx_generic|bcm27xx_bcm2709|sunxi_cortexa7) ]]; then
echo "MTARGET=arm_cortex-a7_neon-vfpv4" >> $GITHUB_ENV
elif [[ ${{matrix.target}} == "meson_meson8b" ]]; then
elif [[ ${{matrix.target}} == "amlogic_meson8b" ]]; then
echo "MTARGET=arm_cortex-a5_vfpv4" >> $GITHUB_ENV
elif [[ ${{matrix.target}} == "bcm53xx" ]]; then
echo "MTARGET=arm_cortex-a9" >> $GITHUB_ENV
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
run: |
cd openwrt
make defconfig
if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|rockchip_*|sunxi_*|x86_*|meson_meson8b) ]]; then
if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|rockchip_*|sunxi_*|x86_*) ]]; then
sed -n '/# Wireless Drivers/,/# end of Wireless Drivers/p' .config | sed -e 's/=m/=n/' >>.config
sed -i "s/\(kmod-qca.*\)=m/\1=n/" .config
make defconfig
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ jobs:
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
-d '{"event_type": "mediatek_mt7981 ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_mt7981"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
-d '{"event_type": "ipq50xx_arm ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq50xx_arm"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
Expand Down Expand Up @@ -162,7 +157,7 @@ jobs:
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
-d '{"event_type": "meson_meson8b ${{ github.event.inputs.param }}", "client_payload": {"target": "meson_meson8b"}}'
-d '{"event_type": "amlogic_meson8b ${{ github.event.inputs.param }}", "client_payload": {"target": "amlogic_meson8b"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
Expand Down
11 changes: 11 additions & 0 deletions devices/amlogic_meson8b/.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

CONFIG_TARGET_amlogic=y
CONFIG_TARGET_amlogic_meson8b=y
CONFIG_TARGET_amlogic_meson8b_DEVICE_thunder-onecloud=y

CONFIG_TARGET_ROOTFS_SQUASHFS=n
CONFIG_TARGET_ROOTFS_EXT4FS=y

CONFIG_PACKAGE_perf=n

CONFIG_PACKAGE_kmod-rt2x00-pci=n
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))

bash $SHELL_FOLDER/../common/kernel_6.1.sh

git_clone_path master https://github.com/coolsnowwolf/lede target/linux/meson
git_clone_path master https://github.com/coolsnowwolf/lede target/linux/amlogic package/boot/uboot-amlogic

sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/amlogic/image/meson8b.mk



10 changes: 10 additions & 0 deletions devices/amlogic_meson8b/patches/BRCMFMAC_SDIO.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/package/kernel/mac80211/broadcom.mk
+++ b/package/kernel/mac80211/broadcom.mk
@@ -437,6 +437,7 @@ define KernelPackage/brcmfmac/config
default y if TARGET_starfive
default y if TARGET_rockchip
default y if TARGET_sunxi
+ default y if TARGET_amlogic
default n
help
Enable support for cards attached to an SDIO bus.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/target/linux/meson/image/Makefile
+++ b/target/linux/meson/image/Makefile
@@ -46,7 +46,8 @@ endef
--- a/target/linux/amlogic/image/meson8b.mk
+++ b/target/linux/amlogic/image/meson8b.mk
@@ -11,7 +11,8 @@ endef

define Device/thunder-onecloud
DEVICE_DTS := meson8b-onecloud
Expand All @@ -10,14 +10,19 @@
KERNEL_LOADADDR := 0x00208000
IMAGE/emmc.img := boot-script onecloud | emmc-common $$(DEVICE_NAME)
endef
@@ -54,4 +55,10 @@ ifeq ($(SUBTARGET),meson8b)
TARGET_DEVICES += thunder-onecloud
endif

--- a/target/linux/amlogic/image/Makefile
+++ b/target/linux/amlogic/image/Makefile
@@ -88,4 +88,12 @@ endef

include $(SUBTARGET).mk

+define Image/Build
+ if [ "$(PROFILE_SANITIZED)" == "thunder-onecloud" ]; then \
+ export BIN_DIR=$(BIN_DIR); \
+ cd /data/packit/openwrt-onecloud || true; \
+ . ~/packit/packit_onecloud1.sh || true;
+ . ~/packit/packit_onecloud1.sh || true; \
+ fi
+endef
+
$(eval $(call BuildImage))
9 changes: 9 additions & 0 deletions devices/amlogic_mesongx/.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

CONFIG_TARGET_amlogic=y
CONFIG_TARGET_amlogic_mesongx=y
CONFIG_TARGET_amlogic_mesongx_DEVICE_phicomm_n1=y

CONFIG_TARGET_ROOTFS_SQUASHFS=n
CONFIG_TARGET_ROOTFS_EXT4FS=y

CONFIG_PACKAGE_perf=n
14 changes: 14 additions & 0 deletions devices/amlogic_mesongx/diy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

shopt -s extglob

SHELL_FOLDER=$(dirname $(readlink -f "$0"))

bash $SHELL_FOLDER/../common/kernel_6.1.sh

git_clone_path master https://github.com/coolsnowwolf/lede target/linux/amlogic package/boot/uboot-amlogic

sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/amlogic/image/mesongx.mk



10 changes: 10 additions & 0 deletions devices/amlogic_mesongx/patches/BRCMFMAC_SDIO.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/package/kernel/mac80211/broadcom.mk
+++ b/package/kernel/mac80211/broadcom.mk
@@ -437,6 +437,7 @@ define KernelPackage/brcmfmac/config
default y if TARGET_starfive
default y if TARGET_rockchip
default y if TARGET_sunxi
+ default y if TARGET_amlogic
default n
help
Enable support for cards attached to an SDIO bus.
3 changes: 3 additions & 0 deletions devices/bcm27xx_bcm2712/.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ CONFIG_PACKAGE_kmod-of-mdio=n

CONFIG_PACKAGE_kmod-pcie_mhi=m

CONFIG_PACKAGE_kmod-codec-bcm2835=n
CONFIG_PACKAGE_kmod-isp-bcm2835=n

12 changes: 0 additions & 12 deletions devices/common/info.mk

This file was deleted.

71 changes: 60 additions & 11 deletions devices/common/patches/imagebuilder.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
--- a/include/image.mk
+++ b/include/image.mk
@@ -761,6 +761,7 @@ define Device/DumpInfo
Target-Profile: DEVICE_$(1)
Target-Profile-Name: $(DEVICE_DISPLAY)
Target-Profile-Packages: $(DEVICE_PACKAGES)
+Target-Profile-ImageSize: $(IMAGE_SIZE)
Target-Profile-hasImageMetadata: $(if $(foreach image,$(IMAGES),$(findstring append-metadata,$(IMAGE/$(image)))),1,0)
Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES)
$(if $(BROKEN),Target-Profile-Broken: $(BROKEN))

--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -437,6 +437,7 @@ ()
print "PROFILE_NAMES = ".join(" ", @profile_ids_unique)."\n";
foreach my $profile (@{$cur->{profiles}}) {
print $profile->{id}.'_NAME:='.$profile->{name}."\n";
+ print $profile->{id}.'_IMAGE_SIZE:='.$profile->{image_size}."\n";
print $profile->{id}.'_HAS_IMAGE_METADATA:='.$profile->{has_image_metadata}."\n";
if (defined($profile->{supported_devices}) and @{$profile->{supported_devices}} > 0) {
print $profile->{id}.'_SUPPORTED_DEVICES:='.join(' ', @{$profile->{supported_devices}})."\n";

--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -150,6 +150,7 @@ sub parse_target_metadata($) {
push @{$target->{profiles}}, $profile;
};
/^Target-Profile-Name:\s*(.+)\s*$/ and $profile->{name} = $1;
+ /^Target-Profile-ImageSize:\s*(.*)\s*/ and $profile->{image_size} = $1;
/^Target-Profile-hasImageMetadata:\s*(\d+)\s*$/ and $profile->{has_image_metadata} = $1;
/^Target-Profile-SupportedDevices:\s*(.+)\s*$/ and $profile->{supported_devices} = [ split(/\s+/, $1) ];
/^Target-Profile-Priority:\s*(\d+)\s*$/ and do {

--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -38,13 +38,15 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
Expand All @@ -22,10 +55,22 @@

--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -135,17 +135,32 @@ BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(fi
@@ -131,21 +131,47 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
# "-pkgname" in the package list means remove "pkgname" from the package list
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES)
+IMAGE_SIZE:="$(shell echo $$(echo $($(USER_PROFILE)_IMAGE_SIZE) | cut -d k -f1))"
+BUILD_PACKAGES:=$(shell if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" && $(IMAGE_SIZE) -lt 20480 ]]; then \
+echo "$(BUILD_PACKAGES) -coremark -htop -bash -openssh-sftp-server "; \
+else \
+echo "$(BUILD_PACKAGES)"; \
+fi \
+)
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
PACKAGES:=

_call_image: staging_dir/host/.prereq-build
- echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'
+ [ "$(DATE)" ] && DATE="$(DATE)" || DATE="`date +'%m.%d.%Y'`"; \
+ mkdir -p $(USER_FILES)/etc/uci-defaults || true; \
+ echo -e " \
Expand All @@ -34,15 +79,19 @@
+ sed -i \"s/OpenWrt .* by/OpenWrt $$DATE by/\" /etc/banner \n \
+ echo \"$$DATE\" >/etc/openwrt_version \n \
+ "> $(USER_FILES)/etc/uci-defaults/99-version; \
echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'
+ echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'; \
echo 'Packages: $(BUILD_PACKAGES)'
echo
rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR)
+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-4a-gigabit-v2|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_ht-jsh_0211|DEVICE_jdcloud_luban|DEVICE_zte_e8820v2) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \
+ echo "src/gz openwrt_smflash https://dl.openwrt.ai/packages/small_flash" >>$(TOPDIR)/repositories.conf; \
+ if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" ]]; then \
+ if [[ $(IMAGE_SIZE) -lt 20480 ]]; then \
+ if [[ ! "`grep "small_flash" $(TOPDIR)/repositories.conf`" ]]; then \
+ echo "`grep openwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf; \
+ fi \
+ else \
+ sed -i "/smflash/d" $(TOPDIR)/repositories.conf; \
+ sed -i "/small_flash/d" $(TOPDIR)/repositories.conf; \
+ fi \
+ fi
$(MAKE) package_reload
$(MAKE) package_install
Expand All @@ -55,7 +104,7 @@

_call_manifest: FORCE
rm -rf $(TARGET_DIR)
@@ -186,7 +201,17 @@ package_install: FORCE
@@ -186,7 +212,17 @@ package_install: FORCE
@echo Installing packages...
$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/libc_*.ipk $(PACKAGE_DIR)/libc_*.ipk))
$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk))
Expand All @@ -68,18 +117,18 @@
+ if [[ "`echo "$(BUILD_PACKAGES)" | grep "usb"`" ]]; then \
+ packages+="automount "; \
+ fi; \
+ $(OPKG) install --force-overwrite --force-checksum --force-depends $(BUILD_PACKAGES) luci-i18n-base-zh-cn luci-i18n-base-en; \
+ $(OPKG) install $(BUILD_PACKAGES) luci-i18n-base-zh-cn luci-i18n-base-en; \
+ $(OPKG) install $$packages || true
+ $(OPKG) install --force-overwrite --force-checksum --force-depends --force-maintainer --force-reinstall my-default-settings
+ $(OPKG) install --force-maintainer --force-reinstall my-default-settings

prepare_rootfs: FORCE
@echo
@@ -200,12 +225,15 @@ prepare_rootfs: FORCE
@@ -200,12 +236,15 @@ prepare_rootfs: FORCE
) \
)
$(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES))
+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_jdcloud_luban) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \
+ echo "src/gz openwrt_smflash https://dl.openwrt.ai/packages/mipsel_24kc/small_flash" >>$(BUILD_DIR)/root-ramips/etc/opkg/distfeeds.conf; \
+ if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" && $(IMAGE_SIZE) -lt 20480 ]]; then \
+ echo "`grep openwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(BUILD_DIR)/root-*/etc/opkg/distfeeds.conf; \
+ fi

build_image: FORCE
Expand Down
2 changes: 2 additions & 0 deletions devices/mediatek_filogic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-xe3000=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_comfast_cf-e393ax=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_nokia_ea0326gmp=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openembed_som7981=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_ikuai_q3000=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openwrt_one=y
CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

CONFIG_PACKAGE_kmod-pcie_mhi=m
Expand Down
Loading

0 comments on commit 34f3bcf

Please sign in to comment.