Bring up for Odroid N2 (Meson G12B)

Recommended Posts

Donate and support the project!

On 5/25/2019 at 10:14 PM, martinayotte said:

It didn't work for me, "load average" issue still there and copy still stuck in /usr ...

I have just seen this issue on the 5.2-rc integration branch,  to get mmc booting I needed to ensure I did try to remount any disks from fstab (it would crash here).  When I did get it to boot if I pushes the mmc hard it hung (waiting on mmc) and load slowly increased with a lot of io wait.  SD card does not have this issue. and usb seems fine.


Trying to find a solution and this looks interesting which I am yet to try...


Edit:  the problem can occur with sd card as well after some time,  will try the patch above


Edit: mmc / sd problems seem to have disappeared wtih patch above

Link to post
Share on other sites

The new version of activate the multi-boot 0.3. It fixes bugs and adds the ability to easily configure the order of polling devices to run. This is the default order.


setenv mmc_list "1 0"
setenv boot_order "boot_usb boot_mmc boot_mmc_distro boot_rawimage boot_pxe boot_spi"


You can easily change it without using the UART console. It is enough to edit the file "set_boot_order.ini" (this is a plain text file), specify the desired order of the survey (you can remove unnecessary items or add your own). Write the edited file to the SD card named "boot.ini" to connect to N2 and to turn the power on. Automatically starts the script and writes a new SPI parameters of the survey and launch systems. Please note that changing the order will work only after the initial activation of multiloading from SPI. By the way, for those who have already completed the activation of the previous version n2_autoscript to upgrade to a new version does not require the console UART. Record to USB flash drive new file (n2_autoscript)  filename "boot.scr", connect to N2 and power on. The script will update the multiload to the new version. :)


Similar changes I added to my version of u-boot , which is recorded in the images Armbian (to run from the SD\mmc). If HK representatives are interested, I can send PR to their GIT u-boot and they will be able to build a new version of u-boot for SPI, so that any user could easily add to their N2 the ability to run any systems from any media immediately from SPI, using the official HK site, without using the UART console.

Link to post
Share on other sites

Continue development. New version 0.4 of the multi-boot. :)

The new version now uses a single startup scheme for all media (USB SD eMMC) using standard files, the basic "boot.ini" and rezervna "boot.scr." For proper operation of the " boot.ini" with USB media they should be adjusted (added new options to run from USB). New activation files "n2_autoscript.ini" and new option "boot.ini" with USB startup support are in the new 0.4 directory.


Pay attention, now changed the order of activation of multi-boot. To activate using the new file "n2_autoscript.ini". A new set of commands to activate.


I downloaded the scripts to activate the system startup from USB. The order of use


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.ini

source 3000000


At the same time the updated images with the new version of multi-boot 5.87_20190529.

Link to post
Share on other sites
15 hours ago, soerenderfor said:

I have tried to get the different image to work, but no luck. I think i am doing it wrong.

Will you please help me with at detailed guide, how to get boot from SSD working?

Write down in detail what steps you are taking. And show the contents of your  file "boot.ini"

Link to post
Share on other sites

I have burned the image to my USB-SSD with 'mkusb' in Armbian.


And just renamed your set_boot_order.ini to boot.ini.


And after i switch to SPI, i then access into petitboot. But your have nothing with mentioned with petitboot. So maybe the problem is here?


I have no UART cable, but i was hoping it could be done without.



Link to post
Share on other sites
54 minutes ago, soerenderfor said:

I have no UART cable, but i was hoping it could be done without. 

In order to be able to use direct launch from USB , you need to make changes to ENV for SPI. This can be done through the UART console (this method is described TV this topic), or if release a new version of Piteboot for N2 with these additions. I've suggested to HK representatives to do this through an official update Piteboot SPI, but no response has been received yet. I can collect  own version of this upgrade Piteboot, but I think that this way should be collected, verified and submitted officially from HK. If HK will release such update, I am ready to send to GIT HK for u-boot SPI the necessary patch.

Link to post
Share on other sites
On 5/10/2019 at 12:30 PM, Igor said:

I noticed problems with zram but then it would need to wait few more days. It is strange why zram doesn't work oob while it does work on other boards by using the same build system. I checked kernel config, which seems fine and I will check and try to fix this next time, perhaps someone else will. It will be good to add a mainline kernel, no matter how good or bad support is there.


Advertisement + change log is WIP. Many more things has been changed/improved.


... but family duties cut them short :) I hope to catch this up tomorrow.

@Igor regarding zram , i just got some errors visible in dmesg after a day or so of the board being idle


root@odroidn2:/home/juanjo# uname -a
Linux odroidn2 4.9.179-odroidn2 #17 SMP PREEMPT Tue May 28 22:32:11 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux



[43913.709044] zram: Decompression failed! err=-22, page=12681
[43913.709066] zram: Decompression failed! err=-22, page=12681
[43913.709080] zram: Decompression failed! err=-22, page=12681
[43913.709086] Buffer I/O error on dev zram0, logical block 12681, async page read


if you want i can do some sort of testing on it. my knowledge on kernels and this kind of stuff is minimal but if i can be of any help let me know.

Link to post
Share on other sites
2 hours ago, JuanjoAr said:

regarding zram , i just got some errors visible in dmesg after a day or so of the board being idle

Hi. It isn't an Armbian problem, but a problem with the Odroid kernel.
More info here.
It's the same with Ubuntu Mate from Odroid. With kernel 5.1 from Balbes zram-config works fine.
I manually configure it after installing zram-config and all works fine. Meveric uses his own script for zram zram-odroid or odroid-zram. That does work on his Stretch.
So that could be a clue. Zram and swap used to not work completely. I'm happy we've found the cause of that. I think this proplem is some crums left that weren't cleaned up.

Link to post
Share on other sites



I managed to boot from an usb stick but only when an SD card is present. If not the console shows:


until I insert the SD card. (no EMMC present and switch is in MCC state).


I was hoping to be able to boot from USB without the SD card being present. Is that possible?

Link to post
Share on other sites
On 8/1/2019 at 7:32 AM, lanefu said:

I got my N2.. it's awesome.  Using hardkernels Image right now. 


I did a few armbian builds but they didn't seem to boot. (no dhcp lease, no console)  I have to make a JST -> dupont adapter for my serial console.


Armbian build with default kernel worked great--Desktop and everything, after a slight u-boot change

Link to post
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.

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.