mirror of
https://github.com/elseif/MikroTikPatch.git
synced 2026-09-04 14:35:49 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f62f5de4e | ||
|
|
7f2120dca8 | ||
|
|
9be7cdc6ec | ||
|
|
b7eccac7c5 | ||
|
|
e0afc29cca | ||
|
|
98dfe256e6 | ||
|
|
f179b74d3e | ||
|
|
c71a8ff9c1 | ||
|
|
b35ce475ab | ||
|
|
976e562e83 | ||
|
|
86e11b647d | ||
|
|
07c6617805 | ||
|
|
bf2865921a | ||
|
|
604631539c | ||
|
|
fc7bb4f206 |
60
.github/workflows/mikrotik_patch_7.yml
vendored
60
.github/workflows/mikrotik_patch_7.yml
vendored
@@ -22,6 +22,7 @@ on:
|
|||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- stable
|
- stable
|
||||||
|
- long-term
|
||||||
- testing
|
- testing
|
||||||
version:
|
version:
|
||||||
description: "Specify version (e.g., 7.19.2), empty for latest"
|
description: "Specify version (e.g., 7.19.2), empty for latest"
|
||||||
@@ -87,7 +88,7 @@ jobs:
|
|||||||
BUILD_TIME=$(date +'%s')
|
BUILD_TIME=$(date +'%s')
|
||||||
RELEASE=true
|
RELEASE=true
|
||||||
MATRIX_JSON='[{"arch":"x86","channel":"stable"},{"arch":"arm64","channel":"stable"},{"arch":"arm","channel":"stable"},{"arch":"x86","channel":"testing"},{"arch":"arm64","channel":"testing"},{"arch":"arm","channel":"testing"}]'
|
MATRIX_JSON='[{"arch":"x86","channel":"stable"},{"arch":"arm64","channel":"stable"},{"arch":"arm","channel":"stable"},{"arch":"x86","channel":"testing"},{"arch":"arm64","channel":"testing"},{"arch":"arm","channel":"testing"}]'
|
||||||
MATRIX_JSON='[{"arch":"x86","channel":"stable"},{"arch":"arm64","channel":"stable"},{"arch":"x86","channel":"testing"},{"arch":"arm64","channel":"testing"}]'
|
MATRIX_JSON='[{"arch":"x86","channel":"stable"},{"arch":"arm64","channel":"stable"},{"arch":"x86","channel":"long-term"},{"arch":"arm64","channel":"long-term"},{"arch":"x86","channel":"testing"},{"arch":"arm64","channel":"testing"}]'
|
||||||
fi
|
fi
|
||||||
echo "BUILD_TIME=$BUILD_TIME" >> $GITHUB_OUTPUT
|
echo "BUILD_TIME=$BUILD_TIME" >> $GITHUB_OUTPUT
|
||||||
echo "RELEASE=$RELEASE" >> $GITHUB_OUTPUT
|
echo "RELEASE=$RELEASE" >> $GITHUB_OUTPUT
|
||||||
@@ -190,11 +191,11 @@ jobs:
|
|||||||
sudo mksquashfs option-root option.sfs -quiet -comp xz -no-xattrs -b 256k
|
sudo mksquashfs option-root option.sfs -quiet -comp xz -no-xattrs -b 256k
|
||||||
sudo rm -rf option-root
|
sudo rm -rf option-root
|
||||||
if [ "${{ matrix.arch }}" == "x86" ]; then
|
if [ "${{ matrix.arch }}" == "x86" ]; then
|
||||||
sudo wget -O cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20250708/cpython-3.11.13+20250708-x86_64-unknown-linux-musl-install_only_stripped.tar.gz
|
sudo wget -O cpython.tar.gz -nv https://github.com/astral-sh/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-x86_64-unknown-linux-musl-install_only_stripped.tar.gz
|
||||||
elif [ "${{ matrix.arch }}" == "arm64" ]; then
|
elif [ "${{ matrix.arch }}" == "arm64" ]; then
|
||||||
sudo wget -O cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20250708/cpython-3.11.13+20250708-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz
|
sudo wget -O cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz
|
||||||
elif [ "${{ matrix.arch }}" == "arm" ]; then
|
elif [ "${{ matrix.arch }}" == "arm" ]; then
|
||||||
sudo wget -O cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20250708/cpython-3.11.13+20250708-armv7-unknown-linux-gnueabi-install_only_stripped.tar.gz
|
sudo wget -O cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-armv7-unknown-linux-gnueabi-install_only_stripped.tar.gz
|
||||||
fi
|
fi
|
||||||
sudo tar -xf cpython.tar.gz
|
sudo tar -xf cpython.tar.gz
|
||||||
sudo rm cpython.tar.gz
|
sudo rm cpython.tar.gz
|
||||||
@@ -218,6 +219,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo wget -nv -O mikrotik.iso https://download.mikrotik.com/routeros/$LATEST_VERSION/mikrotik-$LATEST_VERSION$ARCH.iso
|
sudo wget -nv -O mikrotik.iso https://download.mikrotik.com/routeros/$LATEST_VERSION/mikrotik-$LATEST_VERSION$ARCH.iso
|
||||||
|
|
||||||
|
- name: Cache refind
|
||||||
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86'
|
||||||
|
id: cache-refind
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: refind-bin-0.14.2.zip
|
||||||
|
key: refind
|
||||||
|
restore-keys: refind
|
||||||
|
|
||||||
|
- name: Get refind
|
||||||
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && steps.cache-refind.outputs.cache-hit != 'true'
|
||||||
|
run: sudo wget --no-check-certificate -nv -O refind-bin-0.14.2.zip https://nchc.dl.sourceforge.net/project/refind/0.14.2/refind-bin-0.14.2.zip
|
||||||
|
|
||||||
- name: Patch mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
|
- name: Patch mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
|
||||||
if: steps.get_latest.outputs.has_new_version == 'true' && (matrix.arch == 'x86' || matrix.arch == 'arm64')
|
if: steps.get_latest.outputs.has_new_version == 'true' && (matrix.arch == 'x86' || matrix.arch == 'arm64')
|
||||||
@@ -262,12 +275,23 @@ jobs:
|
|||||||
sudo -E python3 npk.py create ./new_iso/gps-$LATEST_VERSION$ARCH.npk ./python3-$LATEST_VERSION$ARCH.npk python3 ./python3.sfs -desc="python 3.11.13"
|
sudo -E python3 npk.py create ./new_iso/gps-$LATEST_VERSION$ARCH.npk ./python3-$LATEST_VERSION$ARCH.npk python3 ./python3.sfs -desc="python 3.11.13"
|
||||||
sudo cp python3-$LATEST_VERSION$ARCH.npk ./new_iso/
|
sudo cp python3-$LATEST_VERSION$ARCH.npk ./new_iso/
|
||||||
sudo mkdir ./efiboot
|
sudo mkdir ./efiboot
|
||||||
sudo mount -o loop ./new_iso/efiboot.img ./efiboot
|
|
||||||
if [ "${{ matrix.arch }}" == "x86" ]; then
|
if [ "${{ matrix.arch }}" == "x86" ]; then
|
||||||
sudo -E python3 patch.py kernel ./efiboot/linux.x86_64
|
truncate --size 32M efiboot.img
|
||||||
sudo cp ./efiboot/linux.x86_64 ./BOOTX64.EFI
|
sudo mkfs.fat -F16 -n ROUTEROS efiboot.img
|
||||||
sudo cp ./BOOTX64.EFI ./new_iso/isolinux/linux
|
sudo mount -o loop efiboot.img efiboot
|
||||||
sudo umount ./efiboot
|
sudo mkdir -p efiboot/EFI/BOOT
|
||||||
|
sudo unzip refind-bin-0.14.2.zip refind-bin-0.14.2/refind/refind_x64.efi
|
||||||
|
sudo cp refind-bin-0.14.2/refind/refind_x64.efi ./efiboot/EFI/BOOT/BOOTX64.EFI
|
||||||
|
sudo rm -rf refind-bin-0.14.2
|
||||||
|
echo -e 'timeout 0\ntextonly\ntextmode 0\nshowtools shutdown, reboot, exit\nmenuentry "Install RouterOS" {\n\tloader /linux.x86_64\n\toptions "load_ramdisk=1 root=/dev/ram0 -install -cdrom debug"\n}\ndefault_selection /EFI/BOOT/BOOTX64.EFI' \
|
||||||
|
> refind.conf
|
||||||
|
sudo cp refind.conf ./efiboot/EFI/BOOT/
|
||||||
|
sudo rm refind.conf
|
||||||
|
sudo -E python3 patch.py kernel ./new_iso/isolinux/linux
|
||||||
|
sudo cp ./new_iso/isolinux/linux ./efiboot/linux.x86_64
|
||||||
|
sudo cp ./new_iso/isolinux/linux ./linux.x86_64
|
||||||
|
sudo umount ./efiboot
|
||||||
|
sudo cp -f efiboot.img ./new_iso/efiboot.img
|
||||||
sudo mkisofs -o mikrotik-$LATEST_VERSION$ARCH.iso \
|
sudo mkisofs -o mikrotik-$LATEST_VERSION$ARCH.iso \
|
||||||
-V "MikroTik $LATEST_VERSION ${{ matrix.arch }}" \
|
-V "MikroTik $LATEST_VERSION ${{ matrix.arch }}" \
|
||||||
-sysid "" -preparer "MiKroTiK" \
|
-sysid "" -preparer "MiKroTiK" \
|
||||||
@@ -284,6 +308,7 @@ jobs:
|
|||||||
-R -J \
|
-R -J \
|
||||||
./new_iso
|
./new_iso
|
||||||
elif [ "${{ matrix.arch }}" == "arm64" ]; then
|
elif [ "${{ matrix.arch }}" == "arm64" ]; then
|
||||||
|
sudo mount -o loop ./new_iso/efiboot.img ./efiboot
|
||||||
sudo -E python3 patch.py kernel ./efiboot/EFI/BOOT/BOOTAA64.EFI
|
sudo -E python3 patch.py kernel ./efiboot/EFI/BOOT/BOOTAA64.EFI
|
||||||
sudo umount ./efiboot
|
sudo umount ./efiboot
|
||||||
sudo xorriso -as mkisofs -o mikrotik-$LATEST_VERSION$ARCH.iso \
|
sudo xorriso -as mkisofs -o mikrotik-$LATEST_VERSION$ARCH.iso \
|
||||||
@@ -414,7 +439,7 @@ jobs:
|
|||||||
</VirtualHardwareSection>
|
</VirtualHardwareSection>
|
||||||
<AnnotationSection ovf:required="false">
|
<AnnotationSection ovf:required="false">
|
||||||
<Info>A human-readable annotation</Info>
|
<Info>A human-readable annotation</Info>
|
||||||
<Annotation>MikroTik RouterOS CHR v7.19.4</Annotation>
|
<Annotation>MikroTik RouterOS CHR</Annotation>
|
||||||
</AnnotationSection>
|
</AnnotationSection>
|
||||||
</VirtualSystem>
|
</VirtualSystem>
|
||||||
</Envelope>'
|
</Envelope>'
|
||||||
@@ -605,19 +630,6 @@ jobs:
|
|||||||
sudo zip ../all_packages-${{ matrix.arch }}-$LATEST_VERSION.zip *.npk
|
sudo zip ../all_packages-${{ matrix.arch }}-$LATEST_VERSION.zip *.npk
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Cache refind
|
|
||||||
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && env.RELEASE == 'true'
|
|
||||||
id: cache-refind
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: refind-bin-0.14.2.zip
|
|
||||||
key: refind
|
|
||||||
restore-keys: refind
|
|
||||||
|
|
||||||
- name: Get refind
|
|
||||||
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && steps.cache-refind.outputs.cache-hit != 'true' && env.RELEASE == 'true'
|
|
||||||
run: sudo wget -nv -O refind-bin-0.14.2.zip https://nchc.dl.sourceforge.net/project/refind/0.14.2/refind-bin-0.14.2.zip
|
|
||||||
|
|
||||||
- name: Create install-image-${{ env.LATEST_VERSION }}${{ env.ARCH }}.img
|
- name: Create install-image-${{ env.LATEST_VERSION }}${{ env.ARCH }}.img
|
||||||
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && env.RELEASE == 'true'
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && env.RELEASE == 'true'
|
||||||
run: |
|
run: |
|
||||||
@@ -641,7 +653,7 @@ jobs:
|
|||||||
> syslinux.cfg
|
> syslinux.cfg
|
||||||
sudo cp syslinux.cfg ./install/
|
sudo cp syslinux.cfg ./install/
|
||||||
sudo rm syslinux.cfg
|
sudo rm syslinux.cfg
|
||||||
sudo cp ./BOOTX64.EFI ./install/linux
|
sudo cp ./linux.x86_64 ./install/linux
|
||||||
NPK_FILES=($(find ./all_packages/*.npk))
|
NPK_FILES=($(find ./all_packages/*.npk))
|
||||||
for ((i=1; i<=${#NPK_FILES[@]}; i++))
|
for ((i=1; i<=${#NPK_FILES[@]}; i++))
|
||||||
do
|
do
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -2,16 +2,9 @@
|
|||||||
[](https://github.com/elseif/MikroTikPatch/actions/workflows/mikrotik_patch_7.yml)
|
[](https://github.com/elseif/MikroTikPatch/actions/workflows/mikrotik_patch_7.yml)
|
||||||
|
|
||||||
### 感谢赞助
|
### 感谢赞助
|
||||||
[DartNode(aff)](https://dartnode.com?aff=SnazzyLobster067) | [ZMTO(aff)](https://console.zmto.com/?affid=1588) | [Vultr(aff)](https://www.vultr.com/?ref=9807160-9J)
|
[](https://www.digitalocean.com/?refcode=dbf6ed365068&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)
|
||||||
|
|
||||||
### 感谢捐赠
|
[DartNode(aff)](https://dartnode.com?aff=SnazzyLobster067) | [ZMTO(aff)](https://console.zmto.com/?affid=1588) | [Vultr(aff)](https://www.vultr.com/?ref=9807160-9J)
|
||||||
ETH/BSC/MATIC(USDT):0x7d5ade1bb74f170411ba4a9a6e8752d7b431b455
|
|
||||||
|
|
||||||
TRX(USDT): TJ1Spmytu9CFhDg4QSo3cmWSrBKjNXuUYP
|
|
||||||
|
|
||||||
[](https://ko-fi.com/O4O31LX7D0)
|
|
||||||
|
|
||||||
捐赠后请将交易号或链接通过tg或email发给我记录。
|
|
||||||
|
|
||||||
# MikroTik RouterOS Patch [[English](README_EN.md)]
|
# MikroTik RouterOS Patch [[English](README_EN.md)]
|
||||||
[](./LICENSE)
|
[](./LICENSE)
|
||||||
|
|||||||
@@ -468,10 +468,10 @@
|
|||||||
// Fetch latest version numbers from MikroTik servers
|
// Fetch latest version numbers from MikroTik servers
|
||||||
const loadingOverlay = document.getElementById("loading");
|
const loadingOverlay = document.getElementById("loading");
|
||||||
const [routeros7_stable, routeros7_testing, routeros6_longterm, routeros6_stable] = await Promise.all([
|
const [routeros7_stable, routeros7_testing, routeros6_longterm, routeros6_stable] = await Promise.all([
|
||||||
fetch_latest_versions("https://upgrade.mikrotik.ltd/routeros/NEWESTa7.stable", "7.19.4"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.stable?ts=${Date.now()}`, "7.19.4"),
|
||||||
fetch_latest_versions("https://upgrade.mikrotik.ltd/routeros/NEWESTa7.testing", "7.20rc1"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.testing?ts=${Date.now()}`, "7.20rc1"),
|
||||||
fetch_latest_versions("https://upgrade.mikrotik.ltd/routeros/NEWEST6.long-term", "6.49.18"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.long-term?ts=${Date.now()}`, "6.49.18"),
|
||||||
fetch_latest_versions("https://upgrade.mikrotik.ltd/routeros/NEWEST6.stable", "6.49.19"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.stable?ts=${Date.now()}`, "6.49.19"),
|
||||||
]);
|
]);
|
||||||
// Hide loading overlay and remove loading class
|
// Hide loading overlay and remove loading class
|
||||||
loadingOverlay.style.display = "none";
|
loadingOverlay.style.display = "none";
|
||||||
|
|||||||
Reference in New Issue
Block a user