├── .github ├── .gitkeep ├── ISSUE_TEMPLATE │ └── bug-report.md └── workflows │ ├── delete-older-releases-workflows.yml │ ├── compile-kernel.yml │ ├── rebuild-armbian.yml │ ├── use-releases-file-to-build.yml │ └── build-armbian.yml ├── compile-kernel ├── tools │ ├── patch │ │ └── .gitkeep │ └── script │ │ ├── ubuntu2204-make-openwrt-depends │ │ ├── armbian-compile-kernel-depends │ │ ├── ubuntu2204-build-armbian-depends │ │ ├── ubuntu_chroot_armbian.sh │ │ ├── armbian_rootfs.sh │ │ └── armbian_compile_kernel_script.sh ├── README.cn.md └── README.md ├── documents ├── android_partition_table_template.xlsx ├── led_screen_display_control.md └── armbian_software.md ├── .gitignore ├── action.yml ├── LICENSE └── README.cn.md /.github/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /compile-kernel/tools/patch/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documents/android_partition_table_template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloTheAsia/amlogic-s9xxx-armbian/HEAD/documents/android_partition_table_template.xlsx -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | /build 3 | /tmp_dir 4 | /build-armbian/kernel 5 | /build-armbian/u-boot 6 | /compile-kernel/kernel 7 | /compile-kernel/output 8 | /compile-kernel/tools/armbian 9 | .DS_Store 10 | .idea 11 | npm-debug.log* 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | 9 | **Device Information | 设备信息** 10 | - SOC: [e.g. S095x3] 11 | - Model [e.g. HK1] 12 | 13 | **Armbian Version | 系统版本** 14 | - Kernel Version: [e.g. 5.15.100] 15 | - Release: [e.g. jammy/bullseye] 16 | 17 | **Describe the bug | 问题描述** 18 | All issues will only remain open for one week to prioritize resolving them. 19 | After that period, they will be closed but can still continue to be discussed in the thread. 20 | 所有的问题都只保留一周的开启状态供重点关注解决,超时将关闭,但仍然可以长期继续跟帖讨论。 21 | 22 | Please provide a detailed description of the issue and, if necessary, attach a screenshot. 23 | 详细描述问题,并在必要时附上屏幕截图。 24 | 25 | 26 | -------------------------------------------------------------------------------- /compile-kernel/tools/script/ubuntu2204-make-openwrt-depends: -------------------------------------------------------------------------------- 1 | ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison btrfs-progs build-essential bzip2 ca-certificates ccache cmake coreutils cpio curl device-tree-compiler fastjar flex g++-multilib gawk gcc-multilib gettext git git-core gperf gzip haveged help2man intltool jq libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool libz-dev lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pigz pkgconf python2.7 python3 python3-pip python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools swig tar texinfo uglifyjs unzip upx upx-ucl vim wget xmlto xsltproc xxd xz-utils yasm zip zlib1g-dev zstd -------------------------------------------------------------------------------- /compile-kernel/tools/script/armbian-compile-kernel-depends: -------------------------------------------------------------------------------- 1 | acl aptly aria2 bc binfmt-support binutils bison btrfs-progs build-essential busybox ca-certificates ccache clang coreutils cpio crossbuild-essential-arm64 cryptsetup curl debian-archive-keyring debian-keyring debootstrap device-tree-compiler dialog dirmngr distcc dosfstools dwarves f2fs-tools fakeroot flex gawk gcc gdisk git gpg gzip imagemagick jq kmod libbison-dev libcrypto++-dev libelf-dev libfdt-dev libfile-fcntllock-perl libfl-dev libfuse-dev liblz4-tool libncurses-dev libncurses5 libncurses5-dev libncursesw5-dev libpython3-dev libssl-dev libusb-1.0-0-dev linux-base lld llvm locales lz4 lzma lzop mtools ncurses-base ncurses-term nfs-kernel-server ntpdate p7zip p7zip-full parallel parted patchutils pigz pixz pkg-config pv python3 python3-dev python3-distutils python3-setuptools qemu-user-static rename rsync swig tar udev unzip uuid uuid-dev uuid-runtime vim wget whiptail xz-utils zip zlib1g-dev zstd -------------------------------------------------------------------------------- /compile-kernel/tools/script/ubuntu2204-build-armbian-depends: -------------------------------------------------------------------------------- 1 | acl aptly aria2 bc binfmt-support bison binutils-aarch64-linux-gnu btrfs-progs build-essential busybox ca-certificates ccache clang coreutils cpio crossbuild-essential-arm64 cryptsetup curl debian-archive-keyring debian-keyring debootstrap device-tree-compiler dialog dirmngr distcc dosfstools dwarves f2fs-tools fakeroot flex gawk gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi gdisk git gpg gzip imagemagick jq kmod lib32ncurses-dev lib32stdc++6 libbison-dev libc6-dev-armhf-cross libc6-i386 libcrypto++-dev libelf-dev libfdt-dev libfile-fcntllock-perl libfl-dev libfuse-dev libgcc-12-dev-arm64-cross liblz4-tool libncurses-dev libncurses5 libncurses5-dev libncursesw5-dev libpython2.7-dev libssl-dev libusb-1.0-0-dev linux-base lld llvm locales lz4 lzma lzop mtools ncurses-base ncurses-term nfs-kernel-server ntpdate p7zip p7zip-full parallel parted patchutils pigz pixz pkg-config pv python2 python3 python3-dev python3-distutils python3-setuptools qemu-user-static rename rsync swig tar u-boot-tools udev unzip uuid uuid-dev uuid-runtime vim wget whiptail xsltproc xz-utils zip zlib1g-dev zstd -------------------------------------------------------------------------------- /compile-kernel/tools/script/ubuntu_chroot_armbian.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #========================================================================== 3 | # 4 | # This file is licensed under the terms of the GNU General Public 5 | # License version 2. This program is licensed "as is" without any 6 | # warranty of any kind, whether express or implied. 7 | # 8 | # This file is a part of the Rebuild Armbian 9 | # https://github.com/ophub/amlogic-s9xxx-armbian 10 | # 11 | # Description: Run on Armbian, generate uInitrd. 12 | # Copyright (C) 2021- https://github.com/unifreq 13 | # Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian 14 | # 15 | #===================== Set make environment variables ===================== 16 | # 17 | # Set environment variables 18 | chroot_arch_info="$(arch)" 19 | chroot_kernel_version="${1}" 20 | initramfs_conf="/etc/initramfs-tools/update-initramfs.conf" 21 | compress_initrd_file="/etc/initramfs-tools/initramfs.conf" 22 | # 23 | # Set font color 24 | STEPS="[\033[95m STEPS \033[0m]" 25 | INFO="[\033[94m INFO \033[0m]" 26 | SUCCESS="[\033[92m SUCCESS \033[0m]" 27 | WARNING="[\033[93m WARNING \033[0m]" 28 | ERROR="[\033[91m ERROR \033[0m]" 29 | # 30 | #========================================================================== 31 | 32 | # Error message 33 | error_msg() { 34 | echo -e " ${ERROR} ${1}" 35 | exit 1 36 | } 37 | 38 | # Install the required dependencies 39 | chroot_env_init() { 40 | echo -e "${STEPS} Start checking dependencies..." 41 | # Check the compression algorithm 42 | if [[ -f "${compress_initrd_file}" ]]; then 43 | compress_settings="$(cat ${compress_initrd_file} | grep -E ^COMPRESS= | awk -F'=' '{print $2}')" 44 | [[ -n "${compress_settings}" ]] || error_msg "The compression algorithm is not set." 45 | else 46 | error_msg "The file ${compress_initrd_file} does not exist." 47 | fi 48 | 49 | # Set the necessary packages 50 | case "${compress_settings}" in 51 | xz | lzma) necessary_packages="xz-utils" ;; 52 | zstd) necessary_packages="zstd" ;; 53 | gzip | *) necessary_packages="gzip" ;; 54 | esac 55 | 56 | # Check the necessary packages 57 | [[ -n "$(dpkg -l | awk '{print $2}' | grep -w "^${necessary_packages}$")" ]] || { 58 | echo -e "${INFO} Install the required dependencies..." 59 | apt-get update -y 60 | apt-get install -y ${necessary_packages} 61 | } 62 | } 63 | 64 | # Generate uInitrd 65 | chroot_generate_uinitrd() { 66 | cd /boot 67 | echo -e "${STEPS} Generate uInitrd file..." 68 | 69 | # Enable update_initramfs 70 | [[ -f "${initramfs_conf}" ]] && sed -i "s|^update_initramfs=.*|update_initramfs=yes|g" ${initramfs_conf} 71 | 72 | # Generate uInitrd file directly under armbian system 73 | update-initramfs -c -k ${chroot_kernel_version} 74 | 75 | if [[ -f "uInitrd" ]]; then 76 | echo -e "${SUCCESS} The initrd.img and uInitrd file is Successfully generated." 77 | [[ ! -L "uInitrd" ]] && mv -vf uInitrd uInitrd-${chroot_kernel_version} 78 | sync && sleep 3 79 | else 80 | echo -e "${WARNING} The initrd.img and uInitrd file not updated." 81 | fi 82 | 83 | echo -e "${INFO} File situation in the /boot directory after update: \n$(ls -l *${chroot_kernel_version})" 84 | } 85 | 86 | echo -e "${INFO} Current system: [ ${chroot_arch_info} ]" 87 | echo -e "${INFO} Compile the kernel version: [ ${chroot_kernel_version} ]" 88 | 89 | # Check dependencies 90 | chroot_env_init 91 | # Generate uInitrd 92 | chroot_generate_uinitrd 93 | -------------------------------------------------------------------------------- /.github/workflows/delete-older-releases-workflows.yml: -------------------------------------------------------------------------------- 1 | #========================================================================== 2 | # https://github.com/ophub/amlogic-s9xxx-armbian 3 | # Description: Delete older releases and workflows runs 4 | #========================================================================== 5 | 6 | name: Delete older releases and workflows 7 | 8 | on: 9 | repository_dispatch: 10 | workflow_dispatch: 11 | inputs: 12 | delete_releases: 13 | description: "Delete Releases file?" 14 | required: true 15 | default: true 16 | type: boolean 17 | delete_tags: 18 | description: "Delete related Tags?" 19 | required: false 20 | default: true 21 | type: boolean 22 | prerelease_option: 23 | description: "Whether to differentiate pre-release." 24 | required: false 25 | default: "all" 26 | type: choice 27 | options: 28 | - all 29 | - true 30 | - false 31 | releases_keep_latest: 32 | description: "How many latest releases to keep." 33 | required: false 34 | default: "2" 35 | type: choice 36 | options: 37 | - 30 38 | - 20 39 | - 10 40 | - 9 41 | - 8 42 | - 7 43 | - 6 44 | - 5 45 | - 4 46 | - 3 47 | - 2 48 | - 1 49 | - 0 50 | releases_keep_keyword: 51 | description: "Keyword of the keep releases." 52 | required: false 53 | default: "v0/_save_/kernel_" 54 | delete_workflows: 55 | description: "Delete workflows records?" 56 | required: true 57 | default: true 58 | type: boolean 59 | workflows_keep_day: 60 | description: "Days to keep workflows." 61 | required: false 62 | default: "1" 63 | type: choice 64 | options: 65 | - 30 66 | - 20 67 | - 10 68 | - 9 69 | - 8 70 | - 7 71 | - 6 72 | - 5 73 | - 4 74 | - 3 75 | - 2 76 | - 1 77 | - 0 78 | workflows_keep_keyword: 79 | description: "keywords for keep workflows." 80 | required: false 81 | default: "" 82 | out_log: 83 | description: "Output detailed JSON logs." 84 | required: false 85 | default: true 86 | type: boolean 87 | 88 | env: 89 | TZ: America/New_York 90 | 91 | jobs: 92 | build: 93 | runs-on: ubuntu-22.04 94 | if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }} 95 | 96 | steps: 97 | - name: Checkout 98 | uses: actions/checkout@v4 99 | 100 | - name: Initialization environment 101 | id: init 102 | env: 103 | DEBIAN_FRONTEND: noninteractive 104 | run: | 105 | sudo timedatectl set-timezone "${TZ}" 106 | echo "status=success" >> ${GITHUB_OUTPUT} 107 | 108 | - name: Delete releases and workflows runs 109 | uses: ophub/delete-releases-workflows@main 110 | with: 111 | delete_releases: ${{ inputs.delete_releases }} 112 | delete_tags: ${{ inputs.delete_tags }} 113 | prerelease_option: ${{ inputs.prerelease_option }} 114 | releases_keep_latest: ${{ inputs.releases_keep_latest }} 115 | releases_keep_keyword: ${{ inputs.releases_keep_keyword }} 116 | delete_workflows: ${{ inputs.delete_workflows }} 117 | workflows_keep_day: ${{ inputs.workflows_keep_day }} 118 | workflows_keep_keyword: ${{ inputs.workflows_keep_keyword }} 119 | out_log: ${{ inputs.out_log }} 120 | gh_token: ${{ secrets.GITHUB_TOKEN }} 121 | -------------------------------------------------------------------------------- /compile-kernel/tools/script/armbian_rootfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #========================================================================== 3 | # 4 | # This file is licensed under the terms of the GNU General Public 5 | # License version 2. This program is licensed "as is" without any 6 | # warranty of any kind, whether express or implied. 7 | # 8 | # This file is a part of the Rebuild Armbian 9 | # https://github.com/ophub/amlogic-s9xxx-armbian 10 | # 11 | # Description: Redo the Armbian rootfs file. 12 | # Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian 13 | # 14 | # Command: ./compile-kernel/tools/script/redo_armbian_rootfs.sh -v 15 | # ./compile-kernel/tools/script/redo_armbian_rootfs.sh -v bookworm 16 | # 17 | #===================== Set make environment variables ===================== 18 | # 19 | # Set environment variables 20 | current_path="${PWD}" 21 | build_path="${current_path}/build" 22 | image_path="${build_path}/output/images" 23 | cache_path="${build_path}/cache/rootfs" 24 | tmp_rootfs="${image_path}/tmp_rootfs" 25 | # 26 | # Set font color 27 | STEPS="[\033[95m STEPS \033[0m]" 28 | INFO="[\033[94m INFO \033[0m]" 29 | SUCCESS="[\033[92m SUCCESS \033[0m]" 30 | WARNING="[\033[93m WARNING \033[0m]" 31 | ERROR="[\033[91m ERROR \033[0m]" 32 | # 33 | #========================================================================== 34 | 35 | error_msg() { 36 | echo -e " ${ERROR} ${1}" 37 | exit 1 38 | } 39 | 40 | init_var() { 41 | echo -e "${STEPS} Start Initializing Variables..." 42 | 43 | # If it is followed by [ : ], it means that the option requires a parameter value 44 | get_all_ver="$(getopt "v:" "${@}")" 45 | 46 | while [[ -n "${1}" ]]; do 47 | case "${1}" in 48 | -v | --VERSION_CODENAME) 49 | if [[ -n "${2}" ]]; then 50 | version_codename="${2}" 51 | shift 52 | else 53 | error_msg "Invalid -v parameter [ ${2} ]!" 54 | fi 55 | ;; 56 | *) 57 | error_msg "Invalid option [ ${1} ]!" 58 | ;; 59 | esac 60 | shift 61 | done 62 | 63 | echo -e "${INFO} VERSION CODENAME: [ ${version_codename} ]" 64 | } 65 | 66 | redo_rootfs() { 67 | echo -e "${STEPS} Start redoing Armbian [ ${version_codename} ] rootfs file..." 68 | 69 | # Searching for Armbian image 70 | image_file="$(basename $(ls ${image_path}/*.img 2>/dev/null | head -n 1))" 71 | image_version="$(echo ${image_file} | grep -oE '[2-9][0-9]\.[0-9]{1,2}\.[0-9]{1,2}' | head -n 1)" 72 | image_kernel="$(echo ${image_file} | grep -oE '[5-9]\.[0-9]{1,2}\.[0-9]{1,3}' | head -n 1)" 73 | image_save_name="Armbian_${image_version}-trunk_${image_kernel}.img" 74 | 75 | # Searching for rootfs file 76 | rootfs_file="$(ls ${cache_path}/rootfs-*.tar.zst 2>/dev/null | head -n 1)" 77 | rootfs_save_name="Armbian_${image_version}-${version_codename}_rootfs" 78 | 79 | # Create temporary directory 80 | mkdir -p ${tmp_rootfs} 81 | sudo chown root:root ${tmp_rootfs} 82 | [[ "${?}" == "0" ]] && echo -e "${INFO} 01. Temporary directory creation completed." || error_msg "01. Failed to create directory!" 83 | 84 | # Redo Armbian rootfs 85 | [[ -n "${rootfs_file}" ]] && { 86 | sudo tar -mxf ${rootfs_file} -C ${tmp_rootfs}/ 87 | cd ${tmp_rootfs}/ 88 | sudo tar -czf ${rootfs_save_name}.tar.gz * 89 | sudo mv -f ${rootfs_save_name}.tar.gz ../ 90 | [[ "${?}" == "0" ]] && echo -e "${INFO} 02. Making Armbian rootfs completed." || error_msg "02. Failed to redo rootfs!" 91 | } || error_msg "02. Failed to find rootfs file!" 92 | 93 | # Rename Armbian image 94 | [[ -n "${image_file}" ]] && { 95 | cd ${image_path}/ 96 | mv -f ${image_file} ${image_save_name} 97 | pigz -qf *.img || gzip -qf *.img 98 | [[ "${?}" == "0" ]] && echo -e "${INFO} 03. Renaming Armbian image completed." || error_msg "03. Failed to rename the image!" 99 | } || error_msg "03. Failed to find Armbian image!" 100 | 101 | # Add sha256sum verification files 102 | cd ${image_path}/ 103 | sudo rm -rf $(ls . | grep -vE ".img.gz|.tar.gz" | xargs) 2>/dev/null 104 | for file in *; do [[ ! -d "${file}" ]] && sha256sum "${file}" >"${file}.sha"; done 105 | [[ "${?}" == "0" ]] && echo -e "${INFO} 04. The files in the current directory:\n$(ls -l .)" || error_msg "04. Failed to add sha256sum!" 106 | 107 | # Delete Armbian build source codes and temporary files 108 | cd ${build_path}/ 109 | sudo rm -rf $(ls . | grep -v "^output$" | xargs) 110 | [[ "${?}" == "0" ]] && echo -e "${INFO} 05. Armbian source code cleanup completed." || error_msg "05. Failed to clean up!" 111 | 112 | sync && sleep 3 113 | } 114 | 115 | echo -e "${STEPS} Start to redo the Armbian rootfs file." 116 | 117 | # Initialize variables 118 | init_var "${@}" 119 | # Redo Armbian rootfs 120 | redo_rootfs 121 | -------------------------------------------------------------------------------- /.github/workflows/compile-kernel.yml: -------------------------------------------------------------------------------- 1 | #========================================================================== 2 | # Description: Compile the kernel 3 | # Copyright (C) 2021 https://github.com/unifreq/openwrt_packit 4 | # Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian 5 | #========================================================================== 6 | 7 | name: Compile the kernel 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | kernel_source: 14 | description: "Select the kernel source" 15 | required: false 16 | default: "rockchip-linux/kernel@stable-4.4-rk3399-linux" 17 | type: choice 18 | options: 19 | - unifreq 20 | - rockchip-linux/kernel 21 | - codesnas 22 | kernel_version: 23 | description: "Select kernel version" 24 | required: false 25 | default: "5.15.1_6.1.1" 26 | type: choice 27 | options: 28 | - 5.4.y 29 | - 5.10.y 30 | - 5.15.y 31 | - 6.1.y 32 | - 6.6.y 33 | - 6.1.y_6.6.y 34 | - 6.1.y_5.15.y 35 | - 5.4.y_5.10.y 36 | - stable-4.4-rk3399-linux 37 | kernel_auto: 38 | description: "Auto use the latest kernel" 39 | required: false 40 | default: true 41 | type: boolean 42 | kernel_package: 43 | description: "Select compile package list" 44 | required: false 45 | default: "all" 46 | type: choice 47 | options: 48 | - all 49 | - dtbs 50 | kernel_toolchain: 51 | description: "Select the compilation toolchain" 52 | required: false 53 | default: "gcc" 54 | type: choice 55 | options: 56 | - clang 57 | - gcc 58 | compress_format: 59 | description: "Set the initrd compression format" 60 | required: false 61 | default: "xz" 62 | type: choice 63 | options: 64 | - xz 65 | - gzip 66 | - zstd 67 | - lzma 68 | kernel_sign: 69 | description: "Set the kernel custom signature" 70 | required: false 71 | default: "-ophub" 72 | type: choice 73 | options: 74 | - -ophub 75 | - -yourname 76 | 77 | env: 78 | TZ: America/New_York 79 | 80 | jobs: 81 | build: 82 | runs-on: ubuntu-22.04 83 | if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }} 84 | 85 | steps: 86 | - name: Checkout 87 | uses: actions/checkout@v4 88 | 89 | - name: Initialization environment 90 | id: init 91 | env: 92 | DEBIAN_FRONTEND: noninteractive 93 | run: | 94 | docker rmi $(docker images -q) 2>/dev/null 95 | [[ -n "${AGENT_TOOLSDIRECTORY}" ]] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}" 96 | sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android 2>/dev/null 97 | sudo swapoff -a 98 | sudo rm -f /swapfile /mnt/swapfile 99 | sudo -E apt-get -y update 100 | sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true 101 | sudo -E apt-get -y install $(curl -fsSL https://is.gd/depend_ubuntu2204_armbian) 102 | sudo -E systemctl daemon-reload 103 | #sudo -E apt-get -y full-upgrade 104 | sudo -E apt-get -y autoremove --purge 105 | sudo -E apt-get clean 106 | sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile} 107 | sudo rm -rf ~/{.cargo,.dotnet,.rustup} 108 | sudo timedatectl set-timezone "${TZ}" 109 | echo "status=success" >> ${GITHUB_OUTPUT} 110 | 111 | - name: Create simulated physical disk 112 | id: disk 113 | run: | 114 | mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 1) 115 | root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 4) 116 | sudo truncate -s "${mnt_size}"G /mnt/mnt.img 117 | sudo truncate -s "${root_size}"G /root.img 118 | sudo losetup /dev/loop6 /mnt/mnt.img 119 | sudo losetup /dev/loop7 /root.img 120 | sudo pvcreate /dev/loop6 121 | sudo pvcreate /dev/loop7 122 | sudo vgcreate github /dev/loop6 /dev/loop7 123 | sudo lvcreate -n runner -l 100%FREE github 124 | sudo mkfs.xfs /dev/github/runner 125 | sudo mkdir -p /builder 126 | sudo mount /dev/github/runner /builder 127 | sudo chown -R runner.runner /builder 128 | df -Th 129 | 130 | - name: Create a mapped directory 131 | id: mapped 132 | working-directory: /builder 133 | run: | 134 | df -hT ${PWD} 135 | mkdir -p /builder/{kernel,output} 136 | ln -sf /builder/kernel /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/compile-kernel/kernel 137 | ln -sf /builder/output /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/compile-kernel/output 138 | echo "status=success" >> ${GITHUB_OUTPUT} 139 | 140 | - name: Compile the kernel [ ${{ inputs.kernel_version }} ] 141 | uses: ophub/amlogic-s9xxx-armbian@main 142 | if: ${{ steps.mapped.outputs.status }} == 'success' && !cancelled() 143 | with: 144 | build_target: kernel 145 | kernel_source: ${{ inputs.kernel_source }} 146 | kernel_version: ${{ inputs.kernel_version }} 147 | kernel_auto: ${{ inputs.kernel_auto }} 148 | kernel_package: ${{ inputs.kernel_package }} 149 | kernel_sign: ${{ inputs.kernel_sign }} 150 | kernel_toolchain: ${{ inputs.kernel_toolchain }} 151 | compress_format: ${{ inputs.compress_format }} 152 | 153 | - name: Upload Kernel to Release 154 | uses: ncipollo/release-action@main 155 | if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled() 156 | with: 157 | tag: kernel_stable 158 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 159 | allowUpdates: true 160 | removeArtifacts: false 161 | replacesArtifacts: true 162 | token: ${{ secrets.GH_TOKEN }} 163 | body: | 164 | The kernel can be used to compile Armbian and OpenWrt. 165 | The kernel source code comes from: ${{ inputs.kernel_source }} 166 | The kernel compilation toolchain: ${{ inputs.kernel_toolchain }} 167 | -------------------------------------------------------------------------------- /compile-kernel/README.cn.md: -------------------------------------------------------------------------------- 1 | # 内核编译和使用说明 2 | 3 | 查看英文说明 | [View English description](README.md) 4 | 5 | 此内核可用于 `Armbian` 和 `OpenWrt` 系统。例如 [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian), [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt), [flippy-openwrt-actions](https://github.com/ophub/flippy-openwrt-actions) 和 [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) 等项目。可以在编译固件时集成,也可以安装到已有的系统中使用。 6 | 7 | 你可以根据需要对内核的配置进行调整,如添加驱动和补丁。也可以根据心情编译具有特殊意义的个性化签名内核,如 `5.10.95-happy-new-year`, `5.10.96-beijing-winter-olympics`, `5.10.99-valentines-day` 等等。 8 | 9 | ## 内核存储库 10 | 11 | 在 [ophub/kernel](https://github.com/ophub/kernel) 的 [Releases](https://github.com/ophub/kernel/releases) 里有已经编译好的内核。 12 | 13 | ## 本地编译 14 | 15 | - ### 在 Ubuntu 系统下运行 16 | 17 | 1. 克隆仓库到本地 `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git` 18 | 19 | 2. 安装必要的软件包(脚本仅在 x86_64 Ubuntu-20.04/22.04 下做过测试) 20 | 21 | ```yaml 22 | sudo apt-get update -y 23 | sudo apt-get full-upgrade -y 24 | # For Ubuntu-22.04 25 | sudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2204-build-armbian-depends) 26 | ``` 27 | 28 | 3. 进入 `~/amlogic-s9xxx-armbian` 根目录,然后运行 `sudo ./recompile -k 5.15.100` 等指定参数命令即可编译内核。脚本会自动下载安装编译环境和内核源码并做好全部设置。打包好的内核文件保存在 `compile-kernel/output` 目录里。 29 | 30 | - ### 在 Armbian 系统下运行 31 | 32 | 1. 更新本地编译环境和配置文件:`armbian-kernel -u` 33 | 34 | 2. 编译内核:运行 `armbian-kernel -k 5.15.100` 等指定参数命令即可编译内核。脚本会自动下载安装编译环境和内核源码并做好全部设置。打包好的内核文件保存在 `/opt/kernel/compile-kernel/output` 目录里。 35 | 36 | - ### 本地编译参数说明 37 | 38 | | 参数 | 含义 | 说明 | 39 | | ------ | ----------- | ------------------------------- | 40 | | -r | Repository | 指定编译内核的源代码仓库。可选择 `github.com` 的内核源代码仓库。例如 `-r unifreq` 等。可设置参数格式为 `owner/repo@branch` 三项组合,参数中的所有者名称 `owner` 为必选参数,内核源代码仓库名称 `/repo` 和 仓库的分支名称 `@branch` 为可选参数。当仅指定所有者名称 `owner` 参数时,将自动匹配所有者的名称为 `linux-5.x.y` 格式且分支为 `main` 的内核源代码仓库。如果仓库名称或分支名称不同,请使用组合方式指定,如 `owner@branch` 或 `owner/repo` 或 `owner/repo@branch`。默认值:`unifreq` | 41 | | -k | Kernel | 指定 kernel 名称,如 `-k 5.15.100` . 多个内核使用 `_` 进行连接,如 `-k 5.15.100_5.15.50` | 42 | | -a | AutoKernel | 设置是否自动采用同系列最新版本内核。当为 `true` 时,将自动查找在 `-k` 中指定的内核如 `5.15.100` 的同系列是否有更新的版本,如有 `5.15.100` 之后的最新版本时,将自动更换为最新版。设置为 `false` 时将编译指定版本内核。默认值:`true` | 43 | | -m | MakePackage | 设置制作内核的包列表。当设置为 `all` ,将制作 `Image, modules, dtbs` 的全部文件。当设置值为 `dtbs` 时仅制作 3 个 dtbs 文件。默认值:`all` | 44 | | -p | AutoPatch | 设置是否使用自定义内核补丁。当设置为 `true` 时将使用 [tools/patch](tools/patch) 目录下的内核补丁,详细说明参考[内核补丁添加方法](../documents/README.cn.md#9-编译-armbian-内核)。默认值:`false` | 45 | | -n | CustomName | 设置内核自定义签名。当设置为 `-ophub` ,生成的内核名称为 `5.15.100-ophub` 。设置自定义签名时请勿包含空格。默认值:`-ophub` | 46 | | -t | Toolchain | 设置编译内核的工具链。可选项:`clang / gcc`。默认值:`gcc` | 47 | | -c | Compress | 设置内核中 initrd 使用的压缩格式。可选项:`xz / gzip / zstd / lzma`。默认值:`xz` | 48 | 49 | - `sudo ./recompile` : 使用默认配置编译内核。 50 | - `sudo ./recompile -k 5.15.100` : 使用默认配置,并通过 `-k` 进行指定需要编译的内核版本,多个版本同时编译时使用 `_` 进行连接。 51 | - `sudo ./recompile -k 5.15.100 -a true` : 使用默认配置,并通过 `-a` 参数设置编译内核时,是否自动升级到同系列最新内核。 52 | - `sudo ./recompile -k 5.15.100 -n -ophub` : 使用默认配置,并通过 `-n` 参数设置内核自定义签名。 53 | - `sudo ./recompile -k 5.15.100 -m dtbs` : 使用默认配置,并通过 `-m` 参数指定仅制作 dtbs 文件。 54 | - `sudo ./recompile -k 5.15.100_6.1.10 -a true -n -ophub` : 使用默认配置,并通过多个参数进行设置。 55 | 56 | 💡提示:推荐使用 `unifreq` 的 [linux-6.1.y](https://github.com/unifreq/linux-6.1.y), [linux-5.15.y](https://github.com/unifreq/linux-5.15.y), [linux-5.10.y](https://github.com/unifreq/linux-5.10.y) 和 [linux-5.4.y](https://github.com/unifreq/linux-5.4.y) 等仓库的内核源代码进行编译,他针对相关盒子添加了驱动和补丁。推荐使用 [tools/config](tools/config) 中的模板,已经根据相关盒子进行了预配置,可以在此基础上进行个性化定制。 57 | 58 | ## 使用 GitHub Actions 编译内核 59 | 60 | 1. 在 [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面里选择 ***`Compile the kernel`*** ,点击 ***`Run workflow`*** 按钮即可编译。 61 | 62 | 2. 详见使用模板 [compile-kernel.yml](../.github/workflows/compile-kernel.yml) 。代码如下: 63 | 64 | ```yaml 65 | - name: Compile the kernel 66 | uses: ophub/amlogic-s9xxx-armbian@main 67 | with: 68 | build_target: kernel 69 | kernel_version: 6.1.y_5.15.y 70 | kernel_auto: true 71 | kernel_sign: -yourname 72 | ``` 73 | 74 | 💡注意: 如果你 `fork` 仓库并进行了修改,使用时须将 Actions 的 `用户名` 改成你自己的仓库,例如: 75 | 76 | ```yaml 77 | uses: YOUR-REPO/amlogic-s9xxx-armbian@main 78 | ``` 79 | 80 | - ### GitHub Action 输入参数说明 81 | 82 | 相关参数与`本地编译命令`相对应,请参考上面的说明。 83 | 84 | | 参数 | 默认值 | 说明 | 85 | |-------------------|------------------|-----------------------------------------------------------| 86 | | build_target | kernel | 固定参数 `kernel`,设置编译目标为内核。 | 87 | | kernel_source | unifreq | 指定编译内核的源代码仓库。默认值为 `unifreq` 。功能参考 `-r` | 88 | | kernel_version | 6.1.y_5.15.y | 指定 kernel 名称,如 `5.15.100`。功能参考 `-k` | 89 | | kernel_auto | true | 设置是否自动采用同系列最新版本内核。默认值为 `true`。功能参考 `-a` | 90 | | kernel_package | all | 设置制作内核的包列表。默认值为 `all`。功能参考 `-m` | 91 | | kernel_sign | -ophub | 设置内核自定义签名。默认值为 `-ophub`。功能参考 `-n` | 92 | | kernel_toolchain | gcc | 设置编译内核的工具链。默认值为 `gcc`。功能参考 `-t` | 93 | | kernel_config | false | 默认使用 [tools/config](tools/config) 目录下的配置模板。你可以设置编译内核的配置文件在你仓库中的存放目录,如 `kernel/config_path` 。该目录下存储的配置模板必须以内核的主版本命名,如`config-5.10`、`config-5.15`等。 | 94 | | kernel_patch | false | 设置自定义内核补丁目录。 | 95 | | auto_patch | false | 设置是否使用自定义内核补丁。默认值为 `false`。功能参考 `-p` | 96 | | compress_format | xz | 设置内核中 initrd 使用的压缩格式。默认值为 `xz`。功能参考 `-c` | 97 | 98 | - ### GitHub Action 输出变量说明 99 | 100 | 上传到 `Releases` 需要给仓库设置 `Workflow 读写权限`,详见[使用说明](../documents/README.cn.md#2-设置隐私变量-github_token)。 101 | 102 | | 参数 | 默认值 | 说明 | 103 | |-----------------------------------|--------------------------|----------------------------| 104 | | ${{ env.PACKAGED_OUTPUTTAGS }} | 6.1.y_5.15.y | 编译好的内核的名称 | 105 | | ${{ env.PACKAGED_OUTPUTPATH }} | compile-kernel/output | 编译完成的内核所在文件夹的路径 | 106 | | ${{ env.PACKAGED_OUTPUTDATE }} | 04.13.1058 | 编译日期(月.日.时分) | 107 | | ${{ env.PACKAGED_STATUS }} | success | 编译状态:success / failure | 108 | 109 | ## 内核使用说明 110 | 111 | 此内核可用于 `Armbian` 和 `OpenWrt` 系统。以 ophub 的项目进行举例说明。 112 | 113 | ### 在 Armbian 系统中使用 114 | 115 | 下面分别对在编译 Armbian 固件时集成,以及如何安装到已有的系统中使用进行说明。 116 | 117 | - #### 使用内核编译 Armbian 固件 118 | 119 | 编译 Armbian 固件支持本地化操作,也支持使用 github.com 的 Actions 在线编译。其中本地化编译时的使用方法详见:[本地化打包](../README.cn.md#本地化打包), 使用 Actions 在线编译的方法详见:[使用 GitHub Actions 进行编译](../README.cn.md#使用-github-actions-进行编译) 120 | 121 | - #### 将内核安装到已有的 Armbian 系统 122 | 123 | 可以使用 `armbian-update` 命令将编译好的内核安装到已有的 Armbian 系统中,具体操作方法详见:[更新 Armbian 内核](../README.cn.md#更新-armbian-内核) 124 | 125 | 126 | ### 在 OpenWrt 系统中使用 127 | 128 | 下面分别对在 OpenWrt 系统中编译固件时集成和安装到已有的系统中使用进行介绍。 129 | 130 | - #### 使用内核编译 OpenWrt 固件 131 | 132 | 编译 OpenWrt 固件支持本地化操作,也支持使用 github.com 的 Actions 在线编译。其中本地化编译时的使用方法详见:[本地化打包](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#本地化打包), 使用 Actions 在线编译的方法详见:[使用 Github Actions 进行编译](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#使用-github-actions-进行编译) 133 | 134 | - #### 将内核安装到已有的 OpenWrt 系统 135 | 136 | 可以使用 [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic/blob/main/README.cn.md) 插件将编译好的内核安装到已有的 OpenWrt 系统中,具体操作方法详见:[升级 OpenWrt](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#升级-openwrt) 137 | 138 | 139 | -------------------------------------------------------------------------------- /documents/led_screen_display_control.md: -------------------------------------------------------------------------------- 1 | # LED Screen Display Control Instructions 2 | 3 | - The configuration files are located in the [/usr/share/openvfd](../armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd) directory of the `Armbian/OpenWrt` system. The command file for the `Armbian` system is at [/usr/sbin/armbian-openvfd](../armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-openvfd), and the command file for the `OpenWrt` system is at [/usr/sbin/openwrt-openvfd](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/make-openwrt/openwrt-files/common-files/usr/sbin/openwrt-openvfd). If they are not currently in the system, they can be manually uploaded, and file execution permissions can be assigned: `chmod +x /usr/share/openvfd/vfdservice /usr/sbin/*-openvfd`. 4 | 5 | - Upgrade the system kernel to the latest version. The `Armbian` system uses the `armbian-update` command for upgrades. The `OpenWrt` system upgrades using `System Menu` → `Amlogic Service` → `Online Download Update`. 6 | 7 | - Currently, `x96max.conf`, `x96maxplus.conf`, `h96max-x3.conf`, `hk1-x3.conf`, `hk1box.conf`, `tx3.conf`, `x96air.conf`, `x88pro-x3.conf` and other devices have been tested. Configurations for other devices can be modified by checking: [arthur-liberman/vfd-configurations](https://github.com/arthur-liberman/vfd-configurations) and [LibreELEC/linux_openvfd](https://github.com/LibreELEC/linux_openvfd/tree/master/conf). The second field value in the corresponding content in the configuration files from these two websites needs to be reduced by `1`. For example: 8 | 9 | ```yaml 10 | vfd_gpio_clk='0,69,0' 11 | vfd_gpio_dat='0,70,0' 12 | ``` 13 | Modify to: 14 | 15 | ```yaml 16 | vfd_gpio_clk='0,68,0' 17 | vfd_gpio_dat='0,69,0' 18 | ``` 19 | 20 | - Taking the configuration of [x96maxplus](../armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96maxplus.conf) as an example: If the order of the displayed time text is incorrect, you can adjust the order of numbers in `vfd_chars='4,0,1,2,3'` to `vfd_chars='1,2,3,4,0'` for testing. If the time is displayed upside down, you can adjust the `first value 0x02` in `vfd_display_type='0x02,0x00,0x01,0x00'` to `0x01` for testing. The content displayed can be adjusted according to the specific situation of your device in `functions='usb apps setup sd hdmi cvbs'`. 21 | 22 | - Rename the configuration file to `diy.conf` and upload it to the `/usr/share/openvfd/conf` directory, then enter the command `armbian-openvfd 99` for testing. 23 | 24 | - The command `armbian-openvfd 0` can disable the LED display and clear the system process. Before each new configuration test, please first execute this disable command, and then execute `armbian-openvfd 99` to test the modified configuration. 25 | 26 | - After the screen display is normal, you can add it to the boot autostart task, change the `15` in the following command to your `box number`: 27 | 28 | ```yaml 29 | # Execute the following command in the terminal to enable the openvfd service 30 | sed -i 's|^#*openvfd_enable=.*|openvfd_enable="yes"|g' /etc/custom_service/start_service.sh 31 | sed -i 's|^#*openvfd_boxid=.*|openvfd_boxid="15"|g' /etc/custom_service/start_service.sh 32 | ``` 33 | 34 | - Everyone is welcome to test and share their device's configuration file (diy.conf) to benefit more people. 35 | 36 | | BoxName | `BoxID` | Armbian Command | OpenWrt Command | Function | 37 | | ---------- | ------- | --------------------- | ----------------------- | ----------- | 38 | | x96max | 11 | armbian-openvfd 11 | openwrt-openvfd 11 | Enable LED | 39 | | x96maxplus | 12 | armbian-openvfd 12 | openwrt-openvfd 12 | Enable LED | 40 | | x96air | 13 | armbian-openvfd 13 | openwrt-openvfd 13 | Enable LED | 41 | | h96max-x3 | 14 | armbian-openvfd 14 | openwrt-openvfd 14 | Enable LED | 42 | | hk1-x3 | 15 | armbian-openvfd 15 | openwrt-openvfd 15 | Enable LED | 43 | | hk1box | 16 | armbian-openvfd 16 | openwrt-openvfd 16 | Enable LED | 44 | | tx3 | 17 | armbian-openvfd 17 | openwrt-openvfd 17 | Enable LED | 45 | | tx3-mini | 18 | armbian-openvfd 18 | openwrt-openvfd 18 | Enable LED | 46 | | t95 | 19 | armbian-openvfd 19 | openwrt-openvfd 19 | Enable LED | 47 | | t95z-plus | 20 | armbian-openvfd 20 | openwrt-openvfd 20 | Enable LED | 48 | | tx9-pro | 21 | armbian-openvfd 21 | openwrt-openvfd 21 | Enable LED | 49 | | x92 | 22 | armbian-openvfd 22 | openwrt-openvfd 22 | Enable LED | 50 | | whale | 23 | armbian-openvfd 23 | openwrt-openvfd 23 | Enable LED | 51 | | x88pro-x3 | 24 | armbian-openvfd 24 | openwrt-openvfd 24 | Enable LED | 52 | | diy | 99 | armbian-openvfd 99 | openwrt-openvfd 99 | Enable LED | 53 | | - | 0 | armbian-openvfd 0 | openwrt-openvfd 0 | Disable LED | 54 | | - | -u | armbian-openvfd -u | openwrt-openvfd -u | Update Conf | 55 | 56 | # LED 屏显示控制说明 57 | 58 | - 配置文件放在 `Armbian/OpenWrt` 系统的 [/usr/share/openvfd](../armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd) 目录下,`Armbian` 系统的命令文件位于 [/usr/sbin/armbian-openvfd](../armbian-files/platform-files/amlogic/rootfs/usr/sbin/armbian-openvfd),`OpenWrt` 系统的命令文件位于 [/usr/sbin/openwrt-openvfd](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/make-openwrt/openwrt-files/common-files/usr/sbin/openwrt-openvfd)。如果当前系统中没有的可以手动上传,并赋予文件执行权限:`chmod +x /usr/share/openvfd/vfdservice /usr/sbin/*-openvfd` 59 | 60 | - 将系统的内核升级到最新版本。`Armbian` 系统使用 `armbian-update` 命令升级。`OpenWrt` 系统使用 `系统菜单` → `晶晨宝盒` → `在线下载更新` 功能升级。 61 | 62 | - 目前有 `x96max.conf`、`x96maxplus.conf`、`h96max-x3.conf`、`hk1-x3.conf`、`hk1box.conf`、`tx3.conf`、`x96air.conf` 和 `x88pro-x3.conf` 等设备经过测试,其他设备的配置可以查看:[arthur-liberman/vfd-configurations](https://github.com/arthur-liberman/vfd-configurations) 和 [LibreELEC/linux_openvfd](https://github.com/LibreELEC/linux_openvfd/tree/master/conf) 进行修改,需要把这两个网站中配置文件里对应内容中进行调整,把第二个字段的值减 `1` 后使用,如: 63 | 64 | ```yaml 65 | vfd_gpio_clk='0,69,0' 66 | vfd_gpio_dat='0,70,0' 67 | ``` 68 | 修改为: 69 | 70 | ```yaml 71 | vfd_gpio_clk='0,68,0' 72 | vfd_gpio_dat='0,69,0' 73 | ``` 74 | 75 | - 以 [x96maxplus](../armbian-files/platform-files/amlogic/rootfs/usr/share/openvfd/conf/x96maxplus.conf) 的配置为例:如果显示的时间文字顺序不正确,可以调整 `vfd_chars='4,0,1,2,3'` 的数字顺序为 `vfd_chars='1,2,3,4,0'` 等进行测试。如果时间是翻转显示,可以调整 `vfd_display_type='0x02,0x00,0x01,0x00'` 中的 `第一个值 0x02` 为 `0x01` 等进行测试。显示的内容可根据自己的设备支持的具体情况调整 `functions='usb apps setup sd hdmi cvbs'` 中的值。 76 | 77 | - 将配置文件命名为 `diy.conf` 并上传至 `/usr/share/openvfd/conf` 目录下,输入命令 `armbian-openvfd 99` 进行测试。 78 | 79 | - 通过命令 `armbian-openvfd 0` 可以禁用 LED 显示并清除系统进程,在每次测试新的配置前,请先执行此禁用命令,再执行 `armbian-openvfd 99` 进行更改后的配置测试。 80 | 81 | - 屏幕显示正常后,可以添加至开机自启动任务,下面命令中的 `15` 改为你的 `盒子编号` : 82 | 83 | ```yaml 84 | # 在终端执行以下命令启用 openvfd 服务 85 | sed -i 's|^#*openvfd_enable=.*|openvfd_enable="yes"|g' /etc/custom_service/start_service.sh 86 | sed -i 's|^#*openvfd_boxid=.*|openvfd_boxid="15"|g' /etc/custom_service/start_service.sh 87 | ``` 88 | 89 | - 欢迎大家测试后分享自己设备的配置文件( diy.conf ),让更多人受益。 90 | 91 | | 盒子名称 | `盒子编号` | Armbian 使用命令 | OpenWrt 使用命令 | 功能 | 92 | | ---------- | -------- | --------------------- | ----------------------- | ------- | 93 | | x96max | 11 | armbian-openvfd 11 | openwrt-openvfd 11 | 启用 LED | 94 | | x96maxplus | 12 | armbian-openvfd 12 | openwrt-openvfd 12 | 启用 LED | 95 | | x96air | 13 | armbian-openvfd 13 | openwrt-openvfd 13 | 启用 LED | 96 | | h96max-x3 | 14 | armbian-openvfd 14 | openwrt-openvfd 14 | 启用 LED | 97 | | hk1-x3 | 15 | armbian-openvfd 15 | openwrt-openvfd 15 | 启用 LED | 98 | | hk1box | 16 | armbian-openvfd 16 | openwrt-openvfd 16 | 启用 LED | 99 | | tx3 | 17 | armbian-openvfd 17 | openwrt-openvfd 17 | 启用 LED | 100 | | tx3-mini | 18 | armbian-openvfd 18 | openwrt-openvfd 18 | 启用 LED | 101 | | t95 | 19 | armbian-openvfd 19 | openwrt-openvfd 19 | 启用 LED | 102 | | t95z-plus | 20 | armbian-openvfd 20 | openwrt-openvfd 20 | 启用 LED | 103 | | tx9-pro | 21 | armbian-openvfd 21 | openwrt-openvfd 21 | 启用 LED | 104 | | x92 | 22 | armbian-openvfd 22 | openwrt-openvfd 22 | 启用 LED | 105 | | whale | 23 | armbian-openvfd 23 | openwrt-openvfd 23 | 启用 LED | 106 | | x88pro-x3 | 24 | armbian-openvfd 24 | openwrt-openvfd 24 | 启用 LED | 107 | | diy | 99 | armbian-openvfd 99 | openwrt-openvfd 99 | 启用 LED | 108 | | - | 0 | armbian-openvfd 0 | openwrt-openvfd 0 | 禁用 LED | 109 | | - | -u | armbian-openvfd -u | openwrt-openvfd -u | 更新配置 | 110 | -------------------------------------------------------------------------------- /.github/workflows/rebuild-armbian.yml: -------------------------------------------------------------------------------- 1 | #========================================================================== 2 | # Description: Build Armbian 3 | # Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian 4 | #========================================================================== 5 | 6 | name: Rebuild armbian 7 | 8 | on: 9 | repository_dispatch: 10 | workflow_dispatch: 11 | inputs: 12 | armbian_url: 13 | description: "Set Armbian file path." 14 | required: false 15 | default: "" 16 | armbian_board: 17 | description: "Select device board." 18 | required: false 19 | default: "all" 20 | type: choice 21 | options: 22 | - all 23 | - s905w_s905x_s905mb_s905l3a_s905l3b_s905x2_s905x3_s912_s922x_s922x-ct2000_s922x-reva 24 | - s905x3-x88-pro-x3_s912-m8s-pro_s905x-t95_s912-t95z-plus_s905l3-unt400g1_s905lb-r3300l 25 | - seewo-sv21_smart-am40_station-m1_sw799_tn3399_zysj_tvi3315a_xiaobao_zcube1-max 26 | - vplus_tanix-tx6_tqc-a01 27 | - a311d 28 | - beikeyun 29 | - chainedbox 30 | - crrc 31 | - dg3399 32 | - dlfr100 33 | - e25 34 | - eaidk-610 35 | - emb3531 36 | - fine3399 37 | - firefly-rk3399 38 | - jp-tvbox 39 | - h28k 40 | - h66k 41 | - h68k 42 | - h69k 43 | - h88k 44 | - h88k-v3 45 | - hugsun-x99 46 | - ipc-r 47 | - king3399 48 | - kylin3399 49 | - leez 50 | - lx-r3s 51 | - mrkaio-m68s 52 | - nanopi-r5c 53 | - nanopi-r5s 54 | - panther-x2 55 | - r66s 56 | - r68s 57 | - renegade-rk3328 58 | - rk3318-box 59 | - rock5b 60 | - s905 61 | - s905-beelink-mini 62 | - s905-mxqpro-plus 63 | - s905d 64 | - s905d-ki-pro 65 | - s905d-sml5442tw 66 | - s905l 67 | - s905l-mg101 68 | - s905l2 69 | - s905l2-e900v21e 70 | - s905l2-wojia 71 | - s905l3 72 | - s905l3-cm211 73 | - s905l3-unt400g1 74 | - s905l3a 75 | - s905l3a-cm311 76 | - s905l3a-m401a 77 | - s905l3b 78 | - s905l3b-e900v22d 79 | - s905l3b-e900v22e 80 | - s905l3b-ip103h 81 | - s905l3b-rg020et-ca 82 | - s905l3b-unt403a 83 | - s905lb-q96-mini 84 | - s905lb-r3300l 85 | - s905mb 86 | - s905w 87 | - s905w-w95 88 | - s905w-x96-mini 89 | - s905w-x96w 90 | - s905x 91 | - s905x-b860h 92 | - s905x-nexbox-a95x 93 | - s905x-t95 94 | - s905x-tbee 95 | - s905x-tx9 96 | - s905x2 97 | - s905x2-km3 98 | - s905x2-x96max-2g 99 | - s905x3 100 | - s905x3-2101 101 | - s905x3-a100 102 | - s905x3-a95xf3 103 | - s905x3-a95xf3-gb 104 | - s905x3-b 105 | - s905x3-h96max 106 | - s905x3-hk1 107 | - s905x3-ip1001m 108 | - s905x3-q1 109 | - s905x3-q2 110 | - s905x3-tx3 111 | - s905x3-tx3-bz 112 | - s905x3-ugoosx3 113 | - s905x3-whale 114 | - s905x3-x88-pro-x3 115 | - s905x3-x96air 116 | - s905x3-x96air-gb 117 | - s905x3-x96max 118 | - s912 119 | - s912-h96pro-plus 120 | - s912-m8s-pro 121 | - s912-nexbox-a1 122 | - s912-nexbox-a2 123 | - s912-phicomm-t1 124 | - s912-t95z-plus 125 | - s912-tx8-max 126 | - s912-tx9-pro-2g 127 | - s912-tx9-pro-3g 128 | - s912-x92 129 | - s912-zyxq-fake 130 | - s922x 131 | - s922x-ct2000 132 | - s922x-gtking 133 | - s922x-gtkingpro-h 134 | - s922x-odroid-n2 135 | - s922x-reva 136 | - s922x-ugoos-am6 137 | - seewo-sv21 138 | - smart-am40 139 | - station-m1 140 | - sw799 141 | - tanix-tx6 142 | - tb-ls3399 143 | - tn3399 144 | - tqc-a01 145 | - tvi3315a 146 | - vplus 147 | - xiaobao 148 | - zcube1-max 149 | - zysj 150 | armbian_kernel: 151 | description: "Select kernel version." 152 | required: false 153 | default: "6.1.y_5.15.y" 154 | type: choice 155 | options: 156 | - 5.4.y 157 | - 5.10.y 158 | - 5.15.y 159 | - 6.1.y 160 | - 6.6.y 161 | - 6.1.y_6.6.y 162 | - 6.1.y_5.15.y 163 | - 5.4.y_5.10.y 164 | auto_kernel: 165 | description: "Auto use the latest kernel." 166 | required: false 167 | default: true 168 | type: boolean 169 | kernel_repo: 170 | description: "Set the kernel repository." 171 | required: false 172 | default: "ophub/kernel" 173 | type: choice 174 | options: 175 | - ophub/kernel 176 | kernel_usage: 177 | description: "Set the tags of the stable kernel." 178 | required: false 179 | default: "stable" 180 | type: choice 181 | options: 182 | - stable 183 | - flippy 184 | - dev 185 | - beta 186 | armbian_fstype: 187 | description: "Set armbian rootfs type." 188 | required: false 189 | default: "ext4" 190 | type: choice 191 | options: 192 | - ext4 193 | - btrfs 194 | armbian_storage: 195 | description: "Select image storage type." 196 | required: false 197 | default: "save" 198 | type: choice 199 | options: 200 | - save 201 | - temp 202 | builder_name: 203 | description: "Set Armbian builder signature." 204 | required: false 205 | default: "ophub" 206 | type: choice 207 | options: 208 | - ophub 209 | - angel 210 | - yourname 211 | 212 | env: 213 | TZ: America/New_York 214 | 215 | jobs: 216 | build: 217 | runs-on: ubuntu-22.04 218 | if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }} 219 | 220 | steps: 221 | - name: Checkout 222 | uses: actions/checkout@v4 223 | 224 | - name: Initialization environment 225 | id: init 226 | env: 227 | DEBIAN_FRONTEND: noninteractive 228 | run: | 229 | docker rmi $(docker images -q) 2>/dev/null 230 | [[ -n "${AGENT_TOOLSDIRECTORY}" ]] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}" 231 | sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android 2>/dev/null 232 | sudo swapoff -a 233 | sudo rm -f /swapfile /mnt/swapfile 234 | sudo -E apt-get -y update 235 | sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true 236 | sudo -E apt-get -y install $(curl -fsSL https://is.gd/depend_ubuntu2204_armbian) 237 | sudo -E systemctl daemon-reload 238 | #sudo -E apt-get -y full-upgrade 239 | sudo -E apt-get -y autoremove --purge 240 | sudo -E apt-get clean 241 | sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile} 242 | sudo rm -rf ~/{.cargo,.dotnet,.rustup} 243 | sudo timedatectl set-timezone "${TZ}" 244 | echo "status=success" >> ${GITHUB_OUTPUT} 245 | 246 | - name: Create simulated physical disk 247 | run: | 248 | mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 1) 249 | root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 4) 250 | sudo truncate -s "${mnt_size}"G /mnt/mnt.img 251 | sudo truncate -s "${root_size}"G /root.img 252 | sudo losetup /dev/loop6 /mnt/mnt.img 253 | sudo losetup /dev/loop7 /root.img 254 | sudo pvcreate /dev/loop6 255 | sudo pvcreate /dev/loop7 256 | sudo vgcreate github /dev/loop6 /dev/loop7 257 | sudo lvcreate -n runner -l 100%FREE github 258 | sudo mkfs.xfs /dev/github/runner 259 | sudo mkdir -p /builder 260 | sudo mount /dev/github/runner /builder 261 | sudo chown -R runner.runner /builder 262 | df -Th 263 | 264 | - name: Set download address 265 | id: down 266 | working-directory: /builder 267 | run: | 268 | # Get the url of the rebuild armbian file 269 | armbian_url="${{ inputs.armbian_url }}" 270 | if [[ -z "${armbian_url}" ]]; then 271 | armbian_site="https://armbian.tnahosting.net/dl/odroidn2/archive/" 272 | armbian_name="Armbian.*jammy.*.img.xz" 273 | armbian_file=$(curl -s "${armbian_site}" | grep -oE "${armbian_name}" | head -n 1) 274 | if [[ -n "${armbian_file}" ]]; then 275 | armbian_url="${armbian_site}${armbian_file}" 276 | else 277 | echo -e "Invalid download path: [ ${armbian_site} ]" 278 | exit 1 279 | fi 280 | fi 281 | echo "ARMBIAN_URL=${armbian_url}" >> ${GITHUB_ENV} 282 | 283 | # Get the release name of the rebuild armbian file 284 | set_release="" 285 | ARR_RELEASE=("jammy" "focal" "bullseye" "buster" "sid") 286 | i=1 287 | for r in ${ARR_RELEASE[*]}; do 288 | if [[ "${armbian_url}" == *"${r}"* ]]; then 289 | set_release="_${r}" 290 | break 291 | fi 292 | let i++ 293 | done 294 | 295 | mkdir -p /builder/build 296 | ln -sf /builder/build ${GITHUB_WORKSPACE}/build 297 | ln -sf /builder/build /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/build 298 | 299 | sudo timedatectl set-timezone "${TZ}" 300 | echo "build_tag=Armbian${set_release}_${{ inputs.armbian_storage }}_$(date +"%Y.%m")" >> ${GITHUB_OUTPUT} 301 | echo "status=success" >> ${GITHUB_OUTPUT} 302 | 303 | - name: Rebuild Armbian 304 | uses: ophub/amlogic-s9xxx-armbian@main 305 | if: ${{ env.ARMBIAN_URL }} != '' && !cancelled() 306 | with: 307 | build_target: armbian 308 | armbian_path: ${{ env.ARMBIAN_URL }} 309 | armbian_board: ${{ inputs.armbian_board }} 310 | armbian_kernel: ${{ inputs.armbian_kernel }} 311 | auto_kernel: ${{ inputs.auto_kernel }} 312 | kernel_repo: ${{ inputs.kernel_repo }} 313 | kernel_usage: ${{ inputs.kernel_usage }} 314 | armbian_fstype: ${{ inputs.armbian_fstype }} 315 | builder_name: ${{ inputs.builder_name }} 316 | 317 | - name: Upload Armbian image to Release 318 | uses: ncipollo/release-action@main 319 | if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled() 320 | with: 321 | tag: ${{ steps.down.outputs.build_tag }} 322 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 323 | allowUpdates: true 324 | removeArtifacts: false 325 | replacesArtifacts: true 326 | token: ${{ secrets.GITHUB_TOKEN }} 327 | body: | 328 | ### Armbian Image information 329 | - Default username: root 330 | - Default password: 1234 331 | - Install command: armbian-install 332 | - Update command: armbian-update 333 | ### Armbian Image Verification 334 | - sha256sum 335 | -------------------------------------------------------------------------------- /.github/workflows/use-releases-file-to-build.yml: -------------------------------------------------------------------------------- 1 | #========================================================================== 2 | # Description: Build Armbian 3 | # Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian 4 | #========================================================================== 5 | 6 | name: Use Releases file to rebuild armbian 7 | 8 | on: 9 | repository_dispatch: 10 | workflow_dispatch: 11 | inputs: 12 | set_release: 13 | description: "Select OS Release." 14 | required: false 15 | default: "jammy" 16 | type: choice 17 | options: 18 | - jammy 19 | - noble 20 | - bullseye 21 | - bookworm 22 | armbian_board: 23 | description: "Select device board." 24 | required: false 25 | default: "all" 26 | type: choice 27 | options: 28 | - all 29 | - s905w_s905x_s905mb_s905l3a_s905l3b_s905x2_s905x3_s912_s922x_s922x-ct2000_s922x-reva 30 | - s905x3-x88-pro-x3_s912-m8s-pro_s905x-t95_s912-t95z-plus_s905l3-unt400g1_s905lb-r3300l 31 | - seewo-sv21_smart-am40_station-m1_sw799_tn3399_zysj_tvi3315a_xiaobao_zcube1-max 32 | - vplus_tanix-tx6_tqc-a01 33 | - a311d 34 | - beikeyun 35 | - chainedbox 36 | - crrc 37 | - dg3399 38 | - dlfr100 39 | - e25 40 | - eaidk-610 41 | - emb3531 42 | - fine3399 43 | - firefly-rk3399 44 | - jp-tvbox 45 | - h28k 46 | - h66k 47 | - h68k 48 | - h69k 49 | - h88k 50 | - h88k-v3 51 | - hugsun-x99 52 | - ipc-r 53 | - king3399 54 | - kylin3399 55 | - leez 56 | - lx-r3s 57 | - mrkaio-m68s 58 | - nanopi-r5c 59 | - nanopi-r5s 60 | - panther-x2 61 | - r66s 62 | - r68s 63 | - renegade-rk3328 64 | - rk3318-box 65 | - rock5b 66 | - s905 67 | - s905-beelink-mini 68 | - s905-mxqpro-plus 69 | - s905d 70 | - s905d-ki-pro 71 | - s905d-sml5442tw 72 | - s905l 73 | - s905l-mg101 74 | - s905l2 75 | - s905l2-e900v21e 76 | - s905l2-wojia 77 | - s905l3 78 | - s905l3-cm211 79 | - s905l3-unt400g1 80 | - s905l3a 81 | - s905l3a-cm311 82 | - s905l3a-m401a 83 | - s905l3b 84 | - s905l3b-e900v22d 85 | - s905l3b-e900v22e 86 | - s905l3b-ip103h 87 | - s905l3b-rg020et-ca 88 | - s905l3b-unt403a 89 | - s905lb-q96-mini 90 | - s905lb-r3300l 91 | - s905mb 92 | - s905w 93 | - s905w-w95 94 | - s905w-x96-mini 95 | - s905w-x96w 96 | - s905x 97 | - s905x-b860h 98 | - s905x-nexbox-a95x 99 | - s905x-t95 100 | - s905x-tbee 101 | - s905x-tx9 102 | - s905x2 103 | - s905x2-km3 104 | - s905x2-x96max-2g 105 | - s905x3 106 | - s905x3-2101 107 | - s905x3-a100 108 | - s905x3-a95xf3 109 | - s905x3-a95xf3-gb 110 | - s905x3-b 111 | - s905x3-h96max 112 | - s905x3-hk1 113 | - s905x3-ip1001m 114 | - s905x3-q1 115 | - s905x3-q2 116 | - s905x3-tx3 117 | - s905x3-tx3-bz 118 | - s905x3-ugoosx3 119 | - s905x3-whale 120 | - s905x3-x88-pro-x3 121 | - s905x3-x96air 122 | - s905x3-x96air-gb 123 | - s905x3-x96max 124 | - s912 125 | - s912-h96pro-plus 126 | - s912-m8s-pro 127 | - s912-nexbox-a1 128 | - s912-nexbox-a2 129 | - s912-phicomm-t1 130 | - s912-t95z-plus 131 | - s912-tx8-max 132 | - s912-tx9-pro-2g 133 | - s912-tx9-pro-3g 134 | - s912-x92 135 | - s912-zyxq-fake 136 | - s922x 137 | - s922x-ct2000 138 | - s922x-gtking 139 | - s922x-gtkingpro-h 140 | - s922x-odroid-n2 141 | - s922x-reva 142 | - s922x-ugoos-am6 143 | - seewo-sv21 144 | - smart-am40 145 | - station-m1 146 | - sw799 147 | - tanix-tx6 148 | - tb-ls3399 149 | - tn3399 150 | - tqc-a01 151 | - tvi3315a 152 | - vplus 153 | - xiaobao 154 | - zcube1-max 155 | - zysj 156 | armbian_kernel: 157 | description: "Select kernel version." 158 | required: false 159 | default: "6.1.y_5.15.y" 160 | type: choice 161 | options: 162 | - 5.4.y 163 | - 5.10.y 164 | - 5.15.y 165 | - 6.1.y 166 | - 6.6.y 167 | - 6.1.y_6.6.y 168 | - 6.1.y_5.15.y 169 | - 5.4.y_5.10.y 170 | auto_kernel: 171 | description: "Auto use the latest kernel." 172 | required: false 173 | default: true 174 | type: boolean 175 | kernel_repo: 176 | description: "Set the kernel repository." 177 | required: false 178 | default: "ophub/kernel" 179 | type: choice 180 | options: 181 | - ophub/kernel 182 | kernel_usage: 183 | description: "Set the tags of the stable kernel." 184 | required: false 185 | default: "stable" 186 | type: choice 187 | options: 188 | - stable 189 | - flippy 190 | - dev 191 | - beta 192 | armbian_fstype: 193 | description: "Select armbian rootfs type." 194 | required: false 195 | default: "ext4" 196 | type: choice 197 | options: 198 | - ext4 199 | - btrfs 200 | armbian_storage: 201 | description: "Select image storage type." 202 | required: false 203 | default: "save" 204 | type: choice 205 | options: 206 | - save 207 | - temp 208 | builder_name: 209 | description: "Set Armbian builder signature." 210 | required: false 211 | default: "ophub" 212 | type: choice 213 | options: 214 | - ophub 215 | - angel 216 | - yourname 217 | 218 | env: 219 | TZ: America/New_York 220 | 221 | jobs: 222 | build: 223 | runs-on: ubuntu-22.04 224 | if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }} 225 | 226 | steps: 227 | - name: Checkout 228 | uses: actions/checkout@v4 229 | 230 | - name: Initialization environment 231 | id: init 232 | env: 233 | DEBIAN_FRONTEND: noninteractive 234 | run: | 235 | docker rmi $(docker images -q) 2>/dev/null 236 | [[ -n "${AGENT_TOOLSDIRECTORY}" ]] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}" 237 | sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android 2>/dev/null 238 | sudo swapoff -a 239 | sudo rm -f /swapfile /mnt/swapfile 240 | sudo -E apt-get -y update 241 | sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true 242 | sudo -E apt-get -y install $(curl -fsSL https://is.gd/depend_ubuntu2204_armbian) 243 | sudo -E systemctl daemon-reload 244 | #sudo -E apt-get -y full-upgrade 245 | sudo -E apt-get -y autoremove --purge 246 | sudo -E apt-get clean 247 | sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile} 248 | sudo rm -rf ~/{.cargo,.dotnet,.rustup} 249 | sudo timedatectl set-timezone "${TZ}" 250 | echo "status=success" >> ${GITHUB_OUTPUT} 251 | 252 | - name: Create simulated physical disk 253 | run: | 254 | mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 1) 255 | root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 4) 256 | sudo truncate -s "${mnt_size}"G /mnt/mnt.img 257 | sudo truncate -s "${root_size}"G /root.img 258 | sudo losetup /dev/loop6 /mnt/mnt.img 259 | sudo losetup /dev/loop7 /root.img 260 | sudo pvcreate /dev/loop6 261 | sudo pvcreate /dev/loop7 262 | sudo vgcreate github /dev/loop6 /dev/loop7 263 | sudo lvcreate -n runner -l 100%FREE github 264 | sudo mkfs.xfs /dev/github/runner 265 | sudo mkdir -p /builder 266 | sudo mount /dev/github/runner /builder 267 | sudo chown -R runner.runner /builder 268 | df -Th 269 | 270 | - name: Download Armbian from Releases 271 | id: down 272 | working-directory: /builder 273 | if: ${{ steps.init.outputs.status }} == 'success' && !cancelled() 274 | run: | 275 | armbian_buildpath="build/output/images" 276 | [[ -d "${armbian_buildpath}" ]] || mkdir -p "${armbian_buildpath}" 277 | ln -sf /builder/build ${GITHUB_WORKSPACE}/build 278 | ln -sf /builder/build /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/build 279 | 280 | latest_version="$(curl -s \ 281 | -H "Accept: application/vnd.github+json" \ 282 | -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ 283 | https://api.github.com/repos/${GITHUB_REPOSITORY}/releases?per_page=100 | 284 | jq '.[]' | 285 | jq -s --arg RTK "Armbian_${{ inputs.set_release }}_" '.[] | select(.tag_name | contains($RTK))' | 286 | jq -s '.[].assets[] | {data:.updated_at, url:.browser_download_url}' | 287 | jq -s --arg BOARD "-trunk_" '.[] | select((.url | contains($BOARD)) and (.url | endswith(".img.gz")))' | 288 | jq -s 'sort_by(.data)|reverse[]' | 289 | jq -s '.[0]' -c 290 | )" 291 | 292 | [[ "${latest_version}" == "null" ]] && echo "Invalid Armbian image download address." && exit 1 293 | latest_updated_at="$(echo ${latest_version} | jq -r '.data')" 294 | latest_url="$(echo ${latest_version} | jq -r '.url')" 295 | 296 | armbian_filename="${latest_url##*/}" 297 | curl -fsSL "${latest_url}" -o "${armbian_buildpath}/${armbian_filename}" 298 | [[ "${?}" -ne "0" ]] && echo "Invalid Armbian image download address." && exit 1 299 | cd "${armbian_buildpath}" && gzip -df *.img.gz && sync 300 | 301 | echo "build_tag=Armbian_${{ inputs.set_release }}_${{ inputs.armbian_storage }}_$(date +"%Y.%m")" >> ${GITHUB_OUTPUT} 302 | echo "status=success" >> ${GITHUB_OUTPUT} 303 | 304 | - name: Rebuild Armbian [ ${{ inputs.set_release }} ] 305 | uses: ophub/amlogic-s9xxx-armbian@main 306 | if: ${{ steps.down.outputs.status }} == 'success' && !cancelled() 307 | with: 308 | build_target: armbian 309 | armbian_path: build/output/images/*.img 310 | armbian_board: ${{ inputs.armbian_board }} 311 | armbian_kernel: ${{ inputs.armbian_kernel }} 312 | auto_kernel: ${{ inputs.auto_kernel }} 313 | kernel_repo: ${{ inputs.kernel_repo }} 314 | kernel_usage: ${{ inputs.kernel_usage }} 315 | armbian_fstype: ${{ inputs.armbian_fstype }} 316 | builder_name: ${{ inputs.builder_name }} 317 | 318 | - name: Upload Armbian image to Release 319 | uses: ncipollo/release-action@main 320 | if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled() 321 | with: 322 | tag: ${{ steps.down.outputs.build_tag }} 323 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 324 | allowUpdates: true 325 | removeArtifacts: false 326 | replacesArtifacts: true 327 | token: ${{ secrets.GITHUB_TOKEN }} 328 | body: | 329 | ### Armbian Image information 330 | - Default username: root 331 | - Default password: 1234 332 | - Install command: armbian-install 333 | - Update command: armbian-update 334 | ### Armbian Image Verification 335 | - sha256sum 336 | -------------------------------------------------------------------------------- /compile-kernel/README.md: -------------------------------------------------------------------------------- 1 | # Kernel Compilation and Usage Instructions 2 | 3 | View Chinese description | [查看中文说明](README.cn.md) 4 | 5 | This kernel can be used for `Armbian` and `OpenWrt` systems. For example, it can be used in the [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian), [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt), [flippy-openwrt-actions](https://github.com/ophub/flippy-openwrt-actions), and [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) projects. It can be integrated when compiling firmware or installed to use in an existing system. 6 | 7 | You can adjust the kernel's configuration as needed, such as adding drivers and patches. You can also compile personalized signature kernels with special significance according to your mood, such as `5.10.95-happy-new-year`, `5.10.96-beijing-winter-olympics`, `5.10.99-valentines-day`, and so on. 8 | 9 | ## Kernel Repository 10 | 11 | Pre-compiled kernels are available in the [Releases](https://github.com/ophub/kernel/releases) of [ophub/kernel](https://github.com/ophub/kernel). 12 | 13 | ## Local Compilation 14 | 15 | - ### Running on Ubuntu system 16 | 17 | 1. Clone the repository to local `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git` 18 | 19 | 2. Install necessary software packages (the script has only been tested under x86_64 Ubuntu-20.04/22.04) 20 | 21 | ```yaml 22 | sudo apt-get update -y 23 | sudo apt-get full-upgrade -y 24 | # For Ubuntu-22.04 25 | sudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2204-build-armbian-depends) 26 | ``` 27 | 28 | 3. Go to the `~/amlogic-s9xxx-armbian` root directory, and then run `sudo ./recompile -k 5.15.100` or other specified parameter commands to compile the kernel. The script will automatically download and install the compilation environment and kernel source code, and make all settings. The packaged kernel files are saved in the `compile-kernel/output` directory. 29 | 30 | 31 | - ### Running on the Armbian system 32 | 33 | 1. Update local compilation environment and configuration files: `armbian-kernel -u` 34 | 35 | 2. Compile the kernel: Run `armbian-kernel -k 5.15.100` or other specified parameter commands to compile the kernel. The script will automatically download, install the compilation environment and the kernel source code, and make all settings. The packaged kernel files are saved in the `/opt/kernel/compile-kernel/output` directory. 36 | 37 | - ### Local Compilation Parameter Explanation 38 | 39 | | Parameter | Meaning | Description | 40 | | --------- | ----------- | ----------- | 41 | | -r | Repository | Specifies the source code repository for compiling the kernel. You can choose the kernel source code repository from `github.com`, such as `-r unifreq`. The parameter format can be a combination of three items `owner/repo@branch`. The owner's name `owner` is a mandatory parameter, the kernel source code repository name `/repo` and the branch name of the repository `@branch` are optional parameters. When only specifying the owner's name `owner`, it will automatically match the kernel source code repository with the name format `linux-5.x.y` and the branch `main` of the owner. If the repository name or branch name is different, please specify it in combination, such as `owner@branch` or `owner/repo` or `owner/repo@branch`. Default value: `unifreq` | 42 | | -k | Kernel | Specifies the kernel name, such as `-k 5.15.100`. Multiple kernels are connected with `_`, such as `-k 5.15.100_5.15.50` | 43 | | -a | AutoKernel | Sets whether to automatically adopt the latest version of the same series of kernels. When it is `true`, it will automatically search whether there is a newer version of the same series of kernels specified in `-k`, such as `5.15.100`. If there is a latest version after `5.15.100`, it will automatically switch to the latest version. When set to `false`, it will compile the specified version of the kernel. Default value: `true` | 44 | | -m | MakePackage | Sets the package list for making the kernel. When set to `all`, it will make all the files of `Image, modules, dtbs`. When the setting value is `dtbs`, only 3 dtbs files will be produced. Default value: `all` | 45 | | -p | AutoPatch | Sets whether to use custom kernel patches. When set to `true`, it will use the kernel patches in the [tools/patch](tools/patch) directory. For detailed instructions, refer to [how to add kernel patches](../documents/README.md#9-compiling-armbian-kernel). Default value: `false` | 46 | | -n | CustomName | Sets the custom signature of the kernel. When set to `-ophub`, the generated kernel name is `5.15.100-ophub`. Please do not include spaces when setting custom signatures. Default value: `-ophub` | 47 | | -t | Toolchain | Sets the toolchain for compiling the kernel. Options: `clang / gcc`. Default value: `gcc` | 48 | | -c | Compress | Set the compression format used for initrd in the kernel. Options: `xz / gzip / zstd / lzma`. Default value: `xz` | 49 | 50 | 51 | - `sudo ./recompile`: Compile the kernel using the default configuration. 52 | - `sudo ./recompile -k 5.15.100`: Use the default configuration and specify the kernel version to be compiled through `-k`. Multiple versions are connected using `_` for simultaneous compilation. 53 | - `sudo ./recompile -k 5.15.100 -a true`: Use the default configuration and set whether to automatically upgrade to the latest kernel of the same series during kernel compilation through the `-a` parameter. 54 | - `sudo ./recompile -k 5.15.100 -n -ophub`: Use the default configuration and set the kernel custom signature through the `-n` parameter. 55 | - `sudo ./recompile -k 5.15.100 -m dtbs`: Use the default configuration and specify only the creation of dtbs files through the `-m` parameter. 56 | - `sudo ./recompile -k 5.15.100_6.1.10 -a true -n -ophub`: Use the default configuration and set multiple parameters. 57 | 58 | 💡 Tip: We recommend using the kernel source code from repositories such as [linux-6.1.y](https://github.com/unifreq/linux-6.1.y), [linux-5.15.y](https://github.com/unifreq/linux-5.15.y), [linux-5.10.y](https://github.com/unifreq/linux-5.10.y) and [linux-5.4.y](https://github.com/unifreq/linux-5.4.y) of `unifreq` for compilation, who added drivers and patches for related boxes. It is recommended to use the template in [tools/config](tools/config), which has been pre-configured according to the related boxes and can be customized based on this. 59 | 60 | ## Compile Kernel Using GitHub Actions 61 | 62 | 1. In the [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page, select ***`Compile the kernel`*** and click the ***`Run workflow`*** button to compile. 63 | 64 | 2. See the use of the template [compile-kernel.yml](../.github/workflows/compile-kernel.yml). The code is as follows: 65 | 66 | ```yaml 67 | - name: Compile the kernel 68 | uses: ophub/amlogic-s9xxx-armbian@main 69 | with: 70 | build_target: kernel 71 | kernel_version: 6.1.y_5.15.y 72 | kernel_auto: true 73 | kernel_sign: -yourname 74 | ``` 75 | 76 | 💡 Note: If you `fork` the repository and made modifications, you need to change the Actions `username` to your own repository when using it, for example: 77 | 78 | ```yaml 79 | uses: YOUR-REPO/amlogic-s9xxx-armbian@main 80 | ``` 81 | 82 | - ### GitHub Action Input Parameters 83 | 84 | These parameters correspond to the `local compilation commands`. Please refer to the above explanation. 85 | 86 | | Parameter | Default Value | Description | 87 | |------------------|---------------|-----------------------------------------------------------------| 88 | | build_target | kernel | Fixed parameter `kernel`, set the compilation target to the kernel.| 89 | | kernel_source | unifreq | Specifies the source code repository for compiling the kernel. Default value is `unifreq`. Refer to `-r` for functionality. | 90 | | kernel_version | 6.1.y_5.15.y | Specifies the kernel name, such as `5.15.100`. Refer to `-k` for functionality. | 91 | | kernel_auto | true | Sets whether to automatically adopt the latest version of the same series kernel. Default value is `true`. Refer to `-a` for functionality. | 92 | | kernel_package | all | Sets the package list for making the kernel. Default value is `all`. Refer to `-m` for functionality. | 93 | | kernel_sign | -ophub | Sets the kernel custom signature. Default value is `-ophub`. Refer to `-n` for functionality. | 94 | | kernel_toolchain | gcc | Sets the toolchain for compiling the kernel. Default value is `gcc`. Refer to `-t` for functionality. | 95 | | kernel_config | false | By default, use the configuration template in the [tools/config](tools/config) directory. You can set the directory for storing the kernel configuration file in your repository, such as `kernel/config_path`. The configuration templates stored in this directory must be named after the main version of the kernel, such as `config-5.10`, `config-5.15`, etc. | 96 | | kernel_patch | false | Sets the directory for custom kernel patches. | 97 | | auto_patch | false | Sets whether to use custom kernel patches. Default value is `false`. Refer to `-p` for functionality. | 98 | | compress_format | xz | Set the compression format used for initrd in the kernel. Default value is `xz`. Refer to `-c` for functionality. | 99 | 100 | - ### GitHub Action Output Variables 101 | 102 | To upload to `Releases`, you need to set `Workflow read/write permissions` for repository. For more details, see [Usage Instructions](../documents/README.md#2-set-up-private-variable-github_token). 103 | 104 | | Parameter | Default Value | Description | 105 | |----------------------------------|-----------------|----------------------------------------| 106 | | ${{ env.PACKAGED_OUTPUTTAGS }} | 6.1.y_5.15.y | The name of the compiled kernel. | 107 | | ${{ env.PACKAGED_OUTPUTPATH }} | compile-kernel/output | The path of the directory where the compiled kernel is stored. | 108 | | ${{ env.PACKAGED_OUTPUTDATE }} | 04.13.1058 | The compilation date (month.day.hourminute). | 109 | | ${{ env.PACKAGED_STATUS }} | success | Compilation status: success / failure. | 110 | 111 | ## Kernel Usage Instructions 112 | 113 | This kernel can be used for `Armbian` and `OpenWrt` systems. For example, the project of ophub. 114 | 115 | ### Use in Armbian System 116 | 117 | The following describes separately how to integrate it when compiling Armbian firmware, and how to install it for use in an existing system. 118 | 119 | - #### Using the Kernel to Compile Armbian Firmware 120 | 121 | Compiling Armbian firmware supports localization operations, and it also supports online compilation using Actions on github.com. The method of use when localizing compilation can be found in: [Local Packaging](../README.md#local-packaging), and the method of use when using Actions for online compilation can be found in: [Using GitHub Actions for Compilation](../README.md#using-github-actions-for-compilation). 122 | 123 | - #### Installing the Kernel in an Existing Armbian System 124 | 125 | You can use the `armbian-update` command to install the compiled kernel into an existing Armbian system. For specific operation methods, please refer to: [Update Armbian Kernel](../README.md#update-armbian-kernel). 126 | 127 | ### Use in OpenWrt System 128 | 129 | The following describes separately how to integrate it when compiling firmware in the OpenWrt system and how to install it for use in an existing system. 130 | 131 | - #### Using the Kernel to Compile OpenWrt Firmware 132 | 133 | Compiling OpenWrt firmware supports localization operations, and it also supports online compilation using Actions on github.com. The method of use when localizing compilation can be found in: [Local Packaging](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.md#local-packaging), and the method of use when using Actions for online compilation can be found in: [Use GitHub Actions for Compilation](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.md#use-gitHub-actions-for-compilation). 134 | 135 | - #### Installing the Kernel in an Existing OpenWrt System 136 | 137 | You can use the [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic) plugin to install the compiled kernel into an existing OpenWrt system. For specific operation methods, please refer to: [Update OpenWrt](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.md#update-openwrt). 138 | 139 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "Rebuild Armbian and Kernel" 2 | author: "https://github.com/ophub/amlogic-s9xxx-armbian" 3 | description: "Support Amlogic, Rockchip and Allwinner boxes." 4 | inputs: 5 | # Select build target 6 | build_target: 7 | description: "Select build target: armbian / kernel" 8 | required: false 9 | default: "armbian" 10 | # For build armbian ----- 11 | armbian_path: 12 | description: "Set Armbian file path." 13 | required: false 14 | default: "build/output/images/*.img" 15 | armbian_board: 16 | description: "Set device Board." 17 | required: false 18 | default: "all" 19 | kernel_repo: 20 | description: "Set kernel repository." 21 | required: false 22 | default: "ophub/kernel" 23 | kernel_usage: 24 | description: "Set the tags of the stable kernel." 25 | required: false 26 | default: "stable" 27 | armbian_kernel: 28 | description: "Set kernel version." 29 | required: false 30 | default: "6.1.y_5.15.y" 31 | auto_kernel: 32 | description: "Auto use the latest kernel." 33 | required: false 34 | default: "true" 35 | armbian_fstype: 36 | description: "Set armbian rootfs type: ext4 / btrfs" 37 | required: false 38 | default: "ext4" 39 | armbian_size: 40 | description: "Set armbian rootfs size(Unit: MiB)." 41 | required: false 42 | default: "" 43 | builder_name: 44 | description: "Set Armbian builder signature." 45 | required: false 46 | default: "" 47 | # For compile kernel ----- 48 | kernel_source: 49 | description: "Select the kernel source code" 50 | required: false 51 | default: "unifreq" 52 | kernel_version: 53 | description: "Select kernel version" 54 | required: false 55 | default: "6.1.y_5.15.y" 56 | kernel_auto: 57 | description: "Auto use the latest kernel" 58 | required: false 59 | default: "true" 60 | kernel_package: 61 | description: "Select compile package list" 62 | required: false 63 | default: "all" 64 | kernel_sign: 65 | description: "Set the kernel custom signature" 66 | required: false 67 | default: "-ophub" 68 | kernel_toolchain: 69 | description: "Select the compilation toolchain" 70 | required: false 71 | default: "clang" 72 | kernel_config: 73 | description: "Set the path of kernel .config" 74 | required: false 75 | default: "false" 76 | kernel_patch: 77 | description: "Set the directory for kernel patches" 78 | required: false 79 | default: "false" 80 | auto_patch: 81 | description: "Set whether to use kernel patches" 82 | required: false 83 | default: "false" 84 | compress_format: 85 | description: "Set the initrd compression format" 86 | required: false 87 | default: "xz" 88 | 89 | runs: 90 | using: "composite" 91 | steps: 92 | - shell: bash 93 | run: | 94 | cd ${GITHUB_ACTION_PATH} 95 | echo -e "Current running path: [ ${PWD} ]" 96 | build_target="${{ inputs.build_target }}" 97 | [[ -z "${build_target}" ]] && build_target="armbian" 98 | 99 | if [[ "${build_target}" == "armbian" ]]; then 100 | 101 | cd ${GITHUB_ACTION_PATH} 102 | echo -e "Start rebuilding Armbian..." 103 | 104 | armbian_file="${{ inputs.armbian_path }}" 105 | armbian_filename="${armbian_file##*/}" 106 | armbian_filepath="build/output/images" 107 | echo -e "Get armbian file input parameters: [ ${armbian_file} ]" 108 | [[ -z "${armbian_file}" ]] && echo -e "The [ armbian_path ] variable must be specified." && exit 1 109 | [[ -d "${armbian_filepath}" ]] || mkdir -p ${armbian_filepath} 110 | if [[ "${armbian_file}" == http* ]]; then 111 | echo -e "Download file: [ ${armbian_file} ]" 112 | curl -fsSL "${armbian_file}" -o "${armbian_filepath}/${armbian_filename}" 113 | else 114 | if [[ -z "$(ls ${armbian_filepath}/${armbian_filename} 2>/dev/null)" ]]; then 115 | echo -e "Copy files: [ ${armbian_file} ]" 116 | cp -vf ${GITHUB_WORKSPACE}/${armbian_file} ${armbian_filepath} 2>/dev/null 117 | else 118 | echo -e "The [ ${armbian_filepath}/${armbian_filename} ] file already exists, skipping." 119 | fi 120 | fi 121 | sync 122 | echo -e "About the [ ${armbian_filepath} ] directory: \n$(ls -l ${armbian_filepath} 2>/dev/null)" 123 | 124 | cd ${armbian_filepath} 125 | echo -e "Check the Armbian file format..." 126 | down_file="$(ls -l *.img* 2>/dev/null | grep "^-" | awk '{print $9}' | sort -u | head -n 1)" 127 | if [[ -n "${down_file}" ]]; then 128 | echo -e "Selected Armbian file: [ ${down_file} ]" 129 | else 130 | echo -e "The Armbian file is invalid." 131 | exit 1 132 | fi 133 | [[ "${down_file:0-7}" == ".img.gz" ]] && gzip -df ${down_file} 2>/dev/null && sync 134 | [[ "${down_file:0-7}" == ".img.xz" ]] && xz -d ${down_file} 2>/dev/null && sync 135 | [[ "${down_file:0-4}" == ".zip" ]] && unzip -o ${down_file} 2>/dev/null && sync 136 | echo -e "Armbian file: \n$(ls -l *.img 2>/dev/null)" 137 | 138 | echo -e "Check the armbian file name (-trunk_)..." 139 | image_file="$(ls *.img 2>/dev/null | head -n 1)" 140 | if [[ "${image_file}" =~ "-trunk_" ]]; then 141 | echo -e "The armbian file name is correct." 142 | else 143 | echo -e "Modify Armbian filename..." 144 | image_version="$(echo ${image_file} | grep -oE '[2-9][0-9]\.[0-9]{1,2}\.[0-9]{1,2}' | head -n 1)" 145 | image_kernel="$(echo ${image_file} | grep -oE '[5-9]\.[0-9]{1,2}\.[0-9]{1,3}' | head -n 1)" 146 | image_save_name="Armbian_${image_version}-trunk_${image_kernel}.img" 147 | rm -f ${image_save_name} 148 | mv -f ${image_file} ${image_save_name} 149 | echo -e "Renamed Armbian file: [ ${image_save_name} ]" 150 | fi 151 | 152 | cd ${GITHUB_ACTION_PATH} 153 | echo -e "Start to rebuild armbian..." 154 | make_command="" 155 | [[ -n "${{ inputs.armbian_board }}" ]] && make_command="${make_command} -b ${{ inputs.armbian_board }}" 156 | [[ -n "${{ inputs.kernel_repo }}" ]] && make_command="${make_command} -r ${{ inputs.kernel_repo }}" 157 | [[ -n "${{ inputs.kernel_usage }}" ]] && make_command="${make_command} -u ${{ inputs.kernel_usage }}" 158 | [[ -n "${{ inputs.armbian_kernel }}" ]] && make_command="${make_command} -k ${{ inputs.armbian_kernel }}" 159 | [[ -n "${{ inputs.auto_kernel }}" ]] && make_command="${make_command} -a ${{ inputs.auto_kernel }}" 160 | [[ -n "${{ inputs.armbian_fstype }}" ]] && make_command="${make_command} -t ${{ inputs.armbian_fstype }}" 161 | [[ -n "${{ inputs.armbian_size }}" ]] && make_command="${make_command} -s ${{ inputs.armbian_size }}" 162 | [[ -n "${{ inputs.builder_name }}" ]] && make_command="${make_command} -n ${{ inputs.builder_name }}" 163 | sudo ./rebuild ${make_command} 164 | 165 | cd ${GITHUB_ACTION_PATH}/${armbian_filepath} 166 | # Compress Armbian image file 167 | pigz -qf *.img || gzip -qf *.img 168 | # Generate a sha256sum verification file for each Armbian image file 169 | for file in *; do [[ ! -d "${file}" ]] && sha256sum "${file}" >"${file}.sha"; done 170 | rm -f *.sha.sha 2>/dev/null 171 | sync && sleep 3 172 | 173 | cd ${GITHUB_ACTION_PATH} 174 | echo -e "Output environment variables." 175 | echo "PACKAGED_OUTPUTPATH=${PWD}/${armbian_filepath}" >> ${GITHUB_ENV} 176 | echo "PACKAGED_OUTPUTDATE=$(date +"%m.%d.%H%M")" >> ${GITHUB_ENV} 177 | echo "PACKAGED_STATUS=success" >> ${GITHUB_ENV} 178 | echo -e "PACKAGED_OUTPUTPATH: ${PWD}/${armbian_filepath}" 179 | echo -e "PACKAGED_OUTPUTDATE: $(date +"%m.%d.%H%M")" 180 | echo -e "PACKAGED_STATUS: success" 181 | echo -e "PACKAGED_OUTPUTPATH files list: \n$(ls -l ${PWD}/${armbian_filepath} 2>/dev/null)" 182 | 183 | elif [[ "${build_target}" == "kernel" ]]; then 184 | 185 | cd ${GITHUB_ACTION_PATH} 186 | echo -e "Start compile kernel..." 187 | 188 | config_filepath="compile-kernel/tools/config" 189 | kernel_outpath="compile-kernel/output" 190 | [[ -d "${config_filepath}" ]] || mkdir -p ${config_filepath} 191 | if [[ -n "${{ inputs.kernel_config }}" && "${{ inputs.kernel_config }}" != "false" ]]; then 192 | if [[ "$(ls ${GITHUB_WORKSPACE}/${{ inputs.kernel_config }}/config-* -l 2>/dev/null | grep "^-" | wc -l)" -ne "0" ]]; then 193 | echo -e "Use a custom kernel compilation template..." 194 | rm -f ${config_filepath}/* 2>/dev/null && sync 195 | cp -vf ${GITHUB_WORKSPACE}/${{ inputs.kernel_config }}/config-* ${config_filepath}/ 2>/dev/null && sync 196 | echo -e "List of Kernel Custom Compilation Configuration Templates: \n$(ls -l ${config_filepath})" 197 | else 198 | echo -e "The custom kernel compilation template path is invalid, continue to use the default template." 199 | fi 200 | else 201 | echo -e "Use the default kernel compilation template." 202 | fi 203 | 204 | custom_kernel_patch="compile-kernel/tools/patch" 205 | [[ -d "${custom_kernel_patch}" ]] || mkdir -p ${custom_kernel_patch} 206 | if [[ -n "${{ inputs.kernel_patch }}" && "${{ inputs.kernel_patch }}" != "false" ]]; then 207 | if [[ -d "${GITHUB_WORKSPACE}/${{ inputs.kernel_patch }}" ]]; then 208 | echo -e "Use custom kernel patches..." 209 | rm -rf ${custom_kernel_patch}/* 2>/dev/null && sync 210 | cp -vrf ${GITHUB_WORKSPACE}/${{ inputs.kernel_patch }}/* -t ${custom_kernel_patch} && sync 211 | echo -e "Directory of custom kernel patches: \n$(ls -l ${custom_kernel_patch})" 212 | else 213 | echo -e "Invalid custom kernel patch directory, skipping." 214 | fi 215 | else 216 | echo -e "No custom kernel patches available." 217 | fi 218 | 219 | make_command="" 220 | [[ -n "${{ inputs.kernel_source }}" ]] && make_command="${make_command} -r ${{ inputs.kernel_source }}" 221 | [[ -n "${{ inputs.kernel_version }}" ]] && make_command="${make_command} -k ${{ inputs.kernel_version }}" 222 | [[ -n "${{ inputs.kernel_auto }}" ]] && make_command="${make_command} -a ${{ inputs.kernel_auto }}" 223 | [[ -n "${{ inputs.kernel_package }}" ]] && make_command="${make_command} -m ${{ inputs.kernel_package }}" 224 | [[ -n "${{ inputs.auto_patch }}" ]] && make_command="${make_command} -p ${{ inputs.auto_patch }}" 225 | [[ -n "${{ inputs.kernel_sign }}" ]] && make_command="${make_command} -n ${{ inputs.kernel_sign }}" 226 | [[ -n "${{ inputs.kernel_toolchain }}" ]] && make_command="${make_command} -t ${{ inputs.kernel_toolchain }}" 227 | [[ -n "${{ inputs.compress_format }}" ]] && make_command="${make_command} -c ${{ inputs.compress_format }}" 228 | sudo ./recompile ${make_command} 229 | 230 | cd ${GITHUB_ACTION_PATH} 231 | output_tags="$(ls -l ${PWD}/${kernel_outpath}/*.tar.gz | awk '{print $9}' | grep -oE '[1-9][0-9]{0,2}\.[0-9]{1,3}\.[0-9]+' | xargs | tr "[ ]" "_")" 232 | echo -e "Output environment variables." 233 | echo "PACKAGED_OUTPUTTAGS=${output_tags}" >> ${GITHUB_ENV} 234 | echo "PACKAGED_OUTPUTPATH=${PWD}/${kernel_outpath}" >> ${GITHUB_ENV} 235 | echo "PACKAGED_OUTPUTDATE=$(date +"%m.%d.%H%M")" >> ${GITHUB_ENV} 236 | echo "PACKAGED_STATUS=success" >> ${GITHUB_ENV} 237 | echo -e "PACKAGED_OUTPUTTAGS: ${output_tags}" 238 | echo -e "PACKAGED_OUTPUTPATH: ${PWD}/${kernel_outpath}" 239 | echo -e "PACKAGED_OUTPUTDATE: $(date +"%m.%d.%H%M")" 240 | echo -e "PACKAGED_STATUS: success" 241 | echo -e "PACKAGED_OUTPUTPATH files list: \n$(ls -l ${PWD}/${kernel_outpath} 2>/dev/null)" 242 | 243 | else 244 | echo -e "Please select a build target: armbian / kernel" 245 | exit 1 246 | fi 247 | 248 | branding: 249 | icon: "terminal" 250 | color: "gray-dark" 251 | -------------------------------------------------------------------------------- /.github/workflows/build-armbian.yml: -------------------------------------------------------------------------------- 1 | #========================================================================== 2 | # Description: Build Armbian 3 | # Copyright (C) 2021 https://github.com/ophub/amlogic-s9xxx-armbian 4 | #========================================================================== 5 | 6 | name: Build armbian 7 | 8 | on: 9 | repository_dispatch: 10 | workflow_dispatch: 11 | inputs: 12 | set_release: 13 | description: "Select OS Release." 14 | required: false 15 | default: "jammy" 16 | type: choice 17 | options: 18 | - jammy 19 | - noble 20 | - bullseye 21 | - bookworm 22 | armbian_board: 23 | description: "Select device board." 24 | required: false 25 | default: "panther-x2" 26 | type: choice 27 | options: 28 | - all 29 | - s905w_s905x_s905mb_s905l3a_s905l3b_s905x2_s905x3_s912_s922x_s922x-ct2000_s922x-reva 30 | - s905x3-x88-pro-x3_s912-m8s-pro_s905x-t95_s912-t95z-plus_s905l3-unt400g1_s905lb-r3300l 31 | - seewo-sv21_smart-am40_station-m1_sw799_tn3399_zysj_tvi3315a_xiaobao_zcube1-max 32 | - vplus_tanix-tx6_tqc-a01 33 | - a311d 34 | - beikeyun 35 | - chainedbox 36 | - crrc 37 | - dg3399 38 | - dlfr100 39 | - e25 40 | - eaidk-610 41 | - emb3531 42 | - fine3399 43 | - firefly-rk3399 44 | - jp-tvbox 45 | - h28k 46 | - h66k 47 | - h68k 48 | - h69k 49 | - h88k 50 | - h88k-v3 51 | - hugsun-x99 52 | - ipc-r 53 | - king3399 54 | - kylin3399 55 | - leez 56 | - lx-r3s 57 | - mrkaio-m68s 58 | - nanopi-r5c 59 | - nanopi-r5s 60 | - panther-x2 61 | - r66s 62 | - r68s 63 | - renegade-rk3328 64 | - rk3318-box 65 | - rock5b 66 | - s905 67 | - s905-beelink-mini 68 | - s905-mxqpro-plus 69 | - s905d 70 | - s905d-ki-pro 71 | - s905d-sml5442tw 72 | - s905l 73 | - s905l-mg101 74 | - s905l2 75 | - s905l2-e900v21e 76 | - s905l2-wojia 77 | - s905l3 78 | - s905l3-cm211 79 | - s905l3-unt400g1 80 | - s905l3a 81 | - s905l3a-cm311 82 | - s905l3a-m401a 83 | - s905l3b 84 | - s905l3b-e900v22d 85 | - s905l3b-e900v22e 86 | - s905l3b-ip103h 87 | - s905l3b-rg020et-ca 88 | - s905l3b-unt403a 89 | - s905lb-q96-mini 90 | - s905lb-r3300l 91 | - s905mb 92 | - s905w 93 | - s905w-w95 94 | - s905w-x96-mini 95 | - s905w-x96w 96 | - s905x 97 | - s905x-b860h 98 | - s905x-nexbox-a95x 99 | - s905x-t95 100 | - s905x-tbee 101 | - s905x-tx9 102 | - s905x2 103 | - s905x2-km3 104 | - s905x2-x96max-2g 105 | - s905x3 106 | - s905x3-2101 107 | - s905x3-a100 108 | - s905x3-a95xf3 109 | - s905x3-a95xf3-gb 110 | - s905x3-b 111 | - s905x3-h96max 112 | - s905x3-hk1 113 | - s905x3-ip1001m 114 | - s905x3-q1 115 | - s905x3-q2 116 | - s905x3-tx3 117 | - s905x3-tx3-bz 118 | - s905x3-ugoosx3 119 | - s905x3-whale 120 | - s905x3-x88-pro-x3 121 | - s905x3-x96air 122 | - s905x3-x96air-gb 123 | - s905x3-x96max 124 | - s912 125 | - s912-h96pro-plus 126 | - s912-m8s-pro 127 | - s912-nexbox-a1 128 | - s912-nexbox-a2 129 | - s912-phicomm-t1 130 | - s912-t95z-plus 131 | - s912-tx8-max 132 | - s912-tx9-pro-2g 133 | - s912-tx9-pro-3g 134 | - s912-x92 135 | - s912-zyxq-fake 136 | - s922x 137 | - s922x-ct2000 138 | - s922x-gtking 139 | - s922x-gtkingpro-h 140 | - s922x-odroid-n2 141 | - s922x-reva 142 | - s922x-ugoos-am6 143 | - seewo-sv21 144 | - nas-lite 145 | - smart-am40 146 | - station-m1 147 | - sw799 148 | - tanix-tx6 149 | - tb-ls3399 150 | - tn3399 151 | - tqc-a01 152 | - tvi3315a 153 | - vplus 154 | - xiaobao 155 | - zcube1-max 156 | - zysj 157 | - orangepi-5-plus 158 | - r08 159 | - hummingbird-4 160 | - hummingbird-4-main 161 | - dusun-210 162 | armbian_kernel: 163 | description: "Select kernel version." 164 | required: false 165 | default: "6.1.57" 166 | type: choice 167 | options: 168 | - 5.10.160_6.1.43 169 | - 6.1.25 170 | - 6.1.57 171 | - 5.4.y 172 | - 5.10.y 173 | - 5.15.y 174 | - 6.1.y 175 | - 6.6.y 176 | - 6.1.y_6.6.y 177 | - 6.1.y_5.15.y 178 | - 5.4.y_5.10.y 179 | auto_kernel: 180 | description: "Auto use the latest kernel." 181 | required: false 182 | default: true 183 | type: boolean 184 | kernel_repo: 185 | description: "Set the kernel repository." 186 | required: false 187 | default: "hellotheasia/kernel" 188 | type: choice 189 | options: 190 | - ophub/kernel 191 | - hellotheasia/kernel 192 | kernel_usage: 193 | description: "Set the tags of the stable kernel." 194 | required: false 195 | default: "rk35xx" 196 | type: choice 197 | options: 198 | - rk35xx 199 | - rk3588 200 | - stable 201 | - flippy 202 | - dev 203 | - beta 204 | armbian_fstype: 205 | description: "Select armbian rootfs type." 206 | required: false 207 | default: "ext4" 208 | type: choice 209 | options: 210 | - ext4 211 | - btrfs 212 | armbian_storage: 213 | description: "Select image storage type." 214 | required: false 215 | default: "save" 216 | type: choice 217 | options: 218 | - save 219 | - temp 220 | builder_name: 221 | description: "Set Armbian builder signature." 222 | required: false 223 | default: "hiasia" 224 | type: choice 225 | options: 226 | - ophub 227 | - angel 228 | - hiasia 229 | 230 | env: 231 | TZ: Asia/Shanghai 232 | ROOTFS_SCRIPT: compile-kernel/tools/script/armbian_rootfs.sh 233 | 234 | jobs: 235 | build: 236 | runs-on: ubuntu-22.04 237 | if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }} 238 | 239 | steps: 240 | - name: Checkout 241 | uses: actions/checkout@v4 242 | 243 | - name: Initialization environment 244 | id: init 245 | env: 246 | DEBIAN_FRONTEND: noninteractive 247 | run: | 248 | docker rmi $(docker images -q) 2>/dev/null 249 | [[ -n "${AGENT_TOOLSDIRECTORY}" ]] && sudo rm -rf "${AGENT_TOOLSDIRECTORY}" 250 | sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android 2>/dev/null 251 | sudo swapoff -a 252 | sudo rm -f /swapfile /mnt/swapfile 253 | sudo -E apt-get -y update 254 | sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true 255 | sudo -E apt-get -y install $(curl -fsSL https://is.gd/depend_ubuntu2204_armbian) 256 | sudo -E systemctl daemon-reload 257 | #sudo -E apt-get -y full-upgrade 258 | sudo -E apt-get -y autoremove --purge 259 | sudo -E apt-get clean 260 | sudo sed -i '/NVM_DIR/d;/skel/d' /root/{.bashrc,.profile} 261 | sudo rm -rf ~/{.cargo,.dotnet,.rustup} 262 | sudo timedatectl set-timezone "${TZ}" 263 | echo "status=success" >> ${GITHUB_OUTPUT} 264 | 265 | - name: Create simulated physical disk 266 | run: | 267 | mnt_size=$(expr $(df -h /mnt | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 1) 268 | root_size=$(expr $(df -h / | tail -1 | awk '{print $4}' | sed 's/[[:alpha:]]//g' | sed 's/\..*//') - 4) 269 | sudo truncate -s "${mnt_size}"G /mnt/mnt.img 270 | sudo truncate -s "${root_size}"G /root.img 271 | sudo losetup /dev/loop6 /mnt/mnt.img 272 | sudo losetup /dev/loop7 /root.img 273 | sudo pvcreate /dev/loop6 274 | sudo pvcreate /dev/loop7 275 | sudo vgcreate github /dev/loop6 /dev/loop7 276 | sudo lvcreate -n runner -l 100%FREE github 277 | sudo mkfs.xfs /dev/github/runner 278 | sudo mkdir -p /builder 279 | sudo mount /dev/github/runner /builder 280 | sudo chown -R runner.runner /builder 281 | df -Th 282 | 283 | - name: Download source code 284 | id: down 285 | working-directory: /builder 286 | if: ${{ steps.init.outputs.status }} == 'success' && !cancelled() 287 | run: | 288 | df -hT ${PWD} 289 | git clone -q --single-branch --depth=1 --branch=main https://github.com/armbian/build.git build 290 | ln -sf /builder/build ${GITHUB_WORKSPACE}/build 291 | ln -sf /builder/build /home/runner/work/_actions/hellotheasia/amlogic-s9xxx-armbian/main/build 292 | echo "status=success" >> ${GITHUB_OUTPUT} 293 | 294 | - name: Compile Armbian [ ${{ inputs.set_release }} ] 295 | id: compile 296 | working-directory: /builder 297 | if: ${{ steps.down.outputs.status }} == 'success' && !cancelled() 298 | run: | 299 | # Compile method and parameter description: https://docs.armbian.com/Developer-Guide_Build-Options 300 | cd build/ 301 | ./compile.sh RELEASE=${{ inputs.set_release }} BOARD=odroidn2 BRANCH=current BUILD_MINIMAL=no \ 302 | BUILD_ONLY=default HOST=armbian BUILD_DESKTOP=no EXPERT=yes KERNEL_CONFIGURE=no \ 303 | COMPRESS_OUTPUTIMAGE="sha" SHARE_LOG=yes 304 | echo "status=success" >> ${GITHUB_OUTPUT} 305 | 306 | - name: Organize files and clear space 307 | id: clean 308 | if: ${{ steps.compile.outputs.status }} == 'success' && !cancelled() 309 | run: | 310 | # Organize and keep essential files, delete unnecessary files 311 | chmod +x ${ROOTFS_SCRIPT} 312 | ${ROOTFS_SCRIPT} -v ${{ inputs.set_release }} 313 | 314 | # Output cleaning result information 315 | df -hT ${PWD} 316 | echo "build_tag=Armbian_${{ inputs.set_release }}_${{ inputs.armbian_storage }}_$(date +"%Y.%m")" >> ${GITHUB_OUTPUT} 317 | echo "status=success" >> ${GITHUB_OUTPUT} 318 | 319 | - name: Upload Armbian image to Release 320 | uses: ncipollo/release-action@main 321 | if: ${{ steps.clean.outputs.status }} == 'success' && !cancelled() 322 | with: 323 | tag: ${{ steps.clean.outputs.build_tag }} 324 | artifacts: build/output/images/* 325 | allowUpdates: true 326 | token: ${{ secrets.GH_TOKEN }} 327 | 328 | - name: Rebuild Armbian 329 | uses: hellotheasia/amlogic-s9xxx-armbian@main 330 | if: ${{ steps.clean.outputs.status }} == 'success' && !cancelled() 331 | with: 332 | build_target: armbian 333 | armbian_path: build/output/images/*.img.gz 334 | armbian_board: ${{ inputs.armbian_board }} 335 | armbian_kernel: ${{ inputs.armbian_kernel }} 336 | auto_kernel: ${{ inputs.auto_kernel }} 337 | kernel_repo: ${{ inputs.kernel_repo }} 338 | kernel_usage: ${{ inputs.kernel_usage }} 339 | armbian_fstype: ${{ inputs.armbian_fstype }} 340 | builder_name: ${{ inputs.builder_name }} 341 | 342 | - name: Upload Rebuild image to Release 343 | uses: ncipollo/release-action@main 344 | if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled() 345 | with: 346 | tag: ${{ steps.clean.outputs.build_tag }} 347 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 348 | allowUpdates: true 349 | removeArtifacts: false 350 | replacesArtifacts: true 351 | token: ${{ secrets.GH_TOKEN }} 352 | body: | 353 | ### Armbian Image information 354 | - Default username: root 355 | - Default password: 1234 356 | - Install command: armbian-install 357 | - Update command: armbian-update 358 | ### Armbian Image Verification 359 | - sha256sum 360 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /documents/armbian_software.md: -------------------------------------------------------------------------------- 1 | # Armbian Software Center 2 | 3 | According to user feedback and demands in the [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues) section, common [software](../armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) is gradually integrated to achieve one-click installation/update/uninstallation and other convenient operations. This includes `docker images`, `desktop software`, `application services`, etc. 4 | 5 | ## Software introduction 6 | 7 | | ID | SoftwareName | Home | DockerHub:Port | Software introduction | 8 | | --- | --------------------- | --------------------- | ---- | ------------------------------------------------- | 9 | | 101 | Docker | [Home](https://www.docker.com/) | [Docker](https://docs.docker.com/engine/install/) | Docker is an open platform for developing, shipping, and running applications. | 10 | | 102 | Portainer | [Home](https://www.portainer.io/) | [Docker](https://hub.docker.com/r/portainer/portainer-ce) :9443 | The most popular container management platform in the world. | 11 | | 103 | Yacht | [Home](https://yacht.sh/) | [Docker](https://hub.docker.com/r/selfhostedpro/yacht) :8001 | A container management UI with a focus on templates and 1-click deployments. | 12 | | 104 | Transmission | [Home](https://transmissionbt.com/) | [Docker](https://github.com/linuxserver/docker-transmission) :9091 | Transmission is a cross-platform BitTorrent client. | 13 | | 105 | qBittorrent | [Home](https://www.qbittorrent.org/) | [Docker](https://hub.docker.com/r/linuxserver/qbittorrent) :8080 | qBittorrent is a BitTorrent client. | 14 | | 106 | NextCloud | [Home](https://nextcloud.com/) | [Docker](https://hub.docker.com/r/arm64v8/nextcloud) :8088 | Nextcloud offers an on-premise Universal File Access and sync platform with powerful collaboration capabilities and desktop, mobile and web interfaces. | 15 | | 107 | Jellyfin | [Home](https://jellyfin.org/) | [Docker](https://hub.docker.com/r/linuxserver/jellyfin) :8096 | Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. | 16 | | 108 | HomeAssistant | [Home](https://www.home-assistant.io/) | [Docker](https://hub.docker.com/r/linuxserver/homeassistant) :8123 | Home Assistant integrates with over a thousand different devices and services, Has powerful automation features. | 17 | | 109 | Kodbox | [Home](https://kodcloud.com/) | [Docker](https://hub.docker.com/r/kodcloud/kodbox) :8081 | Private cloud online document management solution. | 18 | | 110 | CouchPotato | [Home](https://couchpota.to/) | [Docker](https://hub.docker.com/r/linuxserver/couchpotato) :5050 | Couchpotato is an automatic NZB and torrent downloader, Automatically find movies you want to watch. | 19 | | 111 | Sonarr | [Home](https://sonarr.tv/) | [Docker](https://hub.docker.com/r/linuxserver/sonarr) :8989 | Sonarr is a PVR for Usenet and BitTorrent users. | 20 | | 112 | Radarr | [Home](https://radarr.video/) | [Docker](https://hub.docker.com/r/linuxserver/radarr) :7878 | Radarr is a movie collection manager for Usenet and BitTorrent users. | 21 | | 113 | Syncthing | [Home](https://syncthing.net/) | [Docker](https://hub.docker.com/r/linuxserver/syncthing) :8384 | Syncthing is a continuous file synchronization program. | 22 | | 114 | FileBrowser | [Home](https://filebrowser.org/) | [Docker](https://hub.docker.com/r/filebrowser/filebrowser) :8002 | File Browser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. | 23 | | 115 | Heimdall | [Home](https://heimdall.site/) | [Docker](https://hub.docker.com/r/linuxserver/heimdall) :8003 | Heimdall is a way to organise all those links to your most used web sites and web applications in a simple way. | 24 | | 116 | Node-RED | [Home](https://nodered.org/) | [Docker](https://nodered.org/docs/getting-started/docker) :1880 | Node-RED is a programming tool. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click. | 25 | | 117 | Mosquitto | [Home](https://www.mosquitto.org/) | [Docker](https://hub.docker.com/r/arm64v8/eclipse-mosquitto) :1883 | The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. Eclipse Mosquitto is an open source implementation of a server for versions 5, 3.1.1, and 3.1 of the MQTT protocol. | 26 | | 118 | OpenWrt | [Home](https://www.openwrt.org/) | [Docker](https://hub.docker.com/r/ophub/openwrt-aarch64) :80 | The OpenWrt Project is a Linux operating system targeting embedded devices, it has more than 3000+ standardized application packages and a very rich third-party plug-in support. | 27 | | 119 | Netdata | [Home](https://learn.netdata.cloud/) | [Docker](https://hub.docker.com/r/netdata/netdata) :19999 | Netdata is distributed, real-time, performance and health monitoring for systems and applications. | 28 | | 120 | XunLei | [Home](https://github.com/cnk3x/xunlei) | [Docker](https://hub.docker.com/r/cnk3x/xunlei) :2345 | The Thunder remote download service program extracted from the Thunder Synology suite. | 29 | | 121 | Docker-Headless | [Home](https://github.com/infrastlabs/docker-headless) | [Docker](https://hub.docker.com/r/infrastlabs/docker-headless) :10081 | Remote Desktop with Audio/Locale/IBus Support. Multi Desktop (Gnome, Plasma, Mate, Xfce, Cinnamon) | 30 | | 122 | Navidrome | [Home](https://www.navidrome.org/) | [Docker](https://hub.docker.com/r/deluan/navidrome) :4533 | Navidrome is a self-hosted, open source music server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. | 31 | | 123 | Alist | [Home](https://alist.nn.ci/) | [Docker](https://hub.docker.com/r/xhofe/alist) :5244 | A file list program that supports multiple storage, powered by Gin and Solidjs. | 32 | | 124 | QingLong | [Home](https://github.com/whyour/qinglong) | [Docker](https://hub.docker.com/r/whyour/qinglong) :5700 | A timed task management panel that supports typescript, javaScript, python3, and shell. | 33 | | 125 | ChatGPT-Next-Web | [Home](https://github.com/Yidadaa/ChatGPT-Next-Web) | [Docker](https://hub.docker.com/r/yidadaa/chatgpt-next-web) :3000 | A well-designed cross-platform ChatGPT UI (Web / PWA / Linux / Win / MacOS). | 34 | | 201 | Desktop:GNOME | [Home](https://www.gnome.org/) | - | GNOME provides a focused desktop working environment that helps you get things done. | 35 | | 202 | Firefox | [Home](https://www.mozilla.org/) | - | An excellent web browser. | 36 | | 203 | VLC | [Home](https://www.videolan.org/) | - | VLC is a free, open source, cross-platform multimedia player and framework that can play most multimedia files. | 37 | | 204 | MPV | [Home](https://mpv.io/) | - | A free, open source, and cross-platform media player. | 38 | | 205 | GIMP | [Home](https://www.gimp.org/) | - | GIMP is a cross-platform image editor. | 39 | | 206 | Krita | [Home](https://krita.org/) | - | Krita is a professional FREE and open source painting program. | 40 | | 207 | LibreOffice | [Home](https://www.libreoffice.org/) | - | LibreOffice is a free and powerful office suite, Its clean interface and feature-rich tools help you unleash your creativity and enhance your productivity. | 41 | | 208 | Shotcut | [Home](https://shotcut.org/) | - | Shotcut is a free, open source, cross-platform video editor. | 42 | | 209 | Kdenlive | [Home](https://kdenlive.org/) | - | Kdenlive is Free and Open Source Video Editor. | 43 | | 210 | Thunderbird | [Home](https://www.thunderbird.net/) | - | Thunderbird makes email better for you, bringing together speed, privacy and the latest technologies. | 44 | | 211 | Evolution | [Home](https://github.com/GNOME/evolution) | - | Evolution is a personal information management application that provides integrated mail, calendaring and address book functionality. | 45 | | 212 | Gwenview | [Home](https://apps.kde.org/gwenview/) | - | Gwenview is a fast and easy to use image viewer by KDE, ideal for browsing and displaying a collection of images. | 46 | | 213 | Eog | [Home](https://gitlab.gnome.org/GNOME/eog) | - | Eye of GNOME(eog) is a image viewer program. It is meant to be a fast and functional image viewer. | 47 | | 214 | VisualStudioCode | [Home](https://code.visualstudio.com/) | - | Visual Studio Code is a lightweight but powerful source code editor. | 48 | | 215 | Gedit | [Home](https://github.com/GNOME/gedit) | - | Gedit is a full-featured text editor for the GNOME desktop environment. You can use it to prepare simple notes and documents, or you can use some of its advanced features, making it your own software development environment. | 49 | | 216 | Flameshot | [Home](https://flameshot.org/) | - | Powerful, yet simple to use open-source screenshot software. | 50 | | 301 | Frps | [Home](https://gofrp.org/) | - | A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. | 51 | | 302 | Frpc | [Home](https://gofrp.org/) | - | Frp is a high-performance reverse proxy application focusing on intranet penetration, supporting TCP, UDP, HTTP, HTTPS and other protocols. | 52 | | 303 | NPS | [Home](https://ehang-io.github.io/nps) | - | NPS is a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal. | 53 | | 304 | NPC | [Home](https://ehang-io.github.io/nps) | - | NPCs are clients of NPS. | 54 | | 305 | Plex | [Home](https://www.plex.tv/) | - | From personal media on your own server, to free and on-demand Movies & Shows, live TV, podcasts, and web shows, to streaming music, you can enjoy it all in one app, on any device. | 55 | | 306 | Emby-Server | [Home](https://emby.media/) | - | Sync your personal media to the cloud for easy backup, archiving, and converting. Store your content in multiple resolutions to enable direct streaming from any device. | 56 | | 307 | KVM | [Home](https://virt-manager.org/) | - | KVM (for Kernel-Based Virtual Machines) is a complete virtualization solution for Linux with virtualization extensions. The virt-manager application is a desktop user interface for managing virtual machines through libvirt. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers). KVM virtual machine can install [OpenWrt](https://github.com/unifreq/openwrt_packit), Debian, Ubuntu, OpenSUSE, ArchLinux, Centos, Gentoo, KyLin, UOS, etc. | 57 | | 308 | PVE | [Home](https://github.com/pimox/pimox7) | https://IP:8006 | Proxmox Virtual Environment is an open source server virtualization management solution based on QEMU/KVM and LXC. You can manage virtual machines, containers, highly available clusters, storage and networks with an integrated, easy-to-use web interface or via CLI. | 58 | | 309 | CasaOS | [Home](https://github.com/IceWhaleTech/CasaOS) | https://IP:81 | CasaOS is a simple, easy-to-use, elegant open-source Personal Cloud system. | 59 | 60 | ## Software Center Usage Guide 61 | 62 | Log into the Armbian system → Enter the command: 63 | 64 | ```shell 65 | armbian-software 66 | ``` 67 | 68 | A list of integrated software shortcuts for installation/management will appear, such as: 69 | 70 | ```shell 71 | root@armbian:~# armbian-software 72 | [ STEPS ] Start selecting software [ Current system: debian/bullseye ]... 73 | ---------------------------------------------------------- 74 | ID NAME STATE MANAGE 75 | ---------------------------------------------------------- 76 | 102 Portainer installed update/remove 77 | 202 Firefox installed update/remove 78 | 302 Frpc not-installed install 79 | ... 80 | ---------------------------------------------------------- 81 | [ OPTIONS ] Please Input Software ID: 82 | ``` 83 | 84 | - `Uninstalled software`: The status shows `not-installed`, input the `ID` of the software to `install`. 85 | - `Installed software`: The status shows `installed`, input the `ID` of the software and choose to `update` or `remove` as prompted. 86 | 87 | ## Software Center Development Guide 88 | 89 | The scripts/commands of the software center are stored in the [/usr/share/ophub/armbian-software](../armbian-files/common-files/usr/share/ophub/armbian-software) directory. You can use the `armbian-software -u` command to sync and download this directory to the local system, updating the local software center list. The files starting with a number are `one-click installation script` files for the corresponding software. [software-command.sh](../armbian-files/common-files/usr/share/ophub/armbian-software/software-command.sh) is a `unified instruction file` for installing/updating/removing software by commands. [software-list.conf](../armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) is the software list configuration file, explained as follows: 90 | 91 | ```yaml 92 | # 1.ID 2.Software Name 3.AuthMethod@Package 4.Execute Selection 5.Supported Release 93 | 102 :Portainer :docker@portainer :command-docker.sh :all 94 | 202 :Firefox :dpkg@firefox :command-desktop.sh :all 95 | 302 :Frpc :which@frpc :302-frpc.sh :all 96 | 308 :PVE :dpkg@pve-manager :command-service.sh :bullseye@bookworm 97 | ... 98 | ``` 99 | 100 | - `ID`: The `unique serial number` of the software. 101 | - `Software Name`: The `software name` (the name length is required to be less than 40 characters). 102 | - `AuthMethod@Package`: The `check method` for the installation status of the software and the corresponding `software package`, separated by the `@` symbol. 103 | - For software installed with the `docker` container, check with the `docker` method, such as checking whether the `portainer` image is installed, check with `docker@portainer`. 104 | - For software installed with the `apt` method, check with the `dpkg` method, such as checking whether the `firefox` software package is installed, check with `dpkg@firefox`. 105 | - For binary executable files installed by downloading with methods such as `curl`, check with the `which` method, such as checking whether the `frpc` service is installed, check with `which@frpc`. 106 | - `Execute Selection`: Set the software to use a `unified instruction file` or an `independent script` for management. 107 | - For `more streamlined` operation commands, they are collectively written in `command-docker.sh / command-desktop.sh / command-service.sh` files according to software classification, and named by software number. For example, the serial number of `portainer` is `102`, and its operation is written in `software_203()`. 108 | - For operations that are `more complex and long in instructions`, they are managed by independent script files. For example, the independent script for installing `frpc` is named `302-frpc.sh` with the number as the prefix. 109 | - `Supported Release`: Set the supported Armbian `system version codename`. Use `all` to indicate support for all versions. If only certain versions are supported, specify the version codenames separated by `@` symbol. 110 | 111 | We welcome everyone to contribute more software. Feel free to submit support requests in the [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues). 112 | 113 | 114 | 115 | # Armbian 软件中心 116 | 117 | 根据用户在 [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中的需求反馈,逐步整合常用[软件](../armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf),实现一键安装/更新/卸载等快捷操作。包括 `docker 镜像`、`桌面软件`、`应用服务` 等。 118 | 119 | ## 软件介绍 120 | 121 | | ID | 软件名称 | Home | DockerHub:Port | 软件介绍 | 122 | | --- | --------------------- | --------------------- | ---- | ------------------------------------------------- | 123 | | 101 | Docker | [Home](https://www.docker.com/) | [Docker](https://docs.docker.com/engine/install/) | Docker 是一个用于开发、发布和运行应用程序的开放平台。 | 124 | | 102 | Portainer | [Home](https://www.portainer.io/) | [Docker](https://hub.docker.com/r/portainer/portainer-ce) :9443 | 全球最受欢迎的容器管理平台。 | 125 | | 103 | Yacht | [Home](https://yacht.sh/) | [Docker](https://hub.docker.com/r/selfhostedpro/yacht) :8001 | 容器管理 UI,侧重于模板和一键式部署。 | 126 | | 104 | Transmission | [Home](https://transmissionbt.com/) | [Docker](https://github.com/linuxserver/docker-transmission) :9091 | Transmission 是一个跨平台的 BitTorrent 客户端。 | 127 | | 105 | qBittorrent | [Home](https://www.qbittorrent.org/) | [Docker](https://hub.docker.com/r/linuxserver/qbittorrent) :8080 | qBittorrent 是一个 BitTorrent 客户端。 | 128 | | 106 | NextCloud | [Home](https://nextcloud.com/) | [Docker](https://hub.docker.com/r/arm64v8/nextcloud) :8088 | Nextcloud 提供了一个本地通用文件访问和同步平台,具有强大的协作功能以及桌面,移动和 Web 界面。 | 129 | | 107 | Jellyfin | [Home](https://jellyfin.org/) | [Docker](https://hub.docker.com/r/linuxserver/jellyfin) :8096 | Jellyfin 是一个自由软件媒体系统,让你控制管理和流媒体你的媒体。 | 130 | | 108 | HomeAssistant | [Home](https://www.home-assistant.io/) | [Docker](https://hub.docker.com/r/linuxserver/homeassistant) :8123 | Home Assistant 集成了一千多种不同的设备和服务,具有强大的自动化功能。 | 131 | | 109 | Kodbox | [Home](https://kodcloud.com/) | [Docker](https://hub.docker.com/r/kodcloud/kodbox) :8081 | 私有云在线文档管理解决方案。 | 132 | | 110 | CouchPotato | [Home](https://couchpota.to/) | [Docker](https://hub.docker.com/r/linuxserver/couchpotato) :5050 | Couchpotato 是一个自动 NZB 和 torrent 下载器,自动查找要观看的电影。 | 133 | | 111 | Sonarr | [Home](https://sonarr.tv/) | [Docker](https://hub.docker.com/r/linuxserver/sonarr) :8989 | Sonarr 是 Usenet 和 BitTorrent 用户的个人视频录像机。 | 134 | | 112 | Radarr | [Home](https://radarr.video/) | [Docker](https://hub.docker.com/r/linuxserver/radarr) :7878 | Radarr 是 Usenet 和 BitTorrent 用户的电影收藏管理器。 | 135 | | 113 | Syncthing | [Home](https://syncthing.net/) | [Docker](https://hub.docker.com/r/linuxserver/syncthing) :8384 | Syncthing 是一个连续的文件同步程序。 | 136 | | 114 | FileBrowser | [Home](https://filebrowser.org/) | [Docker](https://hub.docker.com/r/filebrowser/filebrowser) :8002 | File Browser 在指定目录中提供文件管理界面,可用于上传,删除,预览,重命名和编辑文件。 | 137 | | 115 | Heimdall | [Home](https://heimdall.site/) | [Docker](https://hub.docker.com/r/linuxserver/heimdall) :8003 | Heimdall 是一种以简单的方式组织所有这些链接到您最常用的网站和 Web 应用程序的方法。 | 138 | | 116 | Node-RED | [Home](https://nodered.org/) | [Docker](https://nodered.org/docs/getting-started/docker) :1880 | Node-RED 是一种编程工具。它提供了一个基于浏览器的编辑器,使得使用调色板中的各种节点轻松地将流连接在一起,只需单击一下即可部署运行。 | 139 | | 117 | Mosquitto | [Home](https://www.mosquitto.org/) | [Docker](https://hub.docker.com/r/arm64v8/eclipse-mosquitto) :1883 | MQTT 协议提供了一种使用发布/订阅模型执行消息传递的轻量级方法。Eclipse Mosquitto 是 MQTT 协议版本 5、3.1.1 和 3.1 的服务器的开源实现。 | 140 | | 118 | OpenWrt | [Home](https://www.openwrt.org/) | [Docker](https://hub.docker.com/r/ophub/openwrt-aarch64) :80 | OpenWrt 项目是一个针对嵌入式设备的 Linux 操作系统,它拥有超过 3000+ 个标准化应用软件包和非常丰富的第三方插件支持。 | 141 | | 119 | Netdata | [Home](https://learn.netdata.cloud/) | [Docker](https://hub.docker.com/r/netdata/netdata) :19999 | Netdata 是针对系统和应用程序的分布式实时性能和运行状况监控。 | 142 | | 120 | XunLei | [Home](https://github.com/cnk3x/xunlei) | [Docker](https://hub.docker.com/r/cnk3x/xunlei) :2345 | 从迅雷群晖套件中提取出来的迅雷远程下载服务程序。 | 143 | | 121 | Docker-Headless | [Home](https://github.com/infrastlabs/docker-headless) | [Docker](https://hub.docker.com/r/infrastlabs/docker-headless) :10081 | 具有音频/区域设置/IBus 支持的远程桌面。 支持多桌面(Gnome、Plasma、Mate、Xfce、Cinnamon) | 144 | | 122 | Navidrome | [Home](https://www.navidrome.org/) | [Docker](https://hub.docker.com/r/deluan/navidrome) :4533 | Navidrome 是一个自托管的开源音乐服务器和流媒体。 它使您可以自由地从任何浏览器或移动设备收听音乐收藏。 | 145 | | 123 | Alist | [Home](https://alist.nn.ci/zh/) | [Docker](https://hub.docker.com/r/xhofe/alist) :5244 | 一个支持多种存储的文件列表程序,使用 Gin 和 Solidjs。 | 146 | | 124 | QingLong | [Home](https://github.com/whyour/qinglong) | [Docker](https://hub.docker.com/r/whyour/qinglong) :5700 | 支持 python3、javaScript、shell、typescript 的定时任务管理面板。 | 147 | | 125 | ChatGPT-Next-Web | [Home](https://github.com/Yidadaa/ChatGPT-Next-Web) | [Docker](https://hub.docker.com/r/yidadaa/chatgpt-next-web) :3000 | 一键免费部署你的跨平台私人 ChatGPT 应用。 | 148 | | 201 | Desktop:GNOME | [Home](https://www.gnome.org/) | - | GNOME 提供了一个专注的桌面工作环境,可帮助您完成工作。 | 149 | | 202 | Firefox | [Home](https://www.mozilla.org/) | - | 一款优秀的网页浏览器。 | 150 | | 203 | VLC | [Home](https://www.videolan.org/) | - | VLC 是一款自由、开源的跨平台多媒体播放器及框架,可播放大多数多媒体文件。 | 151 | | 204 | MPV | [Home](https://mpv.io/) | - | 一个免费的、开源的、跨平台的媒体播放器。 | 152 | | 205 | GIMP | [Home](https://www.gimp.org/) | - | GIMP 是一个跨平台的图像编辑器。 | 153 | | 206 | Krita | [Home](https://krita.org/) | - | Krita 是一个专业的免费和开源绘画程序。 | 154 | | 207 | LibreOffice | [Home](https://www.libreoffice.org/) | - | LibreOffice 是一个免费且功能强大的办公套件,其简洁的界面和功能丰富的工具可帮助您释放创造力并提高生产力。 | 155 | | 208 | Shotcut | [Home](https://shotcut.org/) | - | Shotcut 是一个免费的,开源的,跨平台的视频编辑器。 | 156 | | 209 | Kdenlive | [Home](https://kdenlive.org/) | - | Kdenlive 是一个免费和开源视频编辑器。 | 157 | | 210 | Thunderbird | [Home](https://www.thunderbird.net/) | - | Thunderbird 将速度、隐私和最新技术结合在一起,让您更好地利用电子邮件。 | 158 | | 211 | Evolution | [Home](https://github.com/GNOME/evolution) | - | Evolution 是一个个人信息管理应用程序,提供集成的邮件、日历和地址簿功能。 | 159 | | 212 | Gwenview | [Home](https://apps.kde.org/gwenview/) | - | Gwenview 是 KDE 出品的一款轻便易用的图像查看器,是浏览、显示多张图像时的理想工具。 | 160 | | 213 | Eog | [Home](https://gitlab.gnome.org/GNOME/eog) | - | Eye of GNOME(eog)一个图像查看器程序。它旨在成为一个快速且功能强大的图像查看器。 | 161 | | 214 | VisualStudioCode | [Home](https://code.visualstudio.com/) | - | Visual Studio Code 是一个轻量级但功能强大的源代码编辑器。 | 162 | | 215 | Gedit | [Home](https://github.com/GNOME/gedit) | - | Gedit 是一个用于 GNOME 桌面环境的全功能文本编辑器。您可以使用它来准备简单的笔记和文档,也可以使用它的一些高级功能,使其成为您自己的软件开发环境。 | 163 | | 216 | Flameshot | [Home](https://flameshot.org/) | - | 功能强大,但易于使用的开源屏幕截图软件。 | 164 | | 301 | Frps | [Home](https://gofrp.org/) | - | Frp 是一种快速反向代理,可帮助您将 NAT 或防火墙后面的本地服务器暴露给互联网。 | 165 | | 302 | Frpc | [Home](https://gofrp.org/) | - | Frp 是一个专注于内网穿透的高性能的反向代理应用,支持 TCP、UDP、HTTP、HTTPS 等多种协议。 | 166 | | 303 | NPS | [Home](https://ehang-io.github.io/nps) | - | NPS 服务端。一款轻量级、高性能、功能强大的内网渗透代理服务器,具有强大的 Web 管理终端。 | 167 | | 304 | NPC | [Home](https://ehang-io.github.io/nps) | - | NPC 是 NPS 的客户端。 | 168 | | 305 | Plex | [Home](https://www.plex.tv/) | - | 从您自己服务器上的个人媒体,到免费和点播的电影和节目,直播电视,播客和网络节目,再到流媒体音乐,您可以在任何设备上的一个应用程序中享受所有这些内容。 | 169 | | 306 | Emby-Server | [Home](https://emby.media/) | - | 将您的个人媒体同步到云,以便轻松备份、存档和转换。以多种分辨率存储您的内容,以便从任何设备直接流式传输。 | 170 | | 307 | KVM | [Home](https://virt-manager.org/) | - | KVM(用于基于内核的虚拟机)是包含虚拟化扩展适用于 Linux 的完整虚拟化解决方案。virt-manager 应用程序是一个桌面用户界面,用于通过 libvirt 管理虚拟机。它主要针对 KVM VM,但也管理 Xen 和 LXC(Linux 容器)。KVM 虚拟机可以安装 [OpenWrt](https://github.com/unifreq/openwrt_packit)、Debian、Ubuntu、OpenSUSE、ArchLinux、Centos、Gentoo、KyLin、UOS 等等。 | 171 | | 308 | PVE | [Home](https://github.com/pimox/pimox7) | https://IP:8006 | Proxmox 虚拟环境是一个基于 QEMU/KVM 和 LXC 的开源服务器虚拟化管理解决方案。您可以使用集成的、易于使用的 web 界面或通过 CLI 管理虚拟机、容器、高可用集群、存储和网络。 | 172 | | 309 | CasaOS | [Home](https://github.com/IceWhaleTech/CasaOS) | https://IP:81 | CasaOS 是一个简单、易于使用、优雅的开源个人云系统。 | 173 | 174 | ## 软件中心使用说明 175 | 176 | 登录 Armbian 系统 → 输入命令: 177 | 178 | ```shell 179 | armbian-software 180 | ``` 181 | 182 | 将出现当前已经集成的软件快捷安装/管理列表,如: 183 | 184 | ```shell 185 | root@armbian:~# armbian-software 186 | [ STEPS ] Start selecting software [ Current system: debian/bullseye ]... 187 | ---------------------------------------------------------- 188 | ID NAME STATE MANAGE 189 | ---------------------------------------------------------- 190 | 102 Portainer installed update/remove 191 | 202 Firefox installed update/remove 192 | 302 Frpc not-installed install 193 | ... 194 | ---------------------------------------------------------- 195 | [ OPTIONS ] Please Input Software ID: 196 | ``` 197 | 198 | - `未安装的软件`:状态显示为 `not-installed`,输入软件对应的 `ID` 即可 `安装`。 199 | - `已安装的软件`:状态显示为 `installed`,输入软件对应的 `ID` ,根据提示选择 `更新` 或 `删除`。 200 | 201 | ## 软件中心开发说明 202 | 203 | 软件中心的脚本/命令集中存放在 [/usr/share/ophub/armbian-software](../armbian-files/common-files/usr/share/ophub/armbian-software) 目录下,使用 `armbian-software -u` 命令可以同步下载此目录至本地,更新本地的软件中心列表。其中以数字开头的文件是对应软件的 `一键安装脚本` 文件。[software-command.sh](../armbian-files/common-files/usr/share/ophub/armbian-software/software-command.sh) 是使用命令安装/更新/删除操作的`统一指令文件`。[software-list.conf](../armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf) 是软件列表配置文件,说明如下: 204 | 205 | ```yaml 206 | # 1.ID 2.Software Name 3.AuthMethod@Package 4.Execute Selection 5.Supported Release 207 | 102 :Portainer :docker@portainer :command-docker.sh :all 208 | 202 :Firefox :dpkg@firefox :command-desktop.sh :all 209 | 302 :Frpc :which@frpc :302-frpc.sh :all 210 | 308 :PVE :dpkg@pve-manager :command-service.sh :bullseye@bookworm 211 | ... 212 | ``` 213 | 214 | - `ID`: 软件的 `唯一序号` 。 215 | - `Software Name`:`软件名称`(名称长度要求小于 40 个字符)。 216 | - `AuthMethod@Package`:软件安装状态的`检查方法`,与对应的`软件包`,使用 `@` 符号分割。 217 | - 使用 `docker` 容器安装的镜像,采用 `docker` 方式检查,如检查是否安装了 `portainer` 镜像,使用 `docker@portainer` 进行检查; 218 | - 使用 `apt` 方式安装的软件包采用 `dpkg` 方式检查,如检查是否安装了 `firefox` 软件包,使用 `dpkg@firefox` 进行检查; 219 | - 使用 `curl` 等方式下载安装的二进制执行文件,采用 `which` 方式检查,如检查是否安装了 `frpc` 服务,使用 `which@frpc` 进行检查。 220 | - `Execute Selection`:设置软件使用 `统一指令文件` 或 `独立脚本` 进行管理。 221 | - 对于 `比较精简` 的操作命令,按照软件分类,集中写在 `command-docker.sh / command-desktop.sh / command-service.sh` 文件中,以软件序号进行命名。如 `portainer` 的序号是 `102`,他的操作写在 `software_203()` 中; 222 | - 对于 `比较复杂、指令内容较长` 的操作,进行独立脚本文件管理。如安装 `frpc` 的独立脚本,以序号开头,命名为 `302-frpc.sh` 。 223 | - `Supported Release`:设置支持的 Armbian `系统版本代号`。全部版本都支持的使用 `all` 表示。仅本支持部分版本的填写版本代号,多个版本代号之间使用 `@` 符号连接。 224 | 225 | 欢迎大家补充更多软件。欢迎在 [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中提交支持需求。 226 | 227 | -------------------------------------------------------------------------------- /README.cn.md: -------------------------------------------------------------------------------- 1 | > [!NOTE] 2 | > 由于内核中 `/boot/vmlinuz-xxx` 文件从 `32MB` 调整到了 `64MB`,所以必须使用最新的 `armbian-update` 脚本来更新内核,否则会导致内核更新失败,造成 Armbian 系统无法正常启动。请查看文档[第 12.9 节](documents/README.cn.md#129-如何更新系统中的服务脚本)的脚本升级方法。 3 | 4 | # Armbian / 岸边 5 | 6 | 查看英文说明 | [View English description](README.md) 7 | 8 | Armbian(中文名:岸边)系统是基于 Debian/Ubuntu 而构建的专门用于 ARM 芯片的轻量级 Linux 系统。Armbian 系统精益、干净,并且 100% 兼容并继承了 Debian/Ubuntu 系统的功能和丰富的软件生态,可以安全稳定地运行在 TF/SD/USB 及设备的 eMMC 里。这个项目保留了 Armbian 官方系统的完整性,并进一步拓展了在电视盒子等一些非官方支持设备上的使用,增加了一些便捷操作指令。现在你可以将电视盒子的安卓 TV 系统更换为 Armbian 系统,让他成为一台功能强大的服务器。 9 | 10 | 本项目依托众多的[贡献者](CONTRIBUTORS.md),为 `Amlogic`,`Rockchip` 和 `Allwinner` 盒子构建 Armbian 系统,支持写入 eMMC 中使用,支持更新内核等功能,使用方法详见 [Armbian 使用文档](./documents/README.cn.md)。最新的 Armbian 系统可以在 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 中下载。欢迎 `Fork` 并进行个性化定制。如果对你有用,可以点仓库右上角的 `Star` 表示支持。 11 | 12 | ## Armbian 系统说明 13 | 14 | | 芯片 | 设备 | [内核](https://github.com/ophub/kernel) | [Armbian](https://github.com/ophub/amlogic-s9xxx-armbian/releases) | 15 | | ---- | ---- | ---- | ---- | 16 | | a311d | [Khadas-VIM3](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/99) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_a311d.img | 17 | | s922x | [Beelink-GT-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/370), [Beelink-GT-King-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/707), [Ugoos-AM6-Plus](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/464), [ODROID-N2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/201), [X88-King](https://github.com/ophub/amlogic-s9xxx-armbian/issues/988), [Ali-CT2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1150) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s922x.img | 18 | | s905x3 | [X96-Max+](https://github.com/ophub/amlogic-s9xxx-armbian/issues/351), [HK1-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/414), [Vontar-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1006), [H96-Max-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1250), [Ugoos-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/782), [TX3(QZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/644), [TX3(BZ)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1077), [X96-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/366), [X96-Max+_A100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/779), [A95XF3-Air](https://github.com/ophub/amlogic-s9xxx-armbian/issues/157), [Tencent-Aurora-3Pro(s905x3-b)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/506), [X96-Max+Q1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/788), [X96-Max+100W](https://github.com/ophub/amlogic-s9xxx-armbian/issues/909), [X96-Max+_2101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1086), [Infinity-B32](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1181), [Whale](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1166), [X88-Pro-X3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [X99-Max-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621), [Transpeed-X3-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1621) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905x3.img | 19 | | s905x2 | [X96Max-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/453), [X96Max-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/95), [MECOOL-KM3-4G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/79), [Tanix-Tx5-Max](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/351), [A95X-F2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/851) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905x2.img | 20 | | s912 | [Tanix-TX8-Max](https://github.com/ophub/amlogic-s9xxx-armbian/issues/500), [Tanix-TX9-Pro(3G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/315), [Tanix-TX9-Pro(2G)](https://github.com/ophub/amlogic-s9xxx-armbian/issues/740), [Tanix-TX92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1012790770), [Nexbox-A1](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [Nexbox-A95X-A2](https://www.cafago.com/en/p-v2979eu-2g.html), [A95X](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/260), [H96-Pro-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72#issuecomment-1013071513), [VORKE-Z6-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/72), [Mecool-M8S-PRO-L](https://github.com/ophub/amlogic-s9xxx-armbian/issues/158), [Vontar-X92](https://github.com/ophub/amlogic-s9xxx-armbian/issues/525), [T95Z-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/668), [Octopus-Planet](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1020), [Phicomm-T1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/522), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1882) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s912.img | 21 | | s905d | [MECOOL-KI-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/59), [Phicomm-N1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/925), [SML-5442TW](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/451) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905d.img | 22 | | s905x | [HG680P](https://github.com/ophub/amlogic-s9xxx-armbian/issues/262), [B860H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/60), [TBee-Box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/98), [T95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/285), [TX9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/645), [XiaoMI-3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1405), [X96](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1480) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905x.img | 23 | | s905w | [X96-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/621), [TX3-Mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1062), [W95](https://github.com/ophub/amlogic-s9xxx-armbian/issues/570), [X96W/FunTV](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1044), [MXQ-Pro-4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1140) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905w.img | 24 | | s905mb | [S65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1644) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905mb.img | 25 | | s905l | [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [M201-S](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/444), [MiBox-4](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2101), [MiBox-4C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1826), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1912) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905l.img | 26 | | s905l2 | [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [MGV2000-K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1839), [MGV3000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921), [Wojia-TV-IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/issues/648), [M301A](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/405), [E900v21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1278), [e900v21d](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2127) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905l2.img | 27 | | s905l3 | [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1318), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/763), [HG680-LC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/978), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/921#issuecomment-1453143251), [UNT400G1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1277), [UNT402A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1481), [ZXV10-BV310](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1512), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1817), [ZXV10-B860AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2012), [E900V22D-2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2058) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905l3.img | 28 | | s905l3a | [E900V22C/D](https://github.com/Calmact/e900v22c), [CM311-1a-YST](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [M401A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/732), [M411A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/517), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [UNT413A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/970), [ZTE-B863AV3.2-M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/741), [CM311-1a-CH](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1508), [IP112H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1520) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905l3a.img | 29 | | s905l3b | [CM211-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1180), [CM311-1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1268), [E900V22D](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1256), [E900V21E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1514), [E900V22E](https://github.com/ophub/amlogic-s9xxx-armbian/issues/939), [M302A/M304A](https://github.com/ophub/amlogic-s9xxx-armbian/pull/615), [Hisense-IP103H](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1154), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1332), [TY1608](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1568), [MGV2000](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1613), [B860AV-2.1M](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1598), [UNT403A](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1712), [RG020ET-CA](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1860) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905l3b.img | 30 | | s905lb | [Q96-mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/734), [BesTV-R3300L](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993), [SumaVision-Q7](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1190), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1570), [s65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2128) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905lb.img | 31 | | s905 | [Beelink-Mini-MX-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127), [Sunvell-T95M](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/337), [MXQ-Pro+4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/715), [SumaVision-Q5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1175) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905.img | 32 | | rk3588 | [Radxa-Rock5B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1240), [Beelink-IPC-R](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415), [HLink-H88K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H88K-V3](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726) | [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) | rockchip_boxname.img | 33 | | rk3568 | [FastRhino-R66S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1061), [FastRhino-R68S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/774), [Radxa-E25](https://wiki.radxa.com/Rock3/CM/CM3I/E25), [NanoPi-R5S](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [NanoPi-R5C](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [HLink-H66K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H68K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H69K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [Seewo-sv21](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2017), [Mrkaio-m68s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2155) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)
[6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img | 34 | | rk3566 | [Panther-X2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1319), [JP-TvBox](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1867) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)
[6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img | 35 | | rk3528 | [HLink-H28K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1726) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) | rockchip_boxname.img | 36 | | rk3399 | [EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991), [King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080), [TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094), [Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132), [ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247), [CRRC](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1280), [SMART-AM40](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1317), [SW799](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1326), [ZYSJ](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1380), [DG-3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1492), [DLFR100](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1522), [Emb3531](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1549), [Leez-p710](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1609), [tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687), [xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698), [Fine3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1790), [Firefly-RK3399](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/491), [LX-R3S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2026), [Hugsun-x99](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2050), [Tb-ls3399](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2146) | [6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img | 37 | | rk3328 | [BeikeYun](https://github.com/ophub/amlogic-s9xxx-armbian/issues/852), [Chainedbox-L1-Pro](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1680), [Station-M1](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Bqeel-MVR9](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1313), [Renegade/Firefly](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1861) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img | 38 | | rk3318 | [RX3318-Box](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2129) | [6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img | 39 | | h6 | [Vplus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1100), [Tanix-TX6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1120), [TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638) | [5.15.y](https://github.com/ophub/kernel/releases/tag/kernel_stable)
[h6](https://github.com/ophub/kernel/releases/tag/kernel_h6) | allwinner_boxname.img | 40 | 41 | > [!TIP] 42 | > 目前 [s905 的盒子](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1173)只能在 `TF/SD/USB` 中使用,其他型号的盒子支持写入 `EMMC` 中使用。更多信息请查阅[支持的设备列表说明](build-armbian/armbian-files/common-files/etc/model_database.conf)。可以参考说明文档中 12.15 章节的方法[添加新的支持设备](documents/README.cn.md#1215-如何添加新的支持设备)。使用前先阅读 [Armbian 使用文档](./documents/README.cn.md),常见问题都有解决方法。 43 | 44 | ## 安装及升级 Armbian 的相关说明 45 | 46 | 选择和你的盒子型号对应的 Armbian 系统,不同设备的使用方法查看对应的说明。 47 | 48 | - ### 安装 Armbian 到 EMMC 49 | 50 | 1. `Rockchip` 平台的安装方法请查看说明文档中的 [第 8 章节](documents/README.cn.md)。 51 | 52 | 2. `Amlogic` 和 `Allwinner` 平台,使用 [Rufus](https://rufus.ie/) 或者 [balenaEtcher](https://www.balena.io/etcher/) 等工具将系统写入 USB 里,然后把写好系统的 USB 插入盒子。登录 Armbian 系统 (默认用户: root, 默认密码: 1234) → 输入命令: 53 | 54 | ```shell 55 | armbian-install 56 | ``` 57 | 58 | | 可选参数 | 默认值 | 选项 | 说明 | 59 | | ------- | ------- | ------ | ----------------- | 60 | | -m | no | yes/no | 使用 Mainline u-boot | 61 | | -a | yes | yes/no | 使用 [ampart](https://github.com/7Ji/ampart) 分区表调整工具 | 62 | | -l | no | yes/no | List. 显示全部设备列表 | 63 | 64 | 举例: `armbian-install -m yes -a no` 65 | 66 | - ### 更新 Armbian 内核 67 | 68 | 登录 Armbian 系统 → 输入命令: 69 | 70 | ```shell 71 | # 使用 root 用户运行 (sudo -i) 72 | # 如果不指定参数,将更新为最新版本。 73 | armbian-update 74 | ``` 75 | 76 | | 可选参数 | 默认值 | 选项 | 说明 | 77 | | -------- | ------------ | ------------- | -------------------------------- | 78 | | -r | ophub/kernel | `/` | 设置从 github.com 下载内核的仓库 | 79 | | -u | 自动化 | stable/flippy/dev/beta/rk3588/rk35xx/h6 | 设置使用的内核的 [tags 后缀](https://github.com/ophub/kernel/releases) | 80 | | -k | 最新版 | 内核版本 | 设置[内核版本](https://github.com/ophub/kernel/releases/tag/kernel_stable) | 81 | | -b | yes | yes/no | 更新内核时自动备份当前系统使用的内核 | 82 | | -m | no | yes/no | 使用主线 u-boot | 83 | | -s | 无 | 无/磁盘名称 | [SOS] 恢复 eMMC/NVMe/sdX 等磁盘中的系统内核 | 84 | | -h | 无 | 无 | 查看使用帮助 | 85 | 86 | 举例: `armbian-update -k 5.15.50 -u dev` 87 | 88 | 通过 `-k` 参数指定内核版本号时,可以准确指定具体版本号,例如:`armbian-update -k 5.15.50`,也可以模糊指定到内核系列,例如:`armbian-update -k 5.15`,当模糊指定时将自动使用指定系列的最新版本。 89 | 90 | 更新内核时会自动备份当前系统使用的内核,存储路径在 `/ddbr/backup` 目录里,保留最近使用过的 3 个版本的内核,如果新安装的内核不稳定,可以随时恢复回备份的内核。如果更新内核失败导致系统无法启动,可以通过 `armbian-update -s` 来恢复系统内核。更多说明详见 [帮助文档](documents/README.cn.md) 91 | 92 | - ### 安装常用软件 93 | 94 | 登录 Armbian 系统 → 输入命令: 95 | 96 | ```shell 97 | armbian-software 98 | ``` 99 | 100 | 使用 `armbian-software -u` 命令可以更新本地的软件中心列表。根据用户在 [Issue](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中的需求反馈,逐步整合常用[软件](build-armbian/armbian-files/common-files/usr/share/ophub/armbian-software/software-list.conf),实现一键安装/更新/卸载等快捷操作。包括 `docker 镜像`、`桌面软件`、`应用服务` 等。详见更多[说明](documents/armbian_software.md)。 101 | 102 | - ### 修改 Armbian 配置 103 | 104 | 登录 Armbian 系统 → 输入命令: 105 | 106 | ```shell 107 | armbian-config 108 | ``` 109 | 110 | - ### 为 Armbian 创建 swap 111 | 112 | 如果你在使用 `docker` 等内存占用较大的应用时,觉得当前盒子的内存不够使用,可以创建 `swap` 虚拟内存分区,将磁盘空间的一定容量虚拟成内存来使用。下面命令输入参数的单位是 `GB`,默认为 `1`。 113 | 114 | 登录 Armbian 系统 → 输入命令: 115 | 116 | ```shell 117 | armbian-swap 1 118 | ``` 119 | 120 | - ### 控制 LED 显示 121 | 122 | 登录 Armbian 系统 → 输入命令: 123 | 124 | ```shell 125 | armbian-openvfd 126 | ``` 127 | 128 | 根据 [LED 屏显示控制说明](documents/led_screen_display_control.md) 进行调试。 129 | 130 | - ### 备份/还原 EMMC 原系统 131 | 132 | 支持在 `TF/SD/USB` 中对盒子的 `EMMC` 分区进行备份/恢复。建议您在全新的盒子里安装 Armbian 系统前,先对当前盒子自带的安卓 TV 系统进行备份,以便日后在恢复电视系统等情况下使用。 133 | 134 | 请从 `TF/SD/USB` 启动 Armbian 系统 → 输入命令: 135 | 136 | ```shell 137 | armbian-ddbr 138 | ``` 139 | 140 | 根据提示输入 `b` 进行系统备份,输入 `r` 进行系统恢复。 141 | 142 | > [!IMPORTANT] 143 | > 除此之外也可以通过线刷的方法,将安卓系统刷入 eMMC 中,安卓系统的下载镜像可在 [Tools](https://github.com/ophub/kernel/releases/tag/tools) 中查找。 144 | 145 | - ### 在 Armbian 中编译内核 146 | 147 | 在 Armbian 中编译内核的用法详见 [编译内核](compile-kernel/README.cn.md) 说明文档。登录 Armbian 系统 → 输入命令: 148 | 149 | ```shell 150 | armbian-kernel -u 151 | armbian-kernel -k 6.6.12 152 | ``` 153 | 154 | - ### 更多使用说明 155 | 156 | 将本地系统中的全部服务脚本更新到最新版本,可以登录 Armbian 系统 → 输入命令: 157 | 158 | ```shell 159 | armbian-sync 160 | ``` 161 | 162 | 在 Armbian 的使用中,一些可能遇到的常见问题详见 [documents](documents/README.cn.md) 163 | 164 | ## 本地化打包 165 | 166 | 1. 克隆仓库到本地 `git clone --depth 1 https://github.com/ophub/amlogic-s9xxx-armbian.git` 167 | 168 | 2. 安装必要的软件包(脚本仅在 x86_64 Ubuntu-20.04/22.04 下做过测试) 169 | 170 | ```shell 171 | sudo apt-get update -y 172 | sudo apt-get full-upgrade -y 173 | # For Ubuntu-22.04 174 | sudo apt-get install -y $(cat compile-kernel/tools/script/ubuntu2204-build-armbian-depends) 175 | ``` 176 | 177 | 3. 进入 `~/amlogic-s9xxx-armbian` 根目录,在根目录下创建文件夹 `build/output/images` ,并上传 Armbian 镜像文件 ( 如:`Armbian_21.11.0-trunk_Odroidn2_current_5.15.50.img` ) 到 `~/amlogic-s9xxx-armbian/build/output/images` 目录里。原版 Armbian 镜像文件名称中的发行版本号(如:`21.11.0`)和内核版本号(如:`5.15.50`)请保留,它将在重构后用作 Armbian 系统的名称。 178 | 179 | 4. 进入 `~/amlogic-s9xxx-armbian` 根目录,然后运行 `sudo ./rebuild -b s905x3 -k 6.6.12` 命令即可生成指定 board 的 Armbian 镜像文件。生成的文件保存在 `build/output/images` 目录里。 180 | 181 | - ### 本地化打包参数说明 182 | 183 | | 参数 | 含义 | 说明 | 184 | | ---- | ---------- | ---------- | 185 | | -b | Board | 指定电视盒子型号,如 `-b s905x3` . 多个型号使用 `_` 进行连接,如 `-b s905x3_s905d` . 使用 `all` 表示全部型号。型号代码详见 [model_database.conf](build-armbian/armbian-files/common-files/etc/model_database.conf) 中的 `BOARD` 设置。默认值:`all` | 186 | | -r | KernelRepo | 指定 github.com 内核仓库的 `/`。默认值:`ophub/kernel` | 187 | | -u | kernelUsage | 设置使用的内核的 `tags 后缀`,如 [stable](https://github.com/ophub/kernel/releases/tag/kernel_stable), [flippy](https://github.com/ophub/kernel/releases/tag/kernel_flippy), [dev](https://github.com/ophub/kernel/releases/tag/kernel_dev), [beta](https://github.com/ophub/kernel/releases/tag/kernel_beta)。默认值:`stable` | 188 | | -k | Kernel | 指定 [kernel](https://github.com/ophub/kernel/releases/tag/kernel_stable) 名称,如 `-k 6.6.12` . 多个内核使用 `_` 进行连接,如 `-k 6.6.12_5.15.50` 。通过 `-k` 参数自由指定的内核版本只对使用 `stable/flippy/dev/beta` 的内核有效。其他内核系列例如 [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) / [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) / [h6](https://github.com/ophub/kernel/releases/tag/kernel_h6) 等只能使用特定内核。 | 189 | | -a | AutoKernel | 设置是否自动采用同系列最新版本内核。当为 `true` 时,将自动在内核库中查找在 `-k` 中指定的内核如 6.6.12 的同系列是否有更新的版本,如有 6.6.12 之后的最新版本时,将自动更换为最新版。设置为 `false` 时将编译指定版本内核。默认值:`true` | 190 | | -t | RootfsType | 对系统的 ROOTFS 分区的文件系统类型进行设置,可选项为 `ext4` 或 `btrfs` 类型。例如: `-t btrfs`。默认值:`ext4` | 191 | | -s | Size | 对系统的镜像分区大小进行设置,只设置 ROOTFS 分区大小时可以只指定一个数值,例如: `-s 2560`。需要同时设置 BOOTFS 和 ROOTFS 分区大小时,使用 / 对两个数值进行连接,例如: `-s 512/2560`。默认值:`512/2560` | 192 | | -n | BuilderName | 设置 Armbian 系统构建者签名。设置签名时请勿包含空格。默认值:`无` | 193 | 194 | - `sudo ./rebuild` : 使用默认配置,对全部型号的电视盒子进行打包。 195 | - `sudo ./rebuild -b s905x3 -k 6.6.12` : 推荐使用. 使用默认配置进行相关内核打包。 196 | - `sudo ./rebuild -b s905x3 -k 6.1.y` : 使用默认配置进行相关内核打包,内核使用 6.1.y 系列的最新版。 197 | - `sudo ./rebuild -b s905x3_s905d -k 6.6.12_5.15.50` : 使用默认配置,进行多个内核同时打包。使用 `_` 进行多内核参数连接。 198 | - `sudo ./rebuild -b s905x3 -k 6.6.12 -s 2560` : 使用默认配置,指定一个内核,一个型号进行打包,系统大小设定为2560MiB。 199 | - `sudo ./rebuild -b s905x3_s905d` 使用默认配置,对多个型号的电视盒子进行全部内核打包, 使用 `_` 进行多型号连接。 200 | - `sudo ./rebuild -k 6.6.12_5.15.50` : 使用默认配置,指定多个内核,进行全部型号电视盒子进行打包, 内核包使用 `_` 进行连接。 201 | - `sudo ./rebuild -k 6.6.12_5.15.50 -a true` : 使用默认配置,指定多个内核,进行全部型号电视盒子进行打包, 内核包使用 `_` 进行连接。自动升级到同系列最新内核。 202 | - `sudo ./rebuild -t btrfs -s 2560 -k 6.6.12` : 使用默认配置,设置文件系统为 btrfs 格式,分区大小为 2560MiB, 并指定内核为 6.6.12 ,对全部型号电视盒子进行打包。 203 | 204 | ## 使用 GitHub Actions 进行编译 205 | 206 | 1. 关于 Workflows 文件的配置在 [build-armbian.yml](.github/workflows/build-armbian.yml) 文件里。 207 | 208 | 2. 全新编译:在 [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面里选择 ***`Build armbian`*** ,根据 Armbian 官方支持的 OS 版本,可以选择 Ubuntu 系列:`jammy`,或者 Debian 系列:`bullseye` 等。点击 ***`Run workflow`*** 按钮即可编译。更多参数的设置方法可以在 [Armbian 官方文档](https://docs.armbian.com/Developer-Guide_Build-Options/) 里查阅。 209 | 210 | 3. 再次编译:如果 [Releases](https://github.com/ophub/amlogic-s9xxx-armbian/releases) 中有已经编译好的 `Armbian_.*-trunk_.*.img.gz` 文件,你只是想再次制作其他不同 board 的盒子,可以跳过 Armbian 源文件的编译,直接进行二次制作。在 [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面中选择 ***`Use Releases file to build armbian`*** ,点击 ***`Run workflow`*** 按钮即可二次编译。 211 | 212 | 4. 使用其他 Armbian 系统,如 Armbian 官方系统下载网站 [armbian.tnahosting.net](https://armbian.tnahosting.net/dl/) 提供的 [odroidn2](https://armbian.tnahosting.net/dl/odroidn2/archive/) 系统,仅在流程控制文件 [rebuild-armbian.yml](.github/workflows/rebuild-armbian.yml) 中引入本仓库的脚本进行 Armbian 重构,即可适配其他盒子的使用。在 [Actions](https://github.com/ophub/amlogic-s9xxx-armbian/actions) 页面里选择 ***`Rebuild armbian`*** ,输入 Armbian 的网络下载地址如 `https://dl.armbian.com/*/Armbian_*.img.xz` ,或者在流程控制文件 [rebuild-armbian.yml](.github/workflows/rebuild-armbian.yml) 中通过 `armbian_path` 参数设定重构文件的加载路径。代码如下: 213 | 214 | ```yaml 215 | - name: Rebuild Armbian 216 | uses: ophub/amlogic-s9xxx-armbian@main 217 | with: 218 | build_target: armbian 219 | armbian_path: build/output/images/*.img 220 | armbian_board: s905d_s905x3_s922x_s905x 221 | armbian_kernel: 6.1.y_5.15.y 222 | ``` 223 | 224 | - ### GitHub Actions 输入参数说明 225 | 226 | 相关参数与`本地打包命令`相对应,请参考上面的说明。 227 | 228 | | 参数 | 默认值 | 说明 | 229 | |------------------|-------------------|--------------------------------------------------| 230 | | armbian_path | 无 | 设置原版 Armbian 文件的路径,支持使用当前工作流中的文件路径如 `build/output/images/*.img` ,也支持使用网络下载地址如: `https://dl.armbian.com/*/Armbian_*.img.xz` | 231 | | armbian_board | all | 设置打包盒子的 `board` ,功能参考 `-b` | 232 | | kernel_repo | ophub/kernel | 指定 github.com 内核仓库的 `/`,功能参考 `-r` | 233 | | kernel_usage | stable | 设置使用的内核的 `tags 后缀`。功能参考 `-u` | 234 | | armbian_kernel | 6.1.y_5.15.y | 设置内核 [版本](https://github.com/ophub/kernel/releases/tag/kernel_stable),功能参考 `-k` | 235 | | auto_kernel | true | 设置是否自动采用同系列最新版本内核,功能参考 `-a` | 236 | | armbian_fstype | ext4 | 设置系统 ROOTFS 分区的文件系统类型,功能参考 `-t` | 237 | | armbian_size | 512/2560 | 设置系统 BOOTFS 和 ROOTFS 分区的大小,功能参考 `-s` | 238 | | builder_name | 无 | 设置 Armbian 系统构建者签名,功能参考 `-n` | 239 | 240 | - ### GitHub Actions 输出变量说明 241 | 242 | 上传到 `Releases` 需要给仓库设置 `Workflow 读写权限`,详见[使用说明](documents/README.cn.md#2-设置隐私变量-github_token)。 243 | 244 | | 参数 | 默认值 | 说明 | 245 | |-------------------------------------|---------------|----------------------------| 246 | | ${{ env.PACKAGED_OUTPUTPATH }} | out | Armbian 系统文件输出路径 | 247 | | ${{ env.PACKAGED_OUTPUTDATE }} | 04.13.1058 | 打包日期(月.日.时分) | 248 | | ${{ env.PACKAGED_STATUS }} | success | 打包状态:success / failure | 249 | 250 | ## Armbian 系统默认信息 251 | 252 | | 名称 | 值 | 253 | | ---- | ---- | 254 | | 默认 IP | 从路由器获取 IP | 255 | | 默认账号 | root | 256 | | 默认密码 | 1234 | 257 | 258 | ## 使用 GitHub Actions 编译内核 259 | 260 | 内核的编译方法详见 [compile-kernel](compile-kernel/README.cn.md) 261 | 262 | ```yaml 263 | - name: Compile the kernel 264 | uses: ophub/amlogic-s9xxx-armbian@main 265 | with: 266 | build_target: kernel 267 | kernel_version: 6.1.y_5.15.y 268 | kernel_auto: true 269 | kernel_sign: -yourname 270 | ``` 271 | 272 | ## Armbian 贡献者 273 | 274 | 首先感谢 [150balbes](https://github.com/150balbes) 为在 Amlogic 电视盒子中使用 Armbian 所做出的杰出贡献和奠定的良好基础。这里编译的 [Armbian](https://github.com/armbian/build) 系统直接使用了官方当前的最新源码进行实时编译。程序的开发思路来自 [ebkso](https://www.kflyo.com/howto-compile-armbian-for-n1-box) 等作者的教程。感谢各位的奉献和分享,让我们可以在更多盒子里使用 Armbian 系统。 275 | 276 | 本系统所使用的 [u-boot](https://github.com/ophub/u-boot), [kernel](https://github.com/ophub/kernel) 等资源主要从 [unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) 的项目中复制而来,部分文件由用户在 [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt) / [amlogic-s9xxx-armbian](https://github.com/ophub/amlogic-s9xxx-armbian) / [luci-app-amlogic](https://github.com/ophub/luci-app-amlogic) / [kernel](https://github.com/ophub/kernel) / [u-boot](https://github.com/ophub/u-boot) 等项目的 [Pull](https://github.com/ophub/amlogic-s9xxx-armbian/pulls) 和 [Issues](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 中提供分享。为感谢这些开拓者和分享者,从现在开始(本源代码库创建于`2021-09-19`),我统一在 [CONTRIBUTORS.md](https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/CONTRIBUTORS.md) 中进行了记录。再次感谢大家为盒子赋予了新的生命和意义。 277 | 278 | ## 其他发行版 279 | 280 | - [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt) 项目提供了在盒子中使用的 `OpenWrt` 系统,在支持 Armbian 的相关设备中同样适用。 281 | - [unifreq](https://github.com/unifreq/openwrt_packit) 为晶晨、瑞芯微和全志等更多盒子制作了 `OpenWrt` 系统,属于盒子圈的标杆,推荐使用。 282 | - [Scirese](https://github.com/Scirese/alarm) 在安卓电视盒子里测试了 `Arch Linux ARM` / `Manjaro` 系统的制作、安装和使用,具体详见他仓库中的相关说明。 283 | - [7Ji](https://7ji.github.io/) 在他的博客中发表了一些在 Amlogic 平台上的逆向工程和开发的文章,比如以 ArchLinux 的方式安装 ArchLinux ARM 系统,对 Amlogic 平台的启动机制的介绍等。在他的 [ampart](https://github.com/7Ji/ampart) 项目中,提供了一款分区工具,能够读取并编辑 Amlogic 的 eMMC 分区表和 DTB 内分区,可以 100% 利用 eMMC 空间。在 [amlogic-s9xxx-archlinuxarm](https://github.com/7Ji/amlogic-s9xxx-archlinuxarm) 项目中提供了 `Arch Linux ARM` 系统的制作和使用方法。在 [YAopenvfD](https://github.com/7Ji/YAopenvfD) 项目中提供了另一个 openvfd 守护进程。 284 | - [13584452567](https://github.com/13584452567) 是本仓库 `Rockchip` 系列设备的开拓者,因为他的分享而拓展了对 [EAIDK-610](https://github.com/ophub/amlogic-s9xxx-armbian/pull/991), [King3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1080), [TN3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1094), [Kylin3399](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1132), [ZCube1-Max](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1247), [tvi3315a](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1687), [xiaobao](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1698) 等众多 `Rockchip` 设备的支持,他也是 [TQC-A01](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1638) 等 `Allwinner` 设备 [专用内核](https://github.com/13584452567/linux-6.6.y) 的维护者。他在 [论坛](https://github.com/ophub/amlogic-s9xxx-armbian/discussions/1634) 和 [问答区](https://github.com/ophub/amlogic-s9xxx-armbian/issues) 里提供了大量的技术支持和解决方案,为盒子圈的发展做出了巨大的贡献。 285 | 286 | 287 | ## 链接 288 | 289 | - [armbian](https://github.com/armbian/build) 290 | - [unifreq](https://github.com/unifreq) 291 | - [kernel.org](https://kernel.org) 292 | 293 | ## License 294 | 295 | The amlogic-s9xxx-armbian © OPHUB is licensed under [GPL-2.0](LICENSE) 296 | 297 | -------------------------------------------------------------------------------- /compile-kernel/tools/script/armbian_compile_kernel_script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================================================== 3 | # 4 | # This file is licensed under the terms of the GNU General Public 5 | # License version 2. This program is licensed "as is" without any 6 | # warranty of any kind, whether express or implied. 7 | # 8 | # This file is a part of the Rebuild Armbian 9 | # https://github.com/ophub/amlogic-s9xxx-armbian 10 | # 11 | # Description: Run on Armbian, Compile the kernel. 12 | # Copyright (C) 2021~ https://www.kernel.org 13 | # Copyright (C) 2021~ https://github.com/unifreq 14 | # Copyright (C) 2021~ https://github.com/ophub/amlogic-s9xxx-armbian 15 | # 16 | # Command: armbian-kernel 17 | # Command optional parameters please refer to the source code repository 18 | # 19 | #================================= Functions list ================================= 20 | # 21 | # error_msg : Output error message 22 | # 23 | # init_var : Initialize all variables 24 | # toolchain_check : Check and install the toolchain 25 | # query_version : Query the latest kernel version 26 | # apply_patch : Apply custom kernel patches 27 | # get_kernel_source : Get the kernel source code 28 | # 29 | # headers_install : Deploy the kernel headers file 30 | # compile_env : Set up the compile kernel environment 31 | # compile_dtbs : Compile the dtbs 32 | # compile_kernel : Compile the kernel 33 | # generate_uinitrd : Generate initrd.img and uInitrd 34 | # packit_dtbs : Packit dtbs files 35 | # packit_kernel : Packit boot, modules and header files 36 | # compile_selection : Choose to compile dtbs or all kernels 37 | # clean_tmp : Clear temporary files 38 | # 39 | # loop_recompile : Loop to compile kernel 40 | # 41 | #========================= Set make environment variables ========================= 42 | # 43 | # Related file storage path 44 | current_path="${PWD}" 45 | compile_path="${current_path}/compile-kernel" 46 | config_path="${compile_path}/tools/config" 47 | script_path="${compile_path}/tools/script" 48 | kernel_patch_path="${compile_path}/tools/patch" 49 | kernel_path="${compile_path}/kernel" 50 | output_path="${compile_path}/output" 51 | [[ -d "${kernel_path}" ]] || mkdir -p ${kernel_path} 52 | [[ -d "${output_path}" ]] || mkdir -p ${output_path} 53 | 54 | # Set the temporary backup path for the current system kernel 55 | tmp_backup_path="/ddbr/tmp" 56 | boot_backup_path="${tmp_backup_path}/boot" 57 | modules_backup_path="${tmp_backup_path}/modules" 58 | 59 | # Set the system file path to be used 60 | arch_info="$(uname -m)" 61 | host_release="$(cat /etc/os-release | grep '^VERSION_CODENAME=.*' | cut -d"=" -f2)" 62 | initramfs_conf="/etc/initramfs-tools/update-initramfs.conf" 63 | ophub_release_file="/etc/ophub-release" 64 | 65 | # Set the default for downloading kernel sources from github.com 66 | repo_owner="unifreq" 67 | repo_branch="main" 68 | build_kernel=("6.1.1" "5.15.1") 69 | # Set whether to use the latest kernel, options: [ true / false ] 70 | auto_kernel="true" 71 | # Set whether to apply custom kernel patches, options: [ true / false ] 72 | auto_patch="false" 73 | # Set custom signature for the kernel 74 | custom_name="-ophub" 75 | # Set the kernel compile object, options: [ dtbs / all ] 76 | package_list="all" 77 | # Set the compression format, options: [ gzip / lzma / xz / zstd ] 78 | compress_format="xz" 79 | 80 | # Compile toolchain download mirror, run on Armbian 81 | dev_repo="https://github.com/ophub/kernel/releases/download/dev" 82 | # Arm GNU Toolchain source: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads 83 | gun_file="arm-gnu-toolchain-13.2.rel1-aarch64-aarch64-none-elf.tar.xz" 84 | # Set the toolchain path 85 | toolchain_path="/usr/local/toolchain" 86 | # Set the default cross-compilation toolchain: [ gcc / clang ] 87 | toolchain_name="gcc" 88 | 89 | # Set font color 90 | STEPS="[\033[95m STEPS \033[0m]" 91 | INFO="[\033[94m INFO \033[0m]" 92 | SUCCESS="[\033[92m SUCCESS \033[0m]" 93 | WARNING="[\033[93m WARNING \033[0m]" 94 | ERROR="[\033[91m ERROR \033[0m]" 95 | # 96 | #================================================================================== 97 | 98 | error_msg() { 99 | echo -e " ${ERROR} ${1}" 100 | exit 1 101 | } 102 | 103 | init_var() { 104 | echo -e "${STEPS} Start Initializing Variables..." 105 | 106 | # If it is followed by [ : ], it means that the option requires a parameter value 107 | get_all_ver="$(getopt "k:a:n:m:p:r:t:c:" "${@}")" 108 | 109 | while [[ -n "${1}" ]]; do 110 | case "${1}" in 111 | -k | --kernel) 112 | if [[ -n "${2}" ]]; then 113 | oldIFS="${IFS}" 114 | IFS="_" 115 | build_kernel=(${2}) 116 | IFS="${oldIFS}" 117 | shift 118 | else 119 | error_msg "Invalid -k parameter [ ${2} ]!" 120 | fi 121 | ;; 122 | -a | --autoKernel) 123 | if [[ -n "${2}" ]]; then 124 | auto_kernel="${2}" 125 | shift 126 | else 127 | error_msg "Invalid -a parameter [ ${2} ]!" 128 | fi 129 | ;; 130 | -n | --customName) 131 | if [[ -n "${2}" ]]; then 132 | custom_name="${2// /}" 133 | [[ "${custom_name:0:1}" != "-" ]] && custom_name="-${custom_name}" 134 | shift 135 | else 136 | error_msg "Invalid -n parameter [ ${2} ]!" 137 | fi 138 | ;; 139 | -m | --MakePackage) 140 | if [[ -n "${2}" ]]; then 141 | package_list="${2}" 142 | shift 143 | else 144 | error_msg "Invalid -m parameter [ ${2} ]!" 145 | fi 146 | ;; 147 | -p | --AutoPatch) 148 | if [[ -n "${2}" ]]; then 149 | auto_patch="${2}" 150 | shift 151 | else 152 | error_msg "Invalid -p parameter [ ${2} ]!" 153 | fi 154 | ;; 155 | -r | --repo) 156 | if [[ -n "${2}" ]]; then 157 | repo_owner="${2}" 158 | shift 159 | else 160 | error_msg "Invalid -r parameter [ ${2} ]!" 161 | fi 162 | ;; 163 | -t | --Toolchain) 164 | if [[ -n "${2}" ]]; then 165 | toolchain_name="${2}" 166 | shift 167 | else 168 | error_msg "Invalid -t parameter [ ${2} ]!" 169 | fi 170 | ;; 171 | -c | --Compress) 172 | if [[ -n "${2}" ]]; then 173 | compress_format="${2}" 174 | shift 175 | else 176 | error_msg "Invalid -c parameter [ ${2} ]!" 177 | fi 178 | ;; 179 | *) 180 | error_msg "Invalid option [ ${1} ]!" 181 | ;; 182 | esac 183 | shift 184 | done 185 | 186 | # Receive the value entered by the [ -r ] parameter 187 | input_r_value="${repo_owner//https\:\/\/github\.com\//}" 188 | code_owner="$(echo "${input_r_value}" | awk -F '@' '{print $1}' | awk -F '/' '{print $1}')" 189 | code_repo="$(echo "${input_r_value}" | awk -F '@' '{print $1}' | awk -F '/' '{print $2}')" 190 | code_branch="$(echo "${input_r_value}" | awk -F '@' '{print $2}')" 191 | # 192 | [[ -n "${code_owner}" ]] || error_msg "The [ -r ] parameter is invalid." 193 | [[ -n "${code_branch}" ]] || code_branch="${repo_branch}" 194 | 195 | # Set compilation parameters 196 | export ARCH="arm64" 197 | export LOCALVERSION="${custom_name}" 198 | 199 | # Check release file 200 | [[ -f "${ophub_release_file}" ]] || error_msg "missing [ ${ophub_release_file} ] file." 201 | 202 | # Get values 203 | source "${ophub_release_file}" 204 | PLATFORM="${PLATFORM}" 205 | FDTFILE="${FDTFILE}" 206 | 207 | # Early devices did not add platform parameters, auto-completion 208 | [[ -z "${PLATFORM}" && -n "${FDTFILE}" ]] && { 209 | [[ ${FDTFILE:0:5} == "meson" ]] && PLATFORM="amlogic" || PLATFORM="rockchip" 210 | echo "PLATFORM='${PLATFORM}'" >>${ophub_release_file} 211 | } 212 | echo -e "${INFO} Armbian PLATFORM: [ ${PLATFORM} ]" 213 | } 214 | 215 | toolchain_check() { 216 | cd ${current_path} 217 | echo -e "${STEPS} Start checking the toolchain for compiling the kernel..." 218 | 219 | # Install dependencies 220 | sudo apt-get -qq update 221 | sudo apt-get -qq install -y $(cat compile-kernel/tools/script/armbian-compile-kernel-depends) 222 | 223 | # Set the default path 224 | path_os_variable="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" 225 | 226 | # Download the cross-compilation toolchain: [ clang / gcc ] 227 | [[ -d "/etc/apt/sources.list.d" ]] || mkdir -p /etc/apt/sources.list.d 228 | if [[ "${toolchain_name}" == "clang" ]]; then 229 | # Install LLVM 230 | echo -e "${INFO} Start installing the LLVM toolchain..." 231 | sudo apt-get -qq install -y lsb-release software-properties-common gnupg 232 | curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s all 233 | [[ "${?}" -eq "0" ]] || error_msg "LLVM installation failed." 234 | 235 | # Set cross compilation parameters 236 | export PATH="${path_os_variable}" 237 | export CROSS_COMPILE="aarch64-linux-gnu-" 238 | export CC="clang" 239 | export LD="ld.lld" 240 | export MFLAGS=" LLVM=1 LLVM_IAS=1 " 241 | else 242 | # Download Arm GNU Toolchain 243 | [[ -d "${toolchain_path}" ]] || mkdir -p ${toolchain_path} 244 | if [[ ! -d "${toolchain_path}/${gun_file//.tar.xz/}/bin" ]]; then 245 | echo -e "${INFO} Start downloading the ARM GNU toolchain [ ${gun_file} ]..." 246 | curl -fsSL "${dev_repo}/${gun_file}" -o "${toolchain_path}/${gun_file}" 247 | [[ "${?}" -eq "0" ]] || error_msg "GNU toolchain file download failed." 248 | tar -xJf ${toolchain_path}/${gun_file} -C ${toolchain_path} 249 | rm -f ${toolchain_path}/${gun_file} 250 | # List and check directory names, and change them all to lowercase 251 | for dir in $(ls ${toolchain_path}); do 252 | if [[ -d "${toolchain_path}/${dir}" && "${dir}" != "${dir,,}" ]]; then 253 | mv -f ${toolchain_path}/${dir} ${toolchain_path}/${dir,,} 254 | fi 255 | done 256 | [[ -d "${toolchain_path}/${gun_file//.tar.xz/}/bin" ]] || error_msg "The gcc is not set!" 257 | fi 258 | 259 | # Add ${PATH} variable 260 | path_gcc="${toolchain_path}/${gun_file//.tar.xz/}/bin:${path_os_variable}" 261 | export PATH="${path_gcc}" 262 | 263 | # Set cross compilation parameters 264 | export CROSS_COMPILE="${toolchain_path}/${gun_file//.tar.xz/}/bin/aarch64-none-elf-" 265 | export CC="${CROSS_COMPILE}gcc" 266 | export LD="${CROSS_COMPILE}ld.bfd" 267 | export MFLAGS="" 268 | fi 269 | } 270 | 271 | query_version() { 272 | cd ${current_path} 273 | echo -e "${STEPS} Start querying the latest kernel version..." 274 | 275 | # Set empty array 276 | tmp_arr_kernels=() 277 | 278 | # Query the latest kernel in a loop 279 | i=1 280 | for KERNEL_VAR in ${build_kernel[*]}; do 281 | echo -e "${INFO} (${i}) Auto query the latest kernel version of the same series for [ ${KERNEL_VAR} ]" 282 | # Identify the kernel mainline 283 | MAIN_LINE="$(echo ${KERNEL_VAR} | awk -F '.' '{print $1"."$2}')" 284 | 285 | if [[ -z "${code_repo}" ]]; then linux_repo="linux-${MAIN_LINE}.y"; else linux_repo="${code_repo}"; fi 286 | github_kernel_repo="${code_owner}/${linux_repo}/${code_branch}" 287 | github_kernel_ver="https://raw.githubusercontent.com/${github_kernel_repo}/Makefile" 288 | # latest_version="125" 289 | latest_version="$(curl -s ${github_kernel_ver} | grep -oE "SUBLEVEL =.*" | head -n 1 | grep -oE '[0-9]{1,3}')" 290 | if [[ "${?}" -eq "0" && -n "${latest_version}" ]]; then 291 | tmp_arr_kernels[${i}]="${MAIN_LINE}.${latest_version}" 292 | else 293 | error_msg "Failed to query the kernel version in [ github.com/${github_kernel_repo} ]" 294 | fi 295 | echo -e "${INFO} (${i}) [ ${tmp_arr_kernels[$i]} ] is github.com/${github_kernel_repo} latest kernel. \n" 296 | 297 | let i++ 298 | done 299 | 300 | # Reset the kernel array to the latest kernel version 301 | unset build_kernel 302 | build_kernel="${tmp_arr_kernels[*]}" 303 | } 304 | 305 | apply_patch() { 306 | cd ${current_path} 307 | echo -e "${STEPS} Start applying custom kernel patches..." 308 | 309 | # Apply the common kernel patches 310 | if [[ -d "${kernel_patch_path}/common-kernel-patches" ]]; then 311 | echo -e "${INFO} Copy common kernel patches..." 312 | cp -vf ${kernel_patch_path}/common-kernel-patches/*.patch -t ${kernel_path}/${local_kernel_path} 313 | 314 | cd ${kernel_path}/${local_kernel_path} 315 | for file in *.patch; do 316 | echo -e "${INFO} Apply kernel patch file: [ ${file} ]" 317 | patch -p1 <"${file}" 318 | done 319 | rm -f *.patch 320 | else 321 | echo -e "${INFO} No common kernel patches, skipping." 322 | fi 323 | 324 | # Apply the dedicated kernel patches 325 | if [[ -d "${kernel_patch_path}/${local_kernel_path}" ]]; then 326 | echo -e "${INFO} Copy [ ${local_kernel_path} ] version dedicated kernel patches..." 327 | cp -vf ${kernel_patch_path}/${local_kernel_path}/*.patch -t ${kernel_path}/${local_kernel_path} 328 | 329 | cd ${kernel_path}/${local_kernel_path} 330 | for file in *.patch; do 331 | echo -e "${INFO} Apply kernel patch file: [ ${file} ]" 332 | patch -p1 <"${file}" 333 | done 334 | rm -f *.patch 335 | else 336 | echo -e "${INFO} No [ ${local_kernel_path} ] version dedicated kernel patches, skipping." 337 | fi 338 | } 339 | 340 | get_kernel_source() { 341 | cd ${current_path} 342 | echo -e "${STEPS} Start downloading the kernel source code..." 343 | 344 | [[ -d "${kernel_path}" ]] || mkdir -p ${kernel_path} 345 | 346 | if [[ ! -d "${kernel_path}/${local_kernel_path}" ]]; then 347 | echo -e "${INFO} Start cloning from [ https://github.com/${server_kernel_repo} -b ${code_branch} ]" 348 | git clone -q --single-branch --depth=1 --branch=${code_branch} https://github.com/${server_kernel_repo} ${kernel_path}/${local_kernel_path} 349 | [[ "${?}" -eq "0" ]] || error_msg "[ https://github.com/${server_kernel_repo} ] Clone failed." 350 | else 351 | # Get a local kernel version 352 | local_makefile="${kernel_path}/${local_kernel_path}/Makefile" 353 | local_makefile_version="$(cat ${local_makefile} | grep -oE "VERSION =.*" | head -n 1 | grep -oE '[0-9]{1,3}')" 354 | local_makefile_patchlevel="$(cat ${local_makefile} | grep -oE "PATCHLEVEL =.*" | head -n 1 | grep -oE '[0-9]{1,3}')" 355 | local_makefile_sublevel="$(cat ${local_makefile} | grep -oE "SUBLEVEL =.*" | head -n 1 | grep -oE '[0-9]{1,3}')" 356 | 357 | # Local version and server version comparison 358 | if [[ "${auto_kernel}" == "true" || "${auto_kernel}" == "yes" ]] && [[ "${kernel_sub}" -gt "${local_makefile_sublevel}" ]]; then 359 | # Pull the latest source code of the server 360 | cd ${kernel_path}/${local_kernel_path} 361 | git checkout ${code_branch} && git reset --hard origin/${code_branch} && git pull 362 | unset kernel_version 363 | kernel_version="${local_makefile_version}.${local_makefile_patchlevel}.${kernel_sub}" 364 | echo -e "${INFO} Synchronize the upstream source code, compile the kernel version [ ${kernel_version} ]." 365 | else 366 | # Reset to local kernel version number 367 | unset kernel_version 368 | kernel_version="${local_makefile_version}.${local_makefile_patchlevel}.${local_makefile_sublevel}" 369 | echo -e "${INFO} Use local source code, compile the kernel version [ ${kernel_version} ]." 370 | fi 371 | fi 372 | 373 | # Remove the local version number 374 | rm -f ${kernel_path}/${local_kernel_path}/localversion 375 | 376 | # Apply custom kernel patches 377 | [[ "${auto_patch}" == "true" || "${auto_patch}" == "yes" ]] && apply_patch 378 | } 379 | 380 | headers_install() { 381 | cd ${kernel_path}/${local_kernel_path} 382 | 383 | # Set headers files list 384 | head_list="$(mktemp)" 385 | ( 386 | find . arch/${ARCH} -maxdepth 1 -name Makefile\* 387 | find include scripts -type f -o -type l 388 | find arch/${ARCH} -name Kbuild.platforms -o -name Platform 389 | find $(find arch/${ARCH} -name include -o -name scripts -type d) -type f 390 | ) >${head_list} 391 | 392 | # Set object files list 393 | obj_list="$(mktemp)" 394 | { 395 | [[ -n "$(grep "^CONFIG_OBJTOOL=y" include/config/auto.conf 2>/dev/null)" ]] && echo "tools/objtool/objtool" 396 | find arch/${ARCH}/include Module.symvers include scripts -type f 397 | [[ -n "$(grep "^CONFIG_GCC_PLUGINS=y" include/config/auto.conf 2>/dev/null)" ]] && find scripts/gcc-plugins -name \*.so 398 | } >${obj_list} 399 | 400 | # Install related files to the specified directory 401 | tar --exclude '*.orig' -c -f - -C ${kernel_path}/${local_kernel_path} -T ${head_list} | tar -xf - -C ${output_path}/header 402 | tar --exclude '*.orig' -c -f - -T ${obj_list} | tar -xf - -C ${output_path}/header 403 | 404 | # copy .config manually to be where it's expected to be 405 | cp -f .config ${output_path}/header/.config 406 | 407 | # Delete temporary files 408 | rm -f ${head_list} ${obj_list} 409 | } 410 | 411 | compile_env() { 412 | cd ${current_path} 413 | echo -e "${STEPS} Start checking local compilation environments." 414 | 415 | # Get kernel output name 416 | kernel_outname="${kernel_version}${custom_name}" 417 | echo -e "${INFO} Compile kernel output name [ ${kernel_outname} ]. \n" 418 | 419 | # Create a temp directory 420 | rm -rf ${output_path}/{boot/,dtb/,modules/,header/,${kernel_version}/} 421 | mkdir -p ${output_path}/{boot/,dtb/{allwinner/,amlogic/,rockchip/},modules/,header/,${kernel_version}/} 422 | 423 | cd ${kernel_path}/${local_kernel_path} 424 | echo -e "${STEPS} Set compilation parameters." 425 | 426 | # Show variable 427 | echo -e "${INFO} ARCH: [ ${ARCH} ]" 428 | echo -e "${INFO} LOCALVERSION: [ ${LOCALVERSION} ]" 429 | echo -e "${INFO} CROSS_COMPILE: [ ${CROSS_COMPILE} ]" 430 | echo -e "${INFO} CC: [ ${CC} ]" 431 | echo -e "${INFO} LD: [ ${LD} ]" 432 | 433 | # Set generic make string 434 | MAKE_SET_STRING=" ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} CC=${CC} LD=${LD} ${MFLAGS} LOCALVERSION=${LOCALVERSION} " 435 | 436 | # Make clean/mrproper 437 | make ${MAKE_SET_STRING} mrproper 438 | 439 | # Check .config file 440 | if [[ ! -s ".config" ]]; then 441 | [[ -s "${config_path}/config-${kernel_verpatch}" ]] || error_msg "Missing [ config-${kernel_verpatch} ] template!" 442 | echo -e "${INFO} Copy [ ${config_path}/config-${kernel_verpatch} ] to [ .config ]" 443 | cp -f ${config_path}/config-${kernel_verpatch} .config 444 | else 445 | echo -e "${INFO} Use the .config file in the current directory." 446 | fi 447 | # Clear kernel signature 448 | sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|" .config 449 | 450 | # Enable/Disabled Linux Kernel Clang LTO 451 | [[ "${toolchain_name}" == "clang" ]] && { 452 | kernel_x="$(echo "${kernel_version}" | cut -d '.' -f1)" 453 | kernel_y="$(echo "${kernel_version}" | cut -d '.' -f2)" 454 | if [[ "${kernel_x}" -ge "6" ]] || [[ "${kernel_x}" -eq "5" && "${kernel_y}" -ge "12" ]]; then 455 | scripts/config -e LTO_CLANG_THIN 456 | else 457 | scripts/config -d LTO_CLANG_THIN 458 | fi 459 | } 460 | 461 | # Make menuconfig 462 | #make ${MAKE_SET_STRING} menuconfig 463 | 464 | # Set max process 465 | PROCESS="$(cat /proc/cpuinfo | grep "processor" | wc -l)" 466 | [[ -z "${PROCESS}" ]] && PROCESS="1" && echo "PROCESS: 1" 467 | } 468 | 469 | compile_dtbs() { 470 | cd ${kernel_path}/${local_kernel_path} 471 | 472 | # Make dtbs 473 | echo -e "${STEPS} Start compilation dtbs [ ${local_kernel_path} ]..." 474 | make ${MAKE_SET_STRING} dtbs -j${PROCESS} 475 | [[ "${?}" -eq "0" ]] && echo -e "${SUCCESS} The dtbs is compiled successfully." 476 | } 477 | 478 | compile_kernel() { 479 | cd ${kernel_path}/${local_kernel_path} 480 | 481 | # Make kernel 482 | echo -e "${STEPS} Start compilation kernel [ ${local_kernel_path} ]..." 483 | make ${MAKE_SET_STRING} Image modules dtbs -j${PROCESS} 484 | #make ${MAKE_SET_STRING} bindeb-pkg KDEB_COMPRESS=xz KBUILD_DEBARCH=arm64 -j${PROCESS} 485 | [[ "${?}" -eq "0" ]] && echo -e "${SUCCESS} The kernel is compiled successfully." 486 | 487 | # Install modules 488 | echo -e "${STEPS} Install modules ..." 489 | make ${MAKE_SET_STRING} INSTALL_MOD_PATH=${output_path}/modules modules_install 490 | [[ "${?}" -eq "0" ]] && echo -e "${SUCCESS} The modules is installed successfully." 491 | 492 | # Strip debug information 493 | STRIP="${CROSS_COMPILE}strip" 494 | find ${output_path}/modules -name "*.ko" -print0 | xargs -0 ${STRIP} --strip-debug 2>/dev/null 495 | [[ "${?}" -eq "0" ]] && echo -e "${SUCCESS} The modules is stripped successfully." 496 | 497 | # Install headers 498 | echo -e "${STEPS} Install headers ..." 499 | headers_install 500 | [[ "${?}" -eq "0" ]] && echo -e "${SUCCESS} The headers is installed successfully." 501 | } 502 | 503 | generate_uinitrd() { 504 | cd ${current_path} 505 | echo -e "${STEPS} Generate uInitrd environment initialization..." 506 | 507 | # Backup current system files for /boot 508 | echo -e "${INFO} Backup the files in the [ ${boot_backup_path} ] directory." 509 | rm -rf ${boot_backup_path} && mkdir -p ${boot_backup_path} 510 | mv -f /boot/{config-*,initrd.img-*,System.map-*,vmlinuz-*,uInitrd*,*Image} -t ${boot_backup_path} 511 | # Copy /boot related files into armbian system 512 | cp -f ${kernel_path}/${local_kernel_path}/System.map /boot/System.map-${kernel_outname} 513 | cp -f ${kernel_path}/${local_kernel_path}/.config /boot/config-${kernel_outname} 514 | cp -f ${kernel_path}/${local_kernel_path}/arch/arm64/boot/Image /boot/vmlinuz-${kernel_outname} 515 | if [[ "${PLATFORM}" == "rockchip" || "${PLATFORM}" == "allwinner" ]]; then 516 | cp -f /boot/vmlinuz-${kernel_outname} /boot/Image 517 | else 518 | cp -f /boot/vmlinuz-${kernel_outname} /boot/zImage 519 | fi 520 | #echo -e "${INFO} Kernel copy results in the [ /boot ] directory: \n$(ls -l /boot) \n" 521 | 522 | # Backup current system files for /usr/lib/modules 523 | echo -e "${INFO} Backup the files in the [ ${modules_backup_path} ] directory." 524 | rm -rf ${modules_backup_path} && mkdir -p ${modules_backup_path} 525 | mv -f /usr/lib/modules/$(uname -r) -t ${modules_backup_path} 526 | # Copy modules files 527 | cp -rf ${output_path}/modules/lib/modules/${kernel_outname} -t /usr/lib/modules 528 | #echo -e "${INFO} Kernel copy results in the [ /usr/lib/modules ] directory: \n$(ls -l /usr/lib/modules) \n" 529 | 530 | # COMPRESS: [ gzip | lzma | xz | zstd ] 531 | [[ "${kernel_outname}" =~ ^5.4.[0-9]+ ]] && compress_format="xz" 532 | compress_initrd_file="/etc/initramfs-tools/initramfs.conf" 533 | if [[ -f "${compress_initrd_file}" ]]; then 534 | sed -i "s|^COMPRESS=.*|COMPRESS=${compress_format}|g" ${compress_initrd_file} 535 | compress_settings="$(cat ${compress_initrd_file} | grep -E ^COMPRESS=)" 536 | echo -e "${INFO} Set the [ ${compress_settings} ] in the initramfs.conf file." 537 | else 538 | error_msg "The [ ${compress_initrd_file} ] file does not exist." 539 | fi 540 | 541 | cd /boot 542 | echo -e "${STEPS} Generate uInitrd file..." 543 | 544 | # Enable update_initramfs 545 | [[ -f "${initramfs_conf}" ]] && sed -i "s|^update_initramfs=.*|update_initramfs=yes|g" ${initramfs_conf} 546 | 547 | # Generate uInitrd file directly under armbian system 548 | update-initramfs -c -k ${kernel_outname} 549 | 550 | # Disable update_initramfs 551 | [[ -f "${initramfs_conf}" ]] && sed -i "s|^update_initramfs=.*|update_initramfs=no|g" ${initramfs_conf} 552 | 553 | if [[ -f "uInitrd" ]]; then 554 | echo -e "${SUCCESS} The initrd.img and uInitrd file is Successfully generated." 555 | [[ ! -L "uInitrd" ]] && mv -vf uInitrd uInitrd-${kernel_outname} 556 | else 557 | echo -e "${WARNING} The initrd.img and uInitrd file not updated." 558 | fi 559 | 560 | echo -e "${INFO} File situation in the /boot directory after update: \n$(ls -l *${kernel_outname})" 561 | 562 | # Restore the files in the [ /boot ] directory 563 | mv -f *${kernel_outname} ${output_path}/boot 564 | mv -f ${boot_backup_path}/* -t . 565 | 566 | # Restore the files in the [ /usr/lib/modules ] directory 567 | rm -rf /usr/lib/modules/${kernel_outname} 568 | mv -f ${modules_backup_path}/* -t /usr/lib/modules 569 | 570 | # Remove temporary backup directory 571 | sync && sleep 3 572 | rm -rf ${boot_backup_path} ${modules_backup_path} 573 | } 574 | 575 | packit_dtbs() { 576 | # Pack 3 dtbs files 577 | echo -e "${STEPS} Packing the [ ${kernel_outname} ] dtbs packages..." 578 | 579 | cd ${output_path}/dtb/allwinner 580 | cp -f ${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/allwinner/*.dtb . 2>/dev/null 581 | [[ "${?}" -eq "0" ]] && { 582 | [[ -d "${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/allwinner/overlay" ]] && { 583 | mkdir -p overlay 584 | cp -f ${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/allwinner/overlay/*.dtbo overlay/ 2>/dev/null 585 | } 586 | tar -czf dtb-allwinner-${kernel_outname}.tar.gz * 587 | mv -f *.tar.gz ${output_path}/${kernel_version} 588 | echo -e "${SUCCESS} The [ dtb-allwinner-${kernel_outname}.tar.gz ] file is packaged." 589 | } 590 | 591 | cd ${output_path}/dtb/amlogic 592 | cp -f ${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/amlogic/*.dtb . 2>/dev/null 593 | [[ "${?}" -eq "0" ]] && { 594 | [[ -d "${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/amlogic/overlay" ]] && { 595 | mkdir -p overlay 596 | cp -f ${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/amlogic/overlay/*.dtbo overlay/ 2>/dev/null 597 | } 598 | tar -czf dtb-amlogic-${kernel_outname}.tar.gz * 599 | mv -f *.tar.gz ${output_path}/${kernel_version} 600 | echo -e "${SUCCESS} The [ dtb-amlogic-${kernel_outname}.tar.gz ] file is packaged." 601 | } 602 | 603 | cd ${output_path}/dtb/rockchip 604 | cp -f ${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/rockchip/*.dtb . 2>/dev/null 605 | [[ "${?}" -eq "0" ]] && { 606 | [[ -d "${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/rockchip/overlay" ]] && { 607 | mkdir -p overlay 608 | cp -f ${kernel_path}/${local_kernel_path}/arch/arm64/boot/dts/rockchip/overlay/*.dtbo overlay/ 2>/dev/null 609 | } 610 | tar -czf dtb-rockchip-${kernel_outname}.tar.gz * 611 | mv -f *.tar.gz ${output_path}/${kernel_version} 612 | echo -e "${SUCCESS} The [ dtb-rockchip-${kernel_outname}.tar.gz ] file is packaged." 613 | } 614 | } 615 | 616 | packit_kernel() { 617 | # Pack 3 kernel files 618 | echo -e "${STEPS} Packing the [ ${kernel_outname} ] boot, modules and header packages..." 619 | 620 | cd ${output_path}/boot 621 | rm -rf dtb-* 622 | chmod +x * 623 | tar -czf boot-${kernel_outname}.tar.gz * 624 | mv -f *.tar.gz ${output_path}/${kernel_version} 625 | echo -e "${SUCCESS} The [ boot-${kernel_outname}.tar.gz ] file is packaged." 626 | 627 | cd ${output_path}/modules/lib/modules 628 | tar -czf modules-${kernel_outname}.tar.gz * 629 | mv -f *.tar.gz ${output_path}/${kernel_version} 630 | echo -e "${SUCCESS} The [ modules-${kernel_outname}.tar.gz ] file is packaged." 631 | 632 | cd ${output_path}/header 633 | tar -czf header-${kernel_outname}.tar.gz * 634 | mv -f *.tar.gz ${output_path}/${kernel_version} 635 | echo -e "${SUCCESS} The [ header-${kernel_outname}.tar.gz ] file is packaged." 636 | } 637 | 638 | compile_selection() { 639 | # Compile by selection 640 | if [[ "${package_list}" == "dtbs" ]]; then 641 | compile_dtbs 642 | packit_dtbs 643 | else 644 | compile_kernel 645 | generate_uinitrd 646 | packit_dtbs 647 | packit_kernel 648 | fi 649 | 650 | # Add sha256sum integrity verification file 651 | cd ${output_path}/${kernel_version} 652 | sha256sum * >sha256sums 653 | echo -e "${SUCCESS} The [ sha256sums ] file has been generated" 654 | 655 | cd ${output_path} 656 | tar -czf ${kernel_version}.tar.gz ${kernel_version} 657 | 658 | echo -e "${INFO} Kernel series files are stored in [ ${output_path} ]." 659 | } 660 | 661 | clean_tmp() { 662 | cd ${current_path} 663 | echo -e "${STEPS} Clear the space..." 664 | 665 | sync && sleep 3 666 | rm -rf ${output_path}/{boot/,dtb/,modules/,header/,${kernel_version}/} 667 | rm -rf ${tmp_backup_path} 668 | 669 | echo -e "${SUCCESS} All processes have been completed." 670 | } 671 | 672 | loop_recompile() { 673 | cd ${current_path} 674 | 675 | j="1" 676 | for k in ${build_kernel[*]}; do 677 | # kernel_version, such as [ 6.1.15 ] 678 | kernel_version="${k}" 679 | # kernel and , such as [ 6.1 ] 680 | kernel_verpatch="$(echo ${kernel_version} | awk -F '.' '{print $1"."$2}')" 681 | # kernel , such as [ 15 ] 682 | kernel_sub="$(echo ${kernel_version} | awk -F '.' '{print $3}')" 683 | 684 | # The loop variable assignment 685 | if [[ -z "${code_repo}" ]]; then 686 | server_kernel_repo="${code_owner}/linux-${kernel_verpatch}.y" 687 | local_kernel_path="linux-${kernel_verpatch}.y" 688 | else 689 | server_kernel_repo="${code_owner}/${code_repo}" 690 | local_kernel_path="${code_repo}-${code_branch}" 691 | fi 692 | 693 | # Execute the following functions in sequence 694 | get_kernel_source 695 | compile_env 696 | compile_selection 697 | clean_tmp 698 | 699 | let j++ 700 | done 701 | } 702 | 703 | # Show welcome message 704 | echo -e "${STEPS} Welcome to compile kernel! \n" 705 | echo -e "${INFO} Server running on Armbian: [ Release: ${host_release} / Host: ${arch_info} ] \n" 706 | # Check script permission, supports running on Armbian system. 707 | [[ "$(id -u)" == "0" ]] || error_msg "Please run this script as root: [ sudo ./${0} ]" 708 | [[ "${arch_info}" == "aarch64" ]] || error_msg "The script only supports running under Armbian system." 709 | 710 | # Initialize variables 711 | init_var "${@}" 712 | # Check and install the toolchain 713 | toolchain_check 714 | # Query the latest kernel version 715 | [[ "${auto_kernel}" == "true" || "${auto_kernel}" == "yes" ]] && query_version 716 | 717 | # Show compile settings 718 | echo -e "${INFO} Kernel compilation toolchain: [ ${toolchain_name} ]" 719 | echo -e "${INFO} Kernel from: [ ${code_owner} ]" 720 | echo -e "${INFO} Kernel patch: [ ${auto_patch} ]" 721 | echo -e "${INFO} Kernel arch: [ ${ARCH} ]" 722 | echo -e "${INFO} Kernel Package: [ ${package_list} ]" 723 | echo -e "${INFO} kernel signature: [ ${custom_name} ]" 724 | echo -e "${INFO} Latest kernel version: [ ${auto_kernel} ]" 725 | echo -e "${INFO} kernel initrd compress: [ ${compress_format} ]" 726 | echo -e "${INFO} Kernel List: [ $(echo ${build_kernel[*]} | xargs) ] \n" 727 | 728 | # Show server start information 729 | echo -e "${INFO} Server space usage before starting to compile: \n$(df -hT ${kernel_path}) \n" 730 | 731 | # Loop to compile the kernel 732 | loop_recompile 733 | 734 | # Show server end information 735 | echo -e "${STEPS} Server space usage after compilation: \n$(df -hT ${kernel_path}) \n" 736 | echo -e "${SUCCESS} All process completed successfully." 737 | # All process completed 738 | wait 739 | --------------------------------------------------------------------------------