[SOLVED] About upgrading HC1 form Stretch to Buster

Post Reply
Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

[SOLVED] About upgrading HC1 form Stretch to Buster

Post by Talkless »

Hi,

Currently I run Debian Stretch on HC1, using tutorial in https://wiki.debian.org/InstallingDebianOn/OdroidHC1.

Now I wonder, should I be able to perfom inplace upgrade (not image rebuild) to Buster? Should it work with Buster's kernel?

Also, I see that mentoned tutorial was changed to use `flash-kernel` packages, any "dangers" for changing boot setup..? Currenlty, I run this script every time Linux updates:

Code: Select all

#!/usr/bin/env bash

if [[ $(id -u) != 0 ]]
then
    >&2 echo "Please run as root."
    exit 1
fi
echo "Creating boot image files..."

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'boot.ini as u-boot script' -d /boot/boot.ini /boot/boot.scr
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n image -d /boot/initrd /boot/initrd.ub

echo "Done."
Will this be needed too with Buster and it's flash-kernel?

Big thanks!
Last edited by Talkless on Thu Jan 02, 2020 10:40 pm, edited 1 time in total.

igorpec
Posts: 1114
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: bash,c++,python
Has thanked: 73 times
Been thanked: 169 times
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by igorpec »

Kernel will not be changed since its the same.

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

igorpec wrote:
Sun Dec 29, 2019 11:26 pm
Kernel will not be changed since its the same.
Uhm pardon..? Debian Strech uses Linux 4.9, and Debian Buster has Linux 4.19.

igorpec
Posts: 1114
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: bash,c++,python
Has thanked: 73 times
Been thanked: 169 times
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by igorpec »

Talkless wrote:
Mon Dec 30, 2019 6:01 am
igorpec wrote:
Sun Dec 29, 2019 11:26 pm
Kernel will not be changed since its the same.
Uhm pardon..? Debian Strech uses Linux 4.9, and Debian Buster has Linux 4.19.
This might be true on x86 / mainline world.

You are not using official Debian since it does not exists.
https://wiki.debian.org/InstallingDebianOn/OdroidHC1
"Debian does not support installation on the device as of today (May 2019). Installing requires U-Boot and several firmware BLOB from Hardkernel/Samsung."

If you want to switch between kernels in a simple manner, you should perhaps try Armbian (https://docs.armbian.com/#what-is-armbian). We provide stock vendor 4.14.y kernel and 5.4.y in a combination with any Debian like user space: Stretch, Buster, Bullseye (Debian 11 to be), Xenial, Bionic, ...

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

igorpec wrote:
Mon Dec 30, 2019 8:27 am
You are not using official Debian since it does not exists.
https://wiki.debian.org/InstallingDebianOn/OdroidHC1
"Debian does not support installation on the device as of today (May 2019). Installing requires U-Boot and several firmware BLOB from Hardkernel/Samsung."
Official installer does not exist, yes, but that wiki tutorial works file, system is initialized using multistrap via chrooting. It IS Debian, with Linux odroid-hc1 4.9.0-11-armmp-lpae #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) armv7l GNU/Linux from official mirror deb http://debian.mirror.vu.lt/debian stretch main

igorpec
Posts: 1114
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: bash,c++,python
Has thanked: 73 times
Been thanked: 169 times
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by igorpec »

Talkless wrote:
Mon Dec 30, 2019 7:53 pm
igorpec wrote:
Mon Dec 30, 2019 8:27 am
You are not using official Debian since it does not exists.
https://wiki.debian.org/InstallingDebianOn/OdroidHC1
"Debian does not support installation on the device as of today (May 2019). Installing requires U-Boot and several firmware BLOB from Hardkernel/Samsung."
Official installer does not exist, yes, but that wiki tutorial works file, system is initialized using multistrap via chrooting.
That would be expected. Every serious system or derivative construct root file-system that way:
https://github.com/armbian/build/blob/m ... ap.sh#L141
Talkless wrote:
Mon Dec 30, 2019 7:53 pm
It IS Debian, with Linux odroid-hc1 4.9.0-11-armmp-lpae #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) armv7l GNU/Linux from official mirror deb http://debian.mirror.vu.lt/debian stretch main
Kernel is simply too old/generic for this particular hardware. It's like selling Debian Wheezy as a pure gold in 2020 ...

Common ARM kernel (which is what Linux distributions would like to have some day) that would cover "all" arm variants is still some time away. I would certainly not trust that kernel. But you do whatever you like.

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

igorpec wrote:
Mon Dec 30, 2019 10:57 pm
But you do whatever you like.
This is current kernel I am using in Stretch for maybe a year already, works fine. The quesiton is about UPGRADING to newer 4.19, on Buster, and all that changed boot stuff (like using flash-kernel package). I just hoped someone had experience with Buster, before moving to the upgrading (or bricking :) ) part...

