compulab-yokneam / linux-compulab

Linux Kernel for CompuLab SOMs
https://www.compulab.com/products/computer-on-modules/
Other
3 stars 17 forks source link

Support iot-gate-imx8plus in Kernel 6.6(.23) #10

Open pbilstein opened 1 day ago

pbilstein commented 1 day ago

Hi,

we would like to build a newer kernel for our iot-gate-imx8plus. Is it possible to add support for it in 6.6(.23)?

Another question to be clear: I want to use this kernel in the debian variant. Is this possible?

Kind regards Peter

vraevsky commented 1 day ago

Hi,

What do you call debian variant?

Regards, Valentin.

pbilstein commented 1 day ago

Hi,

I'm using the debian image for the imx8plus from here and followed this link which I found on the debian documentation to update the kernel.

Regards, Peter

vraevsky commented 1 day ago

Hi,

6.6.23 is already there: https://github.com/compulab-yokneam/linux-compulab/tree/linux-compulab_v6.6.23

Deployment procedure is here: https://github.com/compulab-yokneam/Documentation/blob/master/etc/linux_kernel_deployment.md

Regards, Valentin.

pbilstein commented 1 day ago

Hi,

I followed the build guide, but I get the following error:

$ export MACHINE=iot-gate-imx8plus
$ make ${MACHINE}_defconfig compulab.config
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
***
*** Can't find default configuration "arch/arm64/configs/iot-gate-imx8plus_defconfig"!
***
make[3]: *** [scripts/kconfig/Makefile:94: iot-gate-imx8plus_defconfig] Fehler 1
make[2]: *** [Makefile:697: iot-gate-imx8plus_defconfig] Fehler 2
make[1]: *** [/home/peter/projects/neoalto/compulab-kernel/linux-compulab/Makefile:359: __build_one_by_one] Fehler 2
make: *** [Makefile:234: __sub-make] Fehler 2

So it looks like the support for iot-gate-imx8plus is missing so far. Or am I doing something wrong?

Regards Peter

vraevsky commented 1 day ago

Hi,

Our guide has this for all imx8mp family: export MACHINE=compulab_v8 make ${MACHINE}_defconfig compulab.config

have a look at: https://github.com/compulab-yokneam/linux-compulab/linux-compulab_v6.6.23/README.md

I'd appreciate if if you could post the link to the followed the build guide.

Regards, Valentin.

pbilstein commented 15 hours ago

Hi,

ok I got it. I did'nt re-read the README after switching thee kernel version branch. I followed still this one:

https://github.com/compulab-yokneam/linux-compulab/blob/linux-compulab_v5.15.32/README.md

instead of the new..

https://github.com/compulab-yokneam/linux-compulab/blob/linux-compulab_v6.6.23/README.md

btw: this one gives me a 404: https://github.com/compulab-yokneam/linux-compulab/linux-compulab_v6.6.23/README.md

And I used the v5.15.32 readme which is linked here: Building IOT-GATE-IMX8PLUS Linux Kernel

Kind regards Peter

vraevsky commented 14 hours ago

Hi,

got it too. Did yo get to build the kernel using the latest procedure?

Regards, Valentin.

pbilstein commented 11 hours ago

Hi,

ok I was able to build the deb packages and followed the installation guide:

https://github.com/compulab-yokneam/Documentation/blob/master/etc/linux_kernel_deployment.md#debian-linux-bindeb-pkg-deployment

It says:

Install procedure:

  • Copy the created packages to the device and issue dpkg -i /path/to/deb/folder/*.deb
  • Mount the device boot partition.
  • Copy the content of the /usr/lib/linux-image-/compulab/{.dtb,.dtbo} to the mounted boot partition.

After reboot the old kernel is loaded. Am I missing any steps?

My /boot looks like this now

/boot$ ls -lah
total 63M
drwxr-xr-x  4 root root 4.0K Nov 22 11:50  .
drwxr-xr-x 18 root root 4.0K Nov 21 20:29  ..
-rw-r--r--  1 root root 4.7M Feb 29  2024  System.map-6.1.22-3.1
-rw-r--r--  1 root root 6.3M Nov 22 09:39  System.map-6.6.36-gc758345748da
-rw-r--r--  1 root root 234K Feb 29  2024  config-6.1.22-3.1
-rw-r--r--  1 root root 241K Nov 22 09:39  config-6.6.36-gc758345748da
drwxr-xr-x  2 root root 4.0K Feb  5  2024  efi
-rw-r--r--  1 root root 1.8M Feb  5  2024  flash.bin.d1d8
-rw-r--r--  1 root root 1.8M Feb  5  2024  flash.bin.d2d4
drwxr-xr-x  5 root root 4.0K Nov 21 20:33  grub
lrwxrwxrwx  1 root root    9 Feb  8  2024  imx-boot -> /dev/null
-rw-r--r--  1 root root  19M Feb 29  2024  initrd.img-6.1.22-3.1
-rwxr-xr-x  1 root root  75K Nov 22 11:50  iot-gate-imx8plus-brkout_pwm_gpio.dtb
-rwxr-xr-x  1 root root  388 Nov 22 11:50  iot-gate-imx8plus-gpio-keys.dtbo
-rwxr-xr-x  1 root root  76K Nov 22 11:50  iot-gate-imx8plus-m2adc.dtb
-rwxr-xr-x  1 root root  76K Nov 22 11:50  iot-gate-imx8plus-m2emmc.dtb
-rwxr-xr-x  1 root root  75K Nov 22 11:50  iot-gate-imx8plus-m2tpm.dtb
-rwxr-xr-x  1 root root  75K Nov 22 11:50  iot-gate-imx8plus-usbdev.dtb
-rwxr-xr-x  1 root root  75K Nov 22 11:50  iot-gate-imx8plus.dtb
lrwxrwxrwx  1 root root    7 Nov 21 20:33 'kernel-*' -> 'Image-*'
-rw-r--r--  1 root root  14M Feb 29  2024  vmlinuz-6.1.22-3.1
-rw-r--r--  1 root root  16M Nov 22 09:39  vmlinuz-6.6.36-gc758345748da
vraevsky commented 1 hour ago

Reboot the device, stop in U-Boot and issue: run distro_bootcmd

6.6.36 is not released and not tested yet. 6.6.23 is the latest iot validated kernel.

NOTE: Make sure that the device trees are copied to the device p1 partition. The output shows p2/boot folder.