Re: FreeBSD13.0 on Pine ROCK64

From: Mark Millard via freebsd-arm <freebsd-arm_at_freebsd.org>
Date: Tue, 28 Dec 2021 13:14:53 UTC
On 2021-Dec-27, at 19:40, petru garstea <peter.garshtja@ambient-md.com> wrote:

> Greetings,
> 
> Hope all is well.
> 
> I burned on emmc drive a FBSD13 version for pine rock64 SOC however the system doesn't boot.
> 
> The command I used
> 
> dd if=FreeBSD-13.0-RELEASE-arm64-aarch64-ROCK64.img of=/dev/da0 bs=1m conv=sync status=progress
> 
> Then I validate the partition tables
> 
> gpart show
> =>     40  6291376  da0  GPT  (29G) [CORRUPT]
>        40    32728       - free -  (16M)

40+32768 == 32808, which overlaps with [32768..32768+102400)

>     32768   102400    1  efi  (50M)
>    135168  6156160    2  freebsd-ufs  (2.9G)
>   6291328       88       - free -  (44K)
> 
> 
> I tried to boot as is but no luck, then since the GPT is corrupted I ran
> 
> gpt recover da0
> 
> But the result is the same, the system doesnt boot.
> 
> 
> I tested an armbian image and that worked well.

My configuration uses the e.MMC through loading the
kernel (but the kernel gets the world from USB3).
(I do my own FreeBSD builds.)

# gpart show
=>       63  244277185  mmcsd0  MBR  (116G)
         63      32705          - free -  (16M)
      32768     102312       1  fat32lba  [active]  (50M)
     135080      28760          - free -  (14M)
     163840  241172480       2  freebsd  (115G)
  241336320    2940928          - free -  (1.4G)

=>        0  241172480  mmcsd0s2  BSD  (115G)
          0  230686720         1  freebsd-ufs  (110G)
  230686720   10485760            - free -  (5.0G)
. . .

The Rock64 boots just fine, no microsd card present.

For reference, my Rock64 Armbian installation on e.MMC
is shown as (gpart show output):

=>       63  244277185  da3  MBR  (116G)
         63      32705       - free -  (16M)
      32768  241795072    1  linux-data  (115G)
  241827840    2449408       - free -  (1.2G)

Similarly, my Rock64 NetBSD installation on e.MMC
is shown as (again gpart show output):

=>       63  244277185  da3  MBR  (116G)
         63      32705       - free -  (16M)
      32768     163840    1  fat32lba  [active]  (80M)
     196608  244080640    2  !169  (116G)

(These were accessed via a USB3 reader, not via
the Rock64. The Rock64 was otherwise engaged. I did
not build Armbian or NetBSD. I just used an image from
a standard place for each.)

All these start at 63 and avoid having the initial
free space overlapping the [32768.. 32768+???) area.

All these are MBR instead of GPT.

As I remember, the Rock64 has a jumper configuration
that can force microsd card booting, something I avoid
on the Rock64.

I've no clue of any of he above happens to have touched
on you actual problem. But at least I've got an FreeBSD
system that does the steps through loading the kernel
via using the e.MMC. So that much is possible.

===
Mark Millard
marklmi at yahoo.com