hzyitc / armbian-onecloud

Armbian for onecloud. 玩客云用armbian
1.09k stars 209 forks source link

Add build.sh #126

Open SydneyOwl opened 1 year ago

SydneyOwl commented 1 year ago

Hello @hzyitc, A few weeks ago, I wrote a script to speed up the compilation process after making changes to the source code. With this script, you no longer need to manually follow the steps in ci.yml. Recently, I made some modifications to the script to make it more accessible and user-friendly for everyone.

Now, you can specify the branch, distribution, and type of the image to create image by passing parameters to the script. It also supports compiling from modified source code. This is especially useful for people who want to modify the source code but don't want to manually perform the compilation steps. To use this feature, you can use the "-l" parameter to specify the modified source code location or "-s" to skip patching if it has already been done.The script will automatically package the image and output it to the specified directory as well.

Here are the usages: image

For example, if you want to build a "jammy-current-minimal" image from source code, you can run:./build.sh -b current -r jammy -t minimal. Here are some screenshots: image image image Here're the dists:image Building an image on an Ubuntu system(16C,32G) without compilation cache typically takes around 30 minutes. This script only supports Debian-based distributions and has been tested on Ubuntu 22.04 LTS ,a GNU/Linux 5.15.0-56-generic x86_64

Hope this script is helpful for those who wants to build images on their own :)

SydneyOwl commented 1 year ago

Also there‘s a output sample of ./build.sh -b current -r jammy -t minimal log.txt

hzyitc commented 1 year ago

I don't think this is necessary. But I will keep this PR open for someone.

The part of building debs and image can just following the armbian build steps.