Re: Quick test building a module cross all targets and architectures
On 10/27/15 17:16, Hans Petter Selasky wrote: On 10/27/15 16:49, John Baldwin wrote: With MAKE_JUST_WORLDS you would only build a "generic" module once per architecture. That savings is likely far more than the cost of the additional tools. I will try it out. Thanks for your hints and tips. Hi, Running: make buildworld TARGET=arm TARGET_ARCH=armv6 MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=linuxkpi -DNO_CLEAN I get: -- stage 4.4: building everything -- cd /usr/img/freebsd; MAKEOBJDIRPREFIX=/usr/obj/arm.armv6 MACHINE_ARCH=armv6 MACHINE=arm CPUTYPE= GROFF_BIN_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/share/tmac _LDSCRIPTROOT= INSTALL="sh /usr/img/freebsd/tools/install.sh" PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/sbin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/bin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/usr/sbin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " DEPFLAGS="" CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP=objdump OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size" make -f Makefile.inc1 DESTDIR=/usr/obj/arm.armv6/usr/img/freebsd/tmp par-all ===> sys/modules (all) ===> sys/modules/linuxkpi (all) cc -O -pipe -mfloat-abi=softfp -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/include -I. -I/usr/img/freebsd/sys/modules/linuxkpi/../.. -fno-common -funwind-tables -ffreestanding -fwrapv -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -mllvm -arm-use-movt=0 -mfpu=none -std=iso9899:1999 -c /usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c -o linux_compat.o In file included from /usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:38: In file included from /usr/img/freebsd/sys/modules/linuxkpi/../../sys/proc.h:66: In file included from /usr/img/freebsd/sys/modules/linuxkpi/../../sys/_vm_domain.h:34: In file included from /usr/img/freebsd/sys/modules/linuxkpi/../../sys/seq.h:70: ./machine/cpu.h:22:9: error: implicit declaration of function 'cp15_pmccntr_get' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return cp15_pmccntr_get(); ^ 1 error generated. *** Error code 1 And when running: make -DNO_CLEAN -j6 universe MAKE_JUST_KERNELS=yes MODULES_OVERRIDE=linuxkpi With my "sys/conf/kern.post.mk" patch, it passes all the variants. Is this the expected behaviour or a bug somewhere? --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On Tue, 2015-11-03 at 13:24 +0100, Hans Petter Selasky wrote: > On 10/27/15 17:16, Hans Petter Selasky wrote: > > On 10/27/15 16:49, John Baldwin wrote: > > > With MAKE_JUST_WORLDS you would only build > > > a "generic" module once per architecture. That savings is likely > > > far > > > more > > > than the cost of the additional tools. > > > > I will try it out. Thanks for your hints and tips. > > > > Hi, > > Running: > > make buildworld TARGET=arm TARGET_ARCH=armv6 MAKE_JUST_WORLDS=yes > SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=linuxkpi -DNO_CLEAN > > I get: > > > -- > > > > > stage 4.4: building everything > > -- > > cd /usr/img/freebsd; MAKEOBJDIRPREFIX=/usr/obj/arm.armv6 > > MACHINE_ARCH=armv6 MACHINE=arm CPUTYPE= > > GROFF_BIN_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bi > > n > > GROFF_FONT_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/ > > share/groff_font > > GROFF_TMAC_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/ > > share/tmac _LDSCRIPTROOT= INSTALL="sh > > /usr/img/freebsd/tools/install.sh" > > PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/sbin:/usr/o > > bj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bin:/usr/obj/arm.armv6/ > > usr/img/freebsd/tmp/legacy/bin:/usr/obj/arm.armv6/usr/img/freebsd/t > > mp/usr/sbin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/usr/bin:/sbin:/b > > in:/usr/sbin:/usr/bin CC="cc " CXX="c++ " DEPFLAGS="" CPP="cpp " > > AS="as" AR="ar" LD="ld" NM=nm OBJDUMP=objdump OBJCOPY="objcopy" > > RANLIB=ranlib STRINGS= SIZE="size" make -f Makefile.inc1 > > DESTDIR=/usr/obj/arm.armv6/usr/img/freebsd/tmp par-all > > ===> sys/modules (all) > > ===> sys/modules/linuxkpi (all) > > cc -O -pipe -mfloat-abi=softfp -Werror -D_KERNEL -DKLD_MODULE > > -nostdinc > > -I/usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/commo > > n/include -I. -I/usr/img/freebsd/sys/modules/linuxkpi/../.. -fno > > -common -funwind-tables -ffreestanding -fwrapv -Wall -Wredundant > > -decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > > -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign > > -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs > > -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error > > -tautological-compare -Wno-error-empty-body -Wno-error-parentheses > > -equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno > > -error-shift-negative-value -mllvm -arm-use-movt=0 -mfpu=none > > -std=iso9899:1999 -c > > /usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/ > > src/linux_compat.c -o linux_compat.o > > In file included from > > /usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/ > > src/linux_compat.c:38: > > In file included from > > /usr/img/freebsd/sys/modules/linuxkpi/../../sys/proc.h:66: > > In file included from > > /usr/img/freebsd/sys/modules/linuxkpi/../../sys/_vm_domain.h:34: > > In file included from > > /usr/img/freebsd/sys/modules/linuxkpi/../../sys/seq.h:70: > > ./machine/cpu.h:22:9: error: implicit declaration of function > > 'cp15_pmccntr_get' is invalid in C99 > > [-Werror,-Wimplicit-function-declaration] > > return cp15_pmccntr_get(); > >^ > > 1 error generated. > > *** Error code 1 > > And when running: > > make -DNO_CLEAN -j6 universe MAKE_JUST_KERNELS=yes > MODULES_OVERRIDE=linuxkpi > > With my "sys/conf/kern.post.mk" patch, it passes all the variants. > > > Is this the expected behaviour or a bug somewhere? > > > --HPS The only way that error can happen is if _KERNEL is defined and __ARM_ARCH is not >= 6 at that point in the compile. The __ARM_ARCH symbol is set by the compiler and/or acle-compat.h (acle-compat translates old gcc-style arm arch symbols to new-style). Hmm, and looking at that output some more, we have CC="cc " CXX="c++ " etc, so it's not using the cross-compiler and __ARM_ARCH will be zero. Why it's using the wrong compiler is a question I'll leave for Warner or someone else who understands module building better. -- Ian ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On 10/26/15 19:03, John Baldwin wrote: On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote: Hi, We have NO_MODULES for building kernel without modules, but no NO_KERNEL to only build the modules. What do you think about the following patch: diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index ddf828e..f0920df 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} .for target in all clean cleandepend cleandir clobber depend install \ obj reinstall tags +.if !defined(NO_KERNEL) ${target}: kernel-${target} +.else +${target}: +.endif .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) ${target}: modules-${target} modules-${target}: It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES to be built with universe in very little time. This can save a lot of build time when changes are limited to a set of kernel modules. Can you just use something like MODULES_WITH_WORLD instead? make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=foo (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE directly?) make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo Hi John, The command you suggested will re-build all the cross-tools, which is not what I want. --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On 10/26/15 19:23, Konstantin Belousov wrote: On Mon, Oct 26, 2015 at 11:03:07AM -0700, John Baldwin wrote: On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote: Hi, We have NO_MODULES for building kernel without modules, but no NO_KERNEL to only build the modules. What do you think about the following patch: diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index ddf828e..f0920df 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} .for target in all clean cleandepend cleandir clobber depend install \ obj reinstall tags +.if !defined(NO_KERNEL) ${target}: kernel-${target} +.else +${target}: +.endif .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) ${target}: modules-${target} modules-${target}: It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES to be built with universe in very little time. This can save a lot of build time when changes are limited to a set of kernel modules. Can you just use something like MODULES_WITH_WORLD instead? make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=foo (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE directly?) make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo In any variant, this proposal sounds strange. Almost all in-kernel code is compiled both for kernel and for modules. I am only aware of exceptions for i915kms, which was done for a reason which is no longer valid. In other words, if your goal is to check that the change does not break compilation of some kernel code, then it is wrong to not compile kernels. Note that kernel and modules compilation environments are differrent. Hi, I understand that the compilation environments are different. How would you suggest to build-test a handful of C-files under a single device keyword and associated kernel module cross all kernels we have in a 10-minutes time-frame? MODULES_OVERRIDE can be defined from within kernel configs aswell, so possibly a MODULES_OVERRIDE_OVERRIDE is needed for this kind of feature. How about some kind of KERNCONF_APPEND= parameter, which contains instructions for "config" to only emit a single device keyword, yet, keeping all options and parameters. --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On 10/27/15 13:16, Konstantin Belousov wrote: On Tue, Oct 27, 2015 at 10:31:26AM +0100, Hans Petter Selasky wrote: I understand that the compilation environments are different. How would you suggest to build-test a handful of C-files under a single device keyword and associated kernel module cross all kernels we have in a 10-minutes time-frame? MODULES_OVERRIDE can be defined from within kernel configs aswell, so possibly a MODULES_OVERRIDE_OVERRIDE is needed for this kind of feature. How about some kind of KERNCONF_APPEND= parameter, which contains instructions for "config" to only emit a single device keyword, yet, keeping all options and parameters. Did you tried to pass -DNO_CLEAN -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ options for make universe over the already built tree ? When I develop, I use make buildkernel -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ unless I change config, or add a file, or add a module etc. This combination gives me seconds for whole kernel and modules rebuild time when I know that the build metadata, i.e. files participating in the build, and the build options, did not changed from the latest full rebuild. I think that a similar trick should work with make universe, it might be somewhat more involved to properly pass the directions, may be not. But it should give the build time in the range of tens of minutes, indeed. Hi Konstantin, You will need an initial complete universe build which compiles to be able to use these options. Not all C-files have a dependency rule, possibly due to a lack of functionality in "config". I've burnt a few times with -DNO_CLEAN in the past because of "no-depend" keywords in sys/conf/files . In other words: make buildkernel -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ Is not the same like: > make buildkernel And especially before commit. The most promising in this thread so far is: make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=foo --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On 10/27/15 13:16, Konstantin Belousov wrote: On Tue, Oct 27, 2015 at 10:31:26AM +0100, Hans Petter Selasky wrote: I understand that the compilation environments are different. How would you suggest to build-test a handful of C-files under a single device keyword and associated kernel module cross all kernels we have in a 10-minutes time-frame? MODULES_OVERRIDE can be defined from within kernel configs aswell, so possibly a MODULES_OVERRIDE_OVERRIDE is needed for this kind of feature. How about some kind of KERNCONF_APPEND= parameter, which contains instructions for "config" to only emit a single device keyword, yet, keeping all options and parameters. Did you tried to pass -DNO_CLEAN -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ options for make universe over the already built tree ? When I develop, I use make buildkernel -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ unless I change config, or add a file, or add a module etc. This combination gives me seconds for whole kernel and modules rebuild time when I know that the build metadata, i.e. files participating in the build, and the build options, did not changed from the latest full rebuild. I think that a similar trick should work with make universe, it might be somewhat more involved to properly pass the directions, may be not. But it should give the build time in the range of tens of minutes, indeed. Hi Konstantin, You will need an initial complete universe build which compiles to be able to use these options. Not all C-files have a dependency rule, possibly due to a lack of functionality in "config". I've burnt a few times with -DNO_CLEAN in the past because of "no-depend" keywords in sys/conf/files . In other words: make buildkernel -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ Is not the same like: make buildkernel And especially before commit. The most promising in this thread so far is: make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=foo --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On Tue, Oct 27, 2015 at 10:31:26AM +0100, Hans Petter Selasky wrote: > I understand that the compilation environments are different. > > How would you suggest to build-test a handful of C-files under a single > device keyword and associated kernel module cross all kernels we have in > a 10-minutes time-frame? MODULES_OVERRIDE can be defined from within > kernel configs aswell, so possibly a MODULES_OVERRIDE_OVERRIDE is needed > for this kind of feature. How about some kind of KERNCONF_APPEND= > parameter, which contains instructions for "config" to only emit a > single device keyword, yet, keeping all options and parameters. Did you tried to pass -DNO_CLEAN -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ options for make universe over the already built tree ? When I develop, I use make buildkernel -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND -DNO_KERNELOBJ unless I change config, or add a file, or add a module etc. This combination gives me seconds for whole kernel and modules rebuild time when I know that the build metadata, i.e. files participating in the build, and the build options, did not changed from the latest full rebuild. I think that a similar trick should work with make universe, it might be somewhat more involved to properly pass the directions, may be not. But it should give the build time in the range of tens of minutes, indeed. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On Tue, 2015-10-27 at 14:00 +0100, Hans Petter Selasky wrote: > On 10/27/15 13:16, Konstantin Belousov wrote: > > On Tue, Oct 27, 2015 at 10:31:26AM +0100, Hans Petter Selasky > > wrote: > > > I understand that the compilation environments are different. > > > > > > How would you suggest to build-test a handful of C-files under a > > > single > > > device keyword and associated kernel module cross all kernels we > > > have in > > > a 10-minutes time-frame? MODULES_OVERRIDE can be defined from > > > within > > > kernel configs aswell, so possibly a MODULES_OVERRIDE_OVERRIDE is > > > needed > > > for this kind of feature. How about some kind of KERNCONF_APPEND= > > > parameter, which contains instructions for "config" to only emit > > > a > > > single device keyword, yet, keeping all options and parameters. > > > > Did you tried to pass > > -DNO_CLEAN -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KERNELDEPEND > > -DNO_KERNELOBJ > > options for make universe over the already built tree ? > > > > When I develop, I use > > make buildkernel -DNO_KERNELCLEAN -DNO_KERNELCONFIG > > -DNO_KERNELDEPEND -DNO_KERNELOBJ > > unless I change config, or add a file, or add a module etc. This > > combination gives me seconds for whole kernel and modules rebuild > > time > > when I know that the build metadata, i.e. files participating in > > the > > build, and the build options, did not changed from the latest full > > rebuild. > > > > I think that a similar trick should work with make universe, it > > might be > > somewhat more involved to properly pass the directions, may be not. > > But > > it should give the build time in the range of tens of minutes, > > indeed. > > Hi Konstantin, > > You will need an initial complete universe build which compiles to be > able to use these options. > No, just a "make kernel-toolchains" which is noticibly faster than universe. You can add TARGETS=arm to get just the toolchains for the arm arches, or TARGET_ARCH=amd64 to get just that one arch. Building kernel toolchains for all arches means building clang many times, but it's something you only have to do a few times a year when a new version of clang is imported. > Not all C-files have a dependency rule, possibly due to a lack of > functionality in "config". I've burnt a few times with -DNO_CLEAN in > the > past because of "no-depend" keywords in sys/conf/files . > > In other words: > > make buildkernel -DNO_KERNELCLEAN -DNO_KERNELCONFIG > > -DNO_KERNELDEPEND -DNO_KERNELOBJ > > Is not the same like: > > make buildkernel > > And especially before commit. > > The most promising in this thread so far is: > > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules > > MODULES_OVERRIDE=foo Certainly it's *possible* to have a problem building kernels with NO_CLEAN, but IMO it's just not right to elevate that possibility into anything like a serious problem. I do NO_CLEAN builds literally dozens of times a day, across all arches. I can't remember the last time I had a problem. When it does cause a problem, or when I've made big changes that might require regenerating dependencies, I just rm -rf the kernel dir(s) within $OBJDIR and the next build takes 40 seconds instead of 7, or if doing all arch kernels and they're all removed, it takes maybe 15 minutes, but that's something I only do once every few weeks. BTW, MODULES_OVERRIDE on the command line already overrides the one in the config file. -- Ian ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On Tuesday, October 27, 2015 10:06:41 AM Hans Petter Selasky wrote: > On 10/26/15 19:03, John Baldwin wrote: > > On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote: > >> Hi, > >> > >> We have NO_MODULES for building kernel without modules, but no NO_KERNEL > >> to only build the modules. > >> > >> What do you think about the following patch: > >> > >>> diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk > >>> index ddf828e..f0920df 100644 > >>> --- a/sys/conf/kern.post.mk > >>> +++ b/sys/conf/kern.post.mk > >>> @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} > >>> > >>> .for target in all clean cleandepend cleandir clobber depend install \ > >>> obj reinstall tags > >>> +.if !defined(NO_KERNEL) > >>> ${target}: kernel-${target} > >>> +.else > >>> +${target}: > >>> +.endif > >>> .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && > >>> exists($S/modules) > >>> ${target}: modules-${target} > >>> modules-${target}: > >> > >> It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES > >> to be built with universe in very little time. This can save a lot of > >> build time when changes are limited to a set of kernel modules. > > > > Can you just use something like MODULES_WITH_WORLD instead? > > > > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules > > MODULES_OVERRIDE=foo > > > > (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE > > directly?) > > > > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo > > > > Hi John, > > The command you suggested will re-build all the cross-tools, which is > not what I want. NO_CLEAN=yes? You have to build all the compilers no matter what, and for incremental builds once you have NO_CLEAN=yes you only have to build it once. Having a NO_KERNEL for buildkernel just seems rather obscure. You still have to have a config file (even if it's the implicit GENERIC). Also, with your change, you will still build the module umpteen times (once for each kernel, so about 80 times on arm, etc.). With MAKE_JUST_WORLDS you would only build a "generic" module once per architecture. That savings is likely far more than the cost of the additional tools. -- John Baldwin ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On 10/27/15 16:49, John Baldwin wrote: With MAKE_JUST_WORLDS you would only build a "generic" module once per architecture. That savings is likely far more than the cost of the additional tools. I will try it out. Thanks for your hints and tips. --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
+1 to this thankyou! -adrian On 26 October 2015 at 02:11, Hans Petter Selaskywrote: > Hi, > > We have NO_MODULES for building kernel without modules, but no NO_KERNEL to > only build the modules. > > What do you think about the following patch: > >> diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk >> index ddf828e..f0920df 100644 >> --- a/sys/conf/kern.post.mk >> +++ b/sys/conf/kern.post.mk >> @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} >> >> .for target in all clean cleandepend cleandir clobber depend install \ >> obj reinstall tags >> +.if !defined(NO_KERNEL) >> ${target}: kernel-${target} >> +.else >> +${target}: >> +.endif >> .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && >> exists($S/modules) >> ${target}: modules-${target} >> modules-${target}: > > > It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES to > be built with universe in very little time. This can save a lot of build > time when changes are limited to a set of kernel modules. > > --HPS > ___ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On 26 October 2015 at 11:23, Konstantin Belousovwrote: > On Mon, Oct 26, 2015 at 11:03:07AM -0700, John Baldwin wrote: >> On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote: >> > Hi, >> > >> > We have NO_MODULES for building kernel without modules, but no NO_KERNEL >> > to only build the modules. >> > >> > What do you think about the following patch: >> > >> > > diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk >> > > index ddf828e..f0920df 100644 >> > > --- a/sys/conf/kern.post.mk >> > > +++ b/sys/conf/kern.post.mk >> > > @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} >> > > >> > > .for target in all clean cleandepend cleandir clobber depend install \ >> > > obj reinstall tags >> > > +.if !defined(NO_KERNEL) >> > > ${target}: kernel-${target} >> > > +.else >> > > +${target}: >> > > +.endif >> > > .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && >> > > exists($S/modules) >> > > ${target}: modules-${target} >> > > modules-${target}: >> > >> > It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES >> > to be built with universe in very little time. This can save a lot of >> > build time when changes are limited to a set of kernel modules. >> >> Can you just use something like MODULES_WITH_WORLD instead? >> >> make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules >> MODULES_OVERRIDE=foo >> >> (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE >> directly?) >> >> make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo >> > > In any variant, this proposal sounds strange. Almost all in-kernel > code is compiled both for kernel and for modules. I am only aware of > exceptions for i915kms, which was done for a reason which is no longer > valid. In other words, if your goal is to check that the change does not > break compilation of some kernel code, then it is wrong to not compile > kernels. > > Note that kernel and modules compilation environments are differrent. No, the goal isn't that - it's to do things like "let's recompile usb + usb modules, unload, load to test." It's not a substitute for the "test a full build"; it's for testing things that are easily tested as modules - usb, wlan, etc. -a ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote: > Hi, > > We have NO_MODULES for building kernel without modules, but no NO_KERNEL > to only build the modules. > > What do you think about the following patch: > > > diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk > > index ddf828e..f0920df 100644 > > --- a/sys/conf/kern.post.mk > > +++ b/sys/conf/kern.post.mk > > @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} > > > > .for target in all clean cleandepend cleandir clobber depend install \ > > obj reinstall tags > > +.if !defined(NO_KERNEL) > > ${target}: kernel-${target} > > +.else > > +${target}: > > +.endif > > .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && > > exists($S/modules) > > ${target}: modules-${target} > > modules-${target}: > > It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES > to be built with universe in very little time. This can save a lot of > build time when changes are limited to a set of kernel modules. Can you just use something like MODULES_WITH_WORLD instead? make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=foo (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE directly?) make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo -- John Baldwin ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Quick test building a module cross all targets and architectures
On Mon, Oct 26, 2015 at 11:03:07AM -0700, John Baldwin wrote: > On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote: > > Hi, > > > > We have NO_MODULES for building kernel without modules, but no NO_KERNEL > > to only build the modules. > > > > What do you think about the following patch: > > > > > diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk > > > index ddf828e..f0920df 100644 > > > --- a/sys/conf/kern.post.mk > > > +++ b/sys/conf/kern.post.mk > > > @@ -32,7 +32,11 @@ KERN_DEBUGDIR?= ${DEBUGDIR} > > > > > > .for target in all clean cleandepend cleandir clobber depend install \ > > > obj reinstall tags > > > +.if !defined(NO_KERNEL) > > > ${target}: kernel-${target} > > > +.else > > > +${target}: > > > +.endif > > > .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && > > > exists($S/modules) > > > ${target}: modules-${target} > > > modules-${target}: > > > > It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES > > to be built with universe in very little time. This can save a lot of > > build time when changes are limited to a set of kernel modules. > > Can you just use something like MODULES_WITH_WORLD instead? > > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules > MODULES_OVERRIDE=foo > > (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE > directly?) > > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo > In any variant, this proposal sounds strange. Almost all in-kernel code is compiled both for kernel and for modules. I am only aware of exceptions for i915kms, which was done for a reason which is no longer valid. In other words, if your goal is to check that the change does not break compilation of some kernel code, then it is wrong to not compile kernels. Note that kernel and modules compilation environments are differrent. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"