If there’s a bootable CE image on both the µSD and eMMC cards which one with the N2 boot from, seen conflicting documentation on that. Thanks.
SD card first if CoreELEC is on both.
Yeah thanks, both CoreELEC.
Having a weird issue and want to reload the eMMC, boot from SD and use installtoemmc script instead of writing to eMMC from Windows and Rufus.
Oh, one other related question, the nightly build starts just after midnight, yeah? I don’t see this morning’s build yet (16th), will it post sometime this morning?
Nightlies are a compilation of the day’s commits, so the one that compiled out at 01:05 on May 16th will be dated _20190515. So “today’s” build is out already. I’m assuming it’s compiled in GMT timezone, because I get them in the early evening here (EST), and manually install them as soon as I get notice.
CE has preference for SD card, but the HK Linux images have preference for eMMC, that’s where the conflicting information must be coming from.
If you have CE on both eMMC and SD, it’ll boot from SD. It’s a measure we added so it’d be easy to recover the eMMC or quickly test stuff before putting it on the eMMC.
It’s worth adding that the default for Amlogic devices is to boot SD/USB first for recovery purposes.
Hardkernel are the ones who changed the default behaviour, we simply reverted it back.
Sounds good, thanks for all the info
One other question, is there any way to mount the image and enable ssh logins before the first boot?
Hello, I would like to ask you a question, having emmc with android and CE in SD as I do to switch to SD while being on android?
always starts the nand, being put
Simply reboot from Android…
I mean switch to the SD with corelec from android, doing but adroid run again
Out of curiosity I installed Android Pie on eMMC and found out that CE from SD can boot only when Android on eMMC is removed. No dual boot as when CE is on both media…
In CE we use a modified uboot.
When CE is installed on eMMC and SD card the behavior is the following:
- The N2 tries to boot from eMMC (still the first boot device)
- The modified uboot looks for a “boot.ini” on the SD card
- If a “boot.ini” is found, it continues to boot from SD card
But if anything else than CE is installed on the eMMC, this doesn’t work anymore, and it just boots from eMMC until it is removed.
I will explain this more…
The CPU has a bootloader burned in, this is called BL1.
BL1 looks for u-boot in the following order EMMC>SD>USB.
The Android image comes with HK’s own version of u-boot.
So BL1 will always load this this HK u-boot from the EMMC and ignore ours for as long as you have the EMMC attached.
HK u-boot by default does not follow the same logic as ours, they have EMMC as primary boot device and this is the problem.
We/I have had this discussion with tobetter from HK and he told me that they changed the logic as this is how the CPU/BL1 looks for u-boot.
My argument was that Chinese black boxes actually boot from SD/USB first if it’s attached and this is a long running convention and it is far easier to recover an EMMC if you do this.
tobetter did propose to improve the petitboot to support reading boot.ini and therefor make it compatible with CE which would sort of remedy this situation when using petitboot but not when booting normally.
To summarise though this is not our problem, HK are the ones at fault here, they changed the boot order from the standard Amlogic setup.
You can see it here. Lines 215/216 was swapped.
It is causing headaches for people, wonder why they thought that was a good idea to go against the convention.
I have sent HK a pull request to try and resolve this.
So I spoke with one of the guys from HK about this and unfortunately the numbering will not be changed. The response I got was as follows.
I’ve talked with Justin and a couple guys here if they are ok to change it
Unfortunately our conclusion is go as is
since the booting order might be a bit complicated not aligned with the previous boards, which could lead some people misunderstanding.
And some people would request it the other way
What they have suggested is making the boot order configurable via Android, I will post more when I know more.
If I understand this correctly, then if I have CE on eMMC and Android on uSD then it would also boot to Android following your change in CE to first look at boot.ini on uSD?
If my assumption is correct then pulling out uSD would always boot CE, and inserting it would boot Android…, or am I missing something?
Not in my experience. With this configuration CE wants to boot from SD but Android wants to boot from eMMC, so neither wants to boot first. and the N2 just hangs.
Same with CE on eMMC and Ubuntu on SD.
Looks like we have to wait for a fully working petitboot.
The new Android Pie version from today has the following note:
" Adding tools that can change the U-boot environment values on Android.
-The users who want to run multiple OS complained the difficulty to make ODROID-N2
boots from SD card due to the boot order that eMMC is a higer priority."
So, this should fix dual boot option with Android on eMMC and CE on uSD