ODroid N2+ Support

This is for ARMv8 based devices

ODroid N2+ Support

Postby DavidSankel » Wed Feb 01, 2023 3:16 am

Hi all, I have ODroid N2+ working pretty well using a 6.0.16 kernel. I got started using archdroid, but that doesn't seem to be active. I wonder what it would take to get the work done over there incorporated into the archlinux ARM project. I'd be happy to do the footwork. Would I start by making pull requests to the package repository?
DavidSankel
 
Posts: 1
Joined: Wed Feb 01, 2023 3:13 am

Re: ODroid N2+ Support

Postby woody » Mon Mar 20, 2023 10:09 pm

I've been trying to update my Odroid N2 to kernel >6.0. I first tried to update from kernel 5.19, but I couldn't get it to boot. I built a new Arch install on an sdcard that came up with kernel 4.9.219-1. I tried updating this install to 6.2 by installing the linux-aarch64-6.2.7-2 package with pacman, but again I couldn't get it to boot.

I've tried using different dbt files: meson64_odroidn2.dtb or meson-g12b-odroid-n2.dtb.
I've tried changing loadaddrs in boot.ini.

So far I haven't hit on a combination to make it work. Can you tell me what dtb file and what boot.ini parameters you're using that made 6.0 work for you? Did you install from pacman or did you create a custom kernel?
Last edited by woody on Tue Mar 21, 2023 2:24 pm, edited 1 time in total.
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby karog » Tue Mar 21, 2023 12:37 am

