Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Quartz64



On 1/30/22 3:43 AM, Robert Swindells wrote:
Jason Mitchell <jmitchel%bigjar.com@localhost> wrote:
On 1/29/22 10:45 AM, Robert Swindells wrote:
Is anyone doing anything with the Quartz64 board from Pine64?

The Pine64 Wiki suggests that you can just download a -current install
image and it will work:

<https://wiki.pine64.org/wiki/Quartz64#NetBSD>

This doesn't work for me, if there are other steps needed then someone
should either add them to the description in the Pine64 wiki or replace
the description with a link to better instructions in our wiki.

The Tianocore firmware images that jmcneill@ has created do work for me
but I can't work out how to combine that with a NetBSD boot image or
configure the firmware to tell it to boot NetBSD.

It could be useful to know if people are working on any NetBSD drivers
for the RK3566 so that we don't duplicate effort.

Robert Swindells
As far as I understand, the tianocore image contains U-Boot and EFI
code. It should look for a DOS partition (or a partition with the EFI
GPT type) and look for a boot loader (in EFI/BOOT/bootaa64.efi). So the
easiest thing to try would be to copy the tianocore image to an sd card
and add a DOS partition and fill it with the files from the DOS
partition in arm64.img. Hopefully when you put the sd card into the
Quartz you will see the NetBSD boot loader when you boot it up. If this
works, then copy the NetBSD partition from the arm64.img to the SD card
and things should work. Or make a new NetBSD partition and copy the
files by hand.
Maybe what is expected is to put the tianocore image on an sd card
and the installation image on an eMMC device, still doesn't boot
NetBSD by default.

I do get a UEFI menu on the serial console if I wait long enough, had
been powering it off too soon, no idea what to do with it though.

That I don't know. Hopefully if there's an EFI partition on the disk, the UEFI loader will boot it.

There's a slight complication (I think) in that the tianocore images are
only 34Mb when unzipped. So that means if you copy the tianocore image
to an sdcard there won't appear to be space to add a DOS partition or a
NetBSD partition. There's probably a way to expand the disk image, and
thus move the gpt partition table, but I don't know what it is.
The "gpt resizedisk" command looks like it should expand the disk image
but it doesn't seem to work on the tianocore one, I just get an error
that I need to recover the partition table if I try to add a DOS or FFS
partition.

(I forgot to copy the list on my first message).

Did you increase the size of the file first? There's probably (almost certainly) an easier way to do this but these commands worked for me:

root@bebe:/home/jmitchel# dd if=/dev/zero of=zero.img bs=4m count=256
root@bebe:/home/jmitchel# cat sdcard_Quartz64_4GB.img zero.img > sdcard_Q64_1Gb.img
root@bebe:/home/jmitchel# gpt resizedisk sdcard_Q64_1Gb.img
root@bebe:/home/jmitchel# gpt show -l sdcard_Q64_1Gb.img
    start     size  index  contents
        0        1         PMBR
        1        1         Pri GPT header
        2       32         Pri GPT table
       34       30         Unused
       64    16320      1  GPT part - loader
    16384    16384      2  GPT part - uboot
    32768    32768      3  GPT part - env
    65536  2099167         Unused
  2164703       32         Sec GPT table
  2164735        1         Sec GPT header

root@bebe:/home/jmitchel# gpt add -l EFI -t efi -s 128M sdcard_Q64_1Gb.img
sdcard_Q64_1Gb.img: Partition 4 added: c12a7328-f81f-11d2-ba4b-00a0c93ec93b 65536 262144

Fingers crossed that the image will boot :)

HTH,

Jason M.

(in case someone else inds this via google, these commands will add an ffs partition. gpt will create a partition at the very start of the disk [a whole 30 sectors] so you have to add two ffs partitions and then delete the first. Once again, I'm sure there's an easier way to do this. Probably just adding -s and the remaining sectors in the disk/image would work -- 1837023 in this example).

root@bebe:/home/jmitchel# gpt add -l NetBSD -t ffs sdcard_Q64_1Gb.img
sdcard_Q64_1Gb.img: Partition 5 added: 49f48d5a-b10e-11dc-b99b-0019d1879648 34 30
root@bebe:/home/jmitchel# gpt show sdcard_Q64_1Gb.img
    start     size  index  contents
        0        1         PMBR
        1        1         Pri GPT header
        2       32         Pri GPT table
       34       30      5  GPT part - NetBSD FFSv1/FFSv2
       64    16320      1  GPT part - Linux data
    16384    16384      2  GPT part - Linux data
    32768    32768      3  GPT part - Linux data
    65536   262144      4  GPT part - EFI System
   327680  1837023         Unused
  2164703       32         Sec GPT table
  2164735        1         Sec GPT header
root@bebe:/home/jmitchel# gpt add -l NetBSD -t ffs sdcard_Q64_1Gb.img
sdcard_Q64_1Gb.img: Partition 6 added: 49f48d5a-b10e-11dc-b99b-0019d1879648 327680 1837023
root@bebe:/home/jmitchel# gpt show sdcard_Q64_1Gb.img
    start     size  index  contents
        0        1         PMBR
        1        1         Pri GPT header
        2       32         Pri GPT table
       34       30      5  GPT part - NetBSD FFSv1/FFSv2
       64    16320      1  GPT part - Linux data
    16384    16384      2  GPT part - Linux data
    32768    32768      3  GPT part - Linux data
    65536   262144      4  GPT part - EFI System
   327680  1837023      6  GPT part - NetBSD FFSv1/FFSv2
  2164703       32         Sec GPT table
  2164735        1         Sec GPT header
root@bebe:/home/jmitchel# gpt remove -i 5 sdcard_Q64_1Gb.img
sdcard_Q64_1Gb.img: Partition 5 removed
root@bebe:/home/jmitchel# gpt show sdcard_Q64_1Gb.img
    start     size  index  contents
        0        1         PMBR
        1        1         Pri GPT header
        2       32         Pri GPT table
       34       30         Unused
       64    16320      1  GPT part - Linux data
    16384    16384      2  GPT part - Linux data
    32768    32768      3  GPT part - Linux data
    65536   262144      4  GPT part - EFI System
   327680  1837023      6  GPT part - NetBSD FFSv1/FFSv2
  2164703       32         Sec GPT table
  2164735        1         Sec GPT header



Home | Main Index | Thread Index | Old Index