Jump to content

Helios64 u-boot does not build anymore after we bumped to 2022.07


Recommended Posts

Posted

In theory, I can move Helios 64 support to the "media" group (and fix build errors), but I'm not sure if this is a good idea (I don't have real hardware for quick testing and debugging) . This will significantly change the entire structure (switching to a different startup option and a different kernel). And before doing this, you need to discuss it with all those interested and those who will be affected by it.

Posted (edited)

I'm rather new and not sure what switching to a media group would entail but I think I'd probably agree with iav. I really ❤️ my H64 but we are a niche community and most of us use them for low-power homelab NAS i'm assuming.

 

I have finally got my H64 stable with OMV6 but I am having issues with smb shares and such that i'm still working on :(

Edited by BinaryWaves
Posted

@prahal Thanks for fixing this bug !

 

You mentioned, that you are investigating the emmc hs400 issue. Once you (or someone else) found a solution to it, please let us know.

 

We could then try to test newer versions of the linux kernel and see what remains to be done.

Posted

@BinaryWaves Luckily I have upgraded to OMV6 and, almost SMB, still work fine... Do You have NUT plugin? I don't have more notifactions when I turnon Helios from UPS plugin... You can confirm me that the switch from buster to bullseye don't reduce stability? I have choose buster image when I have made clean install of armbian, but for the upgrading to OMV 6 automatically has switched to bullseye

Posted
  On 12/10/2022 at 11:22 AM, n3o said:

What are bootable images? What is u-boot?

Expand  

In current thread that means "Armbian was not available for Helios64 hardware for a time. But then it fixed, and anyone can make sdcard with fresh armbian system for Helios64 device".

 

u-boot — software, use by armbian on first seconds after device powered on.

Posted (edited)

 

  On 12/10/2022 at 8:57 PM, iav said:

In current thread that means "Armbian was not available for Helios64 hardware for a time. But then it fixed, and anyone can make sdcard with fresh armbian system for Helios64 device".

 

u-boot — software, use by armbian on first seconds after device powered on.

Expand  

So now I can make image following this tut https://docs.armbian.com/Developer-Guide_Build-Preparation/ ?

Edited by n3o
Posted
  On 11/26/2022 at 11:58 AM, ebin-dev said:

You mentioned, that you are investigating the emmc hs400 issue. Once you (or someone else) found a solution to it, please let us know.

Expand  

 

@ebin-dev
6.2 should have it fixed. Though it requires testing. I did build and install the kernel from Armbian edge 6.1.11-rockchip64 and added the few missing packages for the core regulator for the stable 6.2 repository https://github.com/torvalds/linux/commits/master/drivers/regulator/core.c , that is:

cb3543cff90a regulator: core: fix deadlock on regulator enable
0debed5b117d regulator: core: Fix resolve supply lookup issue
8f3cbcd6b440 regulator: core: Use different devices for resource allocation and DT lookup
ba62319a42c5 regulator: core: fix resource leak in regulator_register()
da46ee19cbd8 regulator: core: fix module refcount leak in set_supply()
0591b14ce039 regulator: core: fix use_count leakage when handling boot-on
dc8d006d15b6 regulator: core: use kfree_const() to free space conditionally
f2b41b748c19 regulator: core: fix unbalanced of node refcount in regulator_dev_lookup()
fd1845069711 regulator: devres: Add devm_regulator_bulk_get_exclusive()

