Prob Kern upg f. odroid-n2 (4.9.219-1) to aarch64 (5.11.4-1)

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Prob Kern upg f. odroid-n2 (4.9.219-1) to aarch64 (5.11.4-1)

Postby muddI » Wed Aug 11, 2021 10:09 am

Hello all,

this week I did my first steps with ArchLinuxARM and installed ArchLinuxARM-2021.07-odroid-n2-rootfs.tar.gz on my N2
on a USB-HDD as described in your well done Installation Instructions. Works perfect, thank you!

Today I updated the kernel from linux-odroid-n2 (4.9.219-1) to linux-aarch64 (5.11.4-1) with pacman -S.
This works fine too, but at least, the board does not boot.

Prob is in boot.ini. the dtb entry is not updated or in other words, the dtb has changed

linux-odroid-n2 (4.9.219-1):
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson64_odroidn2.dtb

linux-aarch64 (5.11.4-1):
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson-g12b-odroid-n2.dtb

After changing that entry, everything is fine again.

So just for information, maybe this helps anyone.

greetings, muddI
muddI
 
Posts: 20
Joined: Wed Aug 11, 2021 9:13 am

Re: Prob Kern upg f. odroid-n2 (4.9.219-1) to aarch64 (5.11.

Postby karog » Sat Aug 21, 2021 12:08 am

I just tried to upgrade from linux-odroid-n2 (4.9.219-1-ARCH) to linux-aarch64 (5.11.4-1).

The pacman -S went fine and I edited boot.ini to /dtbs/amlogic/meson-g12b-odroid-n2.dtb.

Boot fails.

$this->bbcode_second_pass_code('', 'reading /Image
34003456 bytes read in 1937 ms (16.7 MiB/s)
reading /dtbs/amlogic/meson-g12b-odroid-n2.dtb
76018 bytes read in 12 ms (6 MiB/s)
reading /initramfs-linux.uimg
7264642 bytes read in 416 ms (16.7 MiB/s)
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
## Loading init Ramdisk from Legacy Image at 03700000 ...
Image Name: Ramdisk Image
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 7264578 Bytes = 6.9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
load dtb from 0x1000000 ......
ERROR: Did not find a cmdline Flattened Device Tree
')
Note the
$this->bbcode_second_pass_code('', 'libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
')
followed shortly later by
$this->bbcode_second_pass_code('', 'load dtb from 0x1000000 ......
ERROR: Did not find a cmdline Flattened Device Tree
')
I don't know much about this. I am wondering if my load addresses need to be adjusted. Here is what they are that work with old kernel.
$this->bbcode_second_pass_code('', '# Set load addresses
setenv dtb_loadaddr "0x1000000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"
')
Any advice would be appreciated. Thx.

ETA:
I tried
$this->bbcode_second_pass_code('', '
# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x4080000"
')
still no joy

I am using the latest u-boot that pacman gives: alarm/uboot-odroid-n2 2015.01-10
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm

Re: Prob Kern upg f. odroid-n2 (4.9.219-1) to aarch64 (5.11.

Postby muddI » Sun Aug 22, 2021 5:05 am

after upgrading to 5.11.4-1 my boot.ini worked with
----
# Set load addresses
setenv dtb_loadaddr "0x1000000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"
----
which defined the same addresses aus yours


But your reported fdt error says:
----
#define FDT_ERR_NOTFOUND 1
/* FDT_ERR_NOTFOUND: The requested node or property does not exist */
----

So, maybe, does the file /dtbs/amlogic/meson-g12b-odroid-n2.dtb Not exist?
----
ls -l /boot/dtbs/amlogic/meson-g12b-odroid-n2.dtb.
-rwxr-xr-x 1 xxxx xxxx 76018 Mar 8 00:45 meson-g12b-odroid-n2.dtb
----

Never had this error, just guessing


Edit:
Ah, forget this, just read in your post
"reading /dtbs/amlogic/meson-g12b-odroid-n2.dtb
76018 bytes read in 12 ms (6 MiB/s)"
muddI
 
Posts: 20
Joined: Wed Aug 11, 2021 9:13 am

Re: Prob Kern upg f. odroid-n2 (4.9.219-1) to aarch64 (5.11.

Postby karog » Sun Aug 22, 2021 7:11 pm

I am finally up and running on 5.11.4-1.

First, console does change to ttyAML0 so when I still had it as ttyS0 I was not seeing serial output after kernel loaded.

I noticed that with load addresses
$this->bbcode_second_pass_code('', 'setenv dtb_loadaddr "0x1000000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"
')
that 0x3700000 - 0x1B00000 (where /Image is loaded) = 0x1C00000 = 29360128. For 4.9, /Image size is 26548736 which fits but for me, after upgrading to 5.11.4, /Image size is 34003456 which is too big.

I tried setting initrd_loadaddr to 0x4000000 to have enough space but still no go.

So I tried new load addresses found in threads developing mainline for n2 as
$this->bbcode_second_pass_code('', 'setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x4080000"
')
Note that earlier on those threads used setenv initrd_loadaddr "0x3080000" which is not big enough for the current /Image size.

Also those threads commented out "fdt addr ${dtb_loadaddr}" but I seem to need that still.

This let the kernel load and continue despite there still being concerning error messages (FDT_ERR_NOTFOUND 3 times), "Loading init Ramdisk from Legacy Image at 03080000", and "load dtb from 0x1000000" even with the different load addresses defined.
$this->bbcode_second_pass_code('', 'reading /Image
34003456 bytes read in 1973 ms (16.4 MiB/s)
reading /dtbs/amlogic/meson-g12b-odroid-n2.dtb
76018 bytes read in 13 ms (5.6 MiB/s)
reading /initramfs-linux.uimg
7264554 bytes read in 424 ms (16.3 MiB/s)
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
## Loading init Ramdisk from Legacy Image at 03080000 ...
Image Name: Ramdisk Image
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 7264490 Bytes = 6.9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 20000000
Booting using the fdt blob at 0x20000000
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
Loading Ramdisk to 3d112000, end 3d7ff8ea ... OK
Loading Device Tree to 000000001ffea000, end 000000001ffff8f1 ... OK

Starting kernel ...

uboot time: 9226792 us
')
Now I should mention that I have /boot on an SD card but /root on a USB (SSD) drive.

As the boot proceeded I began to see error messages about some process with /dev/mmcblk1p1. For 4.9, that is the first partition on the SD card and I have it mounted to /boot in my /etc/fstab.

But in 5.11.4, /dev/mmcblk1p1 does not exist. In fact, the SD card is now /dev/mmcblk0 so changing fstab to /dev/mmcblk0p1 fixed my last problem and all appears well.

To sum up,

In /boot/boot.ini, I made following changes
$this->bbcode_second_pass_code('', 'setenv condev "console=ttyAML0,115200n8" # on both

# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x4080000"
')
and I changed my /etc/fstab to mount /dev/mmcblk0p1 as /boot.
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 11 guests