ODroid N2+ Support

This is for ARMv8 based devices

Re: ODroid N2+ Support

Postby yossarian » Mon Jun 12, 2023 12:09 am

I tried getting my N2+ to boot from USB using petitboot and I failed. I have an M1 which can boot from petitboot no problem but something is different on the N2+. I'll let you know if I figure it out.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby woody » Fri Jun 16, 2023 3:12 am

@yossarian
I had tried previously to use meson-g12b-odroid-n2.dtb, but I couldn't get a successful boot. When I switched to using your method with labels, I was able to get it to boot. Likewise, when I started booting with meson-g12b-odroid-n2.dtb, I saw that it was hanging at the fstab entry using device name or UUID. When I switched to using labels in fstab, the problem went away. Maybe the issue has something to do with some other setting, but it seems to change depending on which DTB file I use.

I've been able to boot into a USB drive or sdcard with adapter using petitboot for years. I only started to have the problem when I tried to upgrade the kernel to 6.0+. If you do find a way to get petitboot to work, please let me know. Normally, petitboot works out of the box without changing the settings. One thing to note: petitboot has always required using UUID in bootargs. I don't think it was ever expected to work using /dev/sdxx. I haven't tried using labels in petitboot before, so I don't know if that is supposed to work or not.
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm

Re: ODroid N2+ Support

Postby yossarian » Sat Jun 17, 2023 1:36 am

I don't have the serial console adapter which would let me debug the boot problems, but I've ordered it. When that arrives I will conduct a few more experiments.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby yossarian » Sat Jun 17, 2023 9:06 pm

Okay my serial console adapter turned up this afternoon and I tried it out. Absolutely nothing happens after I try to boot from USB using petitboot, so something I'm doing is deeply wrong. Care to show me what you're doing and I'll try to copy it and fix it?
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby karog » Sat Jun 17, 2023 10:03 pm

$this->bbcode_second_pass_quote('yossarian', 'O')kay my serial console adapter turned up this afternoon and I tried it out.


Would you be willing to try booting from uSD or emmc and look for the ram training very early in boot as in my 3rd post in this thread? Thx.
karog
 
Posts: 301
Joined: Thu Jan 05, 2012 7:55 pm

Re: ODroid N2+ Support

Postby yossarian » Sun Jun 18, 2023 2:03 am

$this->bbcode_second_pass_quote('karog', 'W')ould you be willing to try booting from uSD or emmc and look for the ram training very early in boot as in my 3rd post in this thread? Thx.


Here is everything from reboot through bootloader and uboot. I stopped when the kernel started running.

$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: 126347

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: 000235be
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: 2, 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 : 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 SD, src: 0x00020200, 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!

R0_RxClkDly_Margin==94 ps 8
R0_TxDqDly_Margi==94 ps 8


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
pre test bdlr_100_average==407 bdlr_100_min==407 bdlr_100_max==407 bdlr_100_cur==407
aft test bdlr_100_average==407 bdlr_100_min==407 bdlr_100_max==407 bdlr_100_cur==407
non-sec scramble use zero key
ddr scramble enabled

100bdlr_step_size ps== 407
result report
boot times 1Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from SD, src: 0x0003c200, des: 0x0172c000, size: 0x00096600, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0c 40 00 01 27 13 00 00 0a 33 34 33 42 42 50
[3.700648 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE: BL31: v1.3(release):ab8811b
NOTICE: BL31: Built : 15:03:31, Feb 12 2019
NOTICE: BL31: G12A normal boot!
NOTICE: BL31: BL33 decompress pass
ERROR: Error initializing runtime service opteed_fast


U-Boot 2015.01-g430749a (Mar 29 2021 - 02:02:06)

DRAM: 3.5 GiB
Relocation Offset is: d6ef0000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 00000000d7f849a8
MMC: aml_priv->desc_buf = 0x00000000d3ee07c0
aml_priv->desc_buf = 0x00000000d3ee2b00
SDIO Port C: 0, SDIO Port B: 1
card in
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 25000000
[mmc_init] mmc init success
In: serial
Out: serial
Err: serial
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: driver version: v20190313
vpu: detect chip type: 9
vpu: clk_level default: 7(666667000Hz), max: 7(666667000Hz)
vpu: clk_level = 7
vpu: vpu_power_on
vpu: set_vpu_clk
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: set_vpu_clk finish
vpu: vpu_module_init_config
vpp: vpp_init
vpp: vpp osd2 matrix rgb2yuv..............
cvbs: cpuid:0x29
cvbs_config_hdmipll_g12a
cvbs_set_vid2_clk
reading boot-logo.bmp.gz
22164 bytes read in 7 ms (3 MiB/s)
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]set initrd_high: 0x3d800000
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=3840, height=1440
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6 vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1319]
rx version is 1.4 or below div=10
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6 vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1319]
rx version is 1.4 or below div=10
[OSD]osd_hw.free_dst_data: 0,1919,0,1079
Net: dwmac.ff3f0000
syntax error
Hit Enter or space or Ctrl+C key to stop autoboot -- : 0
## Attempting fetch boot.ini in mmc:0...
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
## Executing script at 04000000
Wrong image format for "source" command
## Attempting fetch boot.scr in mmc:0...
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
## Executing script at 04000000
Wrong image format for "source" command
## Attempting fetch boot.ini in mmc:1...
reading boot.ini
2266 bytes read in 3 ms (737.3 KiB/s)
## Executing script at 04000000
reading boot-logo.bmp.gz
22164 bytes read in 8 ms (2.6 MiB/s)
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01000
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6 vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1319]
rx version is 1.4 or below div=10
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6 vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1319]
rx version is 1.4 or below div=10
[OSD]osd_hw.free_dst_data: 0,1919,0,1079
reading /Image
42795520 bytes read in 3690 ms (11.1 MiB/s)
reading /dtbs/amlogic/meson-g12b-odroid-n2-plus.dtb
78314 bytes read in 16 ms (4.7 MiB/s)
reading /initramfs-linux.uimg
7655937 bytes read in 667 ms (10.9 MiB/s)
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory

Usage:
rsvmem check - check reserved memory
rsvmem dump - dump reserved memory

rsvmem check failed
## Loading init Ramdisk from Legacy Image at 04080000 ...
Image Name: Ramdisk Image
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 7655873 Bytes = 7.3 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
active_slot is <NULL>
Unknown command 'store' - try 'help'
No dtbo patitions found
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 20000000
Booting using the fdt blob at 0x20000000
No valid dtbo image found
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
Loading Ramdisk to 3d0b2000, end 3d7ff1c1 ... OK
Loading Device Tree to 000000001ffe9000, end 000000001ffff1e9 ... OK

Starting kernel ...

uboot time: 10456905 us')
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm

Re: ODroid N2+ Support

Postby karog » Sun Jun 18, 2023 2:53 am

$this->bbcode_second_pass_quote('yossarian', '')$this->bbcode_second_pass_quote('karog', 'W')ould you be willing to try booting from uSD or emmc and look for the ram training very early in boot as in my 3rd post in this thread? Thx.

Here is everything from reboot through bootloader and uboot. I stopped when the kernel started running.

Thanks. I see your uboot is set to try the ram training twice but succeeds on the first try whereas mine fails the first time and succeeds on the second. I guess my N2+ is more marginal than yours.

Can you tell me where you got your uboot? I kind of hacked mine out of an ubuntu img from odroid.

One other difference is you have 4GB of ram and I opted for 2GB of ram which more than satisfies my needs.
karog
 
Posts: 301
Joined: Thu Jan 05, 2012 7:55 pm
Top

Re: ODroid N2+ Support

Postby woody » Sun Jun 18, 2023 3:43 am

$this->bbcode_second_pass_quote('', 'y')ossarian wrote:
Absolutely nothing happens after I try to boot from USB using petitboot, so something I'm doing is deeply wrong. Care to show me what you're doing and I'll try to copy it and fix it?


Sounds like we are all able to boot from the sdcard slot using u-boot, but not with petitboot. Booting from petitboot has worked for me on both the N2 and the N2+ up until kernel 6.0, so it appears to be a problem with kernel or with the DTB. Or maybe something needs to be fixed with petitboot.
woody
 
Posts: 88
Joined: Tue Dec 11, 2012 2:40 pm
Top

Re: ODroid N2+ Support

Postby yossarian » Sun Jun 18, 2023 5:29 pm

$this->bbcode_second_pass_quote('karog', 'T')hanks. I see your uboot is set to try the ram training twice but succeeds on the first try whereas mine fails the first time and succeeds on the second. I guess my N2+ is more marginal than yours.

Can you tell me where you got your uboot? I kind of hacked mine out of an ubuntu img from odroid.

One other difference is you have 4GB of ram and I opted for 2GB of ram which more than satisfies my needs.


I'm using the one from the package jgmdev provided here: https://github.com/archdroid-org/pkgbuilds/tree/master/uboot-odroid-n2plus

In case you don't know how to build packages or read their source, it refers to this exact build: https://github.com/hardkernel/u-boot/releases/download/travis/odroidc4-189/u-boot-odroidn2-189.tar.gz

I have two different N2+ boards, and my 2GB one runs the exact same software with no problems, so I doubt it's memory size that matters. You should seriously consider the possibility that you have a defective board though. The most straightforward way to rule that out is to run a hardkernel-supported Linux image from an SD card and see if that can boot. If the supported Ubuntu builds also fail, I'd blame the hardware. If those succeed, then keep hacking on the software.
Last edited by yossarian on Sun Jun 18, 2023 5:49 pm, edited 1 time in total.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm
Top

Re: ODroid N2+ Support

Postby yossarian » Sun Jun 18, 2023 5:32 pm

$this->bbcode_second_pass_quote('woody', 'S')ounds like we are all able to boot from the sdcard slot using u-boot, but not with petitboot. Booting from petitboot has worked for me on both the N2 and the N2+ up until kernel 6.0, so it appears to be a problem with kernel or with the DTB. Or maybe something needs to be fixed with petitboot.


Can you share your mechanism for using petitboot back when it did work? Please be detailed about how you did it, or refer me to a guide that you used. I have been trying to re-use the mechanism I used for the M1, but that M1 is a totally different CPU than the N2+, and the mechanism may be completely wrong, because it doesn't work even slightly on the N2+.
yossarian
 
Posts: 22
Joined: Thu Dec 08, 2011 5:55 pm
Top

PreviousNext

Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 2 guests