Jump to content

Bring up for Odroid N2 (Meson G12B)


Recommended Posts

I've received my Odroid-N2 Dev Sample !

It came along eMMC and Realtek WiFi dongle.

eMMC was already stuffed with 4.9.162 kernel.

First boot went thru, then auto partition expanded and auto shutdown.

Second boot, I was able to login and start exploring ...

 

Link to comment
Share on other sites

I will begin playing with mainline on it, and look to see if any mainline u-boot work has been done at the same time. If so the goal would be to just lump it in with Meson64 and keep the kernel count down. On Amlogic we have the luxury of Balbes's media box images, so we don't have to fight with the vendor kernels.

Sent from my Pixel using Tapatalk

Link to comment
Share on other sites

5 hours ago, balbes150 said:

I have not sent updates for a long time, there are a lot of changes, I need to make a PR (if it is still in demand)

Please, do it if you can spend time on that task, we wish to do kind of "board bring up" for Odroid-N2.

Also, I hate to use the current BSP 4.9.162 ... What is your version ?

Link to comment
Share on other sites

16 minutes ago, martinayotte said:

Please, do it if you can spend time on that task, we wish to do kind of "board bring up" for Odroid-N2.

Also, I hate to use the current BSP 4.9.162 ... What is your version ?

Okay, I'll get the data ready tomorrow and send the PR. I'm using a 5.1 kernel

Link to comment
Share on other sites

I looked at the settings for N2 in the tvboxes branch. It uses a different partitioning scheme and the formation of the startup script, so you will need additional adaptation of the changes to do PR (and most importantly check how it will work in the real image).

 

Link to comment
Share on other sites

Hello, I have Armbian running on my N2.  I have installed OMV through armbian-config. There did not appear to be any errors; and, OMV is assessible via the web gui.  However, when I try to install NCP via armbian-config,  it just says "Loading install info..."  then goes back to the Softy screen.  I do not see any other errors.  I do not know where to look for what errors are preventing NCP from installing since armbian-config and my N2 seem to be functioning properly at the moment.  Does anyone know how to get NCP installed?

 

Link to comment
Share on other sites

@balbes150 , thanks for your 5.1.0 image !

I've tried to enhance boot verbosity by adding "loglevel=7" in bootargs in /boot/boot.ini but it didn't worked since "cat /proc/cmdline" still showing original bootargs, it seems that bootargs from /boot/boot.ini is simply ignored ...

I wish to have more verbosity, because I'm unable to make it boot from eMMC, something must append during this last line and login prompt, since on eMMC it is not reaching the login prompt and it stuck at this "re-mount".

[    7.812132] EXT4-fs (mmcblk1p2): re-mounted. Opts: commit=600,errors=remount-ro

Debian GNU/Linux buster/sid odroid ttyAML0

odroid login: 

 

Link to comment
Share on other sites

19 hours ago, Poincare said:

Does anyone know how to get NCP installed?


You can't have both at the same time. Not on Armbian and not on any other system unless you enforce virtualization, adjust ports of many shared services ... 

Link to comment
Share on other sites

10 hours ago, martinayotte said:

I've tried to enhance boot verbosity by adding "loglevel=7" in bootargs in /boot/boot.ini but it didn't worked since "cat /proc/cmdline" still showing original bootargs, it seems that bootargs from /boot/boot.ini is simply ignored ...

I will check this option at myself and I will write result.

 

10 hours ago, martinayotte said:

I wish to have more verbosity, because I'm unable to make it boot from eMMC, something must append during this last line and login prompt, since on eMMC it is not reaching the login prompt and it stuck at this "re-mount". 

How do you install the system in eMMC (what commands do you use) ?

Link to comment
Share on other sites

3 hours ago, balbes150 said:

How do you install the system in eMMC (what commands do you use) ?

I've booted from SD, bring a copy of the image via SSH/SCP, then "dd if=Armbian_5.86_Odroid-n2_Debian_buster_default_5.1.0_20190514.img of=/dev/mmcblk0 bs=100M" ...

Link to comment
Share on other sites

16 minutes ago, balbes150 said:

All is going normally build the image of N2 on the branch tvboxes ?

I don't understand your question ...

17 minutes ago, balbes150 said:

I am not forming a uInitrd file. Is it a bug in my build environment or is it a common problem ?

In normal Armbian builds, the uInitrd is done as a post-install script when installing Kernel Deb with DPKG.

Link to comment
Share on other sites

Good news. I found an easy way to run Armbian and Libreelec system completely from USB to N2 (without using SD card or eMMC module). :)

