New 5.6.19-pyradef based kernel with Cortex-M4 support


jedi23

Very Active Member
Joined
Aug 11, 2020
Messages
314
Thanks to Codex I can provide an updated kernel based on this one with these changes. These patches are included as well.
When following the manual, just make sure to adapt the env BUILD from part 2 to the location where you extracted the kernel archive.
In the /boot/extlinux/user.cfg from part 6 just delete <BOOT_PREFIX> when your system runs from SD, or replace it with /boot when running the OS from eMMC.
You get the <SD_ROOT_PARAMETERS> from /boot/extlinux/linux.cfg: copy the append line under label l0 and replace APPEND <SD_ROOT_PARAMETERS> in the user.cfg accordingly.
To boot the new kernel, /boot/extlinux/extlinux.conf should look like this:

Code:
default m4ipu
menu title Extlinux Boot Menu
prompt 0
timeout 30


menu include /extlinux/linux.cfg
menu include /extlinux/user.cfg

It's good enough to test the M4 microcontrollers, but I still hope for an official 7.3 kernel with AESS and Power Saving features!
 
Last edited:
Hello,

@jedi23 : thanks for your hard work on this one, really appreciated :)

I'm looking forward to trying it on my Pyra !

Cheers, Magic Sam
 
So with this new kernel, it is possible to communicate with Cortex-M4 in Linux and even load firmware to it. But actually running the firmware is not possible and sets the microcontroller in a crash state, due to a wrong reset handling of both microcontroller cores. Codex developed several new test-kernels until a test-firmware ran successfully! If you already installed Pyra-Kernel-M4-v5 you can patch it with this file, the test-firmware is also included. But I will also provide a new Kernel soon.
In the meantime, you can look into this AI-generated document to get accustomed with the Cortex-M4 microcontroller.
 
Last edited:
I provide my current 5.6.19-pyradef based M4 kernel with an easy installer script.
It does not allow to use all M4-features yet and only one core is usable.
It is a lot of work to make full use of the Cortex-M4 microcontroller and I take a break on it now.
See this document about the missing M4 features that require further kernel changes.

DOWNLOAD M4 Kernel v6

Extract Pyra-M4-AutoInstaller.tar.xz and run

Code:
./install-pyra-m4.sh --dry-run (optional)
sudo ./install-pyra-m4.sh --yes


After successful installation, do not reboot yet or the regular kernel will be loaded again.
To boot with the new kernel, replace "default l0" with "default pyra-m4clean" in /boot/extlinux/extlinux.conf.

So you can always switch back to the original kernel.

See all changes in this document.
 
Back
Top