C1 running Jammy and 5.15.x or 6.1.x kernels

Post Reply
sgjava
Posts: 78
Joined: Mon Dec 29, 2014 7:47 am
languages_spoken: english
ODROIDs: C1, C1+, C2, XU4
Has thanked: 1 time
Been thanked: 4 times
Contact:

C1 running Jammy and 5.15.x or 6.1.x kernels

Post by sgjava »

You can do a simple build hack to create latest Armbian builds for C1. u-boot doesn't build any more, so I just use the last good one.

1.

Code: Select all

git clone --depth 1 https://github.com/armbian/build
2.

Code: Select all

cd build
3.

Code: Select all

mkdir -p ./output/debs
4.

Code: Select all

wget -c -O ./output/debs/linux-u-boot-current-odroidc1_23.02.0-trunk_armhf.deb http://apt.armbian.com/pool/main/l/linux-u-boot-odroidc1-current/linux-u-boot-current-odroidc1_21.02.3_armhf.deb
5.

Code: Select all

sudo ./compile.sh CLEAN_LEVEL= BOARD=odroidc1 BRANCH=current RELEASE=jammy REPOSITORY_INSTALL= BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=no KERNEL_ONLY=no COMPRESS_OUTPUTIMAGE=sha,gpg,img
6.

Code: Select all

ls ./output/images
u-boot has not been able to be built for a while now (last supported image was focal and 5.x kernel).

Step 4 copies the last good u-boot to ./output/debs which is created in step 3. Change current in ./output/debs/linux-u-boot-current-odroidc1_23.02.0-trunk_armhf.deb to edge to use edge kernel. Also change build number 23.02.0 to current build number.

Step 5 does build without prompting. Change BRANCH=current to BRANCH=edge to build edge branch. If all goes well you should see image with step 6.

User avatar
joerg
Posts: 1954
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 200 times
Been thanked: 428 times
Contact:

Re: C1 running Jammy and 5.15.x or 6.1.x kernels

Post by joerg »

Thank you for the nice instruction. There changed a lot since I figured out how to compile Armbian in 2020 viewtopic.php?f=114&t=37887
But now after following here, I had to figure out again, why it is not compiling. Seems that in this short time again things changed.
First I ran into the need of compiling u-boot 20011.3. But it does not work with gcc 10.x. I added SKIP_EXTERNAL_TOOLCHAINS=no to the command, it downloaded the needed toolchains, but there are compiler errors also with gcc 4.8.
Then after sleeping a night I was enlightened! I searched in the scripts why it does not accept the local u-boot deb file. I added some debug output to artifacts_obtain.sh / function is_artifact_available_in_local_cache(): display_alert "artifact_final_file: " "${artifact_final_file}" "info". It turns out, that the file name must be: linux-u-boot-odroidc1-edge_23.08.0-trunk--2011.03-Sa1f3-Pbd9c-H33d5-Vd942-Be203_armhf.deb
I think this changes now from day to day!
After renaming, Armbiam builds!
Armbian_23.08.0-trunk_Odroidc1_jammy_edge_6.3.8_minimal.img (888.00MiB)
I hope it boots. :)

[edit]
It boots!
But to use in production, I have to check if I can make a wifi adapter work.

Code: Select all

  ___      _           _     _    ____ _ 
 / _ \  __| |_ __ ___ (_) __| |  / ___/ |
