mirror of
https://github.com/elseif/MikroTikPatch.git
synced 2026-08-26 10:05:50 +00:00
Compare commits
8 Commits
7.20.7
...
7.22.1-arm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f2120dca8 | ||
|
|
9be7cdc6ec | ||
|
|
b7eccac7c5 | ||
|
|
e0afc29cca | ||
|
|
98dfe256e6 | ||
|
|
f179b74d3e | ||
|
|
c71a8ff9c1 | ||
|
|
b35ce475ab |
78
.github/workflows/mikrotik_patch_7.yml
vendored
78
.github/workflows/mikrotik_patch_7.yml
vendored
@@ -191,26 +191,18 @@ jobs:
|
||||
sudo mksquashfs option-root option.sfs -quiet -comp xz -no-xattrs -b 256k
|
||||
sudo rm -rf option-root
|
||||
if [ "${{ matrix.arch }}" == "x86" ]; then
|
||||
sudo wget -O cpython.tar.zst -nv https://github.com/astral-sh/python-build-standalone/releases/download/20251217/cpython-3.11.14+20251217-x86_64-unknown-linux-musl-lto+static-full.tar.zst
|
||||
sudo tar -xf cpython.tar.zst
|
||||
sudo rm cpython.tar.zst
|
||||
sudo rm -rf ./python/build
|
||||
sudo rm -rf ./python/install/include
|
||||
sudo rm -rf ./python/install/share
|
||||
sudo ln -s /pckg/python3/install/bin ./python/bin
|
||||
sudo mksquashfs python python3.sfs -quiet -comp xz -no-xattrs -b 256k
|
||||
sudo rm -rf ./python
|
||||
#elif [ "${{ matrix.arch }}" == "arm64" ]; then
|
||||
# sudo wget -O cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20251217/cpython-3.11.14+20251217-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz
|
||||
#elif [ "${{ matrix.arch }}" == "arm" ]; then
|
||||
# sudo wget -O cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20251217/cpython-3.11.14+20251217-armv7-unknown-linux-gnueabi-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
|
||||
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
|
||||
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
|
||||
#sudo tar -xf cpython.tar.gz
|
||||
#sudo rm cpython.tar.gz
|
||||
#sudo rm -rf ./python/include
|
||||
#sudo rm -rf ./python/share
|
||||
#sudo mksquashfs python python3.sfs -quiet -comp xz -no-xattrs -b 256k
|
||||
#sudo rm -rf ./python
|
||||
sudo tar -xf cpython.tar.gz
|
||||
sudo rm cpython.tar.gz
|
||||
sudo rm -rf ./python/include
|
||||
sudo rm -rf ./python/share
|
||||
sudo mksquashfs python python3.sfs -quiet -comp xz -no-xattrs -b 256k
|
||||
sudo rm -rf ./python
|
||||
|
||||
- name: Cache mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
|
||||
if: steps.get_latest.outputs.has_new_version == 'true' && (matrix.arch == 'x86' || matrix.arch == 'arm64')
|
||||
@@ -227,6 +219,18 @@ jobs:
|
||||
run: |
|
||||
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
|
||||
if: steps.get_latest.outputs.has_new_version == 'true' && (matrix.arch == 'x86' || matrix.arch == 'arm64')
|
||||
@@ -271,12 +275,22 @@ 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 cp python3-$LATEST_VERSION$ARCH.npk ./new_iso/
|
||||
sudo mkdir ./efiboot
|
||||
sudo mount -o loop ./new_iso/efiboot.img ./efiboot
|
||||
if [ "${{ matrix.arch }}" == "x86" ]; then
|
||||
sudo -E python3 patch.py kernel ./efiboot/linux.x86_64
|
||||
sudo cp ./efiboot/linux.x86_64 ./BOOTX64.EFI
|
||||
sudo cp ./BOOTX64.EFI ./new_iso/isolinux/linux
|
||||
sudo umount ./efiboot
|
||||
truncate --size 32M efiboot.img
|
||||
sudo mkfs.fat -F16 -n ROUTEROS efiboot.img
|
||||
sudo mount -o loop efiboot.img 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 umount ./efiboot
|
||||
sudo cp -f efiboot.img ./new_iso/efiboot.img
|
||||
sudo mkisofs -o mikrotik-$LATEST_VERSION$ARCH.iso \
|
||||
-V "MikroTik $LATEST_VERSION ${{ matrix.arch }}" \
|
||||
-sysid "" -preparer "MiKroTiK" \
|
||||
@@ -293,6 +307,7 @@ jobs:
|
||||
-R -J \
|
||||
./new_iso
|
||||
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 umount ./efiboot
|
||||
sudo xorriso -as mkisofs -o mikrotik-$LATEST_VERSION$ARCH.iso \
|
||||
@@ -423,7 +438,7 @@ jobs:
|
||||
</VirtualHardwareSection>
|
||||
<AnnotationSection ovf:required="false">
|
||||
<Info>A human-readable annotation</Info>
|
||||
<Annotation>MikroTik RouterOS CHR v7.19.4</Annotation>
|
||||
<Annotation>MikroTik RouterOS CHR</Annotation>
|
||||
</AnnotationSection>
|
||||
</VirtualSystem>
|
||||
</Envelope>'
|
||||
@@ -614,19 +629,6 @@ jobs:
|
||||
sudo zip ../all_packages-${{ matrix.arch }}-$LATEST_VERSION.zip *.npk
|
||||
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
|
||||
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && env.RELEASE == 'true'
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user