Libre Computer Raspbian Portability Feedback

The fastest way to run Raspbian on Libre Computer boards: Libre Computer Raspbian Portability Tool for running Raspbian on Libre Computer Boards - YouTube

This tool is tested against the following images on a Raspberry Pi 3:

  • 2022-09-22-raspios-bullseye-arm64.img
  • 2022-09-22-raspios-bullseye-arm64-lite.img
  • 2022-09-22-raspios-bullseye-armhf.img
  • 2022-09-22-raspios-bullseye-armhf-lite.img
  • 2022-09-22-raspios-buster-armhf.img
  • 2022-09-22-raspios-buster-armhf-lite.img

If you are having problems using libretech-raspbian-portability. Please let us know below and we will attempt to fix the issues.

I have been trying to convert raspbian for le potato only for it to boot up as raspbian on rpi and on le potato android. i also tried armbian and debian for le potato they also boot up android. I really dont want android i would prefer debian or armbian. Please help me.

You need to wipe Android from the eMMC by following this guide first: Libre Computer AML-S905X-CC eMMC Flashing Steps from Linux

i want a potatoe raspian but dont have a r pi

how do i get a raspian download i can use?

We should be releasing an Raspbian image in a week or so. Raspbian is based on Debian with a few additional packages so those two will come out at the same time. In the meantime, please use our Ubuntu.

While I appreciate your efforts on the video, it would really be helpful If you could change the color scheme on the terminal window to make it more easily seen and slow down the screen shots. Your verbal descriptions are far too fast (for me) to get the details of the process and the terminal window can’t be clearly seen to determine exactly what the commands are. But thanks again for your efforts.

You have to manually set the YouTube resolution to see the text clearly. Select the native 1080P and you should be able to see the commands typed.

I can not get the raspbian images to write to the SD cards i have. I keep getting verification failures at sector 8192 (i think). So i tried to port it with a raspberrypi. I followed the video exactly and im getting this error…

–2022-09-29 11:03:31-- https://deb.libre.computer/repo/libre-computer-deb.gpg
Resolving deb.libre.computer (deb.libre.computer)… 192.53.162.101, 2600:3c00::f03c:93ff:fea1:358c
Connecting to deb.libre.computer (deb.libre.computer)|192.53.162.101|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3052 (3.0K) [application/octet-stream]
Saving to: ‘/usr/share/keyrings/libre-computer-deb.gpg’

/usr/share/keyrings 100%[===================>] 2.98K --.-KB/s in 0s

2022-09-29 11:03:31 (39.2 MB/s) - ‘/usr/share/keyrings/libre-computer-deb.gpg’ saved [3052/3052]

Hit:1 Index of /debian-security bullseye-security InRelease
Hit:2 Index of /debian bullseye InRelease
Get:3 Index of /debian bullseye-updates InRelease [44.1 kB]
Hit:4 Index of /repo/ linux InRelease
Hit:5 Index of /raspbian bullseye InRelease
Hit:6 Index of /debian bullseye InRelease
Fetched 44.1 kB in 2s (21.6 kB/s)
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
13 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
grub-common:arm64 : Depends: libc6:arm64 (>= 2.28) but it is not installable
Recommends: os-prober:arm64 (>= 1.33) but it is not installable
grub2-common:arm64 : Depends: libc6:arm64 (>= 2.28) but it is not installable
libdevmapper1.02.1:arm64 : Depends: libc6:arm64 (>= 2.28) but it is not installable
Depends: libudev1:arm64 (>= 183) but it is not going to be installed
libefiboot1:arm64 : Depends: libc6:arm64 (>= 2.17) but it is not installable
libefivar1:arm64 : Depends: libc6:arm64 (>= 2.17) but it is not installable
libfreetype6:arm64 : Depends: libbrotli1:arm64 (>= 0.6.0) but it is not going to be installed
Depends: libc6:arm64 (>= 2.17) but it is not installable
libfuse2:arm64 : Depends: libc6:arm64 (>= 2.28) but it is not installable
liblzma5:arm64 : Depends: libc6:arm64 (>= 2.17) but it is not installable
libpcre2-8-0:arm64 : Depends: libc6:arm64 (>= 2.17) but it is not installable
libpng16-16:arm64 : Depends: libc6:arm64 (>= 2.29) but it is not installable
libselinux1:arm64 : Depends: libc6:arm64 (>= 2.17) but it is not installable
zlib1g:arm64 : Depends: libc6:arm64 (>= 2.17) but it is not installable
E: Unable to correct problems, you have held broken packages.

Ok i got it to work. I gave up porting with the RaspberryPi. I was using the wrong image. I didn’t realize s905x-cc-v2 was a different potato but s905x-cc.img.xz worked.

I still can never get windisk imager to work. But for the second time RaspberryPi imager has worked were windisk will not. I install Ubuntu with it and now Raspbian. Someone previously said Pi imager would break the image. but it doesnt. Its the only thing that i can get to work.

Thank you for submitting the log. We will try to replicate the issue and update the script if necessary.

Win32DiskImager needs to have automount disabled.

Raspberry Pi Imager works as long as you don’t try to change user, password, or other settings.

@librecomputer, do you have any updates for the bug in the portability script? I am having the same problem.

Do you know what image you are using? Need the filename of the image so we can try.

Hello. I have tried this on the the aml-S905x-CC and my device boots to grub and says that
EFI boot manager: Cannot Load Any image.
Any help would be much appreciated

What image are you running the script on?

Raspbian on a pi 4. Is that what you were asking?

Which image file for Raspbian? There’s like several hundred Raspbian images in different modified states in the wild. Raspbian Portability was only tested against the buster and bullseye images on their website. If you have the original image and log of the portability script, it would be helpful in identification. Cannot Load Any Image means it did not find GRUB which should have been installed so some screencaps of the logs would help identify.

Yeah it’s buster 10. I’ll rerun and see what I can get you. Give me 5 minuets. Thanks!

This script is designed to run on existing Raspbian images and enables them
to boot on any Libre Computer board. It uses an upstream FOSS software stack
developed by the community and Libre Computer to support booting Raspbian.


It is a proof-of-concept and there are no warranties implied or otherwise.
We highly recommend backing up the image if it holds important data in case
something unexpected occurs. While the image should still boot on the original
device, this is not fully tested or guaranteed so continue at your own risk.

This script installs/configures/overwrites data on the device's MicroSD card.
It is designed to run on Raspberry Pi(R)s and requires internet access to
download additional necessary components. Once the script finishes, the card
should still remain bootable on the original board.

Once completed, move the MicroSD card to the selected Libre Computer Board.

