From nobody Tue Jun 03 18:08:58 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bBdyN4K3mz5xxk3 for ; Tue, 03 Jun 2025 18:09:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-21.consmr.mail.gq1.yahoo.com (sonic309-21.consmr.mail.gq1.yahoo.com [98.137.65.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bBdyN2NhQz45dB for ; Tue, 03 Jun 2025 18:09:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1748974150; bh=jlhBz6+LmaiiirdfqRWikk5/svL7FgBnJHn9Endk/ng=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=EFQyevPjrHFblHK5REQvS9ZopV8lymAVCiAnXX6VONQgV6BGBcaolCZ2uZkJz9HIWlXKK+D34XTkLr2DLqpEbMer0a+XgTvZrh7eJRnlQ+nqXM/Blm8WOUv6lteiarlJWE+r0WTS8nWxR6QIeGlIEKnSsWN6babrBs4o6RsMaoITK5k2WA1gQCCxl70Tom+mKwLzkcWeiseznpFviDsW1rC8roNkaB9zUsJGNDvs6Fy6pix2KX/lijXmEZ6XIBlthxV9ucdw7Tnma+NnUA4B8Wat2mZYcMm4CB7HWGqWArdhJMgw19o2uOT7WEgxNtAU69Js58eKoONY5geord6fNA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1748974150; bh=jk4T0mumce2aboQVI7ijcyBG/LEnzYE4yYLwSwXH5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WZ2713iGxC_rxfraluaqW.4Jnf0v55_83kfTitgVV8.wQkhKqJmTsia6 nvpyvIibCz.koHzPlX7pUzSum_e3lEvAagyrflFlSykobblu8Sp2.dejDIaqTo61nzr1TSbV2sMw dgU3xN56XIpMbtZGkxwyUo3lbXfyET6utPzRYRI9AEiAIFKZyJqk.xr0madVNIPjp7u5UMjGb470 wCqrAlb5bX_I999aTa4ASHd2EwwamhxUt6JdqspeJsF8UFfvOcoT.StkDtkmpYlMexbAbqMduvqw 2CSlweUw80xW29z.V919_Hxusr_aQ_Tswok8pzOXEM4YZyW4YpYyNEDTlWMsdiWrxnrWNtei.XmK xqqHjMW25Qzb.kDDS8espq4nnhjUyTeYAxAjz.f0e4ouNqrcDQ3bQRDqqaONEhkSy_XH8Num7IAn 7pbb9D0cBDZSU_EzpZGbpS8fSaNfUcV1WqaVBl.m0iPNJZWjtlkwl9eR4ELeg9aqe.WUki656NZT TlIaHm7A2rT4uki51m4qtPaHaCziV.vc7BeZdyJyG.PyAZt_D2F5LGIqqsPq6zY_sAhh5dHTEXKv 7Zxw.7JE- X-Sonic-MF: X-Sonic-ID: 862d0287-08b2-4f26-ac43-f1e972c75c76 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Tue, 3 Jun 2025 18:09:10 +0000 Received: by hermes--production-gq1-74d64bb7d7-s6s6l (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c7a2a85bbdc205bf870f3402d126f339; Tue, 03 Jun 2025 18:09:09 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: incremental bulds from scratch with beinstall.sh From: Mark Millard In-Reply-To: Date: Tue, 3 Jun 2025 11:08:58 -0700 Cc: "Simon J. Gerraty" , FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <5EED2C75-1540-4B73-85D3-54276D20BB50@yahoo.com> References: <28F2BDE7-5903-4C04-A570-6A407F19D5F2.ref@yahoo.com> <28F2BDE7-5903-4C04-A570-6A407F19D5F2@yahoo.com> <49396.1746554966@kaos.jnpr.net> <87401.1746562441@kaos.jnpr.net> <4ACBBC16-3BB6-436A-B0B1-A18F088B000E@yahoo.com> <4421.1746572832@kaos.jnpr.net> <2CA19E21-0F2F-465A-BE8E-81ACDEE42D23@yahoo.com> <10858.1746584427@kaos.jnpr.net> <27515.1747072855@kaos.jnpr.net> <3D5D0CE0-64A9-4A99-8282-61918987BA5C@yahoo.com> <8FA02BF7-2653-4B4A-8EFD-84C148473AF5@yahoo.com> <91572.1747150994@kaos.jnpr.net> <85314.1747165929@kaos.jnpr.net> To: Nuno Teixeira X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Rspamd-Queue-Id: 4bBdyN2NhQz45dB X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] On Jun 3, 2025, at 10:41, Nuno Teixeira wrote: >=20 > Hello! >=20 > https://reviews.freebsd.org/D50313 has been acepted and soon it will = be committed. That review has multiple changes for distinct issues. > I still have a lot of difficulties about how this works and how to be = configured. > Thinking if it will be some config examples be provided? I assume you are just after how to use the addition of SB_OBJROOT to share/mk/src.sys.obj.mk and to use .MAKE.META.IGNORE* variables to help cut down on META_MODE rebuild activity. In other words, for the part of the summary that says: QUOTE This allows SB_OBJROOT to be used in .MAKE.META.IGNORE* variables to tweak what should be considered as making a target out-of-date. END QUOTE I assume this because our past discussion has been about cutting down on META_MODE's amount of rebuilding, which is what .MAKE.META.IGNORE* variables can be used for. SB_OBJROOT allows avoiding: QUOTE The build varies MAKEOBJDIRPREFIX at times which can make it difficult to tack the original OBJROOT. END QUOTE So defining .MAKE.META.IGNORE* variables to involve the use of SB_OBJROOT instead keeps things working as MAKEOBJDIRPREFIX changes. That leads me to expect that it is really setting up overall use of .MAKE.META.IGNORE* variables that you want to learn about, with SB_OBJROOT use just being a (new) smaller detail involved in that. Sound right? > Thanks >=20 >> Simon J. Gerraty escreveu (ter=C3=A7a, 13/05/2025 = =C3=A0(s) 20:52): >> Mark Millard wrote: >> > > If you are going to head down that path, I would highly recommend >> > > using the 'mk' wrapper from >> > > https://www.crufty.net/ftp/pub/sjg/sb-tools.tar.gz >> > > We've used that model at work for over 20 years. >> > > Described in https://www.crufty.net/sjg/docs/sb-tools.htm >> > > >> > > In a nutshell; each tree has a .sandbox-env file which can tune = its >> > > environment (as well as mark the top of the "sandbox"). >> > > There are a plethora of other hooks to tune. >> > > I find it especially useful with Emac's M-x compile >> >=20 >> > I will take a look. >> >=20 >> > Using my aarch64 context as an example (it >> > has more variations than my amd64 >> > environment, since I do nothing for i386 >> > but aarch64 is also set up for armv7): >>=20 >> you can do combinations. >>=20 >> Eg Junos currently builds for last I counted, over 35 combinations of >> architecture and OS we provide symlinks to 'mk' to simply usage. >> Eg. you can always do 'mk --machine arm64,aarch64' but = 'mk-arm64,aarch64' is >> less typing and allows for auto-completion. >>=20 >> FreeBSD by uses MACHINE and MACHINE_ARCH as TARGET_SPEC_VARS, >> Junos however only supports a single MACHINE_ARCH per MACHINE but >> multiple TARGET_OS's (bsd15,bsd12,wrl9,...) so we use >> MACHINE and TARGET_OS as TARGET_SPEC_VARS. >>=20 >> You can of course extend that for your own use, so that you could = have >> mk --machine arm64,aarch64,something to set >> TARGET_SPEC=3Darm64,aarch64,something >>=20 >> but that assumes that the objects for arm64,aarch64,something should = be >> kept separate from those for arm64,aarch64,other >>=20 >> If "something" and "other" really represent things to be built for >> arm64,aarch64, then setting up targets for them is another option. >>=20 >> There is nothing to stop you of course from using any of the scripts >> below in conjuction with the setup supported by 'mk'. >>=20 >> Things that everyone is likely to need/use can/should be setup as >> targets so 'mk-arm64,aarch64 dbg-kernel' "just worked" >> but things that do not fit that criteria are better served as scripts >> such as you have. >>=20 >> This is in some way a reflection of the difference b/w an emedded = vendor >> who is typically only interested in a very small sub-set of the >> architectures supported by the project, but wants them handled the = same >> way by 100's if not 1000's of devs. Eg we put all our Juniper = specific >> targets under a juniper/ tree - that works with the same = DIRDEPS_BUILD >> bits as FreeBSD can. >>=20 >> > I have 8 aarch64 scripts that have the >> > likes of __MAKE_CONF (and more) specified >> > that do individual system builds of main's >> > kernel or world: >> >=20 >> > # ls -C1 ~/build-sys-*dbg-*.sh >> > /root/build-sys-main-CA7-dbg-kernel.sh >> > /root/build-sys-main-CA7-dbg-world.sh >> > /root/build-sys-main-CA7-nodbg-kernel.sh >> > /root/build-sys-main-CA7-nodbg-world.sh >> > /root/build-sys-main-CA76-dbg-kernel.sh >> > /root/build-sys-main-CA76-dbg-world.sh >> > /root/build-sys-main-CA76-nodbg-kernel.sh >> > /root/build-sys-main-CA76-nodbg-world.sh >> >=20 >> > The above in turn involve use of appropriate >> > files from: >> >=20 >> > # ls -C1 ~/src.configs/* >> > /root/src.configs/make.conf >> > /root/src.configs/src.conf.CA7-dbg-clang.aarch64-host >> > /root/src.configs/src.conf.CA7-nodbg-clang.aarch64-host >> > /root/src.configs/src.conf.CA76-dbg-clang.aarch64-host >> > /root/src.configs/src.conf.CA76-nodbg-clang.aarch64-host >> >=20 >> > ~/src.configs/make.conf is common to all 8. >>=20 >> Which is consistent with how one might setup a .sandbox-env for that >> tree - it might do nothing more than set >>=20 >> export __MAKE_CONF=3D$HOME/src.configs/make.conf >>=20 >> >=20 >> > They also use my git worktree: /usr/main-src/ >> >=20 >> > ( /usr/src/ is from PkgBase and, so, has no >> > .git/ repository. A different /usr/*-src/ >> > has the .git repository. ) >> >=20 >> >=20 >> > I also have 7 scripts that run more than >> > one of those ~/build-sys-*dbg-*.sh in a >> > sequence: >> >=20 >> > # ls -C1 ~/build-sys-*[67]-[kw]*.sh >> > /root/build-sys-main-CA7-kernel.sh >> > /root/build-sys-main-CA7-world-kernel.sh >> > /root/build-sys-main-CA7-world.sh >> > /root/build-sys-main-CA76-kernel.sh >> > /root/build-sys-main-CA76-world-kernel.sh >> > /root/build-sys-main-CA76-world.sh >> > /root/build-sys-main-CA76_CA7-world-kernel.sh >> >=20 >> > (Each of those 7 build both -dbg- and -nodbg- >> > variations.) >>=20 >> Sounds like something more suited to a set of targets - which could >> reduce redundant work? >>=20 >> >=20 >> >=20 >> > For reference: >> >=20 >> > CA76: cortex-a76 (aarch64) >> > CA7: cortex-a7 (armv7) >> >=20 >> > # ls -dC1 /usr/obj/BUILDs/*/ >> > /usr/obj/BUILDs/main-CA7-dbg-clang/ >> > /usr/obj/BUILDs/main-CA7-nodbg-clang/ >> > /usr/obj/BUILDs/main-CA76-dbg-clang/ >> > /usr/obj/BUILDs/main-CA76-nodbg-clang/ >> >=20 >> > I do not use ~/src.configs/make.conf with >> > poudriere-devel for package builds. I avoid >> > doing package builds outside of poudriere >> > in normal circumstances. >> >=20 >> > I normally do not build stable/* or releng/*.* >> > systems, just using official FreeBSD builds >> > for such. (Long ago I used to build more >> > variations.) >> >=20 >> > I only build amd64 systems on amd64; I only >> > build aarch64 and armv7 on aarch64. (Long >> > ago I used to cross build little endian >> > systems on amd64.) >>=20 >> We cross-build everything ;-) >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com