| Target | Ecosystem |
|---|---|
![]() |
![]() |
This repository is about a minimal linux distro, based on Ubuntu 24.04 LTS. This linux distribution has the minimal setup for starting a system. Every package Ubuntu 24.04 LTS have, can be installed on STM32-OS.
- busybox
- ssh
- apt
- vnc
- dpkg
- nano
- python
- bzip2
- gzip
- etc...
First you need to clone two repos.
git clone https://github.com/danielmartensson/STM32-OS
git clone https://github.com/danielmartensson/STM32-ComputerThen you run this file. Enter super user password for root privileges. This will create a file callecd rootfs.ext4.
./create_stm32_os.shAfter that, go to this path and run STM32CubeProgrammer. Plug in your Micro USB cable (yes I know) into STM32-Computer and load the FlashLayout - STM32-OS.tsv inside STM32CubeProgrammer. Then you press Download and the eMMC will be flashed with the STM32-OS.
STM32-Computer/Firmware/STM32-Computer-Firmware/CA7/FIP_artifacts
Don't forget to change the BOOT1 pin to unconnected when you're flashing and then change BOOT1 pin to connected when you're booting the STM32-OS.
After the system has booted up, and you can either login(user: root. password: root) via UART or ssh, then it's important to run this command so you can take adventage of the total system space. This will resize the system to its true size, or else, you cannot even create a single file.
resize2fs /dev/mmcblk0p7
e2fsck -f /dev/mmcblk0p6
df -hA minimal system need to have:
- hdmi
- ssh
- net
- vnc
So therefore, these must be installed, if they are not already installed.
apt-get install isc-dhcp-client net-tools drm-info libdrm2 libdrm-amdgpu1 libdrm-common libdrm-tests xorg xterm xserver-xorg-video-armsoc x11-xserver-utils xinit xserver-xorg-input-evdev weston seatd libinput-tools xcursor-themes libgl1-mesa-dri mesa-utils wayland-utils libpam-modules alsa usbutils
sudo touch ~/.XauthorityThis STM32-OS comes with a VNC server. To configure the VNC server.
openssl genrsa -out vnc.key 2048
openssl req -new -x509 -key vnc.key -out vnc.cert -days 365 -subj "/CN=localhost"And start the VNC server with. This can be done through openssh.
weston --backend=vnc --vnc-tls-cert=/path/to/vnc.cert --vnc-tls-key=/path/to/vnc.keyThen you're are logged in with sudo chroot rootfs and trying to install something, then this might appears.
Problem: sudo: unable to allocate pty: No such device
Solution: mount none -t devpts /dev/ptsProblem: ⚠ /proc/ is not mounted. This is not a supported mode of operation. Please fix
your invocation environment to mount /proc/ and /sys/ properly. Proceeding anyway.
Your mileage may vary.
Solution: mount -t proc proc /procHere are files that are too large to commit:
rootfs/usr/lib/arm-linux-gnueabihf/libLLVM-17.so.1
- Question: Can I use this for
STM32MP157too?- Answer: The installation of this linux distribution is meant to work for
STM32-Computer, but therootfsfolder, which is theSTM32-OS, can work for all types ofarmhfarchitectures. So the answer is yes, you can.
- Answer: The installation of this linux distribution is meant to work for
- Question: STMicroelectronics have a linux distribution called
OpenSTLinux. Why did you not use that instead?- Answer: I find that
Ubunutu'secosystem of theaptpackages are much richer compared toOpenSTLinux. Also there is more community support forUbuntucompared toOpenSTLinux.
- Answer: I find that
- Question: I want to build on my kernel, can I use this repository to build on my kernel?
- Answer: No, if you want to build on your kernel, head over to
STM32-Computer. I have separated thebootfs-work (kernel) androotfs-work (STM32-OS).
- Answer: No, if you want to build on your kernel, head over to
- Question: What's the difference between
Ubuntu 24.04 LTSandSTM32-OS 24.04 LTS?- Answer: I'm keeping
STM32-OSas thin as possible for minimalRAMusage.
- Answer: I'm keeping



