Ubuntu 22.04.4 for uConsole CM4 (flashable .xz image)

Hi, everyone!

I have tailored a script to build an Ubuntu image for the uConsole, CM4 variant. I made it using the kernel provided by @ak-rex, which already does incorporate the drivers for it.

https://github.com/crossplatformdev/uConsole-Image-Builder

The script is just in case you want to cook the image by yourselves. It takes around 2h30m and 3 hours to complete.

(Just the Ubuntu image is tested, for the moment. You all are very welcome to try and finish the Debian and the Armbian build)

With this script, I have built this Ubuntu 22.04 image, which is what I daily use:

The script should work for Debian and Armbian too, but I haven’t tested a build, yet.

Enjoy!

7 Likes

Try this way.

1 Like

Love the Ubuntu image. I seem to be having really laggy performance on several different SD cards.

1 Like

Fix for sound: speakers no longer popping during shutdown.

Download and install this package:

https://github.com/crossplatformdev/uConsole-Image-Builder/releases/download/20240817/uconsole-cm4-gpio.deb

# dpkg -i uconsole-cm4-gpio.deb

Enjoy!

Any chance you will be adding support for manjaro ?

Nope, sorry.

But theorically you just need to compile a kernel with the drivers provided by Clockworkpi, or use ak-rex kernel, if it suits your distro. Then you install the kernel packages in a distro that already supports CM4.

You can check the build script to get an idea of how to do so.

Best wishes.

You can try some things:

  • Perhaps you gpio package is outdated. Generate a new one with the script provided in this thread.
  • Try to disable swap and zram if enabled, your SD card may be trashing.
  • Try a different desktop environment than Unity. Supposedly lightweight environments as LXDE, XFCE4, etc can help. Personally, I use Gnome.

Try to recompile the kernel. The kernel provided in the distro is compiled with the default settings of ak-rex. I found some tweaks could be done, as:

  • enable CPU frequency ladder
  • enable light power comsumption (for GPU, CPU, PCI, …)
  • enable suspend to disk
  • optimice work queue for low power devices (is a menuconfig option)

etc.

I will release, soon, another version, of the same Ubuntu 22.04, with an updated kernel, and with the gpio package installed, this time configured aiming to enhance battery duration (which are my personal needs).

Also I have ordered a device that can operate as SDR and I hope I could compile some utilities for my distro. :slight_smile:

2 Likes

Did anyone successfully build it? I used a GitHub project. The root user ran ./create_image.sh UBUNTU and ./create_image.sh ARMBIAN_NOBLE , but no image was successfully built.

Thank you, my friend.

I am currently using it, loving it and flexing it to my classmate. Though compared to the stock OS and Debian Bookworm, it is a little bit heavy and can be laggy sometimes, in most cases, it performs well.

I have bought 3 different SD cards for different distros and man, I have one for retro gaming, one for school work and one for experiments. I love this community!!!

I guess in Christmas holiday I’ll try and see if I am able to build one of these linux distro myself.


3 Likes

Hi!

The link with the original Ubuntu image that the script works on has expired. I updated it in the script 4 days ago (you tried 11 days ago at least, when the download link of the ubuntu image that the script works on, was broken).

Just run git pull while being on the folder with my scripts and run them again.

FYI, just the Ubuntu image build works (not Debian nor Armbian). When in theory, just installing the kernel would make any image work in the uConsole, I had not time to test it properly, nor I am interested in other image than Ubuntu.

You’re welcome to venture in using my script to create the other images, and submit PR.

Thank you for your understanding.

1 Like

New build with Ubuntu 22.04.5 image. Also, a low power profile kernel.

Users that already has flashed the first image does not has to do anything, as the branch is the same 22.04. It is just for new users to start with a more updated install.

For everyone: I have compiled a low power profile kernel, whose sources and binary .deb files are in the release link. You all can install them, if you want to have a low power kernel, that fits better for the uConsole (as it is a portable device, it makes some little sacrifices but it makes the battery last longer).

You can just download the kernel .deb files and install them using:
sudo dpkg -i linux-*.deb

Enjoy the image, remember that you can build your own, try to use my script for building other image than Ubuntu (you may find it does not work, but you can try to fix it!), try to build a kernel suitable for 24.04 with the uConsole drivers, … for the moment, I myself can conform with Ubuntu 22.04, as I was not intending to maintain any image, just I am willing to share mine own (that does not represent any particular extra effort :wink:).

Thank you for choosing my image.

3 Likes

Thanks for creating this and continuing to keep it updated.

1 Like

About updates and who to ask support:

  • Ubuntu related software and updates are strictly maintained by Canonical and de Ubuntu Community. It is a LTS version and will have support during many years, that can be extended with Ubuntu Pro.
  • The kernel is maintained by @Rex.
  • Just the build script for the image and the gpio package build script are maintained by me. Currently I am working on using the proper kernel from Ubuntu sources, patched for uConsole. As far as I had not the need to reflash I have not released a new image, but I’ll do eventually.

About 24.04:
The release seems to be botched and is unable to initiate the wlan0 interface. There’s many threads in StackOverflow and Ubuntu Launchpad related to “Pi4 / CM4 losing wlan0 on system upgrade”. I cannot fix it and I will just wait for it to be fixed in other release.

If you want to upgrade and try to fix it, you can, and this commands will be helpful:

If anyone succeeds on fixing the wifi, please come back and share what you did!

My uConsole dont want to boot on the ubuntu image.
The power button turns green, but then nothing.

Have tested the following.
Have executed the script both directly on the uConsole and a separate ubuntu server.
No errors from the script.

The xz file inflates without errors.

Have burnt it to my sd card on MacOS using balena etcher and also the raspberry pi imager.
Have burnt it directly on the uConsole using the raspberry pi imager.

Have tested two different sd cards.

The shipped sd card still works, so likely the hardware is fine.
Any ideas on where to start.
Thanks

Could you tell me the exact link so I could test it?

Hi, sorry, missed your reply. Thanks for responding.

[edit, working now]
Finally tested your prebuilt images, not sure why it took so long.
So some user error in the build process.
I am good now.
Thanks

Have also tested another image (RetroPie).
That works. But burning the ubuntu image using the same setup, same sd-card, same macbook, same balena etcher does not work. So something in the process of creating the image fails. Any logs I can look in or other tips?

Dont think it makes a lot of sense to post a link to my image publicly, so I will send a direct message instead.

Ubuntu pre-built image is continuously giving some error while flashing it. How did you manage to make it work?

I did nothing besides burning it to an SD card.
I used MacOS and Balena Etcher.
Have only tested for a few hours, but no issues.

I’ve got the 22.04 image flashed and working mostly perfectly on my CM4 uConsole. One thing I’ve noticed is that the power profile options are limited to power saver and balanced, but the balanced profile acts like the power saver profile and is very very conservative with scaling cpu frequency up. I’ve done a little bit of googling and learned that ubuntu hides the performance profile in some cases if it thinks that performance is incompatible with the hardware, however from what I can tell, there’s an available performance governor on the CM4 CPU, so I’m not sure if there’s some way to get the UI to allow performance mode to be selected, I haven’t been able to figure it out yet.

I was also curious if it’s safe to upgrade packages. I did that on one of the provided images and had to reinstall. (seems okay, did an upgrade last night and a whole bunch of work since then)

ETA: After some heavier usage on the balanced profile, I can definitely see it scaling up, but it really loves to stay at like 600mhz.

If you’re using the LowPower version, that is intended. The low power kernel has enabled CPU throttling, and it will throttle down to save energy unless there’s a real demand of CPU load (then it will throttle up).

You can also change the gobernor in the up right corner once logged in.