make installkernel : "GENERIC: no such file or directory"

Running FreeBSD 12.1 on Seeed Odyssey x86-j4105 (celeron based single board computer).
Working through MW Lucas' "Absolute FreeBSD", in Chapter 6 "Kernel Games".
Logged in as root, seems even with my user in wheel I can't do some compile steps - that is not my issue today.
My problem: Did:
cp -a /boot/kernel /boot/kernel.good //to backup
cd /sys/amd64/conf
ee GENERIC //Saved nothing - reading only
//quit unsaved
cp GENERIC TRIAL1
ee TRIAL1 // commented out some hardware this board does not have (PCMCIA), and some it does but don' want to use right now (sound), and changed the 'ident' to 'TRIAL1'
//quit and saved.
cd /usr/src
make KERNCONF=TRIAL1 buildkernel // takes a short time but no errors
make installkernel // then errors:

Code:
$ make installkernel
--------------------------------------------------------------
>>> Install check kernel
--------------------------------------------------------------
--------------------------------------------------------------
>>> Installing kernel GENERIC on Fri Jan  1 18:34:31 GMT 2021
--------------------------------------------------------------
cd /usr/obj/usr/src/amd64.amd64/sys/GENERIC;  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/GENERIC: No such file or directory
*** Error code 2

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

Diagnosing my own problem: I am in the wrong directory when running make KERNCONF=TRIAL1 buildkernel or in the wrong directory for make installkernel or both. I think the second, but not sure where I would be.

I am also not sure that cp GENERIC TRIAL1 in /sys/amd64/conf is the right place to put the TRIAL1 config file. This is an 64 bit x86 celeron, So I think the architecture directory is correct. In any case the error seems to be without reference to 'TRIAL1' Just GENERIC and 'kernel'. What should I have done?
 
I apologise (UK spelling) for not having read the above link. Change of error:

Instruction is now
make installkernel KERNCONF=TRIAL1

There is lots of good .ko referencing then stops here
Code:
install -T release -o root -g wheel -m 555   i915kms.ko /boot/kernel/
install: i915kms.ko: No such file or directory
*** Error code 71

So this module is for Haswell and is in base, and should be included as the J4105 is 4 series and haswell (correct me). I am not sure what I removed from the copy of GENERIC called TRIAL1. TRIAL1 attached. I added the .txt extension for it to upload without warning.
 

Attachments

  • TRIAL1.txt
    14.4 KB · Views: 70
Running FreeBSD 12.1 on Seeed Odyssey x86-j4105 (celeron based single board computer).
Working through MW Lucas' "Absolute FreeBSD", in Chapter 6 "Kernel Games".
Logged in as root, seems even with my user in wheel I can't do some compile steps - that is not my issue today.
My problem: Did:
cp -a /boot/kernel /boot/kernel.good //to backup
cd /sys/amd64/conf
ee GENERIC //Saved nothing - reading only
//quit unsaved
cp GENERIC TRIAL1
ee TRIAL1 // commented out some hardware this board does not have (PCMCIA), and some it does but don' want to use right now (sound), and changed the 'ident' to 'TRIAL1'
//quit and saved.
cd /usr/src
make KERNCONF=TRIAL1 buildkernel // takes a short time but no errors
make installkernel // then errors:

Code:
$ make installkernel
--------------------------------------------------------------
>>> Install check kernel
--------------------------------------------------------------
--------------------------------------------------------------
>>> Installing kernel GENERIC on Fri Jan  1 18:34:31 GMT 2021
--------------------------------------------------------------
cd /usr/obj/usr/src/amd64.amd64/sys/GENERIC;  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/GENERIC: No such file or directory
*** Error code 2

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

Diagnosing my own problem: I am in the wrong directory when running make KERNCONF=TRIAL1 buildkernel or in the wrong directory for make installkernel or both. I think the second, but not sure where I would be.

I am also not sure that cp GENERIC TRIAL1 in /sys/amd64/conf is the right place to put the TRIAL1 config file. This is an 64 bit x86 celeron, So I think the architecture directory is correct. In any case the error seems to be without reference to 'TRIAL1' Just GENERIC and 'kernel'. What should I have done?

sorry for heard that,I only can help you with this error
you type
make KERNCONF=TRIAL1 buildkernel

for that are the errors,the make command never find the KERNCONF TRIAL1 file (explains the short time of build)

the right syntax is

make buildkernel KERNCONF=TRIAL1

the patch for build is /usr/src
but I dont get why make not found the GENERIC KERNCONF file
you are sure that you have a 64bit system, but you have
a x86-j4105 board,that tell me that is 386
but anyway,in every arquitecture allways are a GENERIC file
maybe the wrong syntax in make builkernel command generate that error

and for the part that you copy the GENERIC file to TRIAL1
you have the right path
for example
/usr/src/sys/amd64/conf
or
/usr/src/sys/386/conf
 
Code:
..............[cmd]make KERNCONF=TRIAL1 buildkernel[/cmd] ..........
>>> Installing kernel GENERIC on Fri Jan  1 18:34:31 GMT 2021...
cd: /usr/obj/usr/src/amd64.amd64/sys/GENERIC: No such file or directory
.........
of course `no such file or directory `
because when you
make buildkernel KERNCONF=TRIAL1
you have compiled TRIAL1 instead of GENERIC.
so after
Code:
make buildkernel KERNCONF=TRIAL1
you have to :
Code:
make installkernel KERNCONF=TRIAL1
 
  • Thanks
Reactions: im
Yes - That is obvious now I see it.

It does not say 32 or 64 anywhere, and yes x86 does mean 386. Here is the chip though, I did not think you could get a new 4 core processor that is 32 bit.

Intel specs on J4105

Now it does this:

Code:
===> zlib (install)
install -T release -o root -g wheel -m 555   zlib.ko /boot/kernel/
install -T debug -o root -g wheel -m 555   zlib.ko.debug /usr/lib/debug/boot/kernel/
kldxref /boot/kernel
--------------------------------------------------------------
>>> Installing kernel TRIAL1 completed on Sat Jan  2 12:25:24 GMT 2021
--------------------------------------------------------------
root@testbed02:/usr/src # reboot
Connection to 192.168.0.101 closed by remote host.
Connection to 192.168.0.101 closed.
chXXXXX@15-XXXXXX:~$ ssh chXXXXX@192.168.0.101
Password for chXXXXX@testbed02:
Last login: Sat Jan  2 10:16:11 2021 from 192.168.0.24
FreeBSD 12.1-RELEASE TRIAL1 

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/

Thankyou everyone. Solved.
 
It does not say 32 or 64 anywhere, and yes x86 does mean 386. Here is the chip though, I did not think you could get a new 4 core processor that is 32 bit.
Intel 64 is the same thing as AMD64; they're 64 bit extensions to the original 32 bit instruction set. It's named 'amd64' on FreeBSD because AMD was the first to introduce them. As it became quite popular and Intel's IA-64 architecture was going nowhere Intel also started to implement these 64 bit extensions and called it EM64T, which they later renamed to Intel 64.

 
Back
Top