User avatar
tobetter
Posts: 11949
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 834 times
Been thanked: 2017 times
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by tobetter »

Flash-kernel does have HC1 set up for a year already if I remember correctly and it would install kernel and boot.scr properly if your BOOT partition is ext2/4. I never had tried to upgrade from Stretch to Buster, but I am also using the flash-kernel for my Debian/Ubuntu Installer.

If you be good if you can back up your uSD as a file or to another uSD, and do test. As long as partition table is not corrupted, you would be able to recover if your HC1 is bricked with copying kernel, DTB and decent boot.ini/.scr.

"Tapatalk wishes you to have fun with ODROID"


Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

tobetter wrote:
Tue Dec 31, 2019 9:09 am
it would install kernel and boot.scr properly if your BOOT partition is ext2/4.
Yes it's ext4.
tobetter wrote:
Tue Dec 31, 2019 9:09 am
If you be good if you can back up your uSD as a file or to another uSD, and do test.
Great idea, thanks! I'll just dump sd contents with dd into my laptop.

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

Looks like upgrade is.. kinda fine, though I did got this boot error:

Code: Select all

Found U-Boot script /boot.scr
3103 bytes read in 23 ms (130.9 KiB/s)
## Executing script at 50000000
4391424 bytes read in 359 ms (11.7 MiB/s)
** File not found /dtbs/4.19.0-6-armmp-lpae/exynos5422-odroidxu4.dtb
There was no exynos5422-odroidxu4 .dtb file, only exynos5422-odroidhc1.dtb, so I just copied it with new name. No sure if that's something on my side or flash-kernel bug..?

User avatar
tobetter
Posts: 11949
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 834 times
Been thanked: 2017 times
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by tobetter »

Talkless wrote:
Wed Jan 01, 2020 9:46 pm
Looks like upgrade is.. kinda fine, though I did got this boot error:

Code: Select all

Found U-Boot script /boot.scr
3103 bytes read in 23 ms (130.9 KiB/s)
## Executing script at 50000000
4391424 bytes read in 359 ms (11.7 MiB/s)
** File not found /dtbs/4.19.0-6-armmp-lpae/exynos5422-odroidxu4.dtb
There was no exynos5422-odroidxu4 .dtb file, only exynos5422-odroidhc1.dtb, so I just copied it with new name. No sure if that's something on my side or flash-kernel bug..?
The flash-kernel looks into /proc/device-tree/model in order to find out which board is whenever it updates the kernel and boot script. Your previous Stretch must-have for XU4 or U-boot does not recognize the board as HC1 on booting. It would not a major problem as long as your HC1 can boot up.

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

tobetter wrote:
Thu Jan 02, 2020 1:02 pm
The flash-kernel looks into /proc/device-tree/model in order to find out which board is whenever it updates the kernel and boot script.
Could be, though I did specify device manually with variable as suggested by Debian Wiki: env FK_MACHINE="Hardkernel Odroid HC1" flash-kernel.

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: [SOLVED] About upgrading HC1 form Stretch to Buster

Post by Talkless »

OK so Debian 10.4 upgrade came, with new stable kernel, and I've got this again (note different "-9" version):

Code: Select all

** File not found /dtbs/4.19.0-9-armmp-lpae/exynos5422-odroidxu4.dtb **

Though I do have machine set:

Code: Select all

cat /etc/flash-kernel/machine 
Hardkernel Odroid HC1

Could this be a bug in flash-kernel package..?

Manually running flash-kernel command after new kernel is error prone... (can be forgotten). And so does not work with unattended-upgrades... (would "brick" itself after upgrade & reboot).

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

tobetter wrote:
Thu Jan 02, 2020 1:02 pm
It would not a major problem as long as your HC1 can boot up.
It is problem as I have to create symlink exynos5422-odroidxu4.dtb -> exynos5422-odroidhc1.dtb every time new kernel arrives.

