From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4h60Jj0yjfz2xPV for ; Fri, 24 Jul 2026 07:40:21 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4h60Jj0byxz2xMD for ; Fri, 24 Jul 2026 07:40:21 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [IPv6:2001:678:b28::161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bit raw public key) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "people01.haj.ipfire.org", Issuer "YE2" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4h60Jg4mblz2f3 for ; Fri, 24 Jul 2026 07:40:19 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1784878819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=WzLGp2iWUPDpoXTK0vNsjCz1zY6WFzkeVTXGu0jyWbQ=; b=Ek6+D4YNzeN/sMfdKI2f34DCM9KjeG3NXQC5vt6fElzM+oIPfN4qTjO1mVKVrea7szeR9f uG5kskrEju144RDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1784878819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=WzLGp2iWUPDpoXTK0vNsjCz1zY6WFzkeVTXGu0jyWbQ=; b=mY0RgT5ZtY1eWAR9NHHnh2ugDg3XbdWAWwELhqHDOFHN19TP9hZFi0uVnsniCbrvBBeXWD /lVj/6Tzn2ZY/3bSWRGhiiBnXfFCoRqmI6bVhVf27Ibl0rn4B3fkcn1IZpu/z5FgMdbstt 1POzbIQNsDCAzV/0GscMrn4LC2NpEzMsJaIiO2SFbpCbwnKIGAwwsgHL50INBfeCg/nnfZ RVjShC5ir4Uk6HlFjSPs4ZPRCkMqjhZ8Z77mYReE+fEPHNgaRlI4WwqBQOB4l01gUnxYlN wIXNRkdrqA17B4PsLhrZVBWAwuSaGFaIGZqctnhogbiAWgAOGH2m4CiArEU6ag== Received: by people01.haj.ipfire.org (Postfix, from userid 1001) id 4h60Jf4Nv5z2xVb; Fri, 24 Jul 2026 07:40:18 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. ae0abec969ad78675e2f9f6340e2137f599e3a43 X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: bba1a0a8b1141675ae463e8138b256a1f635c2ce X-Git-Newrev: ae0abec969ad78675e2f9f6340e2137f599e3a43 Message-Id: <4h60Jf4Nv5z2xVb@people01.haj.ipfire.org> Date: Fri, 24 Jul 2026 07:40:18 +0000 (UTC) From: Arne Fitzenreiter Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, next has been updated via ae0abec969ad78675e2f9f6340e2137f599e3a43 (commit) from bba1a0a8b1141675ae463e8138b256a1f635c2ce (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ae0abec969ad78675e2f9f6340e2137f599e3a43 Author: Arne Fitzenreiter Date: Fri Jul 24 09:35:55 2026 +0200 make.sh: reimplement usr ramdisk for /usr/src this save around 30GB writes per build. It is automatic enabled if the system has more than 10GB ram installed and can enforces if there more than 6GB installed by setting RAMDISK=on in .config It can also diabled via RAMDISK=off this is needed if you want extract changed file from build environment if an other shell. Signed-off-by: Arne Fitzenreiter ----------------------------------------------------------------------- Summary of changes: make.sh | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 10 deletions(-) Difference in files: diff --git a/make.sh b/make.sh index dfde840c2..6dffeac5c 100755 --- a/make.sh +++ b/make.sh @@ -270,6 +270,24 @@ print_build_summary() { print_status DONE } +cleanrd() { + if mountpoint "${BUILD_DIR}/usr/src" > /dev/null ; then + print_line "Unmount /usr/src ramdisk ..." + umount "${BUILD_DIR}/usr/src/cache" + umount "${BUILD_DIR}/usr/src/ccache" + umount "${BUILD_DIR}/usr/src/config" + umount "${BUILD_DIR}/usr/src/doc" + umount "${BUILD_DIR}/usr/src/html" + umount "${BUILD_DIR}/usr/src/images" + umount "${BUILD_DIR}/usr/src/langs" + umount "${BUILD_DIR}/usr/src/log" + umount "${BUILD_DIR}/usr/src/lfs" + umount "${BUILD_DIR}/usr/src/src" + umount "${BUILD_DIR}/usr/src" + print_status DONE + fi +} + exiterror() { # Dump logfile if [ -n "${LOGFILE}" ] && [ -e "${LOGFILE}" ]; then @@ -289,6 +307,8 @@ exiterror() { print_status FAIL done + cleanrd + exit 1 } @@ -373,16 +393,6 @@ prepareenv() { mkdir -p "${BUILD_DIR}/sys" mkdir -p "${BUILD_DIR}/tmp" mkdir -p "${BUILD_DIR}/usr/src" - mkdir -p "${BUILD_DIR}/usr/src/cache" - mkdir -p "${BUILD_DIR}/usr/src/ccache" - mkdir -p "${BUILD_DIR}/usr/src/config" - mkdir -p "${BUILD_DIR}/usr/src/doc" - mkdir -p "${BUILD_DIR}/usr/src/html" - mkdir -p "${BUILD_DIR}/usr/src/images" - mkdir -p "${BUILD_DIR}/usr/src/langs" - mkdir -p "${BUILD_DIR}/usr/src/lfs" - mkdir -p "${BUILD_DIR}/usr/src/log" - mkdir -p "${BUILD_DIR}/usr/src/src" # Make BUILD_DIR a mountpoint mount -o bind "${BUILD_DIR}" "${BUILD_DIR}" @@ -407,6 +417,26 @@ prepareenv() { mkdir -p "${BUILD_DIR}/proc" mount --bind "${BUILD_DIR}/proc" "${BUILD_DIR}/proc" + # Optionally make /usr/src a ramdisk for less disk I/O + if [ "${ENABLE_RAMDISK}" = "on" ]; then + print_line "Mounting /usr/src Ramdisk ..." + mount build_usr_src "${BUILD_DIR}/usr/src" \ + -t tmpfs -o size=8G,nr_inodes=1M,mode=1777 + print_status DONE + fi + + # Create directories in /usr/src + mkdir -p "${BUILD_DIR}/usr/src/cache" + mkdir -p "${BUILD_DIR}/usr/src/ccache" + mkdir -p "${BUILD_DIR}/usr/src/config" + mkdir -p "${BUILD_DIR}/usr/src/doc" + mkdir -p "${BUILD_DIR}/usr/src/html" + mkdir -p "${BUILD_DIR}/usr/src/images" + mkdir -p "${BUILD_DIR}/usr/src/langs" + mkdir -p "${BUILD_DIR}/usr/src/lfs" + mkdir -p "${BUILD_DIR}/usr/src/log" + mkdir -p "${BUILD_DIR}/usr/src/src" + # Make all sources and proc available under lfs build mount --bind /sys "${BUILD_DIR}/sys" mount --bind -o ro "${BASEDIR}/cache" "${BUILD_DIR}/usr/src/cache" @@ -2349,11 +2379,21 @@ SYSTEM_MEMORY="$(system_memory)" BUILD_ARCH="${HOST_ARCH}" CCACHE_CACHE_SIZE="4G" +# Auto use ramdisk the host system more than 10GB of RAM or more +if [ ${SYSTEM_MEMORY} -ge 10240 ]; then + ENABLE_RAMDISK="on" +fi + # Load configuration file if [ -f .config ]; then source .config fi +# Disable even enforced ramdisk if the system has less than 6GB of RAM +if [ ${SYSTEM_MEMORY} -lt 6200 ]; then + ENABLE_RAMDISK="off" +fi + # Parse any command line options (not commands) while [ $# -gt 0 ]; do case "${1}" in @@ -2475,6 +2515,23 @@ BUILDTARGET="${BUILD_ARCH}-pc-linux-gnu" # Use this as default PARALLELISM DEFAULT_PARALLELISM="${SYSTEM_PROCESSORS}" +# Unpacked and Compiled kernel needs 4300GB on Ramdisk +# and one thread around 850MB Ram +if [ "${ENABLE_RAMDISK}" = "on" ]; then + if [ $DEFAULT_PARALLELISM -gt $(((${SYSTEM_MEMORY}-4500)/850)) ]; then + DEFAULT_PARALLELISM=$(((${SYSTEM_MEMORY}-4500)/850)) + fi +else + if [ $DEFAULT_PARALLELISM -gt $((${SYSTEM_MEMORY}/850)) ]; then + DEFAULT_PARALLELISM=$((${SYSTEM_MEMORY}/850)) + fi +fi + +if [ $DEFAULT_PARALLELISM -lt 1 ]; then + DEFAULT_PARALLELISM=1 +fi + + # Limit lauched ninja build jobs to computed parallel value NINJAJOBS="${DEFAULT_PARALLELISM}" @@ -2557,6 +2614,9 @@ build) check_changed_rootfiles print_build_summary $(( SECONDS - START_TIME )) + + cleanrd + ;; tail) tail -F \ @@ -2573,6 +2633,7 @@ shell) # may be used to changed kernel settings prepareenv --network entershell + cleanrd ;; check) # Check for rootfile consistency @@ -2624,6 +2685,7 @@ toolchain) if ! compress_toolchain "${TOOLCHAIN}"; then exiterror "Could not compress toolchain" fi + cleanrd ;; gettoolchain) hooks/post-receive -- IPFire 2.x development tree