Ubuntu Bionic for OpenFrame

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Ubuntu Bionic for OpenFrame

Post by roobarb! »

________________________________________________________________

Ubuntu Bionic for OpenFrame (Kernel 3.16)
Operating System Changes / Kernel Changes
________________________________________________________________


UBUNTU BIONIC FOR OPENFRAME IS NO LONGER SUPPORTED

Ha, "supported". ;)

Please use Debian for OpenFrame for new installations.


Given the last operating system release I'd made was Ubuntu Trusty, which left support in April 2019, I thought it would be sensible to create something new. Given that Ubuntu Bionic is the last to support 32-bit hardware I thought I'd give it some polish, meaning I spent far too much time on it. There's an automated build system now, a single image for all devices, plus the groundwork is done for supporting Debian in the future, where 32-bit support should live on.

There are a few things which are a bit different to previous images; most notably this is a command line only image, created to be as 'vanilla' as possible. This means you can use instructions available for any Ubuntu Bionic system to install whichever GUI environment you might like. Or none at all if you just want a single-use system.

I also needed to add Bluetooth to my OpenFrames and tried out a bunch of combination adapters. I eventually found this EZCast WiFi 2.4/5 GHz + Bluetooth 4.2 Adapter for £10 from Amazon. You can easily remove the plastic housing (though not strictly necessary) and replace the old internal Ralink 2770F card.


Highlights
  • Single image for any OpenFrame.
  • Built for size; about 430 MB space used initially.
  • Fully working audio and OpenGL with kernel drivers.
  • Automating scripts for completing common tasks (eg. installing X.Org Server).
  • Support for the Realtek 8821CU combined 5 GHz WiFi and Bluetooth 4.2 module.
  • Simple before-boot wireless network configuration.

Installation and Setup

So I'm not editing in multiple places, please check the instructions on birdslikewires.net.

Issues

If you're using an OpenFrame 2 the wireless connection does work... sort of. Performance is absolutely terrible and I've not been able to do anything about it. Maybe it's my OF2 which is at fault, but feedback would be appreciated. We're using the brcmsmac driver; the b43 was worse and broke Bluetooth for me. The broadcom-wl driver might do the trick, but there are licensing issues, so I can't distribute it. Good luck!


Autobuilder

Because I wanted to experiment with automated image creation, Ubuntu Bionic for OpenFrame is built without user intervention on one of my servers. Every time a new version of the 3.16 kernel is released the build system will automatically fetch, patch and compile it, along with all support modules, then create a new image. You can tell if it's an automated build as the kernel version will be, for example, 3.16.71op (no number at the end).

Individual builds are not tested, so please post here if there's something obviously broken.

If you want to see the build log for the last run, they're all here.


Waffle

This was really an experiment in producing an end-to-end, intervention-free process for creating operating system images which could be applied to any system, starting with kernel source code and working up from there. It's not quite as hardcore as compiling the entire OS a la Gentoo Linux, but there was still a decent learning curve. We're cross-compiling everything in a 32-bit schroot environment on a 64-bit server, using the headers from the kernel we've built to compile external modules and then building and updating the entire OS from the Ubunutu base system into an image file, without ever touching a real OpenFrame device.

I was particularly pleased to be able to add support for a decent 5 GHz wireless adapter with Bluetooth, even though it required a lot of work to find suitable drivers which could be 'encouraged' into compiling for kernel 3.16, plus the added work of automatically recompiling them for every new kernel. I did try to get the drivers working for the original Openpeak OS, but there's no way it was worth the effort for me; I'm no driver programmer and I think there's a lot that would need modifying. Someone prove me wrong! ;)

Anyone wanting to investigate any of this for themselves, all of the code is here:

https://github.com/birdslikewires/openframe-kernel
https://github.com/birdslikewires/openframe-ubuntu
https://github.com/andydvsn/rtl8821cu_bt
https://github.com/andydvsn/rtl8821cu_wlan


Appeal

You may notice we're still using kernel 3.16. Everything works for this process right up to the latest kernel 5.2, except for ALSA audio switching. If you know anything about C programming or ALSA, please help in the 'Annual ALSA Appeal' thread. We have almost everything working, including line out detection; the only thing remaining is properly muting the internal speaker when a line out is connected. At the moment the speaker remains powered and an audio system interference crackle is always present. Get this fixed and I'll be able to bump us up to the latest long-term kernel.


This should be a great little project platform, so have fun with it! You'll find many Debian or Ubuntu guides are directly applicable, including a lot of Raspberry Pi guides - just don't go trying to install their ARM binaries, that won't work! ;)
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
Andrew1971
Posts: 101
Joined: Tue Oct 30, 2012 12:49 pm

Re: Ubuntu Bionic for OpenFrame

Post by Andrew1971 »

@roobarb
Thank you for your continuing hard work for the Joggler. Very much appreciated.
Many Thank's
Andrew
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

Thanks, @Andrew1971!

Hilariously enough, minutes after publishing this, kernel 3.16.72 was released with a breaking change to the USB struct adapter used by the RTL8821CU Bluetooth driver. :roll:

