Jump to content

Getting Armbian working on second batch (Mid 2022) PineBook Pro


TRS-80

Recommended Posts

I slowly convinced myself that I wanted a PineBook Pro, some time after the first production run.  But then COVID, parts shortages, etc. happened and they were not available again until about mid-2022.  But when they were, I decided to snap one up.

 

And since then I have not been able to get it to boot Armbian.  It came from the factory with Manjaro, which for me being a Debian guy, might as well be useless.  So the PBP sat around collecting dust.

 

Since then I have tried a few times to get it to work.  I read many forum posts, tried some things.  I won't document all that in detail.

 

In this post, I will continue from where I left off here.  However to summarize, that was about comparing DTB/DTS files to Kali, which supposedly works.  That may become useful later, but I don't think that's the main problem.

 

I think that the main problem is that this new batch came from the factory with no bootloader flashed to the included SPI flash chip.  This is a problem on PineBook Pro because the RK3399 has a kind of weird boot order: SPI, eMMC, SD card.  Therefore, if you just put in some SD card you flashed, it still boots from the factory Manjaro from the eMMC.  Whatever bootloader they are using also apparently will not recognize an otherwise working Armbian image on an SD card.

 

Now, because of the weird boot situation, there is supposed to be a switch to turn off eMMC.  However this did not work for me.  Which means one of 2 things:

 

  1. The switch does not work.  I read at least one other person saying this.  Also on the new revision, it's in a slightly different place than the old revision (may be a clue, maybe not).
  2. I simply had a bad Armbian image (which I had burned to sd card) that would not boot for whatever reason.[0]

 

But let's put that aside for a moment.  As I still think the main problem is the (empty) SPI.  And that will be the easiest/best path forward.

 

I confirmed the 'blank SPI' theory 2 different ways.  First, as mentioned in a follow-up to the linked post (4 paragraphs above):

 

As Martijn Braam states here:

Quote

But the Pinebook Pro has a similar boot configuration, and thus a similar problem. Some time after the PinePhone Pro was shipped, it was time for a new Pinebook Pro batch, and this discussion started again. The same arguments were re-iterated by all sides all over again, and the discussion went nowhere. PINE64 representatives went so far as to say, quote, "people who want [an SPI chip] can just solder one on". This batch of Pinebook Pros has ended up shipping without Tow-Boot flashed.

 

Of course, I like to beat a horse until it's really dead be thorough in my investigations, so today I wasted a lot of time[1] verifying that this indeed was the case.  I did so by dd'ing the /dev/mtd0 block device into a file[2].  When I examined the file, it contained all FF, and also it is about 16 MiB in size.  To me this confirms that indeed, the SPI on the new batch comes from the factory empty.

 

So what is next?  I keep reading that the only people who had success first had to install something like tow-boot to the SPI.  That will be my next step.  But before I flashed anything to SPI, I wanted to see what really came from the factory (which I did above).

 

I will continue to document my progress whenever time allows for me to work on this.

 

[0] Once I got the bootloader situation sorted, I later used this same image (on the SD card) to boot and install Armbian, so I do not think this was the case.

 

[1] In the end the solution was simple.  But first I wasted a lot of time trying to get rkdeveloptool working in Manjaro on the PBP.  Only to realize it's intended to be used from a second machine to read the SPI flash via USB in maskrom mode.  Anyway, lesson learned.

 

[2] I tried to attach it but maybe it's too big.

Edited by TRS-80
add further notes and details
Link to comment
Share on other sites

After the better part of a year being unable to use this device, I am pleased to announce my first successful boot into Armbian.

 

:thumbup:  :beer:  :love:

 

 

I accomplished this by installing tow-boot to the SPI.

 

