armbian bootloader how to get back the original?

Started by d3f, February 06, 2019, 10:31:11 PM

Previous topic - Next topic

d3f

hi there,

I am playing with the latest images on the ftp. I saw huge improvement using the xenial-teres-bspkernel, video is great, mmc is fast. I decided also to try teres_armbian_v1.0_preliminary image and don't ask me why but I have installed it on the eMMC(armbian-config -> System -> Install -> boot from eMMC).

Now I have it running with the Armbian bootloader.

I am wondering how to get back the original Olimex bootloader without breaking up the laptop :)

thanks,
Lazar

khumarahn

#1
The legacy layout of the mmc / sd card is like this:

0-512 B: MBR partition table
8 KiB -- ?: boot0
19096 KiB -- ?: u-boot
20480 KiB -- +50MiB: boot partition table.

You can see how these are flashed in
https://github.com/OLIMEX/DIY-LAPTOP/blob/rel3/SOFTWARE/A64-TERES/scripts/platform-scripts/install_emmc.sh

Probably you can download and boot one of the old olimex images. They come with this script install_emmc.sh. You can edit the script, so it restores u-boot+boot0 and maybe the boot partition, but does not overwrite your data. Then run it and... hope you had a backup.

d3f

The thing is I cannot boot from sd card now. I tried with sd card or usb stick but it always boots from eMMC and it always boots the armbian image  :)

I checked the armbianEnv.txt but not sure if I touch the rootdev parameter, will it boot again...

I found that script, it takes some blobs and flash them on the eMMC. But may be to run the script I need to boot somehow the Olimex image. My guess is if I run it from the armbian image nothing good will happen ...

Yeah, so I didn't expect that the armbian bootloader will leave me without the option to boot from SD card. This is a bad restriction :) I cannot continue playing with some other images.

LubOlimex

#3
It is very unlikely that installing the armbian image broke the boot process. You can't change the boot order by software means. The card takes precedence over eMMC. If Teres-I boots from eMMC when there is a card inserted, then either the card is faulty, or the image on the card is improper, or the card was not prepared properly, or the SD card connector is broken.

We would test the same procedure today (installing armbian to eMMC and then booting version 1.5 official image from card).

Edit: my colleague tested it - it works fine here if we install the armbian to the eMMC and then boot v1.5 image from a card; make sure to format your card and re-write the image then consider also re-downloading the latest image from here: ftp://staging.olimex.com/Allwinner_Images/A64-Teres/linux/xenial-teres-bspkernel-20190121_144941_EET-1_hdmi_out_v1_5.torrent

Technical support and documentation manager at Olimex

khumarahn

I could not boot an armbian image for a similar reason. That is, the bootloader and the kernel would start just fine, but then it would be using the MMC for the root partition, which did not work.

d3f

Thank you, I bought new SD card and wrote the bsp kernel image and it worked!

Quote from: LubOlimex on February 07, 2019, 09:30:27 AM
It is very unlikely that installing the armbian image broke the boot process. You can't change the boot order by software means. The card takes precedence over eMMC. If Teres-I boots from eMMC when there is a card inserted, then either the card is faulty, or the image on the card is improper, or the card was not prepared properly, or the SD card connector is broken.

We would test the same procedure today (installing armbian to eMMC and then booting version 1.5 official image from card).

Edit: my colleague tested it - it works fine here if we install the armbian to the eMMC and then boot v1.5 image from a card; make sure to format your card and re-write the image then consider also re-downloading the latest image from here: ftp://staging.olimex.com/Allwinner_Images/A64-Teres/linux/xenial-teres-bspkernel-20190121_144941_EET-1_hdmi_out_v1_5.torrent