Code: Select all

error: ‘struct usb_interface’ has no member named ‘pm_usage_cnt’
In case anybody ends up Googling their way here, the solution is to switch any use of counter ‘pm_usage_cnt’ with ‘dev.power.usage_count’. The latest image works fine now.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Ubuntu Bionic for OpenFrame

Post by hawsey »

Thank you for this Roobarb , it is appreciated .

Sent from my Moto G (4) using Tapatalk

Happy Joggling
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Ubuntu Bionic for OpenFrame

Post by hawsey »

@Roobarb , with this build does that wireless adapter you linked to work out of the box please ?
Also just building a simple desktop environment is hard for my limited skills unfortunately :-( , can I ask if you have such a build for say a usb stick that you could share pretty please .
Thanks again :-)

Sent from my Moto G (4) using Tapatalk

Happy Joggling
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Ubuntu Bionic for OpenFrame

Post by pete »

Great news roobarb!
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

hawsey wrote: Wed Aug 14, 2019 3:11 pm @Roobarb , with this build does that wireless adapter you linked to work out of the box please ?
Yup. Won't work with the original OpenPeak OS because the drivers won't build for that kernel, but using this image you just unplug the old Ralink 2770F, disconnect the 2.4 GHz antennae and plug this one in. Old antennae aren't used with the new adapter.
hawsey wrote: Wed Aug 14, 2019 3:11 pmAlso just building a simple desktop environment is hard for my limited skills unfortunately :-( , can I ask if you have such a build for say a usb stick that you could share pretty please .
Thanks again :-)
I don't, but what do you need it to do? I've not tested much in any GUI environment beyond "oh good, the windows move", but if I get some time I'll take a look.

In the meantime, this might work.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Ubuntu Bionic for OpenFrame

Post by hawsey »

Cheers , looks like I could follow that to get a desktop.
I just need wireless to work so I'll buy one of those adapters you used :-)
I would like to use it for some amateur radio stuff .

Sent from my Moto G (4) using Tapatalk

Happy Joggling
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

hawsey wrote: Thu Aug 15, 2019 6:16 am I just need wireless to work so I'll buy one of those adapters you used :-)
I would like to use it for some amateur radio stuff .
Sounds interesting!

The old wireless adapters all still work on the OF1/Joggler, so don't feel like you have to change it - but having 5 GHz wifi is great (so much 2.4 GHz interference around here) and when I get time I'd like to play with Bluetooth. The adapter has Bluetooth LE support as well, so you can run a scan with:

Code: Select all

hcitool lescan
It's remarkable how many MAC addresses show up. :)
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
Juggler
Posts: 249
Joined: Thu Apr 21, 2011 2:34 am

Re: Ubuntu Bionic for OpenFrame

Post by Juggler »

Thanks very much roobarb!, this is some amazing work !

I've downloaded the image. Just need to find a spare Joggler to try it on.

Would it be possible to share the image with the v5 kernel ? I wouldn't be using sound, so the ALSA issues shouldn't affect my use. Additionally / alternatively, do you have any instructions on how to include the v5 kernel in the automated build rather than 3.16 ?

I had a quick look through the latest build's log and it all seems fine. Surprised I understood most of it !

The WiFi Bluetooth dongle you've referenced above looks appealing and at a good price.
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

Thank you! Yeah, of course - I just need to bundle together the patches in the right places and I could start running a v5 build branch as well. Might actually be a useful thing to have if anybody can dig in to the ALSA issues. I had an update from one of the ALSA developers a couple of weeks ago - he seems happy to help, but I honestly seem to get a bit lost in that world!

I’ll look into it tomorrow if I get some time.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

Juggler wrote: Thu Aug 15, 2019 8:26 pmWould it be possible to share the image with the v5 kernel ? I wouldn't be using sound, so the ALSA issues shouldn't affect my use.
I've managed to get this working - there were a few things that needed tweaking for kernel v5.2, including a squiffy issue with misidentification of the machine architecture (because I'm building 32-bit images on a 64-bit system). You can grab a copy of Bionic with the 5.2 kernel here.

So you know, I've not tested it on a real Joggler yet and I've excluded the RTL8821CU drivers for that little network adapter because I think some of it is baked in to the kernel now. The drivers I was using for 3.16 won't compile under 5.2 right now anyway. Also, the kernel config is bloated because I fed in one I did for kernel 4 and told it to pick defaults for anything new. If you spot anything that can be removed or you need compiled into the kernel, just let me know.

When I get around to it I'll also change the filenames of the builds to include the date, so people can more easily match the image against the build log in case there are any weird issues.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Ubuntu Bionic for OpenFrame

Post by pete »

Wrote the image to the Joggler emmc. Working fine here Andy. Very nice!!!

Note this Joggler has an adjusted Realtek NIC with ROM.

Deleted my stuff here cuz I tried with two Jogglers. Then after a bit would get RW errors on the eMMC after a couple of reboots.

I am assuming maybe I have too many RW's on these Jogglers.

Will try again today.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Ubuntu Bionic for OpenFrame

Post by pete »

