PinebookPro installation instructions - additional method to update SPI flash
Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
PinebookPro installation instructions - additional method to update SPI flash
I've been following the installation instructions for Slackware on the PinebookPro.
The instructions on installing the boot loader to SPI flash weren't working for me - I could not get the existing system to boot from the SD card, Armbian kept loading. Taking the EMMC out completely did not help - whatever was on the existing SPI would not boot from SD. The Reset and Recovery buttons made no difference.
I eventually found these instructions. I extracted the file spi_loader.img from the Slackware flash-spi-pinebookpro.img and then from the running Armbian system used
That worked ok and was much easier and more successful than the "Bypass SPI flash" methods in the instructions. Maybe this could be added as a third method to help if someone already has a running system in place.
I've been following the installation instructions for Slackware on the PinebookPro.
The instructions on installing the boot loader to SPI flash weren't working for me - I could not get the existing system to boot from the SD card, Armbian kept loading.
This is good timing! Pine64 sent a replacement mainboard for Slackware's Pinebook Pro, which arrived this week. I know a couple of people here had similar challenges with newer Pinebook Pro's and I was wondering what I might encounter.
Armbian? have they switched from Manjaro?
Where would Armbian have been booting from? the SPI flash is only 128MB so I guess it's possible they have a small footprint OS there. I'll find out what's on mine soon!
If they're still using U-Boot, unless it's been disabled, you can press enter to interrupt the boot sequence and use U-Boot's built-in command to erase the flash, or boot directly from SD card from the U-Boot console/command prompt.
Quote:
I eventually found these instructions. I extracted the file spi_loader.img from the Slackware flash-spi-pinebookpro.img and then from the running Armbian system used
That worked ok and was much easier and more successful than the "Bypass SPI flash" methods in the instructions. Maybe this could be added as a third method to help if someone already has a running system in place.
I will add this in. You should be able to get away without flashing the Slackware U-Boot because the immutable first stage boot loader will try booting from SD card if there's nothing in the SPI flash, which will enable you to boot the Slackware flashing image as described in the instructions.
For the documentation: how do you login to the Armbian installation - is there a root password?
I bought the Pinebook Pro second hand so I don't know what had been done to it. It came without an EMMC, and initially using Manjaro on an SD card I could not get any life out of it beyond an LED going orange. There is a sticker inside indicating it's a 2019 model.
I bought an EMMC and installed that along with the NVME adapter - still no joy with Manjaro. I switched to the Armbian Bookworm Cinnamon image on an SD and this booted up ok. It has a utility to copy the installation over first to the EMMC, and after booting from that (no SD card needed by that stage) it allowed transfer of the system over to the NVME drive. I might or might not have flashed something to the SPI, I didn't really know what I was doing and can't remember. That all worked - at least I knew the hardware worked although I didn't really want to use Armbian.
From memory the Armbian first start up required setting a user password, but I don't recall setting a root password. Switching to root required entering the user password (seems a strange arrangement after being used to Slackware) - I think in the same way Raspberry Pi OS does.
I then accidentally messed up the Armbian distribution by running a slackware make_world.sh script without really thinking what I was doing. That overwrote most of coreutils in the /bin directory (I think something it needed was missing so instead of creating the coreutils package it overwrote the main filesystem). Login became impossible, but I was later able to log in over ssh.
Logged into Armbian over ssh I could switch to root. apt-get was not functional as ls, rm, mv, cp and many other things had been replaced by symlinks to symlinks in a loop between /bin and /usr/bin. I restored coreutils by copying files from the installation SD card using the version of cp on the SD card to begin the process. This restored the ability to do anything and was about the time I saw you'd put out the instructions for the Pinebook Pro. I ran the flash_erase to get a bootloader that would read SD cards again, to begin moving the machine to Slackware.
Armbian might be worth a look as they have definitely got a boot process that works without the SD card. I think it's relying on the EMMC instead, but I could be wrong. At one point I had an SD with Slackware flash-spi-pinebookpro.img copied to it using dd. Although it would not boot to do the flash write its presence allowed Armbian to boot from the NVME drive without the EMMC present.
It's been a long process and quite a few mistakes and things learnt along the way. I haven't tried the U-Boot commands to overwrite the flash, but maybe that will be useful in future. With the machine being second hand I'm not sure what bootloader was on there to start with really.
PinebookPro installation instructions - additional method to update SPI flash
I ended up shorting the SPI flash chip with a pair of tweezers. I have a couple months old pinebook pro and this works. I left my emmc module installed, but flipped the hardware switch to disable.
The main thing is you should also purchase a serial console cable from pine64 and save yourself a lot of headaches.
Edit: I forgot to mention that the reason this works is the pbpro expects to always boot spi flash first if it has anything written to it. Shorting it forces the next in line media to be the SD card.
Armbian might be worth a look as they have definitely got a boot process that works without the SD card. I think it's relying on the EMMC instead, but I could be wrong.
I'll add a note that if you can't prevent the Linux distro booting, you can obtain root and dd a few MB of /dev/zero to /dev/mtd0. That'll suffice to boot the Slackware SD card flashing image.
I replaced the main board in the PbPro yesterday (video coming in Jan), and there either wasn't anything in SPI flash or it was U-Boot which booted from the SD Card (as it will by default).
Slackware opts for an SD card as the /boot location due to its exceptional portability across various Hardware Models. This choice offers flexibility for the OS's root partition to reside on any storage type. The boot loader's limited or unreliable support for storage devices is bypassed by the guaranteed bootability from an SD card. This ensures a reliable boot-up sequence by initiating the OS InitRD/Linux from an SD card, initializing drivers, and enabling stable storage access.
However, the HoneyComb LX2 differs as its firmware allows booting from NVME and the SATA controller, eliminating the necessity for an SD card.
While installing Slackware on the eMMC or placing /boot on it is possible (albeit undocumented), I advise against it due to the eMMC's limited lifespan. In my experience, I unintentionally damaged mine within a month during development.
SD cards share a similar limited lifespan, making them unsuitable for hosting the OS. However, using them for /boot is acceptable due to the minimal I/O demands in that location.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.