diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 5011c10..98fd201 --- a/README.md +++ b/README.md @@ -1,51 +1,29 @@ -# Proxmox-Port +# Proxmox VE Port package source -Arm64/Riscv64/Loongarch64 are ok. +## How to Build -There is a detailed introduction in the wiki. +### Initializing the build host +We need Debian 12 for this code -## 1. Tested platform: -- Rockpi (arm64) -- Raspberry Pi (arm64) -- Amlogic TV box (arm64) -- Kunpeng (arm64) -- FT (arm64) -- Ampere (arm64) -- Apple (arm64,vm only,no kvm support) -- 3A5000/3A6000/3C5000 (loongarch64) -- VisionFive2 (riscv64) - -Detailed: https://github.com/jiangcuo/Proxmox-Port/wiki/Support-List +```bash +apt update +apt install quilt docker.io -y +cd docker +docker build -t pvebuilder -f dockerfile.arm64 . +``` + +### Build via Docker + +```bash +bash build.sh pve-common +``` + +The built package will be under /tmp/pve-common -## 2. screen shot -arm64 +### Custom Docker Image -image +```bash +BUILDERNAME=dockerpull.com/pvebuilder:20241101 bash build.sh pve-common +``` -riscv64 - -image - - -loongarch64 - -image - - -## 3. Installation - -If you are using server that supports EFI,you can install proxmox-ve with iso. - -https://mirrors.apqa.cn/proxmox/isos/ - -If you are using u-boot device or failed with iso, you can install proxmox-ve from repo. - -Head to the wiki page to learn more. - - -## Star History - - - -[![Star History Chart](https://api.star-history.com/svg?repos=jiangcuo/Proxmox-Arm64,jiangcuo/Proxmox-Port&type=Date)](https://star-history.com/#jiangcuo/Proxmox-Arm64&jiangcuo/Proxmox-Port&Date) diff --git a/docker/dockerfile.arm64 b/docker/dockerfile.arm64 new file mode 100644 index 0000000..58596f8 --- /dev/null +++ b/docker/dockerfile.arm64 @@ -0,0 +1,43 @@ +FROM debian:12 +ARG DEBIAN_APT=http://mirrors.ustc.edu.cn +ARG PVE_APT=https://mirrors.lierfang.com +ARG ARCH= + + + + +RUN rm /etc/apt/sources.list.d/* \ +&& echo "deb $DEBIAN_APT/debian bookworm main contrib non-free non-free-firmware" >/etc/apt/sources.list \ +&& echo "deb $DEBIAN_APT/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list \ +&& echo "deb $DEBIAN_APT/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list \ +&& echo "deb $DEBIAN_APT/debian-security bookworm-security main contrib non-free non-free-firmware " >> /etc/apt/sources.list + + +RUN apt update && apt install -y wget nano curl gnupg ca-certificates apt-utils + + + +RUN ARCH=$(dpkg --print-architecture) \ +&& if [ "$ARCH" = "amd64" ]; then \ + echo "deb $PVE_APT/proxmox/debian/pve bookworm pve-no-subscription" >> /etc/apt/sources.list; \ + echo "deb $PVE_APT/proxmox/debian/devel bookworm main" >> /etc/apt/sources.list; \ + curl -l -o /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg $PVE_APT/proxmox/debian/proxmox-release-bookworm.gpg; \ +else \ + echo "deb $PVE_APT/proxmox/debian/pve bookworm port" >> /etc/apt/sources.list; \ + echo "deb $PVE_APT/proxmox/debian/devel bookworm port" >> /etc/apt/sources.list; \ + curl -l -o /etc/apt/trusted.gpg.d/pveport.gpg $PVE_APT/proxmox/debian/pveport.gpg; \ +fi + +RUN apt update && apt -y install build-* devscripts cargo dh-cargo devscripts rsync debcargo pkg-config debhelper git bison dwarves flex meson equivs + +RUN apt update \ +&& DEBIAN_FRONTEND=noninteractiv apt-get -y --no-install-recommends install proxmox-ve || echo ok + +RUN rm /var/lib/dpkg/info/pve-manager.postinst \ +&& rm /var/lib/dpkg/info/proxmox-ve.postinst \ +&& dpkg --configure -a + + +ADD ./start.sh / + +CMD ["bash","/start.sh"] diff --git a/docker/start.sh b/docker/start.sh new file mode 100644 index 0000000..414ca1a --- /dev/null +++ b/docker/start.sh @@ -0,0 +1,44 @@ +#!/bin/bash +errlog(){ + echo $1 + exit 1 + +} + +exec_build(){ + echo "install depends" + apt update + yes |mk-build-deps --install --remove + if [ -f "Makefile" ];then + echo "clean " + make clean || echo ok + echo "build deb in `pwd` " + make deb + else + dpkg-buildpackage -b -us -uc ||errlog "build error" + cp ../*.deb ../*.buildinfo ../*.changes $PKGDIR + fi +} + +if [ ! -d "$PKGDIR" ];then + errlog "$PKGDIR dir is not existd,Exitting !" +fi + + +if [ -f "$PKGDIR/../autobuild.sh" ];then + cd $PKGDIR/../ + bash autobuild.sh +else + # Rust not need copy + if [ ! -f "Cargo.toml" ];then + cd $PKGDIR + exec_build + else + mkdir /build/ + rsync -ra $PKGDIR /build + cd /build/data + exec_build + fi + + +fi