Skip to content

Commit

Permalink
Use official repositories for builds
Browse files Browse the repository at this point in the history
  • Loading branch information
danpawlik committed Jul 23, 2024
1 parent d4383d4 commit b1c5b1a
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 19 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ax3200.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ on:
push:

env:
# REMOTE_REPOSITORY: openwrt/openwrt
# REMOTE_BRANCH: main
REMOTE_REPOSITORY: danpawlik/openwrt
REMOTE_BRANCH: bpi-r4
REMOTE_REPOSITORY: openwrt/openwrt
REMOTE_BRANCH: main
RELEASE_PREFIX: Mediatek_mt7622_ax3200
DEVICE_CONFIG: configs/mediatek/mt7622/ax3200
ROLE_CONFIG: configs/common/dumb_ap

jobs:
build:
name: Build OpenWrt
name: Build OpenWRT for AX3200
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
Expand All @@ -26,7 +24,7 @@ jobs:
sudo apt install -y \
build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \
python3-setuptools rsync swig unzip zlib1g-dev file wget
python3-setuptools rsync swig unzip zlib1g-dev file wget curl
sudo apt full-upgrade -y
- name: Checkout remote repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ax3600.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
build:
name: Build OpenWrt
name: Build OpenWRT for AX3600
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
Expand All @@ -28,7 +28,7 @@ jobs:
sudo apt install -y \
build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \
python3-setuptools rsync swig unzip zlib1g-dev file wget
python3-setuptools rsync swig unzip zlib1g-dev file wget curl
sudo apt full-upgrade -y
- name: Checkout remote repository
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/bpi-r4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
push:

env:
# REMOTE_REPOSITORY: openwrt/openwrt
# REMOTE_BRANCH: main
REMOTE_REPOSITORY: danpawlik/openwrt
REMOTE_BRANCH: bpi-r4
REMOTE_REPOSITORY: openwrt/openwrt
REMOTE_BRANCH: main
# REMOTE_REPOSITORY: danpawlik/openwrt
# REMOTE_BRANCH: bpi-r4
# MTK_PPE_ENTRIES_SHIFT_PATCH: 001-32k_ppe.patch
# PREFETCH_PATCH: 002-prefetch.patch
# CUSTOM_FILES_PATH: files/
Expand All @@ -20,7 +20,7 @@ env:

jobs:
build:
name: Build OpenWrt
name: Build OpenWRT for BPI-R4
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
Expand All @@ -29,7 +29,7 @@ jobs:
sudo apt install -y \
build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \
python3-setuptools rsync swig unzip zlib1g-dev file wget
python3-setuptools rsync swig unzip zlib1g-dev file wget curl
sudo apt full-upgrade -y
- name: Checkout remote repository
Expand All @@ -48,11 +48,13 @@ jobs:
./scripts/feeds update -a
./scripts/feeds install -a
# - name: Apply 32K PPE Patch
# run: |
# mv custom_repo/patches/BPI-r4/${{ env.MTK_PPE_ENTRIES_SHIFT_PATCH }} target/linux/mediatek/patches-6.6/${{ env.MTK_PPE_ENTRIES_SHIFT_PATCH }}
# cd target/linux/mediatek/patches-6.6
# git apply ${{ env.MTK_PPE_ENTRIES_SHIFT_PATCH }}
- name: Apply kmod-thermal
run: |
cd target/linux/mediatek/patches-6.6
curl -LO https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/patches/0001-Add-kmod-thermal-for-BPI-R4.patch
curl -LO https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/patches/0001-Add-mt7925-firmware-rule.patch
git apply 0001-Add-kmod-thermal-for-BPI-R4.patch
git apply 0001-Add-mt7925-firmware-rule.patch
- name: Configure firmware image
run: |
Expand Down
24 changes: 24 additions & 0 deletions patches/0001-Add-kmod-thermal-for-BPI-R4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From e65bd02a561d7c6625f6f5ec98473ba52acb9ef9 Mon Sep 17 00:00:00 2001
From: Daniel Pawlik <pawlik.dan@gmail.com>
Date: Mon, 15 Jul 2024 09:05:36 +0000
Subject: [PATCH] Add kmod-thermal for BPI-R4

---
target/linux/mediatek/image/filogic.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 74eaf06ea9..6e79832623 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -365,7 +365,7 @@ define Device/bananapi_bpi-r4-common
DEVICE_DTS_LOADADDR := 0x45f00000
DEVICE_DTS_OVERLAY:= mt7988a-bananapi-bpi-r4-emmc mt7988a-bananapi-bpi-r4-rtc mt7988a-bananapi-bpi-r4-sd mt7988a-bananapi-bpi-r4-wifi-mt7996a
DEVICE_DTC_FLAGS := --pad 4096
- DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-mux-pca954x kmod-eeprom-at24 kmod-mt7996-firmware \
+ DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-thermal kmod-i2c-mux-pca954x kmod-eeprom-at24 kmod-mt7996-firmware \
kmod-rtc-pcf8563 kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs
IMAGES := sysupgrade.itb
KERNEL_LOADADDR := 0x46000000
--
2.45.2
60 changes: 60 additions & 0 deletions patches/0001-Add-mt7925-firmware-rule.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From 0e70d96d40206ca1c6705fd8ced2eb3dc3e95293 Mon Sep 17 00:00:00 2001
From: Daniel Pawlik <pawlik.dan@gmail.com>
Date: Mon, 15 Jul 2024 12:14:10 +0200
Subject: [PATCH] Add mt7925-firmware rule

It seems that the OpenWRT does not add the firmware for the MT7925
device.
This patch includes rules that was suggested on the OpenWRT forum [1],
where the target rules are defined here [2].

[1] https://forum.openwrt.org/t/banana-bpi-r4-wifi7-status/201051/
[2] https://github.com/drozdi70/bananapi_bpir4/blob/main/Makefile.mt76

(cherry picked from commit a7653b8bb96d4c7bad4d278d5e75484709ba205b)
---
package/kernel/mt76/Makefile | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index f71070dbb9..c4421c0b23 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -231,6 +231,12 @@ define KernelPackage/mt7915-firmware
DEPENDS+=+kmod-mt7915e
endef

+define KernelPackage/mt7925-firmware
+ $(KernelPackage/mt76-default)
+ TITLE:=MediaTek MT7925 firmware
+ DEPENDS+=+kmod-mt7925e
+endef
+
define KernelPackage/mt7915e
$(KernelPackage/mt76-default)
TITLE:=MediaTek MT7915e wireless driver
@@ -616,6 +622,14 @@ define KernelPackage/mt7922-firmware/install
$(1)/lib/firmware/mediatek
endef

+define KernelPackage/mt7925-firmware/install
+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7925
+ cp \
+ $(PKG_BUILD_DIR)/firmware/mt7925/WIFI_MT7925_PATCH_MCU_1_1_hdr.bin \
+ $(PKG_BUILD_DIR)/firmware/mt7925/WIFI_RAM_CODE_MT7925_1_1.bin \
+ $(1)/lib/firmware/mediatek/mt7925
+endef
+
define KernelPackage/mt7996-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
cp \
@@ -666,6 +680,7 @@ $(eval $(call KernelPackage,mt7981-firmware))
$(eval $(call KernelPackage,mt7986-firmware))
$(eval $(call KernelPackage,mt7921-firmware))
$(eval $(call KernelPackage,mt7922-firmware))
+$(eval $(call KernelPackage,mt7925-firmware))
$(eval $(call KernelPackage,mt792x-common))
$(eval $(call KernelPackage,mt792x-usb))
$(eval $(call KernelPackage,mt7921-common))
--
2.45.2

0 comments on commit b1c5b1a

Please sign in to comment.