Jump to content

Recommended Posts

Posted

Hi there, yesterday I tried to use nand install skript tool to move the content from my sd card on odroid n2 to emmc card for booting and using emmc card only. The process itself worked and the content of the sd cards was moved, but after unplugging sd card and plugging emmc card the boot process is not starting and nothing is shown on the hdmi monitor. I compared the /boot filesystems and both are identically. I checked the "armbianEnv.txt" file and it is ok for the new uuid of the emmc card.

 

Everything seems to be identically but why is it not booting. Does someone have a hint what to check additionally what is maybe missing at beginning of the boot process. The LED is not blinking on boot process so something in the first steps of booting and loading does not work.

 

Thank you in advance

Posted

Aditionally my actual configuration

- upgraded armbian debian 10 build with omv5 installation to armbian debian 11 build with omv6 via omv-upgrade-install successfull

- actual kernel running 5.10.102-meson64 #22.02.1 SMP PREEMPT

- output from /boot directoy

 

drwxr-xr-x 10 root root     4096 May 19 11:27 .
drwxr-xr-x 21 root root     4096 May 17 21:31 ..
-rw-r--r--  1 root root        0 May 13 08:54 .next
lrwxrwxrwx  1 root root       24 May 13 08:54 Image -> vmlinuz-5.10.102-meson64
-rw-r--r--  1 root root  5292029 Feb 27 10:09 System.map-5.10.102-meson64
-rw-r--r--  1 root root      180 May 19 11:27 armbianEnv.txt
-rw-r--r--  1 root root     1536 Mar 21  2020 armbian_first_run.txt.template
-rw-r--r--  1 root root     4882 Mar 21  2020 boot-desktop.png
-rw-r--r--  1 root root    38518 Mar 21  2020 boot.bmp
-rw-r--r--  1 root root     7823 May 13 08:29 boot.cmd
-rw-r--r--  1 root root     5579 May 13 08:29 boot.ini
-rw-r--r--  1 root root     7895 May 13 08:29 boot.scr
-rw-r--r--  1 root root   229458 Feb 27 10:09 config-5.10.102-meson64
-rwxr-xr-x  1 root root      120 Jan  1  1970 display.bin
lrwxrwxrwx  1 root root       20 May 13 08:54 dtb -> dtb-5.10.102-meson64
drwxr-xr-x  2 root root     4096 Aug 23  2020 dtb-4.9.219-meson64
drwxr-xr-x  2 root root     4096 Sep 21  2020 dtb-4.9.232-meson64
drwxr-xr-x  2 root root     4096 Oct 27  2020 dtb-4.9.236-meson64
drwxr-xr-x  2 root root     4096 Feb  7  2021 dtb-4.9.247-meson64
drwxr-xr-x  2 root root     4096 Mar 10  2021 dtb-4.9.250-meson64
drwxr-xr-x  2 root root     4096 May 12  2021 dtb-4.9.260-meson64
drwxr-xr-x  2 root root     4096 May 13 08:53 dtb-4.9.277-meson64
drwxr-xr-x  4 root root     4096 May 13 08:53 dtb-5.10.102-meson64
lrwxrwxrwx  1 root root       19 Aug 31  2021 dtb.old -> dtb-4.9.275-meson64
-rwxr-xr-x  1 root root      256 Jan  1  1970 edid.bin
-rw-r--r--  1 root root 16773114 May 17 21:53 initrd.img-5.10.102-meson64
-rw-r--r--  1 root root 26329664 May 13 08:54 uImage
lrwxrwxrwx  1 root root       24 May 17 21:53 uInitrd -> uInitrd-5.10.102-meson64
-rw-r--r--  1 root root 16773178 May 17 21:53 uInitrd-5.10.102-meson64
-rw-r--r--  1 root root 26329600 Feb 27 10:09 vmlinuz-5.10.102-meson64
lrwxrwxrwx  1 root root       23 May 13 08:30 zImage -> vmlinuz-4.9.277-meson64

 

Posted
  On 5/20/2022 at 7:27 PM, usual user said:

What firmware (uboot) version are you using and where is it located (SPI or eMMC)?

Expand  

How to find out the uboot version? I am not using SPI as it is not working at the moment. Don't know why, flashed the latest version and if sd card is inserted it crashes directly to shell if I press a button on keyboard.

 

From package manager I get the following information:

 

ii  linux-u-boot-odroidn2-current     22.02.1                        arm64        Uboot loader 2022.01
ii  u-boot-tools                      2021.01+dfsg-5                 arm64        companion tools for Das U-Boot bootloader

