make buildkernel KERNCONF=MYKERNEL.
its custom
This will build GENERIC kernel
to get custom kernel name
ident
should be modified accordingly
make buildkernel KERNCONF=MYKERNEL.
its custom
How do I remove src directory?Can you build a GENERIC kernel on your system? Remove src directory, create new one, checkout the 12.1:
svn checkout https://svn.freebsd.org/base/releng/12.1 /usr/src
Replace /etc/make.conf /etc/src.conf with default ones (not modified). Try to build a GENERIC kernel (no modifications). Report back the
Can you build a GENERIC kernel on your system? Remove src directory, create new one, checkout the 12.1:
svn checkout https://svn.freebsd.org/base/releng/12.1 /usr/src
Replace /etc/make.conf /etc/src.conf with default ones (not modified). Try to build a GENERIC kernel (no modifications). Report back the result.
.
How do I remove src directory?
rm -rf /usr/src
?rm: /usr/src: Device Busyrm -rf /usr/src
?
If I try to build kernel now it says that it doesn't know how to buildkernel.rm -rf /usr/src
?
Yes, obviously. You asked how to remove the source directory. If you removed that source directory where is it supposed to build from?If I try to build kernel now it says that it doesn't know how to buildkernel.
That only left the /usr/src directory itself, probably because you had a shell open in that directory (hence the "busy" error). Another reason could be ZFS, if /usr/src/ is a mounted ZFS dataset then you would get a "busy" too if you try to remove the mountpoint. Everything else inside the directory would still get removed though.
Okay, I still get the same message after deleting the usr/src and doing the check out again. Doesn't know how to build kernel.That only left the /usr/src directory itself, probably because you had a shell open in that directory (hence the "busy" error). Another reason could be the filesystem, if /usr/src/ is a mounted filesystem (ZFS, UFS) then you would get a "busy" too if you try to remove the mountpoint while it's mounted. Everything inside the directory would still get removed though.
That looks like you made a typo in the URL and put a space where a dot should be.Svn: E170013: Unable to connect to a repository at URL 'https://svn
Checked out revision 363360.
root@machine17:~ # cd /usr/src/sys/amd64/conf
root@machine17:/usr/src/sys/amd64/conf # make buildkernel KERNCONF=GENERIC
make: don't know how to make buildkernel. Stop
make: stopped in /usr/src/sys/amd64/conf
su -
cd /
tar -xvzf /usr/freebsd-dist/src.txz
su -
you can use sudo(8) or doas(8), if it's installed ( sudo -i
). pkg install {de,en}-freebsd-doc
, replace de with your native tongue & point your favorite browser to /usr/local/share/doc/freebsd. There's a chapter about building your kernel in the handbook.You're in the wrong directory.Code:Checked out revision 363360. root@machine17:~ # cd /usr/src/sys/amd64/conf root@machine17:/usr/src/sys/amd64/conf # make buildkernel KERNCONF=GENERIC make: don't know how to make buildkernel. Stop make: stopped in /usr/src/sys/amd64/conf
cd /usr/src
make targets
make buildkernel... works
GENERIC kernel build works now but...
root@machine17:~ # cd /usr/src
root@machine17:/usr/src # make buildkernel KERNCONF=MYKERNEL
make[1]: "/usr/src/Makefile.inc1" line 341: SYSTEM_COMPILER: Determined that CC=cc matches the source tree. Not bootstrapping a cross-compiler.
make[1]: "/usr/src/Makefile.inc1" line 346: SYSTEM_LINKER: Determined that LD=ld matches the source tree. Not bootstrapping a cross-linker.
make[1]: "/usr/src/Makefile.inc1" line 1538: Missing KERNCONF /usr/src/sys/amd64/conf/MYKERNEL
*** Error code 1
Stop.
make: stopped in /usr/src
root@machine17:/usr/src # make installkernel KERNCONF=MYKERNEL
--------------------------------------------------------------
>>> Install check kernel
--------------------------------------------------------------
--------------------------------------------------------------
>>> Installing kernel MYKERNEL on Mon Jul 20 18:46:57 MDT 2020
--------------------------------------------------------------
cd /usr/obj/usr/src/amd64.amd64/sys/MYKERNEL; MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= CC="cc -target x86_64-unknown-freebsd12.1 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CXX="c++ -target x86_64-unknown-freebsd12.1 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CPP="cpp -target x86_64-unknown-freebsd12.1 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" AS="as" AR="ar" LD="ld" LLVM_LINK="" NM=nm OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size" PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make KERNEL=kernel install
cd: /usr/obj/usr/src/amd64.amd64/sys/MYKERNEL: No such file or directory
*** Error code 2
Stop.
make[1]: stopped in /usr/src
*** Error code 1
Stop.
make: stopped in /usr/src
You don't have a kernel config file named MYKERNEL.Code:root@machine17:/usr/src # make installkernel KERNCONF=MYKERNEL .... cd: /usr/obj/usr/src/amd64.amd64/sys/MYKERNEL: No such file or directory
I fixed that already and ran buildkernel and installkernel but failed at install kernel as shown above.You don't have a kernel config file named MYKERNEL.
Yes I fixed all problems and it failed at installkernel.Did youmake buildkernel
before?
\nohup nice make buildkernel &
less nohup.out
Then press G F to move at the end & follow new lines coming in. CTRL-C will end following. In the log file, you can see where the object files are written to.