I have been running an N2 with arch for a few years now on kernel 6.2.7. This last Sat I got an N2+ and I am using the 12V 2A power supply from my N2 with a console UART cable. My boot fails very early booting from microSD or EMMC when I think it is testing DRAM. See
$this->bbcode_second_pass_code('', 'G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

no sdio debug board detected
L0:00000000
L1:00000703
L2:0000c067
L3:14000020
B2:00402000
B1:e0f83180

TE: 206202

BL2 Built : 06:17:13, Jun 28 2019. g12b gf0505d7-dirty - qi.duan@droid13

Board ID = 5
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00036dae
DDR driver_vesion: LPDDR4_PHY_V_0_1_14 build time: Jun 28 2019 06:17:09
board id: 5
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
fastboot data verify
verify result: 255
Cfg max: 1, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : STREAM 0x003b0003 - 0x00000000 0x00000000 0x00000000
INFO : STREAM 0x04020000 -
INFO : ERROR : Training has failed!
1D training failed
All ddr config failed...
')and then it repeats what I have already shown.

Woody, are you using a different u-boot.bin than comes with the latest download for this platform which is u-boot.bin size 854896 and I think dated 12-8-2019?

I am wondering if my hardware is bad. Curiously if I try to boot with SPI it begins with the same failure but instead of repeating the entire cycle it retries the DDRM check directly and succeeds. See:$this->bbcode_second_pass_code('', 'Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SPI, src: 0x00014000, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : STREAM 0x003b0003 - 0x00000000 0x00000000 0x00000000
INFO : STREAM 0x04020000 -
INFO : ERROR : Training has failed!
1D training failed
Cfg max: 2, cur: 2. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SPI, src: 0x00014000, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SPI, src: 0x00020000, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!
')Notice that in the microSD/EMMC case, a few lines before the training is a line$this->bbcode_second_pass_code('', 'Cfg max: 1, cur: 1. Board id: 255. Force loop cfg')with max:1 cur: 1 whereas in the SPI case this line is$this->bbcode_second_pass_code('', 'Cfg max: 2, cur: 1. Board id: 255. Force loop cfg') with max: 2 and after the failure there is now the line$this->bbcode_second_pass_code('', 'Cfg max: 2, cur: 2. Board id: 255. Force loop cfg')with cur: 2 so in this SPI case it seems set to try twice unlike the first case and this second time succeeds.

I am not anywhere near loading the kernel or dtb or anything else from /boot. I have seen some remarks on the internet about beefier power supply but my 12v 2A should be way more than enough.

I also notice a bit before the DDR test, some lines that Load FIP HDR and Load ddrfw from the medium that contains the u-boot.bin like SD in the first case and SPI in the second case which is why I am wondering about u-boot.bin. But I have no real experience about this level of booting so I am seeking input.

Any thoughts that might help? Thx
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm

Re: ODroid N2+ Support

Postby woody » Tue Mar 21, 2023 2:39 pm

Karog: Right now, I have 2 different installations: one running kernel 4.9 and another running kernel 5.19. Both are using the same u-boot.bin that you referenced. I've tried to update to 6.x, but I've had to rollback, because I can't get a successful boot. I have an N2 and also an N2+, but I can't get a boot with either.

For your 6.2 installation, what dtb file are you using? Also, what are these parameters in boot.ini:
(These are the ones that are working for me on 5.19 on N2+)

$this->bbcode_second_pass_code('', '
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x4080000"
')
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby karog » Tue Mar 21, 2023 3:23 pm

woody, from my N2 working kernel 6.2.7 boot.ini$this->bbcode_second_pass_code('', '
# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x4080000"

# Load kernel, dtb and initrd
load mmc ${devno}:1 ${loadaddr} /Image
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson-g12b-odroid-n2.dtb
load mmc ${devno}:1 ${initrd_loadaddr} /initramfs-linux.uimg
fdt addr ${dtb_loadaddr}
')so the addresses are the same and the dtb is meson-g12b-odroid-n2.dtb.

Do you have console access so you can see what fails? If not, get the UART from Ameridroid. That should help. From our prior discussions on the other thread about the dtb, I found an old boot.ini that used meson64_odroidn2.dtb so I think with the newer kernels that may be obsolete and you need the g12b dtb. For 6.2 are you using the mainline kernel core/linux-aarch64?

In my case, I am failing so early it looks like maybe hardware but the SPI case looks like maybe it can be worked around with a different u-boot. I am going to explore that today.

woody, if you have console access, would you post the start of the boot on the N2+ like I posted above thru the DDR training? Thx.
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm

Re: ODroid N2+ Support

Postby woody » Tue Mar 21, 2023 5:10 pm

I did get a console set up using HDMI output. When I installed 6.2, I saw the usual petitboot screen, but nothing else after it went into the boot phase. When I did a chroot into the installation, there was no journal entry for the attempted boot, so it looks like it fails very early in the process. I guess the uart connection would show the same thing?

I'll do the upgrade again, and see if I can figure out anything.
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby karog » Tue Mar 21, 2023 5:44 pm

I would definitely get the UART. By the time you get HDMI many things have already happened.

Do you always boot from SPI or have you tried SD or EMMC?
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm

Re: ODroid N2+ Support

Postby woody » Tue Mar 21, 2023 8:28 pm

I normally use a USB HDD or a USB SSD. For testing, I'm using a microSD card in a USB adapter, so it's basically the same as using a USB drive. I can try booting with the SD card in the slot on the device and see if that makes a difference.
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby karog » Tue Mar 21, 2023 8:40 pm

So I solved my problem and it was the u-boot or at least that is what can fix the problem. The standard u-boot.bin in the current arch root fails for me on the odroid N2+ by failing an early DDR test which it tries once and then resets when booting from SD/EMMC. However booting from SPI tries twice and succeeds on the second try and continues. For my purposes I do not want to run from SPI as I run headless; this is just a server for me.

I couldn't find any proper newer u-boot reference so I download a minimal ubuntu image from odroid.com, flashed to an SD card and it booted albeit still taking two tries with the DDR. I looked in its /boot for a u-boot.bin but no joy. Then I realized I had a working u-boot on this SD card so I repartitioned it for an arch boot dir, copied my /boot contents from my N2, adjusted boot.ini for the n2-plus dtb, adjusted fstab on my root dir for the boot PARTUUID of this SD so it can be mounted, and I was up and running on the N2+ with all that was running on my N2.

My main reason for switching is that I have become extremely dependent on my N2 for all manner of things and realized that if it were to fail, I would be up a creek for awhile. So I wanted a swappable backup and figured the N2+ might as well be primary now with the N2 as backup.

Good luck to the rest of you on this thread.
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm

Re: ODroid N2+ Support

Postby karog » Tue Mar 21, 2023 8:46 pm

woody, booting from USB does that mean you are using SPI? If so, that would explain why you haven't had the problem I have since it appears to have the different uboot unless your DDR test does not fail the first time like mine does. If you ever get a UART I would love to know about the DDR training on the N2+.
karog
 
Posts: 300
Joined: Thu Jan 05, 2012 7:55 pm

Next

Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 9 guests