A couple of months ago I noticed a post on social media about Libre Computer’s Raspbian Portability Script and I was intrigued. A Single Board Computer manufacturer that is putting money and resources into boards that aren’t the Raspberry Pi? Not just that, they’re actively trying to make it easier for people to come across from their Raspberry Pi boards.
Note: This post contains Amazon affiliate links so if you click on these and make a purchase, I may receive a small commission that helps to produce content like this.
Table of Contents
What is the script?
At its core, the Libre Computer Raspbian Portability script has been designed to take a Raspbian/Raspberry Pi OS operating system and modify it so that it can be used on a Libre Computer SBC.
On a basic level, it achieves this by modifying the files within the Raspberry Pi OS microSD card to include the necessary files to boot your Libre Computer SBC from the same OS image.
On a slightly deeper level, it will stop/remove the Raspberry Pi OS’s rpi-eeprom-update
service and begin downloading and installing a suitable upstream kernel that can then be used to boot the new device. It will also configure GRUB so that it can be booted properly.
The kicker in this is that in theory, you should then be able to use it again back in the Raspberry Pi should you need to go back. Sounds cool, right? Let’s put it to the test.
What are we testing today?
The Raspbian Portability Script supports the all-h3-cc-h3/h5 (Tritium), aml-s805x-ac (La Frite), aml-s905x-cc (Le Potato), roc-rk3328-cc (Renegade), and roc-rk3399-pc (Renegade Elite) boards. Do ensure that you use the correct architecture in your image for your chosen 2 boards as not all Raspberry Pis will run a 64-bit image.
In light of this, I’ll be using the Libre Computer Renegade Elite and the Raspberry Pi 4 as I quite like the idea of doing a comparison of these in the future, and using the same image seems like a good idea!
Things to note!
There are a couple of differences in terms of hardware between the Libre Computer and Raspberry Pi boards (as you’d expect!) but one of the biggest ones is that none of the Libre Computer boards offer WiFi functionality so if you set your WiFi SSID/password using the Pi OS Imager, this won’t be used on the Libre Computer and you’ll need to use an RJ45 Ethernet cable to reach your device. It’s important to know too that you must have internet connectivity on your starting Raspberry Pi to be able to download the necessary packages/software.
You should also understand that the GPIOs and Device Tree Overlays for I2C, SPI, UART, and PWM would require some further tinkering so that they work like for like. I’m not going to go over that in this particular piece but their Github page for the Wiring Tool project has the steps and information required.
In addition, as the MIPI cameras, DPI displays, and DSI panels are pieces of Raspberry Pi-specific hardware, these would not be supported on the Libre Computers with the same image.
Finally, the software is provided as-is, and not every combination has been fully tested, nor is it guaranteed to work. If you’re working with an existing image that has important files on it, please perform a full backup before running this script.
How to use the Raspbian Portability Script
Download Raspberry Pi OS
I’ll be using the Raspberry Pi 4 here so we’re fine to use a 64-bit version of Raspberry Pi OS Lite. The quickest way to source the latest image and write it to your SD card will be to use the Raspberry Pi OS Imager.
Boot the Raspberry Pi using the new microSD Card
You need to boot into Raspberry Pi OS to run the script, so take your microSD card (I’m using my favourite Amazon Basics microSD card for this) and place it into your Raspberry Pi 4 before booting up.
Download and run the Raspbian Portability Script
Update and upgrade the Raspberry Pi OS once booted:$ sudo apt update
$ sudo apt upgrade
Install the necessary packages and download the script:
$ sudo apt install -y git
$ git clone https://github.com/libre-computer-project/libretech-raspbian-portability.git lrp
We can then run the script with the chosen board selected:
$ sudo lrp/oneshot.sh roc-rk3399-pc
Type continue
to confirm you wish to go ahead and wait a couple of minutes to complete (it may take longer on older, less powerful Raspberry Pis!) Once done, it will ask you to shut down the Pi by pressing any key to confirm.
Note: If you’re not using the roc-rk3399-pc (Renegade Elite) then you’ll want to run the following so the script will output the support options. You can then run the command with the appropriate board name to convert your OS installation.
$ sudo lrp/oneshot.sh
Booting the Libre Computer Board
Now you have the modified image on the microSD card, place it in the Libre Computer board, connect an RJ45 Ethernet cable (or HDMI/keyboard if you prefer), and power it up.
After a couple of minutes, you should see the device pop up on your network (you’ll also see a flashing activity LED on the board itself to indicate life) meaning that it’s ready to go!
I’ll get to more extensive testing in the near future, however, at this time I’ve been able to confirm everything I’d initially expected to work, did (except the ones noted toward the beginning of this post).
Does raspi-config still work?
The utility does still load and depending on what you’re trying to do, it will still work with your Libre Computer board. If you’re looking to modify options that related to GPIO headers then you’re going to need to look into their wiring tool to translate these.
Realistically, anything that’s related to the operating system itself is going to work just fine. Updating raspi-config, changing your hostname, modifying your password, etc will all work as expected, along with updating your locales/timezones.
What if I put it back in the Raspberry Pi 4?
We confirmed it worked initially and we know it now works on the Libre Computer Renegade Elite, but what happens if we put it back in the Raspberry Pi 4 we started with?
The answer is that you get a booted system back on kernel 5.15.74-v8+ and a working Raspberry Pi 4 running Raspberry Pi OS!
Final thoughts
I really like the idea of this script as during the Raspberry Pi shortages we’re still seeing (and are likely to see into mid-late 2023), it offers a very real alternative in the form of Libre Computer’s lineup. If you’re comfortable with the Raspberry Pi OS and the software support surrounding that, you’re going to be able to continue using it with a Libre Computer board. You may even have an old, dead Raspberry Pi that you can take the operating system from!
After moaning about software support on some of the previous single-board computers I’ve worked with, being able to see options like these portability/wiring tools and the commitment to supporting and offering mainstream Linux builds for all of their boards is honestly so refreshing.
This is why I’m excited to say that I’ll have content covering 4 of their computers (La Frite, Le Potato, Renegade, and Renegade Elite) in the coming month or so, along with heatsinks and accessories so keep your eyes peeled for that!
11 comments
I have an SD running the MusicBox Pi project and it works beautifully on my Pi 3B, but I need to repurpose this Pi adn would like to switch the MusicBox SD card to a Potato. The MusicBox is built atop Wheezy and I have been trying for a week now (evenings and weekends) to get git on this OS. It simply will not install. Over a week’s time, you can imagine that the error messages were varied and numerous. It simply is NOT in teh libraries and nothing I slapped into sources.list seemed to resolve the issue.
Is there a way to do this without having git on the wheezy image? Can I clone the git repository to my Winders machine and copy over what’s needed? I’m guessing not.
Hi, Damon! Sorry for the late reply, your message was stuck in the SPAM box for some reason.. So you’re unable to install `git` from the repositories? That seems odd! You could try installing from source perhaps (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and see if that works. If you’ve still got some of the error messages you saw previously, feel free to paste some here and we’ll see if we can crowdsource :D Or perhaps the Libre Computer software section on their forum could be worth a try to see if they’re able to advise directly? They’ll likely need the errors too though!
Hi Bret,
I attempted to use your script to convert a RPI image to La Potato, everything seemed to go properly on the RPI side, but putting that SD card into the Potato does not boot. I have red and blue LED’s, but no green LED. Any pointers?
Hi, Shawn! Hm, it’s a little hard for me to say exactly. I’d probably go back through the steps and make sure it was all followed step-by-step and if you have the same issue, perhaps reach out on Libre Computer’s own help forum and see if they can help you out there, though they’ll likely need a bit more information. Does the same microSD card work in the Le Potato with other images? Or, does it work at all in the same setup you’re trying now? So power supply etc being the same, does it work?
Yes, the SD works fine with Armbian image for the Potato. SD works fine in the RPI after the update script as well. Just as if something didn’t ‘take’ during the script installation. I’ll give it another try and let you know.
Now it is in a boot loop, sorry for bad quality it went so fast I had to take a screen grab from a video. Image is here: https://imgur.com/a/jplwOdm
so if I am reading that correctly, it didn’t get a bootloader?
I did load from an RPI 2 so maybe it was still on 32b system?
Ah! From a Pi 2 yes, you’ll likely have the armhf/32bit image. Do you have a Pi 3/4/400/Zero 2 that you can test with at all?
Hi Bret,
Is it possible to post the URL of the Raspberry Pi image you’ve used?
( https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64.img.xz — doesn’t work well with script on RK3328-CC. The moment Chromium runs, it hangs. I tried a few other versions, they ain’t great too).
Thanks.
Hi! Hm, I’m not 100% sure which one it was to be honest, though it will have been earlier than the one you’re trying there. It’s likely to have been the version that was offered in the 1.7.2 version of Raspberry Pi Imager as that’s what I using at the time of this guide. I should say that I didn’t try Chromium in my test(s) – I was mainly checking that it booted and that basic functionality was working on a non-desktop version of the operating system, so it may be that you’d face the same issue there. Your best option may be to ask at https://hub.libre.computer/ and see if they’re aware of the issue and get some help there! Sorry I couldn’t help more :(
I’m trying to install Balena Cloud OS on my LePotato. I don’t have a rasberry pi, and I’m using Windows.
Can I do this with what I have?
Sadly it seems that the Le Potato is not a supported device for Balena Cloud OS (https://docs.balena.io/reference/hardware/devices/) so you’re likely going to struggle here 😓