Please type 'continue' without quotes to acknowledge and start the script.

Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease
Hit:3 https://deb.libre.computer/repo linux InRelease
Hit:4 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:5 http://archive.raspberrypi.org/debian buster InRelease
Get:6 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
Fetched 34.8 kB in 3s (12.8 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
435 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
grub-efi-arm64:arm64 is already the newest version (2.06-3~deb10u1).
linux-headers-lc-stable-arm64:arm64 is already the newest version (5.19.16-04046-g062726298e8a-1).
linux-image-lc-stable-arm64:arm64 is already the newest version (5.19.16-04046-g062726298e8a-1).
0 upgraded, 0 newly installed, 0 to remove and 435 not upgraded.

The looks like it didn’t finish? Is there anything after that? Can you rerun with bash -x oneshot.sh

ubuntu@ubuntu:~/nfs/nodes/can_pro$ cat ~/runlog.log
pi@raspberrypi:~ $ sudo bash -x ./libretech-raspbian-portability/oneshot.sh aml-s905x-cc
+ set -e
+ '[' root '!=' root ']'
+ '[' -z aml-s905x-cc ']'
+ case "$1" in
+ BOARD_name=aml-s905x-cc
+ BOARD_bootSector=1
+ BOARD_console=AML0
+ BOARD_bootLoader=1
+ BOARD_arch=arm64
+ cat
This script is designed to run on existing Raspbian images and enables them
to boot on any Libre Computer board. It uses an upstream FOSS software stack
developed by the community and Libre Computer to support booting Raspbian.


It is a proof-of-concept and there are no warranties implied or otherwise.
We highly recommend backing up the image if it holds important data in case
something unexpected occurs. While the image should still boot on the original
device, this is not fully tested or guaranteed so continue at your own risk.

This script installs/configures/overwrites data on the device's MicroSD card.
It is designed to run on Raspberry Pi(R)s and requires internet access to
download additional necessary components. Once the script finishes, the card
should still remain bootable on the original board.

Once completed, move the MicroSD card to the selected Libre Computer Board.

Please type 'continue' without quotes to acknowledge and start the script.

+ read -p : input
:continue
+ '[' continue '!=' continue ']'
+++ dirname ./libretech-raspbian-portability/oneshot.sh
++ readlink -f ./libretech-raspbian-portability
+ SRC_DIR=/home/pi/libretech-raspbian-portability
++ findmnt -no SOURCE /
+ target_part=/dev/mmcblk0p7
++ grep '^disk'
++ cut -d ' ' -f 2
++ lsblk --list -no type,name --inverse /dev/mmcblk0p7
+ target_disk=mmcblk0
++ mktemp
+ sfdisk_file=/tmp/tmp.929PbXS3Yd
+ sfdisk -d /dev/mmcblk0
++ grep -Po 'label:\s+\K.*' /tmp/tmp.929PbXS3Yd
+ sfdisk_label=dos
+ '[' -z dos ']'
+ '[' dos = dos ']'
+ :
++ grep -Po 'device:\s+\K.*' /tmp/tmp.929PbXS3Yd
+ sfdisk_dev=/dev/mmcblk0
++ mktemp
+ sfdisk_dev_p1_file=/tmp/tmp.IwLY8xkBQD
+ grep -Po '^/dev/mmcblk0p1\s+:\s+\K.*' /tmp/tmp.929PbXS3Yd
+ sed 's/,/\n/g'
+ sed 's/\s//g'
++ awk -F= '/^start/ {print $2}' /tmp/tmp.IwLY8xkBQD
+ sfdisk_dev_p1_start=8192
+ '[' -z 8192 ']'
+ '[' 8192 -lt 2048 ']'
+ OS_RELEASE_FILE=/etc/os-release
+ '[' '!' -f /etc/os-release ']'
+ readarray -t lines
+ declare -A TARGET_OS_RELEASE
+ for line in "${lines[@]}"
+ key=PRETTY_NAME
+ value='"Raspbian GNU/Linux 10 (buster)"'
+ TARGET_OS_RELEASE["$key"]='"Raspbian GNU/Linux 10 (buster)"'
+ for line in "${lines[@]}"
+ key=NAME
+ value='"Raspbian GNU/Linux"'
+ TARGET_OS_RELEASE["$key"]='"Raspbian GNU/Linux"'
+ for line in "${lines[@]}"
+ key=VERSION_ID
+ value='"10"'
+ TARGET_OS_RELEASE["$key"]='"10"'
+ for line in "${lines[@]}"
+ key=VERSION
+ value='"10 (buster)"'
+ TARGET_OS_RELEASE["$key"]='"10 (buster)"'
+ for line in "${lines[@]}"
+ key=VERSION_CODENAME
+ value=buster
+ TARGET_OS_RELEASE["$key"]=buster
+ for line in "${lines[@]}"
+ key=ID
+ value=raspbian
+ TARGET_OS_RELEASE["$key"]=raspbian
+ for line in "${lines[@]}"
+ key=ID_LIKE
+ value=debian
+ TARGET_OS_RELEASE["$key"]=debian
+ for line in "${lines[@]}"
+ key=HOME_URL
+ value='"http://www.raspbian.org/"'
+ TARGET_OS_RELEASE["$key"]='"http://www.raspbian.org/"'
+ for line in "${lines[@]}"
+ key=SUPPORT_URL
+ value='"http://www.raspbian.org/RaspbianForums"'
+ TARGET_OS_RELEASE["$key"]='"http://www.raspbian.org/RaspbianForums"'
+ for line in "${lines[@]}"
+ key=BUG_REPORT_URL
+ value='"http://www.raspbian.org/RaspbianBugs"'
+ TARGET_OS_RELEASE["$key"]='"http://www.raspbian.org/RaspbianBugs"'
++ uname -m
+ machine_arch=armv7l
+ case $machine_arch in
+ '[' raspbian '!=' raspbian ']'
+ case "${TARGET_OS_RELEASE[VERSION_ID]}" in
+ :
+ dpkg_arch_target=arm64
+ grub_install_cmd='grub-install --directory=/usr/lib/grub/arm64-efi --efi-directory=/boot --force-extra-removable --no-nvram'
++ dpkg --print-architecture
+ dpkg_arch=armhf
+ case "$dpkg_arch" in
+ :
++ dpkg --print-foreign-architectures
+ dpkg_arches_foreign=arm64
+ for dpkg_arch_foreign in $dpkg_arches_foreign
+ '[' arm64 = arm64 ']'
+ break
+ '[' arm64 '!=' arm64 ']'
++ ls /etc/apt/sources.list /etc/apt/sources.list.d/debian-main.list /etc/apt/sources.list.d/libre-computer-deb.list /etc/apt/sources.list.d/raspi.list
+ apt_sources='/etc/apt/sources.list
/etc/apt/sources.list.d/debian-main.list
/etc/apt/sources.list.d/libre-computer-deb.list
/etc/apt/sources.list.d/raspi.list'
+ apt_source_add=1
+ for apt_source in $apt_sources
+ sed -Ei 's/^(deb)\s+(http:\/\/)/\1 [ arch=armhf ] \2/' /etc/apt/sources.list
+ grep deb.debian.org/debian /etc/apt/sources.list
+ for apt_source in $apt_sources
+ sed -Ei 's/^(deb)\s+(http:\/\/)/\1 [ arch=armhf ] \2/' /etc/apt/sources.list.d/debian-main.list
+ grep deb.debian.org/debian /etc/apt/sources.list.d/debian-main.list
+ apt_source_add=0
+ for apt_source in $apt_sources
+ sed -Ei 's/^(deb)\s+(http:\/\/)/\1 [ arch=armhf ] \2/' /etc/apt/sources.list.d/libre-computer-deb.list
+ grep deb.debian.org/debian /etc/apt/sources.list.d/libre-computer-deb.list
+ for apt_source in $apt_sources
+ sed -Ei 's/^(deb)\s+(http:\/\/)/\1 [ arch=armhf ] \2/' /etc/apt/sources.list.d/raspi.list
+ grep deb.debian.org/debian /etc/apt/sources.list.d/raspi.list
+ '[' 0 -eq 1 ']'
+ which rpi-eeprom-update
+ systemctl disable rpi-eeprom-update
+ wget -O /usr/share/keyrings/libre-computer-deb.gpg https://deb.libre.computer/repo/libre-computer-deb.gpg
--2022-10-18 19:49:55--  https://deb.libre.computer/repo/libre-computer-deb.gpg
Resolving deb.libre.computer (deb.libre.computer)... 192.53.162.101, 2600:3c00::f03c:93ff:fea1:358c
Connecting to deb.libre.computer (deb.libre.computer)|192.53.162.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3052 (3.0K) [application/octet-stream]
Saving to: ‘/usr/share/keyrings/libre-computer-deb.gpg’

/usr/share/keyrings 100%[===================>]   2.98K  --.-KB/s    in 0s

2022-10-18 19:49:55 (37.5 MB/s) - ‘/usr/share/keyrings/libre-computer-deb.gpg’ saved [3052/3052]

+ echo 'deb [arch=arm64 signed-by=/usr/share/keyrings/libre-computer-deb.gpg] https://deb.libre.computer/repo linux main non-free'
+ apt update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 https://deb.libre.computer/repo linux InRelease
Hit:4 http://deb.debian.org/debian buster-updates InRelease
Hit:5 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:6 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
435 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ apt -y install grub-efi-arm64 linux-image-lc-stable-arm64 linux-headers-lc-stable-arm64
Reading package lists... Done
Building dependency tree
Reading state information... Done
grub-efi-arm64:arm64 is already the newest version (2.06-3~deb10u1).
linux-headers-lc-stable-arm64:arm64 is already the newest version (5.19.16-04046-g062726298e8a-1).
linux-image-lc-stable-arm64:arm64 is already the newest version (5.19.16-04046-g062726298e8a-1).
0 upgraded, 0 newly installed, 0 to remove and 435 not upgraded.
+ grub-install --directory=/usr/lib/grub/arm64-efi --efi-directory=/boot --force-extra-removable --no-nvram
Installing for arm64-efi platform.
Installation finished. No error reported.
+ sed -Ei 's/(GRUB_CMDLINE_LINUX_DEFAULT)="quiet/\1="noquiet/' /etc/default/grub
+ update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.19.16-04046-g062726298e8a
Found initrd image: /boot/initrd.img-5.19.16-04046-g062726298e8a
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Raspbian GNU/Linux 10 (buster) on /dev/mmcblk0p7
done
+ '[' raspbian = raspbian ']'
+ mkdir -p /boot/EFI/debian
+ cp /boot/EFI/raspbian/grub.cfg /boot/EFI/debian/grub.cfg
+ '[' 1 -eq 1 ']'
+ BOOT_LOADER_URL=http://boot.libre.computer/ci/aml-s905x-cc
++ mktemp
+ boot_loader_file=/tmp/tmp.dLrg2xvGuJ
+ wget -O /tmp/tmp.dLrg2xvGuJ http://boot.libre.computer/ci/aml-s905x-cc
--2022-10-18 19:50:36--  http://boot.libre.computer/ci/aml-s905x-cc
Resolving boot.libre.computer (boot.libre.computer)... 192.53.162.101, 2600:3c00::f03c:93ff:fea1:358c
Connecting to boot.libre.computer (boot.libre.computer)|192.53.162.101|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 933888 (912K) [application/octet-stream]
Saving to: ‘/tmp/tmp.dLrg2xvGuJ’

/tmp/tmp.dLrg2xvGuJ 100%[===================>] 912.00K  2.72MB/s    in 0.3s

2022-10-18 19:50:36 (2.72 MB/s) - ‘/tmp/tmp.dLrg2xvGuJ’ saved [933888/933888]

+ dd if=/tmp/tmp.dLrg2xvGuJ of=/dev/mmcblk0 bs=512 seek=1
1824+0 records in
1824+0 records out
933888 bytes (934 kB, 912 KiB) copied, 0.120149 s, 7.8 MB/s
+ '[' '!' -d /usr/share/X11/xorg.conf.d ']'
+ cp /home/pi/libretech-raspbian-portability/apps/xorg/10-disable-glx.conf /home/pi/libretech-raspbian-portability/apps/xorg/10-meson.conf /home/pi/libretech-raspbian-portability/apps/xorg/10-rockchip.conf /home/pi/libretech-raspbian-portability/apps/xorg/10-sunxi.conf /usr/share/X11/xorg.conf.d
+ '[' -f /home/pi/libretech-raspbian-portability/apps/alsa/aml-s905x-cc.state ']'
+ cp /home/pi/libretech-raspbian-portability/apps/alsa/aml-s905x-cc.state /var/lib/alsa/asound.state
+ read -n 1 -p 'Modifications complete. Press any key to shutdown. Once the green LED stops blinking and turns off for 10 seconds, remove power and move the MicroSD card to the Libre Computer Board.'
Modifications complete. Press any key to shutdown. Once the green LED stops blinking and turns off for 10 seconds, remove power and move the MicroSD card to the Libre Computer Board.