From nobody Sat Jul 31 03:14:26 2021 X-Original-To: bugs@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 85E9212ADAC0 for ; Sat, 31 Jul 2021 03:14:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gc8WQ3Gkxz4mgk for ; Sat, 31 Jul 2021 03:14:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58E74116FD for ; Sat, 31 Jul 2021 03:14:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 16V3EQCD084850 for ; Sat, 31 Jul 2021 03:14:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 16V3EQa5084848 for bugs@FreeBSD.org; Sat, 31 Jul 2021 03:14:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 257514] Can not embed ZFS into Kernel on RelEng/13.0 i386 Date: Sat, 31 Jul 2021 03:14:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: CrazyMihey@Ya.Ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257514 Bug ID: 257514 Summary: Can not embed ZFS into Kernel on RelEng/13.0 i386 Product: Base System Version: 13.0-RELEASE Hardware: i386 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: CrazyMihey@Ya.Ru Created attachment 226811 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D226811&action= =3Dedit Simplyfied Kernel Configuration, Full Building Process Results and System Information Hello, Developers! & Sorry, if I do SomeThing wrong. Some Time ago, on FreeBSD (at least 11.3 & 12.1 & 12.2) on x86 32-Bit I included ZFS Support into Custom Kernel in following Way: device zfs # in =C2=AB/usr/src/sys/i386/conf/CrazyBook=C2=BB But after DownLoading RelEng/13.0 Sources, This Kernel Configuration does n= ot Build any more. :( Process of Getting 13.0: pkg install gitup sed -E -i "" "s~(releng/)([\.\,0-9]*)~\113.0~" "/usr/local/etc/gitup.conf" $(whereis -b -q time) -l rm -rf /usr/src/* /usr/src/.[!.]* /usr/obj= /* /usr/obj/.[!.]* /usr/ports/* /usr/ports/.[!.]* "/var/db/portsnap" "/var/db/gitup" $(whereis -b -q time) -l gitup "release" -v "1" && rm -Rf "/var/db/gitup/release" && for ConfigurationPath in $(find "${Src%"/"}"/sys/*/conf -prune -print); do [ -f "${ConfigurationPath}/GENER= IC" ] && printf "\"%s\"\n" "${ConfigurationPath}" && ln -f -s -v ~/Kernels/* "${ConfigurationPath}"; done First Build the Compiler: cd "/usr/src" && script -a -q "/var/tmp/$(date -j "+%Y.%m.%d-%H:%M:%S")-BuildWorld-$(sh -c 'set -o "pipefail" && egrep -i -o "^[[:space:]]*#[[:space:]]*DeFine.*BSD.*Version[[:space:]]+[[:digit:]]+" "/usr/src/sys/sys/param.h" | rev | egrep -o "[[:digit:]]+" | head -n "1" | = rev | tr -d "[[:space:]]"' || svnlite info "/usr/src" 2>"/dev/null" | grep --ignore-case -- "RevisiOn" | grep --only-matching "[[:digit:]]\+" || cat "/usr/src/.svnversion" 2>"/dev/null" | tr -d "\r\n" | grep "" || cut -f "2"= -d ":" "/usr/src/.gituprevision")-$(( "$(sysctl -n "hw.realmem")" >> 30 ))GB-$(($(sysctl -n "kern.sched.topology_spec" 2>"/dev/null" | grep --extended-regexp --ignore-case --quiet ".*Thread.*Group.*" >"/dev/null" 2>&1 && printf "$(($(sysctl -n "kern.smp.cpus")/2))" || printf "$(sysctl -n "kern.smp.cpus")")+1))Th.Out" $(whereis -b -q time) -l make buildworld KERNCONF=3D"CrazyBook" -j "$(($(sysctl -n "kern.sched.topology_s= pec" 2>"/dev/null" | grep --extended-regexp --ignore-case --quiet ".*Thread.*Group.*" >"/dev/null" 2>&1 && printf "$(($(sysctl= -n "kern.smp.cpus")/2))" || printf "$(sysctl -n "kern.smp.cpus")")+1))" # I understand, the Command looks Ugly, but this is just a Part of Future Scrip= t, where Long Expressions will be moved into Functions or AliAces=E2=80=A6 To make sure about CLang Parameters, I removed Parameter Files =C2=AB/etc/s= rc.conf=C2=BB and =C2=AB/etc/make.conf=C2=BB: rm -Rf "/etc/src.conf" "/etc/make.conf" Second try to Build a Custom Kernel: cd "/usr/src" && script -a -q "/var/tmp/$(date -j "+%Y.%m.%d-%H:%M:%S")-BuildKernel-$(sh -c 'set -o "pipefail" && egrep -i -o "^[[:space:]]*#[[:space:]]*DeFine.*BSD.*Version[[:space:]]+[[:digit:]]+" "/usr/src/sys/sys/param.h" | rev | egrep -o "[[:digit:]]+" | head -n "1" | = rev | tr -d "[[:space:]]"' || svnlite info "/usr/src" 2>"/dev/null" | grep --ignore-case -- "RevisiOn" | grep --only-matching "[[:digit:]]\+" || cat "/usr/src/.svnversion" 2>"/dev/null" | tr -d "\r\n" | grep "" || cut -f "2"= -d ":" "/usr/src/.gituprevision")-$(( "$(sysctl -n "hw.realmem")" >> 30 ))GB-$(($(sysctl -n "kern.sched.topology_spec" 2>"/dev/null" | grep --extended-regexp --ignore-case --quiet ".*Thread.*Group.*" >"/dev/null" 2>&1 && printf "$(($(sysctl -n "kern.smp.cpus")/2))" || printf "$(sysctl -n "kern.smp.cpus")")+1))Th.Out" $(whereis -b -q time) -l make buildkernel KERNCONF=3D"CrazyBook" -j "$(($(sysctl -n "kern.sched.topology_= spec" 2>"/dev/null" | grep --extended-regexp --ignore-case --quiet ".*Thread.*Group.*" >"/dev/null" 2>&1 && printf "$(($(sysctl= -n "kern.smp.cpus")/2))" || printf "$(sysctl -n "kern.smp.cpus")")+1))" && pri= ntf "\007" && sleep "0.500" && printf "\007" && sleep "1.000" && printf "\007" = && sleep "2.000" && printf "\007" && sleep "4.000" && printf "\007" Now I get Following Error: =E2=80=A6 =E2=80=A6 =E2=80=A6 =E2=80=A6 --- opensolaris_atomic.o --- cc -target i386-unknown-freebsd13.0 --sysroot=3D/usr/obj/usr/src/i386.i386/= tmp -B/usr/obj/usr/src/i386.i386/tmp/usr/bin -c -x assembler-with-cpp -DLOCORE -DFREEBSD_NAMECACHE -D_SYS_VMEM_H_ -D__KERNEL -D__KERNEL__ -nostdinc=20 -include /usr/src/sys/modules/zfs/static_ccompile.h=20 -I/usr/src/sys/contrib/openzfs/include=20 -I/usr/src/sys/contrib/openzfs/include/os/freebsd=20 -I/usr/src/sys/contrib/openzfs/include/os/freebsd/spl=20 -I/usr/src/sys/contrib/openzfs/include/os/freebsd/zfs=20=20 -I/usr/src/sys/modules/zfs -I/usr/src/sys/contrib/openzfs/module/zstd/incl= ude=20 -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -MD=20 -MF.depend.opensolaris_atomic.o -MTopensolaris_atomic.o -fdebug-prefix-map=3D./machine=3D/usr/src/sys/i386/include -fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include -mno-mmx -mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-dec= ls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__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 -Wno-address-of-packed-member -Wno-format-zero-length -mno-aes -mno-avx=20 -std=3Diso9899:1999 -Wno-cast-qual -Wno-duplicate-decl-specifier -Wno-in= line=20 -Wno-missing-braces -Wno-missing-prototypes -Wno-nested-externs=20 -Wno-parentheses -Wno-pointer-arith -Wno-redundant-decls=20 -Wno-strict-prototypes -Wno-switch -Wno-undef -Wno-uninitialized=20 -Wno-unknown-pragmas -Wno-unused -include /usr/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h=20 -I/usr/src/sys/cddl/contrib/opensolaris/uts/common -I/usr/src/sys -I/usr/src/sys/cddl/compat/opensolaris -DBUILDING_ZFS -DHAVE_UIO_ZEROCOPY=20 -DWITH_NETDUMP -D__KERNEL__ -D_SYS_CONDVAR_H_ -DSMP -DIN_FREEBSD_BASE -DHAVE_KSID -DBITS_PER_LONG=3D32 -Werror /usr/src/sys/cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic= .S cc: error: no such file or directory: '/usr/src/sys/cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomi= c.S' cc: error: no input files *** [opensolaris_atomic.o] Error code 1 make[2]: stopped in /usr/obj/usr/src/i386.i386/sys/CrazyBook =E2=80=A6 =E2=80=A6 =E2=80=A6 =E2=80=A6 When I try to use =C2=ABoptions ZFS=C2=BB instead of =C2=ABdevice zfs=C2=BB= , or both in kernel Config, I get the same Error. The very Simplyfied Kernel Configuration, that Produces Described Error is attached to Message. Also attached Full =C2=ABMake BuildKernel=C2=BB OutPut= (Big File) and Current System =C2=ABkldstat -v=C2=BB, which shows that Modules =C2=ABz= fs_vdev=C2=BB, =C2=ABzfs_zvol=C2=BB, =C2=ABzfsctrl=C2=BB, =C2=ABzfs=C2=BB, =C2=ABopensolar= is=C2=BB are in =C2=AB/boot/kernel/kernel=C2=BB on 12.1, how to make the same in 13.0? I saw file =C2=AB/usr/src/sys/cddl/contrib/opensolaris/common/atomic/i386/opensolaris_= atomic.S=C2=BB in 12.2 Sources, but It was ReMoved in 13.0. I did not try to Copy this File from Previous Distributions, because IMHO this is a =C2=ABWrong Way=C2=BB. Why am I worried about This? 1. I Read that some Modules (for example, "IPFW", =E2=80=A6) work B= etter (Theoretically, Faster) when they are Embedded into the FreeBSD Kernel, tha= n if they are KLDLoaded during Boot. 2. SomeTimes (on Some Small-Disk Systems) is useful to make =C2=ABb= zip2 --best --verbose "/boot/kernel/kernel"=C2=BB, but It does not Work on =C2=AB/boot/kernel/*.ko=C2=BB. 3. Finally, It worked in Previous Versions of the System =E2=80=94 = so, Should work in 13.0 too. And the Solution, most likely, is not very Labor-Intensiv= e=E2=80=A6 What is the Best Way to Do in Case to Make the Kernel, including =C2=ABAll = Needed=C2=BB? is it safe to use: device zfs options KSTACK_PAGES=3D4 makeoptions WITHOUT_MODULES+=3D"opensolaris zfs" or better: options ZFS I did not Find some Detailed Documentation about This Parameters and what is the Difference between =C2=ABoptions ZFS=C2=BB and =C2=ABdevice zfs=C2=BB= =E2=80=A6 --=20 You are receiving this mail because: You are the assignee for the bug.=