If you check their instructions for the PineBook Pro, it says to install some 'installer' version first to an SD card, and then boot that, and use it to install to the SPI chip (or other media).  I did not want to do that for a few reasons:

  1. I don't understand why all the faffing about with an indirect installation method via SD card?
  2. I don't seem to be able to boot via SD card anyway.
  3. I am really not interested in removing all those $#%^# screws from the back case again, just so I can flip a switch, then put them all back (twice, maybe more).[0]

So what I did was dig around a little more until I found this issue from last year where people were saying just to do the following, essentially:

 

dd if=Tow-boot.spi.bin of=/dev/mtd0

 

So I downloaded latest release of tow-boot, which comes as an xz compressed tar archive.  After opening that up the usual way with:

 

tar -xf pine64-pinebookPro-2021.10-005.tar.xz

 

Under the binaries folder I found the Tow-Boot.spi.bin file.  I copied that over to PBP and then executed the above mentioned 'dd' command (via sudo).

 

I powered off and then back on, I knew it was successful because I saw the Tow Boot logo.  So I powered off and then inserted SD card I had prepared a while back with Armbian on it.

 

And yet it still booted into Manjaro on the eMMC.  So once Manjaro finished booting, I powered back down, then back on, this time pressing <ESC> to bring up tow-boot's boot menu.  After selecting 'SD card' I was able to boot into Armbian image on the SD card, which did the normal expansion and first run setup (entering passwords, locale, etc.).

 

Now this is interesting, because I had tried to boot this very same SD card before, without any luck.  Even turning the (previously mentioned) 'eMMC switch' to both positions[0], I could never get it to work.  So maybe there is something to the 'switch is broken on the new batch' theory?

 

Anyway, I guess that's it, as I finally have Armbian running on here.  It's a minimal/CLI image, so I still have my work cut out for me getting this all set up, but hopefully I can just install my preferred desktop packages and we will see how it goes.  But that's another project for another day.

 

[0] Which involves removing quite a number of tiny little screws and removal of the entire back cover.  And then putting them all back.  In the meantime you can't really use the keyboard or anything, so you pretty much have to do the whole %&#@%# process every time.  After doing this a few times, it starts turning into a hassle.

Link to comment
Share on other sites

Install to eMMC

 

All of the above was with Armbian running on an SD card.  Before I went any further with provisioning the new machine, I wanted to try getting Armbian on to the eMMC, which was always my ultimate goal.

 

I am very pleased to announce that, using nand-sata-install tool, I was able to install the OS to the eMMC without any trouble whatsoever.  I selected 'boot on eMMC and root on eMMC' (or something like that).  After rebooting a couple times to test, it works flawless!  It even copied over all my existing settings (so far only things done during initial setup, but still)!  A pleasant surprise!

 

So, I have decided to leave my tow-boot installed on the SPI.  It seems to be working pretty well and might be helpful in a recovery situation.  By default it boots into eMMC anyway, so now I don't even have to press ESC any more to select the SD card (like I had been doing until now).

 

I am so glad to be rid of that Manjaro cancer.  As if that wasn't bad enough, it came with KDE as well. 

Link to comment
Share on other sites

  • Igor pinned and featured this topic
Posted (edited)

Sorry guise, I didn't log in for a while, so just saw your replies.

 

Are recent images not working (they should be)?

 

After checking my notes, it appears I used Armbian_23.02.0-trunk_Pinebook-pro_sid_edge_6.1.11_xfce_desktop.  However, I vaguely recall switching from Sid to Bookworm (which, at the time, was Testing, IIRC).

 

I think my thought process was: I should probably use Sid/edge for desktop stuff.  But my dotfiles are based on Debian Testing (or Stable), so I simply switched to Bookworm in my Apt sources, as Sid is usually not too far off from Testing.

 

But any Armbian build should work.  The main thing (at the time, haven't messed with it since) seemed to be getting Tow-Boot onto the SPI chip.  If newer image(s) aren't working, those should be the subject of new threads (or testing reports).

Edited by TRS-80
capitalization
Link to comment
Share on other sites

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines