Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Sep 25, 2024
1 parent 10c200f commit 440c0b2
Show file tree
Hide file tree
Showing 61 changed files with 382 additions and 11,363 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
sudo -E apt-get -qq install build-essential clang llvm flex g++ gawk gcc-multilib gettext \
git libncurses5-dev libssl-dev python2.7 python3-distutils python3-pyelftools python3-setuptools \
python3-dev python3-pip rsync unzip zlib1g-dev swig aria2 jq subversion qemu-utils ccache rename \
libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev libfuse-dev gcc-multilib
libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev libfuse-dev
pip3 install --user -U pylibfdt
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo -E apt-get -qq autoremove --purge
Expand All @@ -150,7 +150,7 @@ jobs:
-H "Authorization: Bearer ${{ secrets.TOKEN_KIDDIN9 }}" \
-X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", first: 4, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {nodes {name target { ... on Tag {tagger {date}}}}}}}"}' https://api.github.com/graphql)"
TAG_DATE="$( echo ${TAG_INFO} | jq -r '.data.repository.refs.nodes[] | select(.name | startswith("v23")) | .target.tagger.date' | head -n 1)"
if [[ $(( $(date +%s) - ($(date -d "$TAG_DATE" +%s)) / 86400 )) -lt 30 ]]; then
if [[ $(( ($(date +%s) - $(date -d "$TAG_DATE" +%s)) / 86400 )) -lt 30 ]]; then
REPO_BRANCH="$( echo ${TAG_INFO} | jq -r '.data.repository.refs.nodes[].name' | grep v23 | head -n 1)"
else
REPO_BRANCH="openwrt-23.05"
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,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": "rockchip_rk35xx ${{ github.event.inputs.param }}", "client_payload": {"target": "rockchip_rk35xx"}}'
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": "bcm27xx_bcm2712 ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm27xx_bcm2712"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
Expand Down
8 changes: 4 additions & 4 deletions devices/amlogic_meson8b/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ shopt -s extglob

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

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

rm -rf package/kernel/mac80211
#rm -rf package/kernel/mac80211

git_clone_path c640f7b93736621b4d56627e4f6ab824093f9c3d https://github.com/openwrt/openwrt package/kernel/mac80211
#git_clone_path c640f7b93736621b4d56627e4f6ab824093f9c3d https://github.com/openwrt/openwrt package/kernel/mac80211

git_clone_path main https://github.com/shiyu1314/openwrt-onecloud kernel/6.1/amlogic && mv -f kernel/6.1/amlogic target/linux/
git_clone_path main https://github.com/shiyu1314/openwrt-onecloud kernel/amlogic && mv -f kernel/amlogic target/linux/

sed -i "s/CPU_SUBTYPE:=neon-vfpv4/CPU_SUBTYPE:=vfpv4/" target/linux/amlogic/meson8b/target.mk

Expand Down
3 changes: 3 additions & 0 deletions devices/common/.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ CONFIG_LUCI_CSSTIDY=n
CONFIG_SIGNED_PACKAGES=n
CONFIG_SIGNATURE_CHECK=n

CONFIG_PACKAGE_kmod-switch-rtl8367b=n
CONFIG_PACKAGE_kmod-aic8800=n

# 设置固件大小:
CONFIG_TARGET_ROOTFS_PARTSIZE=1004

Expand Down
2 changes: 1 addition & 1 deletion devices/common/kernel_6.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mkdir new; cp -rf .git new/.git
cd new
git reset --hard origin/master

cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* config/Config-images.in config/Config-kernel.in include/image*.mk include/trusted-firmware-a.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils package/devel/perf ../
cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* config/Config-images.in config/Config-kernel.in include/image*.mk include/trusted-firmware-a.mk include/bpf.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils package/devel/perf package/network/config/qosify ../
cd -

sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;
#include "mt7981b-cmcc-xr30.dtsi"

/ {
model = "CMCC XR30 eMMC version (RAX3000Z Enhanced version)";
compatible = "cmcc,xr30-emmc", "mediatek,mt7981";

chosen {
bootargs = "root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
};
};

&mmc0 {
bus-width = <8>;
max-frequency = <26000000>;
no-sd;
no-sdio;
non-removable;
pinctrl-names = "default", "state_uhs";
pinctrl-0 = <&mmc0_pins_default>;
pinctrl-1 = <&mmc0_pins_uhs>;
vmmc-supply = <&reg_3p3v>;
status = "okay";
};

&pio {
mmc0_pins_default: mmc0-pins {
mux {
function = "flash";
groups = "emmc_45";
};
};

mmc0_pins_uhs: mmc0-uhs-pins {
mux {
function = "flash";
groups = "emmc_45";
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;
#include "mt7981b-cmcc-xr30.dtsi"

/ {
model = "CMCC XR30";
compatible = "cmcc,xr30", "mediatek,mt7981";

aliases {
label-mac-device = &gmac1;
};
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";

spi_nand: flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;

spi-max-frequency = <52000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
mediatek,bmt-max-reserved-blocks = <64>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "bl2";
reg = <0x00000 0x0100000>;
read-only;
};

partition@100000 {
label = "u-boot-env";
reg = <0x100000 0x80000>;
};

factory: partition@180000 {
label = "factory";
reg = <0x180000 0x200000>;
read-only;
};

partition@380000 {
label = "fip";
reg = <0x380000 0x200000>;
read-only;
};

partition@580000 {
label = "ubi";
reg = <0x580000 0x7200000>;
};
};
};
};

&pio {
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};

conf-pu {
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
drive-strength = <8>;
mediatek,pull-up-adv = <0>; /* bias-disable */
};

conf-pd {
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
drive-strength = <8>;
mediatek,pull-up-adv = <0>; /* bias-disable */
};
};
};

&wifi {
mediatek,mtd-eeprom = <&factory 0x0>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright (C) 2023 Tianling Shen <[email protected]>
*/

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

#include "mt7981.dtsi"

/ {
model = "CMCC XR30";
compatible = "cmcc,xr30", "mediatek,mt7981";

aliases {
led-boot = &red_led;
led-failsafe = &red_led;
led-running = &white_led;
led-upgrade = &red_led;
serial0 = &uart0;
};

chosen {
stdout-path = "serial0:115200n8";
};

memory {
reg = <0 0x40000000 0 0x20000000>;
};

gpio-keys {
compatible = "gpio-keys";

button-reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};

button-mesh {
label = "mesh";
linux,code = <BTN_9>;
linux,input-type = <EV_SW>;
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
};
};

gpio-leds {
compatible = "gpio-leds";

white_led: led-0 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_WHITE>;
gpios = <&pio 35 GPIO_ACTIVE_LOW>;
};

led-1 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
};

red_led: led-2 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&pio 35 GPIO_ACTIVE_LOW>;
};
};
};

&eth {
status = "okay";

gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";

fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};

gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "gmii";
phy-handle = <&int_gbe_phy>;
};
};

&mdio_bus {
switch: switch@1f {
compatible = "mediatek,mt7531";
reg = <31>;
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&pio>;
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
};
};

&switch {
ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
label = "lan3";
};

port@1 {
reg = <1>;
label = "lan2";
};

port@2 {
reg = <2>;
label = "lan1";
};

port@6 {
reg = <6>;
ethernet = <&gmac0>;
phy-mode = "2500base-x";

fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};

&uart0 {
status = "okay";
};

&usb_phy {
status = "okay";
};

&watchdog {
status = "okay";
};

&wifi {
status = "okay";
};

&xhci {
status = "okay";
};
Loading

0 comments on commit 440c0b2

Please sign in to comment.