Need to re-write U-boot from Pinephone pro currently in mass rom mode
#1
Hi All;
I was trying to flash my emmc on Pinephone Pro and by mistake I erased instead my U-boot. I used an sd-card for the day and once the battery was drained the phone went into mass rom mode and I can no longer power it on.
After recharging the battery from a power station I tried to switch it on unsuccessfully. I tried as well the recovery mode (using the RE button on the back and it would work).
I can no longer see the device when running the lsblk command. However I see the rockship in mass rom mode when I run the lsusb command from my linux labtop.

I read few instruction and a script provided by the rkdeveloptool-master to flash the memory and see if I can copy across a new bin file (rk3399_loader_spinor_v1.15.114.bin) and from there being able to move out of the mass rom mode and use again the sd card. It was not successful.

I was wondering if there is U-boot image available that I can use and how can I copy it across to my phone memory since I am still on mass rom mode. I guess there are 2 questions in 1:
a) how to move out of the mass rom mode
b) How to reinstall the Uboot in my Pinephone Pro

Thank you.
  Reply
#2
Maskrom mode means that there is no valid boot medium inserted in your phone (eMMC is empty, no or empty microSD card inserted). Please don't try to flash your phone from the Rkdeveloptool, instead simply boot an installation from microSD card. The release images do contain U-Boot. Please have a look at https://wiki.pine64.org/wiki/PinePhone_Pro#Software for the instructions, community folks took a lot of time to write the instructions as clear as possible.

Additionally I would suggest you to flash Tow-Boot to the SPI, as explained in the wiki as well.
  Reply
#3
Hi fxc,
Thanks a lot for your reply. I tried this unsuccessfully. is it not possible to flash across to the U-boot memory directly ? Thanks
  Reply
#4
(11-10-2022, 09:44 AM)wolverine1 Wrote: Hi fxc,
Thanks a lot for your reply. I tried this unsuccessfully. is it not possible to flash across to the U-boot memory directly ? Thanks

Hey wolverin1, U-Boot is the bootloader. It is part of the .img file you downloaded and flashed to the microSD card (or to the eMMC). If no bootloader on the eMMC or the microSD card is found it will boot into MaskROM mode. Because your phone boots into MaskROM mode we know that you do not have a correctly flashed microSD card inserted (or the card is inserted wrongly, such as the wrong slot or not all the way in - make sure the card is in the top slot). Once you get the card to boot you can simply overwrite the eMMC from there.

So your steps are:

1) Flash a microSD card correctly
2) Insert it into the phone, top slot and all the way
3) Boot the phone
4) Overwrite the eMMC

If the microSD card fails to boot then there is an error in step 1 or 2. I would suggest you to post the exact command and the exact filename of the image you used to flash the microSD card.

If you join the bridged community chat then you get very quick help: https://wiki.pine64.org/wiki/Main_Page#Chat_Platforms
  Reply
#5
Hi fxc;
I tried again following instructions /video of other users and it worked! My phone is back up and is working fine!

Many Thanks.
  Reply
#6
Hi fxc;
I have a question though. the U-boot image is likely a bin file. is it possible to know on which language it was written ? can we legally write our own code to use instead of those official release ? if yes, how is the right way to start from your perspective ?

Best Regards
  Reply
#7
(11-19-2022, 02:34 PM)wolverine1 Wrote: Hi fxc;
I have a question though. the U-boot image is likely a bin file. is it possible to know on which language it was written ? can we legally write our own code to use instead of those official release ? if yes, how is the right way to start from your perspective ?

Best Regards

It's mostly C and GPL-2+ so you can modify if you want. I think tow-boot is a specific configuration of u-boot to make it 'Just Work' so long as distros stick to a specific pattern. Distros may be using patches that aren't yet upstreamed, so check the distro source if you want to know exactly what went into the version you used. Some distros better document their build process than others. For general u-boot docs see:

https://u-boot.readthedocs.io/en/latest/
https://www.denx.de/wiki/U-Boot/
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PinePhone Pro/IMX258 Camera Debugging problem jasperji 2 680 10-20-2024, 03:59 AM
Last Post: Jite
  Having difficulty installing PostmarketOS on Pinephone Convergence Beta edition spazz 13 769 10-17-2024, 03:28 PM
Last Post: fhilliard41
  PinePhone doesn't boot anymore lapin 3 453 09-13-2024, 10:09 AM
Last Post: lapin
  How to boot from SD card in PPP joespodie 2 651 08-02-2024, 02:49 PM
Last Post: mikehenson
  New PinePhone Pro fails... P. Siera 5 1,037 08-01-2024, 04:56 AM
Last Post: P. Siera
  A way to view or log the splash screen on Pinephone Pro running ArchLinux (Danctnix) PHLEMON 4 875 07-30-2024, 11:03 PM
Last Post: PHLEMON
  PinePhone Pro silver lining, it’s fast, real damn fast ashoka232 2 1,672 07-30-2024, 05:58 AM
Last Post: DrYak
  Is my PinePhone Pro dead? jlioret 2 2,010 07-28-2024, 04:12 PM
Last Post: dchang0
  Pinephone Pro does not start with RE button pressed c0ssan 11 7,596 07-28-2024, 03:21 PM
Last Post: dchang0
  Will a Pinephone Pro (Explorer) work with TING wpeckham 8 4,274 07-28-2024, 03:04 PM
Last Post: dchang0

Forum Jump:


Users browsing this thread: 1 Guest(s)