For those who want to get this opportunity without waiting for the release of the SPI u-boot update , I can write a simple instruction how to do it through the UART console (it is very simple and takes only 2-3 minutes). :)

 

 

Link to comment
Share on other sites

3 hours ago, balbes150 said:

I can write a simple instruction how to do it through the UART console

Of course, it will be appreciated !

On 5/19/2019 at 4:59 AM, balbes150 said:

I will check this option at myself and I will write result.

This you figured out about the "loglevel" ?

Link to comment
Share on other sites

27 minutes ago, martinayotte said:

This you figured out about the "loglevel" ? 

Checked at myself "loglevel=7" , the option works on both kernels. The image with the 5.1 kernel is written to a slow SD card, when set the level 7 , waited more than 20 minutes to start the system, but did not wait for the prompt to enter the login. :) In mode 5, "cat /proc/cmdline" shows the correct value in the arguments specified by "loglevel=5". You in what place to register this option ? Show the contents of "boot.ini"

Link to comment
Share on other sites

3 minutes ago, balbes150 said:

Show the contents of "boot.ini"

Here it is :

ODROIDN2-UBOOT-CONFIG

setenv dtb_name "/dtb/meson-g12b-odroid-n2.dtb"
setenv bootargs "root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 loglevel=7 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0"

# Set load addresses
setenv dtb_loadaddr "0x1000000"
setenv k_addr "0x1100000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"

# Load kernel, dtb
fatload mmc ${devno}:1 ${k_addr} zImage
fatload mmc ${devno}:1 ${initrd_loadaddr} uInitrd
fatload mmc ${devno}:1 ${dtb_loadaddr} ${dtb_name}
fdt addr ${dtb_loadaddr}

# boot
booti ${k_addr} ${initrd_loadaddr} ${dtb_loadaddr}

and here is what /proc/cmdline is showing me :

root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

Maybe I should stop U-Boot and try "printenv" ? Maybe it is because it was previously saved and the modified /boot/boot.ini is ignored ?

 

Link to comment
Share on other sites

Show "printenv". Have you changed anything in ENV ?

 

 

38 minutes ago, Igor said:

Mainline also didn't work for me, but I only gave it one try. Ran out of time ... 

What's in the launch logs ? Perhaps not all items are correctly added (changed). I use necessarily two partitions for external media. This ensures that users can easily change the settings on any PC (including Windows), when using one ext4 - there will be problems with changing the settings (edit boot.ini, etc.)

Link to comment
Share on other sites

3 minutes ago, balbes150 said:

What's in the launch logs ?


I will check later on. Now busy with life.
 

3 minutes ago, balbes150 said:

I use necessarily two partitions for external media. This ensures that users can easily change the settings on any PC (including Windows), when using one ext4 - there will be problems with changing the settings (edit boot.ini, etc.)


I added support for booting without having FAT partition so this is not the case. Legacy kernel boots fine. 

Link to comment
Share on other sites

44 minutes ago, balbes150 said:

Show "printenv". Have you changed anything in ENV ?

No, I didn't try to change anything yet ...

Here is the ENV :

 

 