| | | |/ _` | '__/ _ \| |/ _` | | |   | |
| |_| | (_| | | | (_) | | (_| | | |___| |
 \___/ \__,_|_|  \___/|_|\__,_|  \____|_|
                                         
Welcome to Armbian 23.08.0-trunk Jammy with bleeding edge Linux 6.3.8-meson

No end-user support: built from trunk

System load:   2%           	Up time:       6 min	
Memory usage:  7% of 989M   	IP:	       192.168.1.130
CPU temp:      45°C           	Usage of /:    5% of 14G 
These users thanked the author joerg for the post:
odroid (Wed Jun 21, 2023 6:34 pm)

User avatar
joerg
Posts: 1954
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 200 times
Been thanked: 428 times
Contact:

Re: C1 running Jammy and 5.15.x or 6.1.x kernels

Post by joerg »

Damn, usb subsystem seems to be broken:

Code: Select all

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[edit]
I answered it myself 3 years ago...

Code: Select all

#!/bin/bash
gpioset gpiochip1 4=0
sleep 1
gpioset gpiochip1 4=1
But when I try to use a wireless dongle, the system becomes unresponsive. when I remove the usb wifi adapter, the system becomes again responsive. I tried three different...

hami
Posts: 28
Joined: Sat Mar 19, 2016 5:31 am
languages_spoken: english, czech
ODROIDs: C1+, C2, C4
Has thanked: 0
Been thanked: 4 times
Contact:

Re: C1 running Jammy and 5.15.x or 6.1.x kernels

Post by hami »

Hello joerg,
could you wrote here your steps how to compile Armbian for Odroid C1 and what OS system you use for that process? I tried several combinations, but without any success. I tried it in Ubuntu 22.04 server. The original (sgjava) set up does not work anymore (armbian changed some variables). Thank you.

The best,
Petr
joerg wrote:
Wed Jun 21, 2023 6:25 pm
Thank you for the nice instruction. There changed a lot since I figured out how to compile Armbian in 2020 viewtopic.php?f=114&t=37887
But now after following here, I had to figure out again, why it is not compiling. Seems that in this short time again things changed.
First I ran into the need of compiling u-boot 20011.3. But it does not work with gcc 10.x. I added SKIP_EXTERNAL_TOOLCHAINS=no to the command, it downloaded the needed toolchains, but there are compiler errors also with gcc 4.8.
Then after sleeping a night I was enlightened! I searched in the scripts why it does not accept the local u-boot deb file. I added some debug output to artifacts_obtain.sh / function is_artifact_available_in_local_cache(): display_alert "artifact_final_file: " "${artifact_final_file}" "info". It turns out, that the file name must be: linux-u-boot-odroidc1-edge_23.08.0-trunk--2011.03-Sa1f3-Pbd9c-H33d5-Vd942-Be203_armhf.deb
I think this changes now from day to day!
After renaming, Armbiam builds!
Armbian_23.08.0-trunk_Odroidc1_jammy_edge_6.3.8_minimal.img (888.00MiB)
I hope it boots. :)

[edit]
It boots!
But to use in production, I have to check if I can make a wifi adapter work.

Code: Select all

  ___      _           _     _    ____ _ 
 / _ \  __| |_ __ ___ (_) __| |  / ___/ |
| | | |/ _` | '__/ _ \| |/ _` | | |   | |
| |_| | (_| | | | (_) | | (_| | | |___| |
 \___/ \__,_|_|  \___/|_|\__,_|  \____|_|
                                         
Welcome to Armbian 23.08.0-trunk Jammy with bleeding edge Linux 6.3.8-meson

No end-user support: built from trunk

System load:   2%           	Up time:       6 min	
Memory usage:  7% of 989M   	IP:	       192.168.1.130
CPU temp:      45°C           	Usage of /:    5% of 14G 

User avatar
joerg
Posts: 1954
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 200 times
Been thanked: 428 times
Contact:

Re: C1 running Jammy and 5.15.x or 6.1.x kernels

Post by joerg »

@hami, I first struggled about an error of wrong OS. I had to add for my LinuxMint Debian Edition 5 'elsie' to lib/functions/host/host_release.sh:

Code: Select all

	if [[ -z $HOSTRELEASE || "bullseye bookworm sid focal impish hirsute jammy kinetic lunar ulyana ulyssa uma una vanessa vera elsie" != *"$HOSTRELEASE"* ]]; then
If your distribution is already there, you don't run in this error.
Then I tried again the command as wrote @sgjava, but I struggled about the naming of the last working u-boot deb package. If the build process can't find the actual package name, it wants to compile u-boot 2011.3. But this results into compile errors.
So finding the correct name for the u-boot package is the solution.
Add this debug message to the build script lib/functions/artifacts/artifacts_obtain.sh:

Code: Select all

function is_artifact_available_in_local_cache() {
....
    display_alert "artifact_final_file: " "${artifact_final_file}" "info"

	if [[ -f "${artifact_final_file}" ]]; then
		artifact_exists_in_local_cache="yes" # outer scope
	fi
	return 0
}
Then you need to compile again and abort, when it starts to compile u-boot. Search in the log for 'artifact_final_file' to find the wanted name for the u-boot package an rename the one you downloaded in step 4.

After this the building of Armbian was working.

Code: Select all

sudo ./compile.sh CLEAN_LEVEL= BOARD=odroidc1 BRANCH=current RELEASE=jammy REPOSITORY_INSTALL= BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_CONFIGURE=no  COMPRESS_OUTPUTIMAGE=sha,gpg,img 
BTW. I tried with 'current', it compiles kernel 6.1. But I couldn't use it because of instability with usb wifi adapter.

If it doesn't work for you, post the error messages here.

hami
Posts: 28
Joined: Sat Mar 19, 2016 5:31 am
languages_spoken: english, czech
ODROIDs: C1+, C2, C4
Has thanked: 0
Been thanked: 4 times
Contact:

Re: C1 running Jammy and 5.15.x or 6.1.x kernels

Post by hami »

@joerg, thank you!
I am able to compile the image. It also booted (both current and edge versions). But the problem is USB, it is unstable. At least in my case it slows down the system which becomes unusable. The same behavior you observed.

User avatar
joerg
Posts: 1954
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 200 times
Been thanked: 428 times
Contact:

Re: C1 running Jammy and 5.15.x or 6.1.x kernels

Post by joerg »

Fine if I could help. For the unstable behavior I can't dive into this issue. Maybe with another kernel tree like from linaro that is used by android the behavior is better. But as I found that my C1 for this use case is defective at gpio pin 19 I don't follow this here anymore.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest