Jump to content

u-boot 2023-04 and it works fine afaict


Dantes

Recommended Posts

I've been following this thread: https://forum.openwrt.org/t/nanopi-r6s-linux-6-3-arm-soc-updates/153072/14 downloaded the latest version. Decided to do some experimenting and found out that they use u-boot 2023.04. And after some experimenting I found out that it works with Armbian when I flash it to the internal storage.

 

U-Boot 2017.09-armbian (Apr 25 2023 - 04:20:41 +0000)

U-Boot SPL 2023.04-OpenWrt-r0-e283eb2 (Jun 12 2023 - 00:36:27 +0000)

 

Whats the reason the armbian u-boot is so far behind ?

(i know its WIP, just asking)


 

 

 

 

Edited by Dantes
typo
Link to comment
Share on other sites

Disclaimer:
For people reading this thread: this is what I did, unless you know exactly what you are doing, don't try this.

 

I extracted the bootloader from the Armbian Image and hurled it through binwalk and then packed it to get some indication of its entropy:

# xzcat Armbian_23.5.1_Nanopi-r6s_jammy_legacy_5.10.160_minimal.img.xz | head -c $((16*1024*1024)) > bootloader
# ls -l bootloader
-rw-rw-r--  1 test test  16777216 Jun 14 bootloader
# binwalk bootloader

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
244504        0x3BB18         CRC32 polynomial table, little endian
320368        0x4E370         Flattened device tree, size: 5186 bytes, version: 17
8388608       0x800000        Flattened device tree, size: 2255 bytes, version: 17
9186092       0x8C2B2C        CRC32 polynomial table, little endian
9248112       0x8D1D70        Android bootimg, kernel size: 1919249152 bytes, kernel addr: 0x5F6C656E, ramdisk size: 1919181921 bytes, ramdisk addr: 0x5700635F, product name: ""
9799680       0x958800        Flattened device tree, size: 9761 bytes, version: 17

# gzip -k bootloader
# ls -l bootloader.gz
-rw-rw-r--  1 test test    737185 Jun 14 bootloader.gz
#

 

 

Then did the same for the OpenwRT Image:

# zcat openwrt-rockchip-armv8-friendlyelec_nanopi-r6c-squashfs-sysupgrade.img.gz | head -c$((16*1024*1024)) > openwrt_bootloader
# ls -l openwrt_bootloader
-rw-rw-r--  1 test test  16777216 Jun 14 openwrt_bootloader
# binwalk openwrt_bootloader

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
199408        0x30AF0         Flattened device tree, size: 4419 bytes, version: 17
8388608       0x800000        Flattened device tree, size: 22528 bytes, version: 17
9421824       0x8FC400        Flattened device tree, size: 47104 bytes, version: 17

# gzip -k openwrt_bootloader
# ls -l openwrt_bootloader.gz
-rw-rw-r--  1 test test    572342 Jun 14 openwrt_bootloader.gz
#

 

The armbian bootloader seems to have a false positive or some old garbage afaict in this particular image, which is common in a WIP.

 

Then installed the bootloader:

# sgdisk --backup=partition-table.original /dev/mmcblk2
# dd if=openwrt_bootloader bs=16M count=1 of=/dev/mmcblk2
1+0 records in
1+0 records out
16777216 bytes (17 MB, 16 MiB) copied, 0,0489076 s, 343 MB/s
# sgdisk --load-backup=partition-table.original /dev/mmcblk2
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
# reboot

 

Now running u-boot 2023.04 B)

Link to comment
Share on other sites

  • Dantes changed the title to u-boot 2023-04 and it works fine afaict

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines