Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odroid-N2+ doesn't boot from eMMC (11.5+, other than Kingston eMMC) #3227

Closed
scoobydrvr opened this issue Mar 6, 2024 · 78 comments · Fixed by #3319
Closed

Odroid-N2+ doesn't boot from eMMC (11.5+, other than Kingston eMMC) #3227

scoobydrvr opened this issue Mar 6, 2024 · 78 comments · Fixed by #3319
Assignees
Labels
board/odroid Hardkernel's ODROID Boards bug stale

Comments

@scoobydrvr
Copy link

Describe the issue you are experiencing

Clean install by writing image to eMMC card. Device does not boot to HA OS with version 11.5 or 12.0. If 11.4 is flashed, device will boot and behave as expected. Updating to 11.5 causes device to fail to boot. Further information - #3226

What operating system image do you use?

odroid-n2 (Hardkernel ODROID-N2/N2+)

What version of Home Assistant Operating System is installed?

11.4

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

  1. Flash 11.5 or 12.0 image to eMMC and attempt to boot
    OR
  2. Flash 11.4 image to eMMC and allow HA OS to update to 11.5

Anything in the Supervisor logs that might be useful for us?

Unable to access after update

Anything in the Host logs that might be useful for us?

Unable to access after update

System information

No response

Additional information

Noticed that there is a kernel change between 11.4 and 11.5. Could this be the root cause?

@scoobydrvr scoobydrvr added the bug label Mar 6, 2024
@agners agners added the board/odroid Hardkernel's ODROID Boards label Mar 7, 2024
@agners
Copy link
Member

agners commented Mar 7, 2024

With HAOS 11.5 we updated the U-Boot bootloader to 2024.01, so this is probably bootloader related.

FWIW, my ODROID-N2 test device here boots fine with HAOS 11.5 and 12.0, so this must be related to your particular unit.

Do you have access to the serial console (e.g. using the USB-UART adapter from Hardkernel) to observe the output at boot time?

@scoobydrvr
Copy link
Author

scoobydrvr commented Mar 7, 2024

Unfortunately, no. I feel like I was lucky to have bought the eMMC writer just in case. For what it's worth, this is a brand new unit so it sounds like Hardkernel has changed something in their file loads at the factory. Would there be anything I could help provide by flashing back to Ubuntu and stopping during Petitboot or files I could share?

Since it took about a week and a half to get the delivery from Korea, would something like this work, provided the jumpers can be made to fit inside the header (and the appropriate TTL level is selected)?

@scoobydrvr
Copy link
Author

@agners
I purchased a USB serial module and got the following the terminal

U-Boot 2024.01 (Mar 13 2024 - 12:36:37 +0000) odroid-n2/n2-plus

Model: Hardkernel ODROID-N2
SoC:   Amlogic Meson G12B (S922X) Revision 29:c (40:2)
DRAM:  1 GiB (effective 3.8 GiB)
Core:  400 devices, 30 uclasses, devicetree: separate
MMC:   sd@ffe05000: 0, mmc@ffe07000: 1
Loading Environment from nowhere... OK
In:    usbkbd,serial
Out:   vidconsole,serial
Err:   vidconsole,serial
Board variant: n2-plus
Net:   eth0: ethernet@ff3f0000
Card did not respond to voltage select! : -110
unable to select a mode : -5
MMC Device 2 not found
no mmc device at slot 2
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... 3 USB Device(s) found
usb - USB sub-system

However, moving back to 11.4 the following is spat out

U-Boot 2023.01 (Jan 09 2024 - 11:00:06 +0000) odroid-n2/n2-plus

Model: Hardkernel ODROID-N2
SoC:   Amlogic Meson G12B (S922X) Revision 29:c (40:2)
DRAM:  1 GiB (effective 3.8 GiB)
Core:  387 devices, 27 uclasses, devicetree: separate
MMC:   sd@ffe05000: 0, mmc@ffe07000: 1
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Board variant: n2-plus
Net:   eth0: ethernet@ff3f0000
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
3491 bytes read in 2 ms (1.7 MiB/s)
## Executing script at 08000000
switch to partitions #0, OK
mmc1(part 0) is current device
loading env...

@scoobydrvr
Copy link
Author

Looks like there is a similar issue with 12.1 maybe

#3250

@piercy
Copy link

piercy commented Mar 25, 2024

@scoobydrvr I see you linked my post, I actually got a similar output as you today. Ive been trying all sorts to get it working but having no luck. going to try 11.4 now and see if it works.

Here's what I managed to get on output , looks very similar to what you are seeing.

edit: 11.4 doesnt work for me either, same error about it not finding the mmc. If it flash ubuntu it works no problem.

image

@scoobydrvr
Copy link
Author

What size is your MMC? I remembered I have a 16Gb card from an old Odroid device. I just threw 12.1 on it an, low and behold, the thing boots up! I had hoped that society had moved past storage device limits but it seems to somehow have an effect here...

@piercy
Copy link

piercy commented Mar 25, 2024

What size is your MMC? I remembered I have a 16Gb card from an old Odroid device. I just threw 12.1 on it an, low and behold, the thing boots up! I had hoped that society had moved past storage device limits but it seems to somehow have an effect here...

It's 32Gb, I just found another thread with a similar issue.

What I noticed in your logs was that when its successful its booting from MMC 1, but when it fails its booting from MMC 2. Mine always seems to try boot from MMC 2 (hence its always failing).

I don't know if there is a way to force this, but feels like its trying to boot the wrong device.

@piercy
Copy link

piercy commented Mar 25, 2024

Not sure it matters but I also noticed my mmc card revision is 0.5, a lot of the pictures ive seen show 0.4. So wonder if the new revision is having issues or something.

I might have to install with SD card as right now I have no automation running, so my house is extra dumb.

@scoobydrvr
Copy link
Author

Not sure it matters but I also noticed my mmc card revision is 0.5, a lot of the pictures ive seen show 0.4. So wonder if the new revision is having issues or something.

I might have to install with SD card as right now I have no automation running, so my house is extra dumb.

My "non-functional" 32Gb is also a rev 0.5 hmmm...

@piercy
Copy link

piercy commented Mar 25, 2024

Not sure it matters but I also noticed my mmc card revision is 0.5, a lot of the pictures ive seen show 0.4. So wonder if the new revision is having issues or something.
I might have to install with SD card as right now I have no automation running, so my house is extra dumb.

My "non-functional" 32Gb is also a rev 0.5 hmmm...

Yeah, it doesnt make too much sense, if i can boot ubuntu I don't really see how the card could be the issue. However, maybe some kind of incompatibility has occurred and is causing issues.

Its way above my knowledge level really, but as other people seem to be fine, it feels like I must have something different to them.

@scoobydrvr
Copy link
Author

Maybe someone with more intimate knowledge can sort out how v0.4 and v0.5 differentiate and why v0.5 doesn't seem to be working?

https://wiki.odroid.com/accessory/emmc/reference_chart#orange_emmc_module

@agners
Copy link
Member

agners commented Apr 2, 2024

I have at least one eMMC module with version v0.5 and it seems to work here, so I don't think it is the PCB revision.

What PCB colors is yours? it seems that PCB color gives some indication what eMMC chip is on the PCB. I do have orange PCBs here.

@agners agners self-assigned this Apr 2, 2024
@piercy
Copy link

piercy commented Apr 2, 2024

@agners Mine is an orange module
image

@piercy
Copy link

piercy commented Apr 2, 2024

I should add, ive tried both flashing with the USB 3.0 reader board, and flashing direct via the cable plugged into the N2+, both flash successfully but wont boot.

@scoobydrvr
Copy link
Author

I have at least one eMMC module with version v0.5 and it seems to work here, so I don't think it is the PCB revision.

What PCB colors is yours? it seems that PCB color gives some indication what eMMC chip is on the PCB. I do have orange PCBs here.

Both of mine, the v0.4 16Gb and v0.5 32Gb, are orange cards

@peter-dolkens
Copy link

I actually have an old model Home Assistant Blue which I based my recommendation to piercy on when he was selecting hardware.

I went through the fresh install process just days before piercy and had no issues

It's currently deployed 2 hours away, so I'll have to wait a few days before I can get any covers off to get photos / part numbers for comparison

@BarBaar44
Copy link

Happy to see this one, as there's nothing wrong my my board and/or eMMC after all :)

#3150 (comment)

I can confirm I was using an orange 32gb v0.5 eMMc

@DavidRSullivan
Copy link

Since it took about a week and a half to get the delivery from Korea, would something like this work, provided the jumpers can be made to fit inside the header (and the appropriate TTL level is selected)?

Did this work?

@scoobydrvr
Copy link
Author

Since it took about a week and a half to get the delivery from Korea, would something like this work, provided the jumpers can be made to fit inside the header (and the appropriate TTL level is selected)?

Did this work?

Yes, thankfully. See output in the comment above. Only caveat is the power and ground cables had to have the plastic connectors removed so they could fit inside the serial header on the board. Should also wrap them in electrical tape or similar to prevent shorts. Additionally, the dongle is powered by the board so you'll need to be quick with PuTTY or whatever serial terminal you use to capture the boot messages from the beginning.

@TibsD
Copy link

TibsD commented Apr 14, 2024

Any solution for this? I am having the same problem wit my N2+

I had a corrupted install of HA OS on an 32Gb eMMC card and tried reflashing the HA OS to the eMMC but do not see a blue light during boot.

Is it possible that the partitions created by the flashing of HA create a problem? How can I "reset" the eMMC card so it is completely empty and has no partitions?

@DavidRSullivan
Copy link

My problem was the SD card, and after purchasing a New ODROID N2+, everything is fine. I am using a 256GB eMMC version .5 without any issue.

@TibsD
Copy link

TibsD commented Apr 16, 2024

Weird issue.
Mine just booted up without any problems after leaving it disconnected from power for a full night.
Connected it up this morning and it booted up right away.

@piercy
Copy link

piercy commented Apr 16, 2024

Weird issue. Mine just booted up without any problems after leaving it disconnected from power for a full night. Connected it up this morning and it booted up right away.

I had mine boot once too, figured it had been resolved by an update (i'd tried a different versions). When i then shut it down to move it to another room, it didn't boot again.

It certainly is a weird issue, seems like its starting to happen more often now though. Hopefully more examples can help diagnose and resolve it .

@piercy
Copy link

piercy commented Apr 16, 2024

My problem was the SD card, and after purchasing a New ODROID N2+, everything is fine. I am using a 256GB eMMC version .5 without any issue.

While i could potentially do this, the fact I can boot into ubuntu fine suggest thats it isn't a problem with my eMMC or the N2+. I am currently using SD card rather that eMMC for HAOS but hoping a solution comes along soon.

@TibsD
Copy link

TibsD commented Apr 16, 2024

Weird issue. Mine just booted up without any problems after leaving it disconnected from power for a full night. Connected it up this morning and it booted up right away.

I had mine boot once too, figured it had been resolved by an update (i'd tried a different versions). When i then shut it down to move it to another room, it didn't boot again.

It certainly is a weird issue, seems like its starting to happen more often now though. Hopefully more examples can help diagnose and resolve it .

And if you wait for a night or so and then try starting it up?

@smarthomefamilyverrips
Copy link

smarthomefamilyverrips commented Aug 14, 2024

#3508

@sairon will the above mentioned bump affect or break Home Assistant Blue Devices? Or where HA Blue Devices never sold with incompatible eMMC's and the latest update from 12.4 to 13.0 should just work fine?

@sairon
Copy link
Member

sairon commented Aug 14, 2024

@lugaru90 There's another issue for Kingston modules, unfortunately there's no resolution for that yet, as it's probably a SoC issue that it's not able to work with them reliably.

@smarthomefamilyverrips No, Blue should be fine. The issues with other eMMCs started to appear after we changed the clock rate to 40 MHz in order to fix compatibility with Kingston. That's now reverted as well.

@smarthomefamilyverrips
Copy link

@lugaru90 There's another issue for Kingston modules, unfortunately there's no resolution for that yet, as it's probably a SoC issue that it's not able to work with them reliably.

@smarthomefamilyverrips No, Blue should be fine. The issues with other eMMCs started to appear after we changed the clock rate to 40 MHz in order to fix compatibility with Kingston. That's now reverted as well.

@sairon OK thank you for your quick response, then I know I can safely update to 13.0 👍

@lugaru90

This comment was marked as off-topic.

@piercy

This comment was marked as off-topic.

@smarthomefamilyverrips

This comment was marked as off-topic.

@smarthomefamilyverrips

This comment was marked as off-topic.

@piercy

This comment was marked as off-topic.

@piercy
Copy link

piercy commented Aug 14, 2024

I would encourage you guys to use the below issue for kingston issues, as maybe once enough people have the problem we will start to get somewhere. Currently we haven't reached critical mass, but I suspect these emmc's aren't going away, so its only a matter of time before it becomes more widespread

Admins it would be good if the duplicate tag could be removed from the below issue, as it isn't a duplicate. It was considered a dupe until it was realized that this issue 3227 and 3250 were different.

#3250

@smarthomefamilyverrips

This comment was marked as off-topic.

@piercy

This comment was marked as off-topic.

@smarthomefamilyverrips

This comment was marked as off-topic.

@sairon
Copy link
Member

sairon commented Aug 14, 2024

@piercy @smarthomefamilyverrips Guys, please use another place for discussions, you're creating unnecessary noise for all people in this issue report.

I will answer piercy's concerns in the other issue, for general discussions please use GH Discussions or the Community forums 🙏

@smarthomefamilyverrips
Copy link

@piercy @smarthomefamilyverrips Guys, please use another place for discussions, you're creating unnecessary noise for all people in this issue report.

I will answer piercy's concerns in the other issue, for general discussions please use GH Discussions or the Community forums 🙏

@sairon OK, sorry not was my intention to clutter this issue report 👍

@smarthomefamilyverrips
Copy link

@lugaru90 There's another issue for Kingston modules, unfortunately there's no resolution for that yet, as it's probably a SoC issue that it's not able to work with them reliably.

@smarthomefamilyverrips No, Blue should be fine. The issues with other eMMCs started to appear after we changed the clock rate to 40 MHz in order to fix compatibility with Kingston. That's now reverted as well.

@sairon Just to confirm, I updated my HA Blue to version 13.0 without any problems, all still working as expexted. 💯 👍

@scoobydrvr
Copy link
Author

Updated to 13.0 and it caused a boot issue, as others have experienced. I should have checked before but it turns out I have the Kingston eMMC module as well... Glad I made that backup this morning!

PXL_20240816_152620210

@TibsD
Copy link

TibsD commented Aug 17, 2024

So updating to OS 13.0 is also not a good idea. Hopefully the issue get's solved quickly.

@amiler
Copy link

amiler commented Aug 23, 2024

Kingston 32GB device does not work on multiple N2+ systems. I have tried every single HAOS version from 11.3 up to the latest 13.1. None worked. Device tries to boot from network with "serverIP not set" console message. Just hangs. Other OS (Ubuntu) flashed on this 32GB eMMC does work without problems.
I have 64GB device (not Kingston) with same revision pcb that does boot with any HAOS version. Unfortunately, I cannot clone 64GB and use on 32GB
Pics attached of working and non-working eMMC device.
eMMC

@piercy
Copy link

piercy commented Aug 23, 2024

Kingston 32GB device does not work on multiple N2+ systems. I have tried every single HAOS version from 11.3 up to the latest 13.1. None worked. Device tries to boot from network with "serverIP not set" console message. Just hangs. Other OS (Ubuntu) flashed on this 32GB eMMC does work without problems. I have 64GB device (not Kingston) with same revision pcb that does boot with any HAOS version. Unfortunately, I cannot clone 64GB and use on 32GB Pics attached of working and non-working eMMC device. eMMC

You should be using #3250 for kingston issues. I realize the OP has now realized his is a kingston, but developers have asked to put kingston information on 3250. It seems to be a dead thread but maybe if we fill it up it start to get some attention.

@amiler
Copy link

amiler commented Aug 23, 2024

Ok. The fact that #3250 is a dead thread is concerning. I am sure there are many with same problem. Appreciate your feeback. Will move it to that thead

sairon added a commit that referenced this issue Oct 10, 2024
Testing shows that the 24MHz cap is problematic for Kingston. Bumping this cap
to 40 MHz in #3319 fixed Kingston but reintroduced issues with some other eMMCs
that the frequency cap was supposed to fix.

This commit adds another patch that selects a different clock for eMMC. While
it's still unclear why Kingston fails with the frequencies of slightly below 24
MHz (see patch message why it's below), using 24 MHz from xtal seems to be fine
and hopefully shouldn't introduce regressions for old eMMCs.

Alternative approach would be using the same clock source but setting the
frequency cap to 25 MHz. This results in exact 25 MHz from PLL which is even
the defined frequency for some eMMC modes, Kingston eMMC works fine with it and
the difference from the previously used value wouldn't be too high, but with 24
MHz we're even closer.

refs #3250, refs #3227
sairon added a commit that referenced this issue Nov 7, 2024
…ROID-N2

Replace the original patch that limits the frequency to 24 MHz with a more
sophisticated version that first tries to initialize the eMMC at this limited
frequency, and if it fails, then tries disabling the limit to use one defined
in the upstream driver.

While still hacky, this seems to finally fix the Kingston eMMC issues, and with
the current implementation, the initialization should appear the same as on
older HAOS versions, as 24 MHz is used first. Better solution that addresses
the root cause on some eMMCs (128 GB Microns?) would be still nice though...

refs #3250, refs #3227
sairon added a commit that referenced this issue Nov 7, 2024
Replace the original patch that limits the frequency to 24 MHz with a more
sophisticated version that first tries to initialize the eMMC at this limited
frequency, and if it fails, then tries disabling the limit to use one defined
in the upstream driver.

While still hacky, this seems to finally fix the Kingston eMMC issues, and with
the current implementation, the initialization should appear the same as on
older HAOS versions, as 24 MHz is used first. Better solution that addresses
the root cause on some eMMCs (128 GB Microns?) would be still nice though...

refs #3250, refs #3227
sairon added a commit that referenced this issue Nov 7, 2024
Replace the original patch that limits the frequency to 24 MHz with a more
sophisticated version that first tries to initialize the eMMC at this limited
frequency, and if it fails, then tries disabling the limit to use one defined
in the upstream driver.

While still hacky, this seems to finally fix the Kingston eMMC issues, and with
the current implementation, the initialization should appear the same as on
older HAOS versions, as 24 MHz is used first. Better solution that addresses
the root cause on some eMMCs (128 GB Microns?) would be still nice though...

refs #3250, refs #3227
Copy link

There hasn't been any activity on this issue recently. To keep our backlog manageable we have to clean old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant OS version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 22, 2024
@sairon
Copy link
Member

sairon commented Nov 22, 2024

Closing this - some issues with Micron 128 GB eMMCs were resolved by reverting the change of the default clock rate, other turned out to be Kingston sticks.

@sairon sairon closed this as completed Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/odroid Hardkernel's ODROID Boards bug stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.