Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Apr 2022 19:41:57 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        John-Mark Gurney <jmg@funkthat.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@FreeBSD.org>
Subject:   Re: Rock64 eMMC not working
Message-ID:  <5E0C3714-2DF8-44BD-A464-202D5588A46A@yahoo.com>
In-Reply-To: <8F74264A-4EF9-48BD-8114-BF9A01AD5C1A@yahoo.com>
References:  <20220407040810.GD88842@funkthat.com> <20220429213048.GL88842@funkthat.com> <8F74264A-4EF9-48BD-8114-BF9A01AD5C1A@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2022-Apr-29, at 15:47, Mark Millard <marklmi@yahoo.com> wrote:

> On 2022-Apr-29, at 14:30, John-Mark Gurney <jmg@funkthat.com> wrote:
>=20
>> John-Mark Gurney wrote this message on Wed, Apr 06, 2022 at 21:08 =
-0700:
>>=20
>> Bump?
>>=20
>> Is no one working on/maintaining the Rock64 port?
>>=20
>> Right now looking at getting the OTG port working on it, but it looks
>> like the dwcotg driver is completely broken in that it can't read =
data
>> accurately from the USB bus.
>>=20
>>> I am trying to get the latest FreeBSD -current snapshot to boot/run =
off
>>> a Pine64 eMMC module on the Rock64, but I'm seeing an issue w/ =
mounting
>>> root:
>>>=20
>>> FreeBSD 14.0-CURRENT #0 main-n254105-d53927b0bae: Thu Mar 31 =
09:26:31 UTC 2022
>>> [...]
>>> Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
>>> mmcsd0: Error indicated: 4 Failed
>>>=20
>>> I got similar messages when 13.1-RC1:
>>>=20
>>> mmcsd0: 16GB <MMCHC M8B16G 2.8 SN D808D122 MFG 07/2018 by 136 =
0x0003> at mmc0 150.0MHz/8bit/1016-block
>>> mmcsd0boot0: 4MB partition 1 at mmcsd0
>>> mmcsd0boot1: 4MB partition 2 at mmcsd0
>>> mmcsd0rpmb: 4MB partition 3 at mmcsd0
>>> [...]
>>> GEOM: mmcsd0: the secondary GPT header is not in the last LBA.
>>> mmcsd0: Error indicated: 4 Failed
>>> rockchip_dwmmc1: Failed to update clk
>>>=20
>>>=20
>>> Are there any known issues w/ this?  A different image to try?
>>>=20
>>> . . .
>=20
> I'm in the middle of updating systems and the Rock64 is
> still back at:
>=20
> # uname -apKU
> FreeBSD Rock64_RPi_4 14.0-CURRENT FreeBSD 14.0-CURRENT #28 =
main-n252475-e76c0108990b-dirty: Sat Jan 15 23:39:27 PST 2022     =
root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA53-nodbg-clang/usr/main-src/arm6=
4.aarch64/sys/GENERIC-NODBG-CA53  arm64 aarch64 1400047 1400047
>=20
> I normally only use the e.MMC during booting. The miscrsd card
> slot is left empty but I used it to manipulate microsd card
> content sometimes. The root file system is on a USB3 NVMe SSD.
>=20
> # gpart show -p
> =3D>       63  244277185    mmcsd0  MBR  (116G)
>         63      32705            - free -  (16M)
>      32768     102312  mmcsd0s1  fat32lba  [active]  (50M)
>     135080      28760            - free -  (14M)
>     163840  241172480  mmcsd0s2  freebsd  (115G)
>  241336320    2940928            - free -  (1.4G)
>=20
> =3D>        0  241172480   mmcsd0s2  BSD  (115G)
>          0  230686720  mmcsd0s2a  freebsd-ufs  (110G)
>  230686720   10485760             - free -  (5.0G)
>=20
> =3D>        40  1953525088    da0  GPT  (932G)
>          40      532480  da0p1  efi  (260M)
>      532520        2008         - free -  (1.0M)
>      534528     7340032  da0p2  freebsd-swap  (3.5G)
>     7874560     1048576         - free -  (512M)
>     8923136    23068672  da0p3  freebsd-swap  (11G)
>    31991808     2097152         - free -  (1.0G)
>    34088960    33554432  da0p4  freebsd-swap  (16G)
>    67643392  1740636160  da0p5  freebsd-ufs  (830G)
>  1808279552     4194304  da0p6  freebsd-swap  (2.0G)
>  1812473856   141051272         - free -  (67G)
>=20
> I can mount mmcsd0s1 (msdosfs) and/or mmcsd0s2a (UFS)
> and do I/O to them. (It is how I update the content.)
>=20
> mmcsd0s2a has the copy of the FreeBSD kernel used to
> boot. This is because the FreeBSD kernel is the first
> stage to be able to deal with the USB3 port as far as
> I know. The e.MMC also is where the Rock64 gets U-Boot
> from and U-Boot gets the EFI from.
>=20
> # mount -onoatime -tmsdosfs /dev/mmcsd0s1 /media
> # ls -Tld /media/*
> drwxr-xr-x  1 root  wheel  4096 Apr 13 07:24:32 2021 /media/EFI
> drwxr-xr-x  1 root  wheel  4096 Apr 13 08:15:48 2021 /media/dtb
> # ls -Tld /media/*/*/*
> -r-xr-xr-x  1 root  wheel  1243772 Jan 28 12:33:00 2022 =
/media/EFI/BOOT/bootaa64.efi
> -r-xr-xr-x  1 root  wheel    50618 Jan 28 12:32:28 2022 =
/media/dtb/rockchip/rk3328-rock64.dtb
>=20
> As for the ufs content (boot not expanded):
>=20
> # mount -onoatime /dev/mmcsd0s2a /mnt
> # ls -Tld /mnt/* /mnt/etc/*
> -r--r--r--   1 root  wheel   6170 Feb  1 04:48:34 2020 /mnt/COPYRIGHT
> drwxr-xr-x  23 root  wheel   1536 Jan 28 15:26:41 2022 /mnt/boot
> drwxr-xr-x   2 root  wheel    512 Apr 26 14:39:22 2020 /mnt/etc
> -rw-r--r--   1 root  wheel     37 Dec 31 16:00:18 2009 /mnt/etc/hostid
> drwx------   2 root  wheel  33280 Nov 27 09:46:08 2019 /mnt/lost+found
>=20
> I've been experimenting with building and using
> U-Boot 2022.04 (not just on the Rock64) and that
> is what is currently in place, despite the FreeBSD
> vintage:
>=20
> U-Boot TPL 2022.04 (Apr 23 2022 - 03:14:35)
> LPDDR3, 800MHz
> BW=3D32 Col=3D11 Bk=3D8 CS0 Row=3D15 CS1 Row=3D15 CS=3D2 Die BW=3D16 =
Size=3D4096MB
> Trying to boot from BOOTROM
> Returning to boot ROM...
>=20
> U-Boot SPL 2022.04 (Apr 23 2022 - 03:14:35 +0000)
> Trying to boot from MMC1
> Card did not respond to voltage select! : -110
> spl: mmc init failed with error: -95
> Trying to boot from MMC2
> NOTICE:  BL31: v2.5(release):
> NOTICE:  BL31: Built : 05:34:22, Dec  8 2021
> NOTICE:  BL31:Rockchip release version: v1.2
>=20
>=20
> U-Boot 2022.04 (Apr 23 2022 - 03:15:10 +0000)
>=20
> Model: Pine64 Rock64
> DRAM:  4 GiB
> PMIC:  RK8050 (on=3D0x40, off=3D0x00)
> Core:  219 devices, 21 uclasses, devicetree: separate
> MMC:   mmc@ff500000: 1, mmc@ff520000: 0
> Loading Environment from MMC... Card did not respond to voltage =
select! : -110
> *** Warning - No block device, using default environment
>=20
> In:    serial@ff130000
> Out:   serial@ff130000
> Err:   serial@ff130000
> Model: Pine64 Rock64
> Net:   eth0: ethernet@ff540000
> Hit any key to stop autoboot:  2 =08=08=08 1 =08=08=08 0=20
> Card did not respond to voltage select! : -110
> switch to partitions #0, OK
> mmc0(part 0) is current device
> Scanning mmc 0:1...
> 50618 bytes read in 5 ms (9.7 MiB/s)
> . . . Card did not respond to voltage select! : -110
> Scanning disk mmc@ff500000.blk...
> Disk mmc@ff500000.blk not ready
> Scanning disk mmc@ff520000.blk...
> Found 3 disks
> No EFI system partition
> BootOrder not defined
> EFI boot manager: Cannot load any image
> Found EFI removable media binary efi/boot/bootaa64.efi
> 1243772 bytes read in 33 ms (35.9 MiB/s)
> Booting /efi\boot\bootaa64.efi
> . . .
>=20
> I may discover that something breaks once I update
> FreeBSD, but the current status of my context seems
> to be working fine for the e.MMC .
>=20
> I've no clue about the OTG port status. I've never
> tied to use it.
>=20

I've got the Rock64 updated to:
(line split for better readability)

# uname -apKU
FreeBSD Rock64_RPi_4_3_2v1p2 14.0-CURRENT FreeBSD 14.0-CURRENT #32
main-n255108-9fb40baf6043-dirty: Thu Apr 28 22:57:05 PDT 2022
=
root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA53-nodbg-clang/usr/main-src/arm6=
4.aarch64/sys/GENERIC-NODBG-CA53
arm64 aarch64 1400057 1400057

It still works the same as reported earlier. No
evidence of e.MMC related problems.


=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5E0C3714-2DF8-44BD-A464-202D5588A46A>