modified: .github/workflows/mikrotik_patch.yml

This commit is contained in:
zyb 2024-07-13 21:34:02 +08:00
parent b734865747
commit 553e42c7ed

View File

@ -146,7 +146,7 @@ jobs:
- name: Patch mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso - name: Patch mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso
run: | run: |
sudo apt-get install -y mkisofs > /dev/null sudo apt-get install -y mkisofs xorriso > /dev/null
sudo mkdir ./iso sudo mkdir ./iso
sudo mount -o loop,ro mikrotik.iso ./iso sudo mount -o loop,ro mikrotik.iso ./iso
sudo mkdir ./new_iso sudo mkdir ./new_iso
@ -165,7 +165,6 @@ jobs:
sudo cp option-$LATEST_VERSION$ARCH.npk ./new_iso/ sudo cp option-$LATEST_VERSION$ARCH.npk ./new_iso/
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.9" 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.9"
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 sudo mount -o loop ./new_iso/efiboot.img ./efiboot
if [ "${{ matrix.arch }}" == "x86_64" ]; then if [ "${{ matrix.arch }}" == "x86_64" ]; then
@ -173,11 +172,11 @@ jobs:
sudo cp ./efiboot/linux.x86_64 ./BOOTX64.EFI sudo cp ./efiboot/linux.x86_64 ./BOOTX64.EFI
sudo cp ./BOOTX64.EFI ./new_iso/isolinux/linux sudo cp ./BOOTX64.EFI ./new_iso/isolinux/linux
sudo umount ./efiboot sudo umount ./efiboot
sudo rm -rf ./efiboot
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" \
-publisher "" -A "MiKroTiK RouterOS" \ -publisher "" -A "MiKroTiK RouterOS" \
-input-charset utf-8 \
-b isolinux/isolinux.bin \ -b isolinux/isolinux.bin \
-c isolinux/boot.cat \ -c isolinux/boot.cat \
-no-emul-boot \ -no-emul-boot \
@ -190,20 +189,18 @@ jobs:
./new_iso ./new_iso
elif [ "${{ matrix.arch }}" == "arm64" ]; then elif [ "${{ matrix.arch }}" == "arm64" ]; then
sudo -E python3 patch.py kernel ./efiboot/EFI/BOOT/BOOTAA64.EFI sudo -E python3 patch.py kernel ./efiboot/EFI/BOOT/BOOTAA64.EFI
sudo cp ./efiboot/EFI/BOOT/BOOTAA64.EFI ./BOOTAA64.EFI
sudo umount ./efiboot sudo umount ./efiboot
sudo rm -rf ./efiboot sudo xorriso -as 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" \
-publisher "" -A "MiKroTiK RouterOS" \ -publisher "" -A "MiKroTiK RouterOS" \
-eltorito-alt-boot \ -input-charset utf-8 \
-e efiboot.img \ -b efiboot.img \
-no-emul-boot \ -no-emul-boot \
-R -J \ -R -J \
./new_iso ./new_iso
fi fi
sudo rm -rf ./efiboot
sudo mkdir ./all_packages sudo mkdir ./all_packages
sudo cp ./new_iso/*.npk ./all_packages/ sudo cp ./new_iso/*.npk ./all_packages/
sudo rm -rf ./new_iso sudo rm -rf ./new_iso