odroidn2#printenv
baudrate=115200
boot_default=run boot_mmc; run boot_mmc_distro; run boot_rawimage
boot_mmc=for n in ${mmc_list}; do setenv devnum ${n}; setenv devno ${n}; cfgload; done
boot_mmc_distro=setenv devtype mmc; for n in ${mmc_list}; do setenv devnum ${n}; setenv devno ${n}; load mmc ${n} ${preloadaddr} boot.scr; source ${preloadaddr}; done
boot_part=boot
boot_pxe=dhcp; pxe get; pxe boot
boot_rawimage=setenv bootargs ${initargs} logo=${display_layer},loaded,${fb_addr} vout=${outputmode},enable cvbsmode=${cvbsmode} hdmimode=${hdmimode} osd_reverse=${osd_reverse} video_reverse=${video_reverse} androidboot.selinux=permissive androidboot.firstboot=${firstboot} jtag=disable androidboot.hardware=odroidn2; for n in ${mmc_list}; do mmc dev ${n}; movi read boot 0 ${loadaddr}; movi read dtbs 0 ${dtb_mem_addr}; booti ${loadaddr} - ${dtb_mem_addr}; bootm; done
boot_recovery=hdmitx edid; if test ${hdmimode} = custombuilt; then setenv cmode modeline=${modeline} customwidth=${customwidth} customheight=${customheight}; fi; if test ${hdmimode} = 2160p30hz || test ${hdmimode} = 2160p60hz; then setenv hdmimode 1080p60hz; fi; setenv bootargs ${initargs} logo=${display_layer},loaded,${fb_addr} vout=${hdmimode},enable hdmimode=${hdmimode} ${cmode} voutmode=${voutmode} cvbsmode=${cvbsmode} osd_reverse=${osd_reverse} video_reverse=${video_reverse} androidboot.selinux=permissive jtag=disable androidboot.hardware=odroidn2 recovery_part=recovery recovery_offset=0; for n in ${mmc_list}; do mmc dev ${n}; movi read recovery 0 ${loadaddr}; movi read dtbs 0 ${dtb_mem_addr}; booti ${loadaddr} - ${dtb_mem_addr}; bootm;done
bootcmd=run start_autoscript; run boot_default
bootdelay=1
bootfile=Image
booting_from_spi=hdmitx edid; setenv bootargs ${initargs} console=tty0 logo=osd0,loaded,0x3d800000 osd_reverse=0 video_reverse=0; setenv bootargs ${bootargs} vout=${vout} hdmimode=${hdmimode} modeline=${modeline} voutmode=${voutmode}; osd open; osd clear; vout output ${outputmode}; run set_spi_params; sf probe; sf read ${preloadaddr} ${start_kernel} ${size_kernel}; sf read ${initrd_high} ${start_initrd} ${size_initrd}; sf read ${dtb_mem_addr} ${start_dtb} ${size_dtb}; if test -e mmc 1:1 spiboot.img; then fdt addr ${dtb_mem_addr}; fdt resize; fdt set /emmc@ffe07000 status 'disabled'; fdt set /soc/cbus/spifc@14000 status 'okay'; fi; bootm ${preloadaddr} ${initrd_high} ${dtb_mem_addr};
bootlogo_addr=1080000
console=ttyS0,115200n8
cvbs_drv=0
cvbscable=0
display_bpp=24
display_color_bg=0
display_color_fg=0xffff
display_color_index=24
display_height=1080
display_layer=osd0
display_width=1920
dtb_mem_addr=0x1000000
ethact=dwmac.ff3f0000
ethaddr=00:1e:06:42:0d:0d
fb_addr=0x3d800000
fb_height=1080
fb_width=1920
fdt_addr_r=0x1000000
fdt_high=0x20000000
fusing_spi_from_sd=sf probe; sf erase 0x0 0x800000; load mmc 1 ${loadaddr} spiboot.img; sf write ${loadaddr} 0x0 ${filesize}
gatewayip=192.168.0.1
hdmimode=1080p60hz
hostname=arm_gxbb
init_display=osd open; osd clear; for n in ${mmc_list}; do if load mmc ${n} ${preloadaddr} logo.bmp.gz; then setenv logo_addr_r ${loadaddr}; unzip ${preloadaddr} ${logo_addr_r}; bmp display ${logo_addr_r}; bmp scale; elif load mmc ${n} ${preloadaddr} logo.bmp; then setenv logo_addr_r ${preloadaddr}; bmp display ${logo_addr_r}; bmp scale; fi; done; vout output ${outputmode};
initargs=rootfstype=ramfs init=/init console=ttyS0,115200n8 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000
initrd_high=3d800000
ipaddr=192.168.0.5
kernel_addr_r=0x1080000
loadaddr=1080000
mmc_list=0 1
netmask=255.255.255.0
osd_reverse=0
outputmode=1080p60hz
preboot=run switch_bootmode;
preloadaddr=0x3000000
pxefile_addr_r=0x1070000
pxeuuid=909802f2-a1dd-11e8-98d0-529269fb1459
ramdisk_addr_r=0x3080000
reboot_mode=cold_boot
serverip=192.168.0.2
set_spi_params=setenv start_uboot 0x0; setenv start_kernel 0x119000; setenv start_dtb 0x100000; setenv start_initrd 0x4E6C00; setenv size_kernel 0x3CDC00; setenv size_dtb 0x19000; setenv size_initrd 0x319400;
start_autoscript=if usb start; then run start_usb_autoscript; if mmcinfo; then run start_mmc_autoscript;fi;fi;
start_mmc_autoscript=if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi
start_usb_autoscript=if fatload usb 0 1020000 s905_autoscript; then autoscr 1020000; fi
stderr=serial
stdin=serial
stdout=serial
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run boot_recovery;else if test ${reboot_mode} = selfinstall; then oem fdisk;run boot_recovery;else if test ${reboot_mode} = cold_boot; then else if test ${reboot_mode} = fastboot; then fastboot;fi;fi;fi;fi;
video_reverse=0