Posted
  On 5/21/2022 at 7:13 PM, Franky66 said:

How to find out the uboot version?

Expand  

Version information is output to the serial console as well as other helpful information. It is therefore a good idea to post the entire log.
I use my self-build firmware (2022.01) in the SPI flash. Since I don't have an eMMC available at the moment, I can't say if this version basically works with eMMC. I just built the 2022.07-rc2. If you want to experiment with it, I can upload the firmware and you can  try it with a spare SD card. Maybe some improvements have already been incorporated there.

Posted

I am sorry, I do not have the separate reader to get the serial console information actually. I will also try to find some support in the hardkernel forum how to get things booting. Maybe something else is broken as the updating petiboot via recovery image didn't work at first time and I had to zero the internal flash areas and try again. There was some advise for this in the forum

Posted

Ok so is there a reason why they conflict each other. I can try you self-build firmware with only u-boot and flash to spi. I have one odroid n2 for experimenting and testing.

Posted
  On 5/22/2022 at 7:20 AM, Franky66 said:

is there a reason why they conflict each other

Expand  

The boot flow they implemented is simply incompatible with Armbian boot method. And since it is also closed source, where I would not even have the opportunity to repair it, for me it is reason to reject it unconditionally.

 

  On 5/22/2022 at 7:20 AM, Franky66 said:

I can try you self-build firmware

Expand  

Since you don't have access to the serial console, a basic test only requires an SD card that you can delete completely. An installation in SPI flash or eMMC only makes sense if it is previously ensured that the firmware basically works for your use case. Debugging an installation in SPI flash or eMMC without access to log files is hopeless. If the firmware basically works, you can install it in SPI flash or eMMC in a next step.

 

These are the necessary steps for the experiment:
Prepare a completely blank SD card, e.g.:

  Quote

dd if=/dev/zero of=/dev/${entire-SD-card-device-to-be-cleared}

Expand  

Copy my firmware binary to the empty SD card, e.g.:

  Quote

dd bs=512 seek=1 conv=notrunc if=u-boot-meson.bin of=/dev/${entire-SD-card-device-to-be-used} ; sync

Expand  

Now insert the SD card into the Odroid N2, mount the eMMC module with the system to be booted, switch the boot switch to the MMC position and start the Odroid N2.
If the system boots successfully now, you can think about installing the firmware in the SPI flash or the eMMC.
When you're ready to do the experiment, speak up and I'll upload the firmware.

Posted
  On 5/22/2022 at 8:23 PM, ManoftheSea said:

It ought to be faster, and will have better performance afterward besides.

Expand  

I asked for a nulled SD card. Since you did not mention the "-k" parameter of blkdiscard in your proposal, this is not guaranteed. Firmware does not take into account filesystem structures and accesses storage media raw, so remaining data fragments can lead to disturbances. Since the write function of the storage medium accounts for the majority of the operation, the execution time of both programs should be almost identical.
The use of an additional tool also requires appropriate knowledge to use it. This increases the complexity of the activity to be carried out. The use of the same tool always reduces the effort to explain the use of the tools used, you can build on already imparted knowledge.

Posted

I uploaded an archive of my firmware here. Unpack it with

tar -xzf u-boot-meson.tgz

and use the dd command described above to write it to the prepared SD card.
And then keep your fingers crossed, hopefully it works for your use case.

Posted
  On 5/22/2022 at 10:54 PM, usual user said:

"-k" parameter of blkdiscard

Expand  

blkdiscard doesn't have a "-k" parameter in my distro.  What does yours do?.  By default, blkdiscard tells the sd card to zero out all memory and prepare it all for writing.  On the sd card, it is not the "write" operation that takes the most time, but the erase operation. 
blkdiscard: tells the card "mark everything available and prepare it whenever you have a chance", making the pool for writes the maximum.
dd: tells the card that every sector is written to, shrinking the spare pool of sectors to the minimum.

It is worth knowing the difference between "write every sector (to zero)" and "tell the card to empty itself".

Posted

So I wrote your image to the sd card. Both sd card and emmc are plugged in, but after power on the screen stays black, nothing is shown. I need this serial to usb adapter, that's useless in finding bugs. Time to buy :-(

Posted
  On 5/24/2022 at 7:41 AM, Franky66 said:

but after power on the screen stays black

Expand  

Even without an eMMC mounted, you should see the following messages:

  Reveal hidden contents


And you are sure your boot mode switch is in the MMC position (towards the SD card slot)?
Maybe something went wrong when preparing the SD card.
This is what the messages look like when I write the SD card:

  Reveal hidden contents

Please be able to read back your prepared SD card with the following command:
 

dd count=4096 if=/dev/${entire-SD-card-device-prepared} of=u-boot-meson-readback.bin

If you upload the u-boot-meson-readback.bin, I can take a look and check if everything is ok. You may also post what your used command lines look like.

Posted
  On 5/23/2022 at 8:44 PM, usual user said:

I meant -z, --zeroout

Expand  

Alright, I agree, including "-z" to blkdiscard is better than using dd to mark every block as used.  It appears in the best case, the device will make a promise to return zeros instead of garbage data, and in the worst case, Linux will write all the blocks itself.

 

Franky66, it may be worthwhile to try with just the SD with the Usual User Firmware, without the eMMC, and see if you get any output.  Then add the eMMC, and see what changes.

Posted
  On 5/24/2022 at 5:15 PM, ManoftheSea said:

without the eMMC, and see if you get any output

Expand  

My shown messages are emitted by the firmware which should have been loaded from the maskrom code from the firware area of the SD card. Since no other drives have been considered until then, it is irrelevant whether an eMMC is mounted or not. If no messages are displayed, this indicates that no firmware is running. Either the maskrom code cannot read the SD card, or the firmware is not in the required positions. In order to check the positioning, I asked for the dump of the first 2MB of the SD card. A serial console log does not provide any significant new insights at this time.

Posted
  On 5/24/2022 at 6:35 PM, usual user said:

My shown messages are emitted by the firmware which should have been loaded from the maskrom code from the firware area of the SD card. Since no other drives have been considered until then, it is irrelevant whether an eMMC is mounted or not. If no messages are displayed, this indicates that no firmware is running. Either the maskrom code cannot read the SD card, or the firmware is not in the required positions. In order to check the positioning, I asked for the dump of the first 2MB of the SD card. A serial console log does not provide any significant new insights at this time.

Expand  

Thankx for your help, I am some days on holiday and will respond as soon as possible.

Posted
  On 5/24/2022 at 6:35 PM, usual user said:

My shown messages are emitted by the firmware which should have been loaded from the maskrom code from the firware area of the SD card. Since no other drives have been considered until then, it is irrelevant whether an eMMC is mounted or not. If no messages are displayed, this indicates that no firmware is running. Either the maskrom code cannot read the SD card, or the firmware is not in the required positions. In order to check the positioning, I asked for the dump of the first 2MB of the SD card. A serial console log does not provide any significant new insights at this time.

Expand  

Hello, I did flashing again sd card without any changes:

 

  Reveal hidden contents

And for comparing I read the sd card back to file

  Reveal hidden contents

Attached please find the corresponding readback file.

u-boot-meson-readback.bin.gzFetching info...

Posted
  On 5/29/2022 at 8:55 AM, Franky66 said:

Attached please find the corresponding readback file.

Expand  

I have checked the dump, and everything is as it should be. Looks like the maskrom code can't read the SD card, I've experienced this with SD cards that weren't at least UHS-1 class. So, for example, class 4, class 10, ...
What comes to my mind right now, what native resolution does your display have? If it is not a standard HDMI resolution, it could be that it is not supported by the firmware. The startup process should still continue, but may hang later for another reason. And without serial console outputs, you're relatively blind.
To rule out the SD card as the culprit, you can also write the firmware to the eMMC. It is the same command as for the SD card:

dd bs=512 seek=1 conv=notrunc if=u-boot-meson.bin of=/dev/${entire-eMMC-device-to-be-used} ; sync

However, you should only do this if you have a backup of the eMMC in order not to lose any data. Whether the OS can finally be started is uncertain, but the first start messages should be displayed if there were SD card reading problems. The boot attempt should only be carried out with mounted eMMC and without SD card in the SD card slot. The start mode switch should be in the MMC position to exclude any SPI flash involvement.
If all this does not lead to a result, access to the serial console is essential to continue troubleshooting.

Posted (edited)

@Franky66 did you manage to boot from eMMC when flashing it directly there? I'm not able to get the recent Odroid N2 Bullseye image to boot from eMMC at all, regardless which way. Doing the exactly same on SD card works fine. I also tried it with a custom image build, installing the Armbian "current" kernel package (Linux 5.10.123) and flashing respective U-Boot via write_uboot_platform: Fails the same way when flashing to eMMC, works from SD card. Here is the log from serial console:

 

  Reveal hidden contents

 

It seems to have issues to detect the partitions on the eMMC, but of course they are fine when mounting and fscking the eMMC from a different system.

Edited by MichaIng

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.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines