Messed up, PBP does not start after write_spi_flash
#1
Hello everybody,
I'm rather an amateur about Linux, but I'm super enthusiastic about PineBookPro.

Mine came 2 weeks ago, but I didn't really like Debian.

So I was planning to switch to Ubuntu (With Gnome3 ) and for this purpose I copied the Bionic Mate image (https://wiki.pine64.org/index.php/Pinebo...ionic_Mate) to an SD card as a first step.

I was able to boot from the card. :-)
As next steps I tried to install Ubuntu directly on the PBP. After a whole evening, in which I didn't get any further, I got the idea to try it out with this: https://wiki.pine64.org/index.php/NOOB#U...oot_to_SPI

Then unfortunately ( to be honest, I don't really understand what Iwas doing) I executed "rock64_write_spi_flash.sh".
When it was finished, I restarted. That was probably the second mistake.

Now the device does not boot anymore.
No matter if I start with USB stick, with SD card or without any medium at all: The screen stays black and the PowerLED flashes. Nothing more happens.

Has somebody has an tip for me: How do I get the device to boot again?
#2
Yeah, that was meant for a different board. For more information about writing or erasing your SPI on a PBP, check out this wiki page https://wiki.pine64.org/index.php/Pinebook_Pro_SPI
#3
Question 
Okay, it looks tricky for me. But punishment is mandatory.

If I understand this page correctly, I have to: -

1. install rkdeveloptool
2. Press the buttons.
3. Connect the PBP via USB-C.
4. Write a file with a lot of zeros into the SPI-Flash with rkdeveloptool.

Is this correct?

Unfortunately I fail already at the first step:
Code:
~$sudo apt-get install libudev-dev libusb-1.0-0-dev dh-autoreconf
... Works fine...
~/code/rockchip/rkdeveloptool$ autoreconf -i
~/code/rockchip/rkdeveloptool$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for library containing iconv... none required
./configure: line 4482: syntax error near unexpected token `LIBUSB1,libusb-1.0'
./configure: line 4482: `PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)'
:~/code/rockchip/rkdeveloptool$ make
make: *** No targets specified and no makefile found. Stop.
~/code/rockchip/rkdeveloptool$ sudo make install
make: *** No rule to make target 'install'. Stop.
#4
However, regardless of the problem with installing rkdeveloptools, I have continued. After I connected the PBP via USB-C to my Dell a mass storage device was mounted on it.

Code:
/$ cd media/bnjmnhg/e9e67d6e-9693-4f25-bbd6-ae24f7c9e5bb/
/media/vonderhaarb/e9e67d6e-9693-4f25-bbd6-ae24f7c9e5bb$ ll
total 513452
drwxr-xr-x   20 root root      4096 Jul 11  2019 ./
drwxr-x---+   6 root root      4096 Apr  3 21:18 ../
drwxr-xr-x    2 root root      4096 Mär 25 13:20 bin/
drwxr-xr-x    2 root root      4096 Jun 26  2018 boot/
drwxr-xr-x    4 root root      4096 Sep 12  2018 dev/
drwxrwxr-x  114 root root      4096 Mär 26 13:45 etc/
drwxr-xr-x    5 root root      4096 Jul 11  2019 home/
drwxr-xr-x   13 root root      4096 Jul  2  2019 lib/
drwx------    2 root root     16384 Feb 22  2019 lost+found/
-rw-r--r--    1 root root   1385163 Sep 12  2018 md5sum.txt
drwxr-xr-x    4 root root      4096 Mär 26 08:52 media/
drwxr-xr-x    2 root root      4096 Sep 12  2018 mnt/
drwxr-xr-x    2 root root      4096 Jun 26  2018 proc/
drwx------   22 root root      4096 Jul 14  2019 root/
drwxr-xr-x    5 root root      4096 Feb 22  2019 run/
drwxr-xr-x    2 root root      4096 Mär 25 13:20 sbin/
drwxr-xr-x    2 root root      4096 Sep 12  2018 srv/
-rw-------    1 root root 524288000 Jul  3  2019 swapfile
drwxr-xr-x    2 root root      4096 Jun 26  2018 sys/
drwxrwxrwt   11 root root      4096 Apr  3 20:51 tmp/
drwxr-xr-x   11 root root      4096 Mär 10  2019 usr/
drwxr-xr-x   11 root root      4096 Aug 16  2019 var/


No idea if this information helps. But I find it reassuring that the device still communicates with me in any case.

Could it be this mascrom-mode?
#5
Try
Code:
sudo apt-get install pkg-config libusb-1.0 autotools-dev

And then run `./configure` again, and if that works,`make`.
#6
(04-03-2020, 01:23 PM)rillian Wrote: Try
Code:
sudo apt-get install pkg-config libusb-1.0 autotools-dev

And then run `./configure` again, and if that works,`make`.

Installation worked, but configure stays the same:
Code:
~/code/rockchip/rkdeveloptool$ sudo apt-get install pkg-config libusb-1.0 autotools-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting 'libusb-1.0-0' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-0-dev' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-doc' for regex 'libusb-1.0'
autotools-dev is already the newest version (20180224.1).
autotools-dev set to manually installed.
libusb-1.0-0 is already the newest version (2:1.0.21-2).
libusb-1.0-0-dev is already the newest version (2:1.0.21-2).
libusb-1.0-doc is already the newest version (2:1.0.21-2).
libusb-1.0-doc set to manually installed.
The following NEW packages will be installed
 pkg-config
0 to upgrade, 1 to newly install, 0 to remove and 3 not to upgrade.
Need to get 45,0 kB of archives.
After this operation, 185 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 pkg-config amd64 0.29.1-0ubuntu2 [45,0 kB]
Fetched 45,0 kB in 0s (170 kB/s)    
Selecting previously unselected package pkg-config.
(Reading database ... 284479 files and directories currently installed.)
Preparing to unpack .../pkg-config_0.29.1-0ubuntu2_amd64.deb ...
Unpacking pkg-config (0.29.1-0ubuntu2) ...
Setting up pkg-config (0.29.1-0ubuntu2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

~/code/rockchip/rkdeveloptool$  ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for library containing iconv... none required
./configure: line 4482: syntax error near unexpected token `LIBUSB1,libusb-1.0'
./configure: line 4482: `PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)'
#7
Hmm. You may need to re-run
Code:
autoreconf -i
as well?
#8
Ok, I'm a few steps further.
rkdeveloptool seems to work now. But it tells me, no device is connected.
The device is connected via USB-A_to_USB-Cable. USB-C on PBP side.
It was also automatically mounted. But I have no idea if this is right.
Code:
~/code/rockchip/rkdeveloptool$ dd if=/dev/zero of=zerospi bs=1M count=16
16+0 records in
16+0 records out
16777216 bytes (17 MB, 16 MiB) copied, 0,0645965 s, 260 MB/s
~/code/rockchip/rkdeveloptool$ ./rkdeveloptool db rk3399_loader_spinor_v1.15.114.bin
Did not find any rockusb device, please plug device in!
~/code/rockchip/rkdeveloptool$ cd /media/vonderhaarb/e9e67d6e-9693-4f25-bbd6-ae24f7c9e5bb/
/media/vonderhaarb/e9e67d6e-9693-4f25-bbd6-ae24f7c9e5bb$ ll
total 513452
drwxr-xr-x   20 root root      4096 Jul 11  2019 ./
drwxr-x---+   7 root root      4096 Apr  4 21:45 ../
drwxr-xr-x    2 root root      4096 Mär 25 13:20 bin/
drwxr-xr-x    2 root root      4096 Jun 26  2018 boot/
drwxr-xr-x    4 root root      4096 Sep 12  2018 dev/
drwxrwxr-x  114 root root      4096 Mär 26 13:45 etc/
drwxr-xr-x    5 root root      4096 Jul 11  2019 home/
drwxr-xr-x   13 root root      4096 Jul  2  2019 lib/
drwx------    2 root root     16384 Feb 22  2019 lost+found/
-rw-r--r--    1 root root   1385163 Sep 12  2018 md5sum.txt
drwxr-xr-x    4 root root      4096 Mär 26 08:52 media/
drwxr-xr-x    2 root root      4096 Sep 12  2018 mnt/
drwxr-xr-x    2 root root      4096 Jun 26  2018 proc/
drwx------   22 root root      4096 Jul 14  2019 root/
drwxr-xr-x    5 root root      4096 Feb 22  2019 run/
drwxr-xr-x    2 root root      4096 Mär 25 13:20 sbin/
drwxr-xr-x    2 root root      4096 Sep 12  2018 srv/
-rw-------    1 root root 524288000 Jul  3  2019 swapfile
drwxr-xr-x    2 root root      4096 Jun 26  2018 sys/
drwxrwxrwt   11 root root      4096 Apr  3 20:51 tmp/
drwxr-xr-x   11 root root      4096 Mär 10  2019 usr/
drwxr-xr-x   11 root root      4096 Aug 16  2019 var/
Id tried it again (This time with the USB-Cable pluged in before pushing the buttons, something changed:
1. The annoying beeping stopped. The Power-LED (Wich was red) switched off.
2. The boot volume is no longer mounted
3, Rkdeveloptool says something different.
Code:
~/code/rockchip/rkdeveloptool$ ./rkdeveloptool db rk3399_loader_spinor_v1.15.114.bin
Opening loader failed, exiting download boot!

Looks like the PBP is just off. :-(
#9
You're outside my expertise now. Some thoughts, in case they're helpful:

The instructions say you can `rkdeveloptool ld` to confirm your pinebook pro is connected and in maskrom mode. Did you ever get that to work?

In my experience flashing phones, low-level firmware writes are often very flaky. It's not unusual to have to try the whole dance several times to get it to work. Try connecting usb before or after pressing the reset button, varying the rhythm of the steps, that sort of thing.

The instructions say to remove all bootable devices. Did you take out the sdcard, and the eMMC module?

I don't understand what you mean by "the boot volume" being "automatically mounted". Do you mean the Pinebook Pro presented a USB mass storage device? What filesystem type? (e.g reported by typing `mount | grep media`) how big was it? (`df -h`) Some boards do allow firmware update this way, but most present a custom usb device, which is what I expected from rkdeveloptool needing libusb installed.
#10
Okay, your last mail was helpful. I've taken another step forward and got a connection in masculine mode.
Thank you so much so far!

Code:
~/code/rockchip/rkdeveloptool$ ./rkdeveloptool ld
DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=103 Maskrom


The question now is what is the next step.
Tophneal posted me this link:
https://wiki.pine64.org/index.php/Pinebook_Pro_SPI

But what should I do next?
Is "Zeroing out SPI Flash" enough?
Or do I have to write something else into the SPI? On the page it says "U-Boot, or other bootloader binary", but which one?

I don't want to make another mistake like the one who put me into this.


Possibly Related Threads…
Thread Author Replies Views Last Post
  My installation guide starting from messed up eMMC Besouro 0 813 12-19-2022, 01:01 PM
Last Post: Besouro
  Hibernate Manjaro -> NetworkManager doesn't start anymore Gerhard 8 7,308 01-11-2020, 09:42 PM
Last Post: tophneal
  Oops! I messed up the graphics drivers diodelass 1 3,005 11-10-2019, 02:49 PM
Last Post: diodelass
  Where to start? dazld 2 3,588 08-16-2019, 09:07 PM
Last Post: hmuller

Forum Jump:


Users browsing this thread: 1 Guest(s)