All are probably not required but I have not yet sorted out which ones matter (and it will become moot as soon as 6.2 enter armbian (except if a new commit breaks the hs400es on rk339 anew.

(Likely the fix would be 0debed5b117d regulator: core: Fix resolve supply lookup issue)

 

The test was a simple mount of the emmc this kernel and hs400es reenabled in the dts, write a file, unmount, remount, read the file. No error in dmesg.

Posted

 It turns out I only had one of the above patch applied:

Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0001-regulator-devres-Add-devm_regulator_bulk_get_exclusi.patch  info
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0002-regulator-core-fix-unbalanced-of-node-refcount-in-re.patch failed wrn
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0003-regulator-core-use-kfree_const-to-free-space-conditi.patch failed wrn
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0004-regulator-core-fix-use_count-leakage-when-handling-b.patch failed wrn
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0005-regulator-core-fix-module-refcount-leak-in-set_suppl.patch failed wrn
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0006-regulator-core-fix-resource-leak-in-regulator_regist.patch failed wrn
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0007-regulator-core-Use-different-devices-for-resource-al.patch failed wrn
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0008-regulator-core-Fix-resolve-supply-lookup-issue.patch failed wrn
Displaying message: * [\e[33mu\e[0m][\e[32mc\e[0m] p-0009-regulator-core-fix-deadlock-on-regulator-enable.patch failed wrn

and one that is unrelated. So I would say that armbian edge should do for hs400es on rk3399. Though if I remove:

assigned-clock-rates = <150000000>;
from the dts (which falls back to rk3399.dtsi value which is 200000000) I get the old error:
 

  Reveal hidden contents

 

Posted

I tried a more extensive test with all armbian (and the above regulator ones above) patches removed (patches removed for an unrelated test) and the test failed CQHCI.

I still have to try the extensive test with devm patch applied and also with the above patchset fixed to apply to armbian kernel 6.1.12.

 

The read test works:
 

dd if=/dev/mmcblk1 of=/dev/null bs=16M iflag=direct
931+1 enregistrements lus
931+1 enregistrements écrits
15634268160 octets (16 GB, 15 GiB) copiés, 65,3501 s, 239 MB/s

 

but with emmc part1 mounted on /mnt, the write test fails:

sudo dd if=/dev/sda of=/mnt/test2.dat bs=16M count=500 oflag=direct
dd: erreur d'écriture dans '/mnt/test2.dat': Erreur d'entrée/sortie
1+0 enregistrements lus
0+0 enregistrements écrits
0 octet copié, 0,856469 s, 0,0 kB/s

with error:
 

[ 2240.820878] mmc1: running CQE recovery                                                                
[ 2240.824858] ------------[ cut here ]------------                                                      
[ 2240.825339] mmc1: cqhci: spurious TCN for tag 12  
(...)

 

Posted

little offtopic: somebody can tell me how update uboot?

from here 

in zsh console the command "dmesg | "mmc.*: SDHCI controller on fe330000.mmc \[fe330000.mmc\] using ADMA"" doesn't work  and command "dpkg -l "linux-u-boot-helios64*"" give me the following output

 

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version      Architecture Description
+++-=============================-============-============-=================================
ii  linux-u-boot-helios64-current 21.08.9      arm64        Uboot loader 2021.07

 

So I have the following questions:

1. What is the equvalent zsh shell command of "dmesg | "mmc.*: SDHCI controller on fe330000.mmc \[fe330000.mmc\] using ADMA"" bourne shell command?

2. linux-u-boot-helios64-edge 23.02.0-trunk arm64        Uboot loader 2022.07 (used by prahal in the linked topic) is stable?

3. Should be used only with armbian edge or can be used also with bullseye?

4. Can be used with linux kernel 5.15.93? Some month ago I have installed from open media vault wireguard plugin, but I don't know why the installation break after update to linux kernel 6 and I must reinstall all from begin . I have make a backup of microsd image a week ago, but I don't want repeat the fail

5. In omv dashboard, in section update, isn't showed Armbian 23.02 ... how can I update it? it's possible add an option to keep stored on sd kernel 5.15.93 in case of issues? And if some issues occurs, what command should send from ssh?

Posted

somebody can help me? Moreover I have tried to search linux-u-boot-helios64-edge 23.02.0-trunk on web but I can't find it... where prahal have found it?

Posted
  On 5/17/2023 at 2:04 PM, n3o said:

What is the equvalent zsh shell command of "dmesg | "mmc.*: SDHCI controller on fe330000.mmc \[fe330000.mmc\] using ADMA"" bourne shell command?

Expand  

 

This is shell agnostic but you miss the program name "grep" after the pipe so you should:

dmesg | grep "mmc.*: SDHCI controller on fe330000.mmc \[fe330000.mmc\] using ADMA"

or as dmesg is a ring buffer and early message could end up lost):

journalctl -k -b | grep "mmc.*: SDHCI controller on fe330000.mmc \[fe330000.mmc\] using ADMA"

 

Posted
  On 5/18/2023 at 3:00 PM, n3o said:

I have tried to search linux-u-boot-helios64-edge 23.02.0-trunk on web but I can't find it... where prahal have found it?

Expand  

lastest linux-u-boot-helios64-edge published was 22.02.1.

 

I built linux-u-boot-helios64-edge 23.02.0-trunk locally by cloning Armbian build repository https://github.com/armbian/build/:
 

git clone https://github.com/armbian/build.git

cd build

./compile.sh docker BOARD=helios64 BRANCH=edge BUILD_ONLY="u-boot" RELEASE=bullseye KERNEL_CONFIGURE=no

 

That is I build inside a docker container (as I am on Debian which is not an officially supported build host.

If you want to also compile the kernel add ",kernel" to BUILD_ONLY, see https://docs.armbian.com/Developer-Guide_Build-Options/

 

You will then have your packages in the build/output/debs/ directory. Copy them to your helios64 and install with "dpkg -i <deb>".

Posted
  On 5/17/2023 at 2:04 PM, n3o said:

Should be used only with armbian edge or can be used also with bullseye?

Expand  

 

I myself run bullseye with an edge kernel, u-boot, and armbian-bsp (in fact everything that was build by the now obsolete KERNEL_ONLY=yes option to compile.sh. Now replaced by BUILD_ONLY="u-boot,kernel,armbian-config,armbian-zsh,plymouth-theme-armbian,armbian-firmware,armbian-bsp".

 

There could be a sysfs or device path rename that breaks armbian scripts. At one time we had the fan path that changed. But this is with kernel packages. u-boot one only matters to the kernel. That is the location and name of the dtb in /boot matters, though I have not heard of anything changing in that regard for a long while (not an u-boot issue per se but more an armbian u-boot configuration issue).

So if one day you have an issue due to a mismatch between u-boot, armbian configuration and script, and the kernel you can pretty easily revert (though it requires learning to rewrite the u-boot).

You can extract the steps from the armbian script that does the job when you run the armbian tool /usr/sbin/nand-sata-install:

/usr/lib/u-boot/platform_install.sh

mostly its write_uboot_platform function:

     if [[ -f $1/rksd_loader.img ]]; then
        dd if=$1/rksd_loader.img of=$2 seek=64 conv=notrunc status=none > /dev/null 2>&1;
     else
     	if [[ -f $1/u-boot.itb ]]; then
            dd if=$1/idbloader.img of=$2 seek=64 conv=notrunc status=none > /dev/null 2>&1;
            dd if=$1/u-boot.itb of=$2 seek=16384 conv=notrunc status=none > /dev/null 2>&1;
        else
            if [[ -f $1/uboot.img ]]; then
                dd if=$1/idbloader.bin of=$2 seek=64 conv=notrunc status=none > /dev/null 2>&1;
                dd if=$1/uboot.img of=$2 seek=16384 conv=notrunc status=none > /dev/null 2>&1;
                dd if=$1/trust.bin of=$2 seek=24576 conv=notrunc status=none > /dev/null 2>&1;
            else
                echo "Unsupported u-boot processing configuration!";
                exit 1;
            fi;
        fi;
    fi

where $2 is the device file where you want to install U-Boot.

nand-install-script get it via:

partition="$(sudo blkid | tr -d '":' | grep "$(sed -e 's/^.*root=//' -e 's/ .*$//' < /proc/cmdline)" | awk '{print $1}')"; echo "${partition::-2}"

 which is the device where your kernel has its root partition setup. But if you want to restore u-boot on eMMC from an SD card image this will give you /dev/mmcblk0 (which is the SD card) instead of /dev/mmcblk1 (the eMMC ).

 

So as this script does the command to write the u-boot from the command line will depend on the format of the u-boot in the package. For  linux-u-boot-helios64-edge 23.02.0-trunk:

ls /usr/lib/linux-u-boot-edge-helios64_23.02.0-trunk_arm64
idbloader.img u-boot.itb

that is /usr/lib/linux-u-boot-edge-helios64_23.02.0-trunk_arm64 contains u-boot.itb so the command are:

dd if=$1/idbloader.img of=$2 seek=64 conv=notrunc status=none > /dev/null 2>&1;
dd if=$1/u-boot.itb of=$2 seek=16384 conv=notrunc status=none > /dev/null 2>&1;

with $1 equals /usr/lib/linux-u-boot-edge-helios64_23.02.0-trunk_arm64 and $2 equals the target device file to write u-boot to (here for emmc /dev/mmcblk1 and for the SD card /dv/mmcblk0).

Which gives to write to the eMMC when rescuing from an SD card on helios64:

dd if=/usr/lib/linux-u-boot-edge-helios64_23.02.0-trunk_arm64/idbloader.img of=/dev/mmcblk0 seek=64 conv=notrunc status=none
dd if=/usr/lib/linux-u-boot-edge-helios64_23.02.0-trunk_arm64/u-boot.itb of=/dev/mmcblk0 seek=16384 conv=notrunc status=none

 

If you want to write to the SD card you could even write the u-boot from a PC via an SD card reader. You will then have to get the u-boot binaries from your deb package (a deb package is a compressed tar archive) and on your PC replace the of=/dev/mmcblk0 by the device file your card reader exhibits the SD card as.

 

Posted
  On 5/18/2023 at 3:46 PM, prahal said:

lastest linux-u-boot-helios64-edge published was 22.02.1.

 

I built linux-u-boot-helios64-edge 23.02.0-trunk locally by cloning Armbian build repository https://github.com/armbian/build/:

Expand  

 thank You for the answer ..  change something from linux-u-boot-helios64-current 23.02.0-trunk to linux-u-boot-helios64-edge 23.02.0-trunk ?

 

I don't know use docker, can You compile u-boot only? Can I use U-boot 23.02.0 both with kernel 5.19.53 that 6.2.0?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines