02-18-2020, 10:01 PM
(This post was last modified: 02-18-2020, 11:01 PM by rogerroger.)
https://cdn.openbsd.org/pub/OpenBSD/6.6/...019.10.tgz and https://cdn.openbsd.org/pub/OpenBSD/6.6/...019.10.tgz should be the same. I think. They contain (arm64 machine code) bootloaders, so it's irrelevant whether they're in the amd64 or arm64 or i386 package repos. I linked the amd64 version because I was working from an amd64 machine at the time, that's all.
...but you're right. The files inside are different. Weird. I'll try with both too on my end.
First, get my microSD card and plug it in to a Linux machine. Find the card's name with:
Wipe it. For me it's /dev/mmcblk1 but double and triple check with dmesg/fdisk before continuing!
Get the u-boot:
Install it (and only it)
Take the card out of the Linux laptop and put it into the pinebook. Press the power button. After a moment this appears:
That's without any OS installed. That's just U-Boot.
Now let's do it again with the installer. Put the microSD card back in Linux.
Take the card out and put it in the pinebook and reboot (by holding the power button until it goes off, then pressing it again, in case that wasn't obvious)
This time u-boot will say
and will jump into OpenBSD's boot(8). Here there's another missing detail that I forgot, but which was mentioned earlier in the thread. You MUST type at that prompt
otherwise the console goes to the serial port (com0) and you'll get a black screen. You have to type this every time you boot, but I'm hoping to make it permanent with /etc/boot.conf.
For good measure, I'll try with the amd64 package:
First, I'll clear the old bootloader by replacing it.
Since this was a u-boot/pinebook bootloader, it did actually boot and get to the boot(8) prompt and I could even `set tty fb0`, however `boot` failed, it couldn't find any disks.
Then I replaced it again with the correct bootloader:
and this one (once I `set tty fb0`'d again) work just fine.
I'd check into your dmesg. I'm pretty sure your SD card is not /dev/sdb. You probably just wrote the installer to the wrong disk. And did you `sync`?
...but you're right. The files inside are different. Weird. I'll try with both too on my end.
First, get my microSD card and plug it in to a Linux machine. Find the card's name with:
Code:
$ dmesg | tail
[ 3090.168574] mmc1: new SDHC card at address aaaa
[ 3090.174085] mmcblk1: mmc1:aaaa SU04G 3.69 GiB
Wipe it. For me it's /dev/mmcblk1 but double and triple check with dmesg/fdisk before continuing!
Code:
$ sudo dd if=/dev/zero of=/dev/mmcblk1
^C4137601+0 records in
4137601+0 records out
2118451712 bytes (2.1 GB, 2.0 GiB) copied, 961.379 s, 2.2 MB/s
Get the u-boot:
Code:
$ wget -q https://ftp.openbsd.org/pub/OpenBSD/6.6/packages/aarch64/u-boot-aarch64-2019.10.tgz
$ sha256sum u-boot-aarch64-2019.10.tgz
1e9a2a7c0678d791031bb78180404110833b48d421fd3c7d84dff985306cbfae u-boot-aarch64-2019.10.tgz
$ tar -zxf u-boot-aarch64-2019.10.tgz
$ ls share/u-boot/pine*
share/u-boot/pine64-lts:
sunxi-spl.bin u-boot u-boot.bin u-boot.img u-boot.itb u-boot-sunxi-with-spl.bin
share/u-boot/pine64_plus:
sunxi-spl.bin u-boot u-boot.bin u-boot.img u-boot.itb u-boot-sunxi-with-spl.bin
share/u-boot/pinebook:
sunxi-spl.bin u-boot u-boot.bin u-boot.img u-boot.itb u-boot-sunxi-with-spl.bin
Install it (and only it)
Code:
$ sudo dd if=share/u-boot/pinebook/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8
666+1 records in
666+1 records out
682536 bytes (683 kB, 667 KiB) copied, 0.525471 s, 1.3 MB/s
$ sync
Take the card out of the Linux laptop and put it into the pinebook. Press the power button. After a moment this appears:
Code:
U-Boot 2019.10 (Oct 12 2019 - 14:07:37 -0600) Allwinner Technology
CPU: Allwinner A64 (SUN50I)
Model: Pinebook
DRAM: 2 GiB
MMC: Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial
Out: vidconsole
Err: vidconsole
Net: No ethernet found.
starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1b000: USB EHCI 1.00
Bus usb@1c1b400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1b000 for devices... 4 USB Device(s) found
scanning bus usb@1c1b400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
=>
That's without any OS installed. That's just U-Boot.
Now let's do it again with the installer. Put the microSD card back in Linux.
Code:
$ wget -q https://ftp.openbsd.org/pub/OpenBSD/6.6/arm64/miniroot66.fs
$ sha256sum miniroot66.fs
3017920329a1d5d70a0c86f2724056c4c91eaf18041639c1d05cd54dc9c9cd78 miniroot66.fs
$ sudo dd if=miniroot66.fs of=/dev/mmcblk1 bs=1M
33+0 records in
33+0 records out
34603008 bytes (35 MB, 33 MiB) copied, 7.92513 s, 4.4 MB/s
$ sudo dd if=share/u-boot/pinebook/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8
666+1 records in
666+1 records out
682536 bytes (683 kB, 667 KiB) copied, 0.834261 s, 818 kB/s
$ sync
Take the card out and put it in the pinebook and reboot (by holding the power button until it goes off, then pressing it again, in case that wasn't obvious)
This time u-boot will say
Code:
Found EFI removable media binary efi/boot/boota64.efi
and will jump into OpenBSD's boot(8). Here there's another missing detail that I forgot, but which was mentioned earlier in the thread. You MUST type at that prompt
Code:
boot> set tty fb0
boot> boot
otherwise the console goes to the serial port (com0) and you'll get a black screen. You have to type this every time you boot, but I'm hoping to make it permanent with /etc/boot.conf.
For good measure, I'll try with the amd64 package:
Code:
$ rm u-boot-aarch64-2019.10.tgz
$ rm -r share/
$ wget -q https://ftp.openbsd.org/pub/OpenBSD/6.6/packages/amd64/u-boot-aarch64-2019.10.tgz
$ sha256sum u-boot-aarch64-2019.10.tgz
622f71b6897412861e3ac11b5cdefcabdbf2b078d87216dfd5c6da1c1c1c852d u-boot-aarch64-2019.10.tgz
$ tar -zxf u-boot-aarch64-2019.10.tgz
First, I'll clear the old bootloader by replacing it.
Code:
$ sudo dd if=share/u-boot/pinebook/u-boot.bin of=/dev/mmcblk1 bs=1024 seek=8
589+1 records in
589+1 records out
603409 bytes (603 kB, 589 KiB) copied, 0.218486 s, 2.8 MB/s
$ sync
Since this was a u-boot/pinebook bootloader, it did actually boot and get to the boot(8) prompt and I could even `set tty fb0`, however `boot` failed, it couldn't find any disks.
Then I replaced it again with the correct bootloader:
Code:
$ sudo dd if=share/u-boot/pinebook/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8
666+1 records in
666+1 records out
682536 bytes (683 kB, 667 KiB) copied, 0.233606 s, 2.9 MB/s
$ sync
and this one (once I `set tty fb0`'d again) work just fine.
I'd check into your dmesg. I'm pretty sure your SD card is not /dev/sdb. You probably just wrote the installer to the wrong disk. And did you `sync`?