User avatar
tobetter
Posts: 11949
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 834 times
Been thanked: 2017 times
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by tobetter »

Talkless wrote:
Sun May 17, 2020 7:44 pm
tobetter wrote:
Thu Jan 02, 2020 1:02 pm
It would not a major problem as long as your HC1 can boot up.
It is problem as I have to create symlink exynos5422-odroidxu4.dtb -> exynos5422-odroidhc1.dtb every time new kernel arrives.
After booting with exynos5422-odroidhc1.dtb, what do you have /proc/device-tree/model?
I can see Hardkernel Odroid HC1 from the source tree of the flash-kernel.

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: About upgrading HC1 form Stretch to Buster

Post by Talkless »

tobetter wrote:
Sun May 17, 2020 11:54 pm
After booting with exynos5422-odroidhc1.dtb, what do you have /proc/device-tree/model?

Code: Select all

# cat /proc/device-tree/model
Hardkernel Odroid HC1

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: [SOLVED] About upgrading HC1 form Stretch to Buster

Post by Talkless »

OK so here's some interesting info.

Just received latest Linux security update, it was installed, and when I did reboot it failed to boot again with same :
File not found /dtbs/4.19.0-9-armmp-lpae/exynos5422-odroid.dtb

Note that it wants to find odroid.dtb, NOT odroidhc1.dtb?

(also, why it's /dtbs instead of /boot/dtbs..?)

But interestingly, doing cold boot (re-plugging power supply) made it boot fine!

Anyhow, creating symlink without hc1 suffix did the trick, so now it boots on cold boot and reboot fine:

Code: Select all

# file /boot/dtbs/4.19.0-9-armmp-lpae/exynos5422-odroid.dtb 
/boot/dtbs/4.19.0-9-armmp-lpae/exynos5422-odroid.dtb: symbolic link to exynos5422-odroidhc1.dtb
But anyhow, why cold boot and reboot differ? Why it wants different .dtb file on different boot mode?

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: [SOLVED] About upgrading HC1 form Stretch to Buster

Post by Talkless »

Same story again. Debian 10.5 has been released with new 4.19.0-10-armmp-lpae Linux image. Had manually create new dtbs symlink because:
** File not found /dtbs/4.19.0-10-armmp-lpae/exynos5422-odroid.dtb **

Talkless
Posts: 26
Joined: Wed Jan 03, 2018 2:22 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: [SOLVED] About upgrading HC1 form Stretch to Buster

Post by Talkless »

Ugh, now with Debian 10.7 it wants "/dtbs/4.19.0-13-armmp-lpae/exynos5422-odroidxu4.dtb ". Not the odroidhc1.dtb, not "just" odroid.dtb, but...

prahal
Posts: 14
Joined: Sun Jan 05, 2014 11:52 pm
languages_spoken: english
ODROIDs: u2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: [SOLVED] About upgrading HC1 form Stretch to Buster

Post by prahal »

Note that /proc/device-tree/model comes from the dtb file read by the kernel you booted from.

So if somehow you boot with the wrong dtb flash-kernel will match the wrong "Machine:" key in /usr/share/flash-kernel/db/all.db
and thus try to copy the wrong dtb from /boot/dtbs/<kernel version>/<dtb file>. This dtb is read in the same black as the matching "Machine:" key
in /usr/share/flash-kernel/db/all.db under the key "DTB-Id:" . In current flash-kernel from bookworm this is exynos5422-odroidhc1.dtb for the "Machine:" matching the string
"Hardkernel Odroid HC1" (probably case sensitive).
So it will copy the proper dtb to /boot/dtbs/<kernel version-armmp-lpae/exynos5422-odroidhc1.dtb.


Before flash-kernel run (when a kernel package is installed, reinstalled or if flash-kernel is run by hand) create this file from /usr/lib/linux-image-<kernel-version>-armmp-lpae/<the DTB-ID:" entry>
You can copy this file yourself choosing the exynos5422-odroidhc1.dtb to /boot/dtbs/<kernel -version>/ if the wrong one is there and reboot then check /proc/device-tree/model has the proper string "Hardkernel Odroid HC1" then try to reinstall the kernel package

Code: Select all

apt install --reinstall <kernel package name>

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 4 guests