Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pbilstein opened this issue Nov 21, 2024 · 12 comments
Open

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

pbilstein opened this issue Nov 21, 2024 · 12 comments

Comments

@pbilstein
Copy link

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
Copy link
Contributor

Hi,

What do you call debian variant?

Regards,
Valentin.

@pbilstein
Copy link
Author

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
Copy link
Contributor

@pbilstein
Copy link
Author

pbilstein commented Nov 21, 2024

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

Hi,

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

Regards,
Valentin.

@pbilstein
Copy link
Author

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
Copy link
Contributor

vraevsky commented Nov 22, 2024

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.

@pbilstein
Copy link
Author

Ok, I used 6.6.23 now and installed deb packages. I have copied everything to as stated to p1 partition.

When I issue run distro_bootcmd I do get into a menu where I can do :

screenshot_2024-11-23 17-24-00
screenshot_2024-11-23 17-24-45
screenshot_2024-11-23 17-24-55

Still booting 6.1 kernel though no matter what option I chosse there, which then even fails to boot because of errors..

[  OK  ] Finished networking.service - Raise network interfaces.
[    7.660006] caam-snvs 30370000.caam-snvs: ipid matched - 0x3e
[    7.672074] caam-snvs 30370000.caam-snvs: violation handlers armed - non-secure state
[    7.694339] imx8-pcie-phy 32f00000.pcie-phy: failed to get imx pcie phy clock
[    7.704701] imx-sdma 30bd0000.dma-controller: firmware found.
[    7.710688] imx-sdma 30bd0000.dma-controller: loaded firmware 4.5
[    7.718076] imx8-pcie-phy 32f00000.pcie-phy: failed to get imx pcie phy clock
[    7.722536] CAN device driver interface
[    7.728866] imx8-pcie-phy 32f00000.pcie-phy: failed to get imx pcie phy clock
[    7.748457] caam 30900000.crypto: device ID = 0x0a16040100000100 (Era 9)
[    7.784627] caam 30900000.crypto: job rings = 1, qi = 0
[    7.836178] imx8-pcie-phy 32f00000.pcie-phy: failed to get imx pcie phy clock
[   10.475238] random: crng init done
[   17.888726] imx8-pcie-phy 32f00000.pcie-phy: failed to get imx pcie phy clock
[   17.896665] platform 30e60000.mailbox: deferred probe pending
[   17.902455] platform 3b6e8000.dsp: deferred probe pending
[   17.907888] platform 32f00000.pcie-phy: deferred probe pending
[   28.747227] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[   28.753347] rcu: 	0-...0: (1 GPs behind) idle=c4f4/1/0x4000000000000000 softirq=1640/1641 fqs=2413
[   28.762317] 	(detected by 3, t=5255 jiffies, g=653, q=3867 ncpus=4)
[   28.768588] Task dump for CPU 0:
[   28.771818] task:(udev-worker)   state:R  running task     stack:0     pid:303   ppid:290    flags:0x0000080e
[   28.781742] Call trace:
[   28.784189]  __switch_to+0xf0/0x170
[   28.787688]  0xffff00004432ac40
[   91.807228] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[   91.813345] rcu: 	0-...0: (1 GPs behind) idle=c4f4/1/0x4000000000000000 softirq=1640/1641 fqs=9626
[   91.822313] 	(detected by 2, t=21020 jiffies, g=653, q=5095 ncpus=4)
[   91.828672] Task dump for CPU 0:
[   91.831902] task:(udev-worker)   state:R  running task     stack:0     pid:303   ppid:290    flags:0x0000080e
[   91.841828] Call trace:
[   91.844276]  __switch_to+0xf0/0x170
[   91.847777]  0xffff00004432ac40

Any suggestions? The question is:

Isn't it necessary to replace the uboot image in the p1 partition or something like this?

@pbilstein
Copy link
Author

Hi, ok I will give it a try next week. It is possible that something is broken with my image.. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants