Unverified Commit 9b5150df authored by wukongdaily's avatar wukongdaily Committed by GitHub
Browse files

新增arm64虚拟机专用固件 比如苹果m芯片的mac mini中的UTM虚拟机

parent 315b98ab
name: build-QEMU-armsr-armv8-24.10.0
# 你可以理解为这是一种ARM64平台下通用型OpenWrt ,产出格式为qcow2,适合所有ARM64平台的虚拟机
# 比如斐讯N1刷了armbian系统,armbian系统里安装了PVE虚拟机 可用
# 比如新款Apple Silicon芯片的苹果电脑里的虚拟机UTM 可用
# 比如友善NanoPi R3S、R5S 官方推出的预装了PVE的debian系统 可用
# 比如瑞莎E20C刷了Armbian系统,自己安装了QEMU+KVM虚拟机 可用
on:
workflow_dispatch:
inputs:
profile:
type: choice
description: |
可用于ARM64虚拟机(比如macOS下的UTM虚拟机 比如斐讯N1/R3S/R5S等arm64系统的PVE虚拟机)
options:
- generic
required: true
default: 'generic'
rootfs_partsize:
description: '设置软件包大小 单位(MB) 最大数值10240'
required: true
default: '2048'
enable_pppoe:
description: "是否配置PPPoE拨号信息?"
required: true
default: 'no'
type: choice
options:
- 'yes'
- 'no'
pppoe_account:
description: "宽带账号 (若启用PPPoE)"
required: false
pppoe_password:
description: "宽带密码 (若启用PPPoE)"
required: false
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set executable permissions
run: chmod +x ${{ github.workspace }}/armsr-armv8/build.sh
- name: Validate PPPoE Inputs
run: |
if [[ "${{ inputs.enable_pppoe }}" == "yes" ]]; then
if [[ -z "${{ inputs.pppoe_account }}" || -z "${{ inputs.pppoe_password }}" ]]; then
echo "Error: PPPoE account and password must be provided when PPPoE is enabled!"
exit 1
fi
fi
- name: Building armsr-armv8 QEMU ImmortalWrt
run: |
profiles="${{ github.event.inputs.profile }}"
rootfs_partsize="${{ github.event.inputs.rootfs_partsize }}"
IFS=',' read -r -a profile_array <<< "$profiles"
for profile in "${profile_array[@]}"; do
echo "Building for profile: $profile"
docker run --rm -i \
--user root \
-v "${{ github.workspace }}/bin:/home/build/immortalwrt/bin" \
-v "${{ github.workspace }}/files:/home/build/immortalwrt/files" \
-v "${{ github.workspace }}/armsr-armv8/imm.config:/home/build/immortalwrt/.config" \
-v "${{ github.workspace }}/armsr-armv8/build.sh:/home/build/immortalwrt/build.sh" \
-e PROFILE=$profile \
-e ROOTFS_PARTSIZE=$rootfs_partsize \
-e ENABLE_PPPOE=${{ inputs.enable_pppoe }} \
-e PPPOE_ACCOUNT=${{ inputs.pppoe_account }} \
-e PPPOE_PASSWORD=${{ inputs.pppoe_password }} \
immortalwrt/imagebuilder:armsr-armv8-openwrt-24.10.0 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/armsr/armv8/*.qcow2 ${{ github.workspace }}
- name: Upload ImmortWrt as release assets
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: QEMU
name: ImmortWrt-QEMU-armsr-armv8-24.10.0
body_path: ${{ github.workspace }}/armsr-armv8/info.md
files: |
${{ github.workspace }}/*.qcow2
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#!/bin/bash
# Log file for debugging
LOGFILE="/tmp/uci-defaults-log.txt"
echo "Starting 99-custom.sh at $(date)" >> $LOGFILE
# yml 传入的路由器型号 PROFILE
echo "Building for profile: $PROFILE"
# yml 传入的固件大小 ROOTFS_PARTSIZE
echo "Building for ROOTFS_PARTSIZE: $ROOTFS_PARTSIZE"
echo "Create pppoe-settings"
mkdir -p /home/build/immortalwrt/files/etc/config
# 创建pppoe配置文件 yml传入环境变量ENABLE_PPPOE等 写入配置文件 供99-custom.sh读取
cat << EOF > /home/build/immortalwrt/files/etc/config/pppoe-settings
enable_pppoe=${ENABLE_PPPOE}
pppoe_account=${PPPOE_ACCOUNT}
pppoe_password=${PPPOE_PASSWORD}
EOF
echo "cat pppoe-settings"
cat /home/build/immortalwrt/files/etc/config/pppoe-settings
# 输出调试信息
echo "$(date '+%Y-%m-%d %H:%M:%S') - Starting build process..."
# 定义所需安装的包列表 下列插件你都可以自行删减
PACKAGES=""
PACKAGES="$PACKAGES curl"
PACKAGES="$PACKAGES luci-i18n-diskman-zh-cn"
PACKAGES="$PACKAGES luci-i18n-package-manager-zh-cn"
PACKAGES="$PACKAGES luci-i18n-firewall-zh-cn"
# 服务——FileBrowser 用户名admin 密码admin
PACKAGES="$PACKAGES luci-i18n-filebrowser-go-zh-cn"
PACKAGES="$PACKAGES luci-app-argon-config"
PACKAGES="$PACKAGES luci-i18n-argon-config-zh-cn"
PACKAGES="$PACKAGES luci-i18n-ttyd-zh-cn"
PACKAGES="$PACKAGES luci-i18n-passwall-zh-cn"
PACKAGES="$PACKAGES luci-app-openclash"
PACKAGES="$PACKAGES luci-i18n-homeproxy-zh-cn"
PACKAGES="$PACKAGES openssh-sftp-server"
PACKAGES="$PACKAGES luci-i18n-dockerman-zh-cn"
# 增加几个必备组件 方便用户安装iStore
PACKAGES="$PACKAGES fdisk"
PACKAGES="$PACKAGES script-utils"
PACKAGES="$PACKAGES luci-i18n-samba4-zh-cn"
# 构建镜像
echo "$(date '+%Y-%m-%d %H:%M:%S') - Building image with the following packages:"
echo "$PACKAGES"
make image PROFILE=$PROFILE PACKAGES="$PACKAGES" FILES="/home/build/immortalwrt/files" ROOTFS_PARTSIZE=$ROOTFS_PARTSIZE
if [ $? -ne 0 ]; then
echo "$(date '+%Y-%m-%d %H:%M:%S') - Error: Build failed!"
exit 1
fi
echo "$(date '+%Y-%m-%d %H:%M:%S') - Build completed successfully."
This diff is collapsed.
[![Github](https://img.shields.io/badge/Release文件可在国内加速站下载-FC7C0D?logo=github&logoColor=fff&labelColor=000&style=for-the-badge)](https://wkdaily.cpolar.top/archives/1)
#### 此固件为ARM64虚拟机专用
#### 格式为qcow2 该格式可在虚拟机里自由扩展大小 无需添加另一块虚拟硬盘
#### 固件地址 `192.168.100.1`
#### 用户名 `root` 密码:无
#### 默认软件包大小 2GB
##### 该固件导入单网口虚拟机的时候 默认采用DHCP模式 在虚拟机终端输入`ip a` 查看ip 后访问web
##### 该固件导入多网口虚拟机的时候 默认第一个网口采用DHCP模式 视为wan 其他网口自动br-lan
##### 若release中下载吃力 可在国内加速站下载 https://wkdaily.cpolar.top/archives/1
- 你可以理解为这是一种ARM64 通用型OpenWrt ,产出格式为qcow2,适合所有ARM64平台的虚拟机
- 举例来说 目前有哪些arm64虚拟机?
- 比如斐讯N1刷了armbian系统,armbian系统里安装了PVE虚拟机 可用
- 比如新款Apple Silicon芯片的苹果电脑里的虚拟机UTM 可用
- 比如友善NanoPi R3S、R5S 官方推出的预装了PVE的debian系统 可用
- 比如瑞莎E20C刷了Armbian系统,自己安装了QEMU+原生的KVM虚拟机 可用
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment