Issues Upgrading to Latest Linux Kernel on STM32MP157F-DK2 using debian rootfs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-04-29 10:03 PM - edited 2024-05-12 6:06 PM
Hello,
I have been running Ubuntu on the STM32MP157F-DK2, guided by the following resources:
https://prog.world/stm32mp1-running-ubuntu-22-04gpu-and-wayland-graphics-server/
https://github.com/cvetaevvitaliy/stm32mp1-ubuntu
Previously, I successfully used the following configurations:
- U-Boot: v2020.10-stm32mp-r2.2
- TF-A: v2.8-stm32mp-r1.1
- Linux Kernel: v2020.10-stm32mp-r2.2
- Ubuntu RootFS: ubuntu-22.04-base-stm32mp1-armhf-16-05-2022.tar.gz
However, I am encountering issues with the latest setup:
- U-Boot: v2022.10-stm32mp-r1
- TF-A: v2.8-stm32mp-r1.1
- Linux Kernel: v6.1-stm32mp-r1
- Ubuntu RootFS: ubuntu-22.04-base-stm32mp1-armhf-16-05-2022.tar.gz
The main change I made was replacing stm32mp15_trusted_defconfig with stm32mp15_defconfig when building U-Boot.
Could anyone provide any insights or suggestions to troubleshoot this issue?
Thank you!
Solved! Go to Solution.
- Labels:
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-07 7:11 PM - edited 2024-05-17 1:12 AM
repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
repo sync
DISTRO=openstlinux-weston MACHINE=stm32mp15-disco source layers/meta-st/scripts/envsetup.sh
bitbake st-image-weston
#extract debian rootfs.
mkdir rootfs_extracted
sudo tar -xvf debian-12.1-minimal-armhf-2023-08-22.tar.xz -C rootfs_extracted/
#cd ....
mkdir extracted_rootfs
sudo tar -xvf armhf-rootfs-debian-bookworm.tar -C extracted_rootfs/
before proceeding, FYI,
You should rename your ext4 file to match the name of the target file indicated by this link.
extract st linux's rootfs.
ex)
cd ..../build-openstlinuxweston-stm32mp15-disco/tmp-glibc/deploy/images
sudo mount -o loop ./st-image-weston-openstlinux-weston-stm32mp15-disco-20240511074134.rootfs.ext4 ./st_linux_rootfs/
..../extracted_rootfs/lib/modules
and
..../extracted_rootfs/lib/firmware
dd if=/dev/zero of=debian-rootfs.img bs=1M count=4096
mkfs.ext4 -F debian-rootfs.img
mkdir mnt
sudo mount -o loop debian-rootfs.img mnt/
sudo cp -a extracted_rootfs/. mnt/
sudo umount mnt
and rename "debian-rootfs.img " to match the name of the file specified in the script.
(this is simpler than modifying the script).
...
# Size of 8GB
DEFAULT_RAW_SIZE=${SDCARD_SIZE:-8192}
# size of 4GB
DEFAULT_ROOTFS_PARTITION_SIZE=4194304
...
(you can adjust the size)
Modify this file too if needed:
.../build-openstlinuxweston-stm32mp15-disco/tmp-glibc/deploy/images/stm32mp15-disco/scripts/
sudo parted /dev/mmcblk0
(parted) rm 11
(parted) resizepart 10 95%
(parted) mkpart primary ext4 95% 100%
(parted) quit
sudo resize2fs /dev/mmcblk0p10
sudo mkfs.ext4 /dev/mmcblk0p11
sudo apt-get update
sudo apt-get install weston
hit weston in the prompt then GUI will show up.
I also succeeded in launching xfce + lightdm combination for GUI.
There was a hiccup that there was no /dev/fb0.
So I had to follow the below.
sudo nano /etc/X11/xorg.conf.d/10-drm.conf
#insert the below and save and exit.
Section "Device"
Identifier "DRM Device"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card0"
Option "SWCursor" "true"
EndSection
Section "Screen"
Identifier "Screen0"
Device "DRM Device"
Monitor "Monitor0"
EndSection
Section "Monitor"
Identifier "Monitor0"
EndSection
Section "ServerLayout"
Identifier "DefaultLayout"
Screen "Screen0"
EndSection
//execute the rest.
sudo apt-get update
sudo apt-get install dbus-x11
which dbus-launch # for checking
startx
moonjune.kim@gmail.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-03 6:29 AM
Hi @abraxas4 ,
Could you please confirm clarified information given :
Previously, I successfully used the following configurations:
- U-Boot: v2020.10-stm32mp-r2.2 -> match ecosystem V3.1.3 ( kernel 5.10 )
- TF-A: v2.8-stm32mp-r1.1 -> match ecosystem V5.0.x ( kernel 6.1)
- Linux Kernel: v2020.10-stm32mp-r2.2 -> is not a valid kernel version
- Ubuntu RootFS: ubuntu-22.04-base-stm32mp1-armhf-16-05-2022.tar.gz
However, I am encountering issues with the latest setup:
- U-Boot: v2022.10-stm32mp-r1
- TF-A: v2.8-stm32mp-r1.1
- Linux Kernel: v6.1-stm32mp-r1
- Ubuntu RootFS: ubuntu-22.04-base-stm32mp1-armhf-16-05-2022.tar.gz
> above version looks consistent with a ecosystem V5.0.x ... but miss the OPTEE version which is now mandatory since stm32mp15_trusted_defconfig (sp_min) is no longer supported in this version.
If this does not allow you to identify the problem, then please share further information about the issue you are facing ( logs )
Thanks
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-07 7:11 PM - edited 2024-05-17 1:12 AM
repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
repo sync
DISTRO=openstlinux-weston MACHINE=stm32mp15-disco source layers/meta-st/scripts/envsetup.sh
bitbake st-image-weston
#extract debian rootfs.
mkdir rootfs_extracted
sudo tar -xvf debian-12.1-minimal-armhf-2023-08-22.tar.xz -C rootfs_extracted/
#cd ....
mkdir extracted_rootfs
sudo tar -xvf armhf-rootfs-debian-bookworm.tar -C extracted_rootfs/
before proceeding, FYI,
You should rename your ext4 file to match the name of the target file indicated by this link.
extract st linux's rootfs.
ex)
cd ..../build-openstlinuxweston-stm32mp15-disco/tmp-glibc/deploy/images
sudo mount -o loop ./st-image-weston-openstlinux-weston-stm32mp15-disco-20240511074134.rootfs.ext4 ./st_linux_rootfs/
..../extracted_rootfs/lib/modules
and
..../extracted_rootfs/lib/firmware
dd if=/dev/zero of=debian-rootfs.img bs=1M count=4096
mkfs.ext4 -F debian-rootfs.img
mkdir mnt
sudo mount -o loop debian-rootfs.img mnt/
sudo cp -a extracted_rootfs/. mnt/
sudo umount mnt
and rename "debian-rootfs.img " to match the name of the file specified in the script.
(this is simpler than modifying the script).
...
# Size of 8GB
DEFAULT_RAW_SIZE=${SDCARD_SIZE:-8192}
# size of 4GB
DEFAULT_ROOTFS_PARTITION_SIZE=4194304
...
(you can adjust the size)
Modify this file too if needed:
.../build-openstlinuxweston-stm32mp15-disco/tmp-glibc/deploy/images/stm32mp15-disco/scripts/
sudo parted /dev/mmcblk0
(parted) rm 11
(parted) resizepart 10 95%
(parted) mkpart primary ext4 95% 100%
(parted) quit
sudo resize2fs /dev/mmcblk0p10
sudo mkfs.ext4 /dev/mmcblk0p11
sudo apt-get update
sudo apt-get install weston
hit weston in the prompt then GUI will show up.
I also succeeded in launching xfce + lightdm combination for GUI.
There was a hiccup that there was no /dev/fb0.
So I had to follow the below.
sudo nano /etc/X11/xorg.conf.d/10-drm.conf
#insert the below and save and exit.
Section "Device"
Identifier "DRM Device"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card0"
Option "SWCursor" "true"
EndSection
Section "Screen"
Identifier "Screen0"
Device "DRM Device"
Monitor "Monitor0"
EndSection
Section "Monitor"
Identifier "Monitor0"
EndSection
Section "ServerLayout"
Identifier "DefaultLayout"
Screen "Screen0"
EndSection
//execute the rest.
sudo apt-get update
sudo apt-get install dbus-x11
which dbus-launch # for checking
startx
moonjune.kim@gmail.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-07 7:23 PM
Hello Olivier,
Thank you for seeking clarification.
Indeed, I've acknowledged the mandatory OPTEE issue and am therefore moving away from my previous combination towards the latest Linux kernel version 6.
However, I have a preference for the Debian environment due to its user-friendliness, so I am attempting to replace the root filesystem.
Regarding your question: I successfully updated to the latest TF-A as a try, which was compatible with the Linux kernel version v5.10. Unfortunately, it does not support kernel versions v5.15 or later, as you noted regarding SP_MIN.
Thank you,