Environment size: 4790/65532 bytes
 

 

 

The strange thing is that, althouth "loglevel=7" been added to /boot/boot.ini, here is the early boot output saying :

[    0.000000] Kernel command line: root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

EDIT: Another weird thing : I've decided to use the workaround by adding chosen/bootargs node to the DT, as we are doing on other boards, recompile the DTB, and reboot ...

Strangely, the "loglevel" is been discarded there too, and doing "cat /proc/device-tree/chosen/bootargs" revealed that it is discarded there too :

 

cat /proc/device-tree/chosen/bootargs 
root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

EDIT2: Ok ! I found my stupid error : I was leaving the eMMC plugged, and although booting from SDCard, U-Boot was taking the boot.ini as well as DTB from eMMC, which they were still at original states !

Link to comment
Share on other sites

31 minutes ago, martinayotte said:

EDIT: Another weird thing : I've decided to use the workaround by adding chosen/bootargs node to the DT, as we are doing on other boards, recompile the DTB, and reboot ...

Strangely, the "loglevel" is been discarded there too, and doing "cat /proc/device-tree/chosen/bootargs" revealed that it is discarded there too :

Is it when starting from SD card or when recording to eMMC ?

 

I downloaded the scripts to activate the system startup from USB. The order of use (so far it is checked only with kernel 5).

1. Burn image to USB.

2. Download the files and add to the image.

3. Switch to start u-boot with SPI.

4. In the UART console, stop startup. (CTRL+C)

5. Execute the command.

 

usb start

fatload usb 0 3000000 n2_autoscript

autoscr 3000000

 

At the end of the script, the system should shut down. Include, if correct, should begin loading and operation of the system with the USB. :)

 

 

https://yadi.sk/d/WrgbX_4ZSlnOXg

Link to comment
Share on other sites

5 hours ago, balbes150 said:

Is it when starting from SD card or when recording to eMMC ?

Starting from SDCard, but check my EDIT2 above : I've found why, it was still taking boot.ini from eMMC, although booting SDCard ...

 

5 hours ago, balbes150 said:

4. In the UART console, stop startup. (CTRL+C)

Unfortunately, my SPINOR seems to be stuffed with a U-Boot that doesn´t have keyboard check, I've tried <space>, <return> and <ctrl-c>, none of them worked.

So, I went back pluging the eMMC, and try it there, but here is the execution :

odroidn2#usb start
(Re)start USB...
USB0:   USB3.0 XHCI init start
Register 3000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
odroidn2#fatload usb 0 3000000 n2_autoscript
reading n2_autoscript
1107 bytes read in 22 ms (48.8 KiB/s)
odroidn2#autoscr 3000000
## Executing script at 03000000
Start add multiboot
Saving Environment to MMC...
Writing to MMC(0)... done
Stop add multiboot
bl31 reboot reason: 0x108
bl31 reboot reason: 0x108
system cmd  0.
bl30 get wakeup sources!
process command 00000006
bl30 enter suspend!
Little core clk suspend rate 1200000000
Big core clk suspend rate 1200000000
store restore gp0 pll
suspend_counter: 1
Enter ddr suspend
ddr suspend time: 17us
alarm=0S
process command 00000001
cec ver:2018/04/19
CEC cfg:0x0000
WAKEUP GPIO cfg:0x00000000
use vddee new table!
WAKEUP GPIO FAIL - invalid key

After that, I've rebooted, it seems to start booting from USB, but stuck without reaching login prompt again ...

I've added "loglevel=7" in boot.ini, and also in boot.cmd I've created to redo boot.scr using mkimage.

But no success : booting from USB stall before login prompt without clue ...

 

EDIT: It has finally booted, but without verbosity, and this time, it was present in /proc/cmdline.

 

Link to comment
Share on other sites

I am checking on the latest version of the SPI image (20190417).

 

After adding the launch from USB from u-boot SPI , the launch of all systems from both SD card and eMMC works perfectly in u-boot SPI. Thus, there is no need to add u-boot to SD card and EMMC, everything works with u-boot SPI. :)

Link to comment
Share on other sites

11 hours ago, martinayotte said:

Start add multiboot Saving Environment to MMC... Writing to MMC(0)... done Stop add multiboot

According to the log , you added support for USB in u-boot, which is located on eMMC. If you disable the eMMC module, you will not be able to start from USB. To fully support the launch from USB without any other media, it is necessary to add the update to the u-boot SPI.

 

Link to comment
Share on other sites

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