Update 21st of August 2019.

I was able to get a desktop going on the Joggler eMMC. Used barebones lxde-core. Works well at around 600Mb.

Followed Andy's steps above and added the barebones lxde-core.

1 - wrote image to USB stick
2 - booted with USB stick and wrote image to eMMC
3 - logged in as root and created joggler user
4 - ran /usr/local/sbin/of-install-xorg
5 - ran sudo apt install lxde-core
6 - rebooted and logged in as joggler and went to desktop with no issues.

Here is a picture of the Joggler running the desktop and Gparted.
Joggler.jpg
root@openframe:/usr/local/sbin# uname -a
Linux openframe 5.2.9op #1 Sun Aug 18 01:44:25 BST 2019 i686 i686 i686 GNU/Linux

Checked the network interfaces:

root@openframe:/usr/local/sbin# sudo lshw -class network

*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: eth0
version: 02
serial: 02:0e:8e:24:bf:96
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full ip=192.168.244.250 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:16 ioport:e000(size=256) memory:fef10000-fef10fff memory:fef00000-fef0ffff memory:d0000000-d000ffff

*-network:0
description: Ethernet interface
physical id: 1
bus info: usb@1:5
logical name: wlan0
serial: 00:0e:8e:24:bf:96
capabilities: ethernet physical
configuration: broadcast=yes driver=rt2800usb driverversion=5.2.9op firmware=0.36 link=no multicast=yes

*-network:1 DISABLED
description: Ethernet interface
physical id: 2
logical name: bond0
serial: 9a:93:f4:ee:eb:e0
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=bonding driverversion=3.7.1 firmware=2 link=no master=yes multicast=yes

Update 21st of August 2019 Update #2

Updated to install some more applications and got the RW error on the update and then it failed to boot. Gonna try to repair the Emmc with another Ubuntu boot disk.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

It's great to see this working in other people's hands, particularly a GUI at 600 MB! And especially when I haven't booted or tested that 5.2.9 image at all. :D

Shame that your internal MMC seems to be giving up the ghost though. I suppose we could check the part number and see what the MTBF is rated at.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Ubuntu Bionic for OpenFrame

Post by hawsey »

Fantastic Pete , are you able to put this on a bootable stick for me please and share the image ?
Great work :-)

Sent from my Moto G (4) using Tapatalk

Happy Joggling
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Ubuntu Bionic for OpenFrame

Post by pete »

Yes I am impressed that I could fit a lite desktop on 600Mb. Yes most likely the two Jogglers have failing eMMCs.

Most likely it will run better on a USB stick.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
roobarb!
Posts: 1745
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Ubuntu Bionic for OpenFrame

Post by roobarb! »

hawsey wrote: Thu Aug 22, 2019 3:09 pmFantastic Pete , are you able to put this on a bootable stick for me please and share the image ?

To be honest, I'd recommend against that - there are unique IDs and keys set up on first boot; you can delete and regenerate them, but it's more effort that it's worth.

Download the image and type these commands:
  1. of-expand <- if you've written the image to a USB device or OpenFrame 2 internal memory
  2. adduser hawsey
  3. usermod -aG sudo hawsey
  4. of-install-xorg
  5. apt install lxde-core
  6. reboot
You'll then have the exact same desktop as Pete.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Ubuntu Bionic for OpenFrame

Post by hawsey »

Roobarb , thank you for the advice , I'm away until early September but will try this out on my return .
Cheers
There will be questions no doubt :-)

Sent from my Moto G (4) using Tapatalk

Happy Joggling
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Ubuntu Bionic for OpenFrame

Post by pete »

Today switching gears over to testing on an Openpeak 2 (with front speakers).

BTW writing the OS to the Openpeak 2 eMMC was much faster and probably because the eMMC doesn't have a lot of read writes to it.

and

Updating my test Ubuntu modded Openpeak 1 tabletop that is utilizing an internal SSD to boot in to Linux. IE: writing the image over to the SSD drive.

This one also has an external (inside) RTC with battery and an aux 5 port USB hub stuck to the back of it.

For those in the US changed time and locale.

1 - sudo dpkg-reconfigure tzdata
2 - apt install console-data
3 - apt install locales
4 - locale-gen en_US.UTF-8
5 - dpkg-reconfigure console-data (note here removed Gb and switched to US)

Update 2

Updating the Openframe 2 was very fast compared to the O2 Joggler. Thinking that the eMMCs are worn too much these days.

Noted that the expandoscript did error out with the root drive name being incorrect so used parted to expand the partition over here.

For parted just do an install of parted and run it. It is very intuitive.

This time installed the full desktop and checking use is at 900Mb. Guessing that the lite desktop will fit on the O2 Joggler but it will be a bit tight.

I cannot get over how a rarely used eMMC is that much faster than a much used eMMC. The low level partition utility only runs in Windows so I may try to do a quickie xp USB boot stick to try a low level format on the eMMC.

Update 3

Ran the autologin user script...works great.

Next Squeezeplayer as this computer was a Squeezeplayer.

Also will check out wireless.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
Post Reply