jgauthier Posted February 27, 2020 Posted February 27, 2020 Greetings, I set up an an armbian build environment, and went through the initial build, which took some time. Subsequent rebuilds took a couple hours as well, and I discovered I could 'skip' rebuilding the kernel unless I wanted to build it. Now, I'm testing customize-image.sh, things aren't always going where I want. so, I troubleshoot, make changes, but now my minimum build time is 30-40 minutes. Is there something else I can do to speed up the process?
lanefu Posted February 27, 2020 Posted February 27, 2020 Hi Jason See the CLEAN_LEVEL options here https://docs.armbian.com/Developer-Guide_Build-Options/ In your case, where customize-image is all thats being tested you could eliminate all clean flags.. sudo ./compile CLEAN_LEVEL=""
Igor Posted February 27, 2020 Posted February 27, 2020 7 hours ago, Jason Gauthier said: make changes, but now my minimum build time is 30-40 minutes. Is there something else I can do to speed up the process? - describe what you are doing - show your userpatches/config-example.conf (I assume you are using that default one) - what is your build hardware?
jgauthier Posted February 27, 2020 Author Posted February 27, 2020 13 hours ago, Igor said: - describe what you are doing - show your userpatches/config-example.conf (I assume you are using that default one) - what is your build hardware? What I am doing: Well, I see that can be kind of vague. I set up a build, that doesn't require user interaction: ./compile.sh EXPORT="yes" BOARD="bananapim2zero" BRANCH="current" RELEASE="buster" KERNEL_ONLY="no" KERNEL_CONFIGURE="no" INSTALL_HEADERS="yes" BUILD_DESKTOP="no" BUILD_MINIMAL="no" EXTERNAL="yes" CREATE_PATCHES="no" The only changes I am trying to make right now is to customize-image.sh. Custom file copies, and some package installs, etc. I am tweaking that, at the cost of 30-40m (plus image transfer to another system and SDcard write time) My userpatches/config-example.conf: # Read build script documentation https://docs.armbian.com/Developer-Guide_Build-Options/ # for detailed explanation of these options and for additional options not listed here KERNEL_ONLY="" # leave empty to select each time, set to "yes" or "no" to skip dialog prompt KERNEL_CONFIGURE="" # leave empty to select each time, set to "yes" or "no" to skip dialog prompt #CLEAN_LEVEL="make,debs,oldcache" # comma-separated list of clean targets: "make" = make clean for selected kernel and u-boot, CLEAN_LEVEL="" # "debs" = delete packages in "./output/debs" for current branch and family, # "alldebs" = delete all packages in "./output/debs", "images" = delete "./output/images", # "cache" = delete "./output/cache", "sources" = delete "./sources" # "oldcache" = remove old cached rootfs except for the newest 8 files DEST_LANG="en_US.UTF-8" # sl_SI.UTF-8, en_US.UTF-8 # advanced EXTERNAL_NEW="prebuilt" # compile and install or install prebuilt additional packages INSTALL_HEADERS="" # install kernel headers package LIB_TAG="master" # change to "branchname" to use any branch currently available. USE_TORRENT="yes" # use torrent network for faster toolchain and cache download DOWNLOAD_MIRROR="" # set to "china" to use mirrors.tuna.tsinghua.edu.cn CARD_DEVICE="" # device name /dev/sdx of your SD card to burn directly to the card when done PROGRESS_LOG_TO_FILE="yes" # comment/uncomment these to rebuild IGNORE_UPDATES="yes" #CLEAN_LEVEL="make,debs,oldcache" Finally, my build hardware is a little dated, and it's a VM. However, during this process, there are no longer any compilations. There are some packages being retrieved (despite IGNORE_UPDATES being "yes"). My latest output logs: ## BUILD SCRIPT ENVIRONMENT Repository: Version: Host OS: bionic Host arch: amd64 Host system: Linux bionic 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Virtualization type: kvm ## Build script directories Build directory is located on: TARGET SOURCE FSTYPE AVAIL / /dev/vda1 ext4 69.2G Build directory permissions: # file: /usr/src/armbian/build # owner: root # group: root user::rwx group::r-x other::r-x Temp directory permissions: # file: /usr/src/armbian/build/.tmp # owner: root # group: root user::rwx group::rwx other::r-x ## BUILD CONFIGURATION Build target: Board: bananapim2zero Branch: current Minimal: no Desktop: no Kernel configuration: Repository: https://github.com/megous/linux Branch: branch:orange-pi-5.4 480000 - 1400000 with ondemand Displaying message: Preparing host info Displaying message: Build host OS release bionic info Displaying message: Syncing clock host info Displaying message: Checking for external GCC compilers info Displaying message: Starting rootfs and image building process for bananapim2zero buster info Displaying message: Checking for local cache buster-cli-armhf.881...e08.tar.lz4 info Displaying message: Extracting buster-cli-armhf.881...e08.tar.lz4 6 days old info Displaying message: Adding Armbian repository and authentication key /etc/apt/sources.list.d/armbian.list info Displaying message: Applying distribution specific tweaks for buster info Displaying message: Applying common tweaks info Displaying message: Installing linux-image-current-sunxi_20.05.0-trunk_armhf.deb Displaying message: Installing linux-u-boot-current-bananapim2zero_20.05.0-trunk_armhf.deb Displaying message: Installing linux-headers-current-sunxi_20.05.0-trunk_armhf.deb Displaying message: Installing armbian-config_20.05.0-trunk_all.deb Displaying message: Installing armbian-firmware_20.05.0-trunk_all.deb Displaying message: Installing linux-dtb-current-sunxi_20.05.0-trunk_armhf.deb Displaying message: Installing linux-buster-root-current-bananapim2zero_20.05.0-trunk_armhf.deb Displaying message: Enabling serial console ttyS0 info Displaying message: Enabling serial console ttyGS0 info Displaying message: Installing additional packages EXTERNAL_NEW Displaying message: Calling image customization script customize-image.sh info Displaying message: Unmounting /usr/src/armbian/build/.tmp/rootfs-current-bananapim2zero-buster-no-no info Displaying message: Preparing image file for rootfs bananapim2zero buster info Displaying message: Current rootfs size 1263 MiB info Displaying message: Creating blank image for rootfs 1584 MiB info Displaying message: Creating partitions root: ext4 info Displaying message: Creating rootfs ext4 on /dev/loop0p1 Displaying message: Copying files to root directory Displaying message: Copying files to /boot directory Displaying message: Updating initramfs... update-initramfs -uv -k 5.4.21-sunxi Displaying message: Updated initramfs. for details see: /usr/src/armbian/build/output/debug/install.log ext Displaying message: Unmounting /usr/src/armbian/build/.tmp/mount-current-bananapim2zero-buster-no-no/ info Displaying message: Free space: SD card info Displaying message: Writing U-boot bootloader /dev/loop0 info Displaying message: Fingerprinting Displaying message: Done building /usr/src/armbian/build/output/images/Armbian_20.05.0-trunk_Bananapim2zero_buster_current_5.4.21.img info Displaying message: Runtime 37 min info Displaying message: Repeat Build Options ./compile.sh BOARD=bananapim2zero BRANCH=current RELEASE=buster BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no info
Igor Posted February 27, 2020 Posted February 27, 2020 9 minutes ago, Jason Gauthier said: I am tweaking that, at the cost of 30-40m 10 minutes ago, Jason Gauthier said: my build hardware is a little dated, and it's a VM. This is quite normal. I need 12 minutes for the same task together with SD writing and verifying - fastest desktop class hardware, native building. But the biggest problem is exactly Debian package manager - which is slow / uses only one core and if we stick to Debian there is nothing we can do about. At least not without serious investment into the core.
jgauthier Posted February 27, 2020 Author Posted February 27, 2020 6 minutes ago, Igor said: This is quite normal. I need 12 minutes for the same task together with SD writing and verifying - fastest desktop class hardware, native building. But the biggest problem is exactly Debian package manager - which is slow / uses only one core and if we stick to Debian there is nothing we can do about. At least not without serious investment into the core. Okay, thanks so much! I noticed it does seem to be very slow while doing the packages. I appreciate the input.
Recommended Posts