Is the flash supposed to show up?

1st time post. Just received my board. For the record, I’m making FreeBSD work (or bust …). Anyways…

I have the flash tiny board on the bit that ends in a micro-sd connector. I’ve plugged that into a microsd-to-usb and then into my FreeBSD host. da0 shows up — but I believe it’s the usb thing only — as it lists the media as “no present” …

… is this expected tow work.

1 Like

The BSD family is still largerly unsupported now. Even FreeBSD in previous reports there was claimed to have only UART functionality, nothing else.
Besides, can you post a ready to boot image somewhere?

1 Like

Nice that you’re optimistic… but we’re aways from working at that level. I was trying to poke the flash chip first. I may not need to — in which case, I’ll just start on the booting.

But certainly I’ll post here when things are good. Actually … it’s likely that official -CURRENT snapshots will work when I’m done. … but I will post when things are in a working state.

2 Likes

Most people here run Linux, but ofcourse, nobody discourages you trying something else :slight_smile:
Even Linux is tied to StarFive source now, upstreaming process is quite tiresome.
Because most run Linux, I asked you to post bootable image somewhere or guide to get it up really quick.

You might be also interested in OpenBSD progress on RV arch: OpenBSD/riscv64 although they have only VF1 beta support now. Rumors do say there is JH7110 work done too but not official right now, you might want to save time digging there too.

1 Like

Lots of good code has landed in the OpenBSD code base to support the VF2 board in the last month (next official release, 7.4, should be in October) that code might help with a FreeBSD port. I do not know if you saw this post I made.

And @rpx did manage to install one of the recent OpenBSD snapshots (a fresh OpenBSD snapshot lands nearly every day) to work using EDK2 for their boot environment.

2 Likes

Is it a blank MicroSD card or one that you previously wrote the 202306 Debian image to for the VF2 board ?

If it is the latter, it could be the first 2 partitions, they are a bit odd and might be confusing FreeBSD. On a VF2 board running the StarFive 202306 Debian image I see the following:

user@starfive:~$ sudo fdisk -l
Disk /dev/mtdblock0: 256 KiB, 262144 bytes, 512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock1: 3 MiB, 3145728 bytes, 6144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock2: 1 MiB, 1048576 bytes, 2048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk1: 28.82 GiB, 30941380608 bytes, 60432384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E05DB137-41F7-47A6-B1C1-E9BE91A4BC0E

Device          Start      End  Sectors  Size Type
/dev/mmcblk1p1   4096     8191     4096    2M HiFive BBL
/dev/mmcblk1p2   8192    16383     8192    4M HiFive FSBL
/dev/mmcblk1p3  16384   221183   204800  100M EFI System
/dev/mmcblk1p4 221184 60430335 60209152 28.7G Linux filesystem
user@starfive:~$

Another possibility is that the USB to SD card reader predates the SD card that you are using, by a generation or two, and does not know how to access a much larger card. I hit that problem long a go with a SD card reader designed for SD (maximum size 2GB) and I tried to use it with a SDHC (minimum size 2GB ; maximum size 32GB) and it was incomparable (It was like there was no card inserted). And I’m sure that you would have a similar problem with a SDXC (minimum size 32GB ; maximum size 2TB) or a SDUC card (minimum size 2TB ; maximum size 128TB) with an older generation of USB card reader.

1 Like

Neither … I’m talking about the chip flash thing that is going to attach to the back of the board and the included thingie to transform that into a micro-ssd thing.

1 Like

Ah the eMMC, I have no idea. Sorry.

There are four devices that can be selected for boot:
Onboard QSPI NOR FLASH (which is soldered to the board)
MicroSD card
eMMC module.
UART

So your first post was a bit confusing:

All I can suggest is to check the log files on FreeBSD and try the device on a different OS to confirm that there is not a hardware fault with the USB->MicroSD->eMMC module reader.

1 Like

Are you talking about something like this?

or this?

An eMMC module should show up just like any SD or MicroSD card would in system events. Try removing it and reinserting it a few times. The same may be necessary when putting it on the board. I had difficulty getting my VF2 board to see an eMMC module. It didn’t see it at all until the 3rd or 4th time I reattached it.

2 Likes

OK. My bad. Amazon phail. Anyways… disk mounts. Now a 32G ssd is

da2: 15193MB (31116288 512 byte sectors)

whereas the flash is:

da1: 14910MB (30535680 512 byte sectors)

… and the flash has no partitioning block, but it does seem to have a dos boot sector

00000000  eb 58 90 4d 53 44 4f 53  35 2e 30 00 02 10 a2 0b  |.X.MSDOS5.0.....|
00000010  02 00 00 00 00 f8 00 00  3f 00 ff 00 00 00 00 00  |........?.......|
00000020  00 f0 d1 01 2f 3a 00 00  00 00 00 00 02 00 00 00  |..../:..........|
00000030  01 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  80 01 29 08 2d 68 60 4e  4f 20 4e 41 4d 45 20 20  |..).-h`NO NAME  |
00000050  20 20 46 41 54 33 32 20  20 20 33 c9 8e d1 bc f4  |  FAT32   3.....|
00000060  7b 8e c1 8e d9 bd 00 7c  88 56 40 88 4e 02 8a 56  |{......|.V@.N..V|
00000070  40 b4 41 bb aa 55 cd 13  72 10 81 fb 55 aa 75 0a  |@.A..U..r...U.u.|
00000080  f6 c1 01 74 05 fe 46 02  eb 2d 8a 56 40 b4 08 cd  |...t..F..-.V@...|
00000090  13 73 05 b9 ff ff 8a f1  66 0f b6 c6 40 66 0f b6  |.s......f...@f..|
000000a0  d1 80 e2 3f f7 e2 86 cd  c0 ed 06 41 66 0f b7 c9  |...?.......Af...|
000000b0  66 f7 e1 66 89 46 f8 83  7e 16 00 75 39 83 7e 2a  |f..f.F..~..u9.~*|
000000c0  00 77 33 66 8b 46 1c 66  83 c0 0c bb 00 80 b9 01  |.w3f.F.f........|
000000d0  00 e8 2c 00 e9 a8 03 a1  f8 7d 80 c4 7c 8b f0 ac  |..,......}..|...|
000000e0  84 c0 74 17 3c ff 74 09  b4 0e bb 07 00 cd 10 eb  |..t.<.t.........|
000000f0  ee a1 fa 7d eb e4 a1 7d  80 eb df 98 cd 16 cd 19  |...}...}........|
00000100  66 60 80 7e 02 00 0f 84  20 00 66 6a 00 66 50 06  |f`.~.... .fj.fP.|
00000110  53 66 68 10 00 01 00 b4  42 8a 56 40 8b f4 cd 13  |Sfh.....B.V@....|
00000120  66 58 66 58 66 58 66 58  eb 33 66 3b 46 f8 72 03  |fXfXfXfX.3f;F.r.|
00000130  f9 eb 2a 66 33 d2 66 0f  b7 4e 18 66 f7 f1 fe c2  |..*f3.f..N.f....|
00000140  8a ca 66 8b d0 66 c1 ea  10 f7 76 1a 86 d6 8a 56  |..f..f....v....V|
00000150  40 8a e8 c0 e4 06 0a cc  b8 01 02 cd 13 66 61 0f  |@............fa.|
00000160  82 74 ff 81 c3 00 02 66  40 49 75 94 c3 42 4f 4f  |.t.....f@Iu..BOO|
00000170  54 4d 47 52 20 20 20 20  00 00 00 00 00 00 00 00  |TMGR    ........|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 0d 0a 44 69  |..............Di|
000001b0  73 6b 20 65 72 72 6f 72  ff 0d 0a 50 72 65 73 73  |sk error...Press|
000001c0  20 61 6e 79 20 6b 65 79  20 74 6f 20 72 65 73 74  | any key to rest|
000001d0  61 72 74 0d 0a 00 00 00  00 00 00 00 00 00 00 00  |art.............|

… now having mounted the filesystem, it only has two files:

[2:23:323]root@ump:/var/crash> hexdump -C /mnt/System\ Volume\ Information/WPSettings.dat
00000000  0c 00 00 00 ba 02 99 6c  1e 87 71 69              |.......l..qi|
0000000c
[2:24:324]root@ump:/var/crash> hexdump -C /mnt/System\ Volume\ Information/IndexerVolumeGuid
00000000  7b 00 36 00 43 00 32 00  37 00 44 00 36 00 43 00  |{.6.C.2.7.D.6.C.|
00000010  37 00 2d 00 41 00 41 00  39 00 33 00 2d 00 34 00  |7.-.A.A.9.3.-.4.|
00000020  39 00 32 00 31 00 2d 00  42 00 32 00 30 00 42 00  |9.2.1.-.B.2.0.B.|
00000030  2d 00 43 00 37 00 32 00  46 00 41 00 43 00 35 00  |-.C.7.2.F.A.C.5.|
00000040  39 00 31 00 39 00 43 00  32 00 7d 00              |9.1.9.C.2.}.|
0000004c

… is this correct, or does it need more preparation? Can I put a partition header block on it?

What is on the MicroSD card and the eMMC module ?

I spun up a FreeBSD 13.1 VirtualBox machine and ran a few commands accessing the 202306 Debian image file (Because I do not have an eMMC module and all my MicroSD cards are currently in use).

I’m asking because I am not sure what your hexdumps output is from, is is from a visionfive 2 debian image 202306 for eMMC and a visionfive 2 debian image 202306 for MicroSD cards or is it something else ?

1 Like

As I tried to make clear, my hex dumps were a) the beginning of the emmc image and b) if that is considered to be a DOS filesystem iimage, the only two files on the image.

What did you write to the MicroSD card and the eMMC module ?
Was it any of the following files or something else ?
starfive-jh7110-202306-eMMC-minimal-desktop.img
starfive-jh7110-202306-SD-minimal-desktop.img
(starfive-jh7110-202306-nvme-minimal-desktop.img)

You have not said the source for the hexdump, what was written to the storage devices.
Should I assume that you wrote:
starfive-jh7110-202306-eMMC-minimal-desktop.img to the MicroSD card ?
starfive-jh7110-202306-SD-minimal-desktop.img to the eMMC ?

The location of the first two bootloaders should be the same for MicroSD card and eMMC module. And u-boot-spl.bin.normal.out (bootloader1 firmware ~128KiB) on the first partition would not have a filesystem. And visionfive2_fw_payload.img (bootloader2 firmware ~ 3MiB) on the second partition should not have a filesystem either since Das U-Boot is a heavily trimmed down Linux kernel.

EDIT:
Or is the MicroSD card and the eMMC module blank ? (well they probably shipped with a Microsoft exFAT filesystem on them)
If they are meant to be blank, but have a Microsoft exFAT filesystem on then and they were accessed by Windoze machines:
WPSettings.dat file is used to store Windows Phone’s settings.
IndexerVolumeGuid is generated by Microsoft Search to assign a unique identifier to the storage that is accessed.

This is just how the emmc came — I plugged it in … to get ready to work on the machine. But you’re description of what I can put there is good — I’ll do that. What partitioning method? MBR or GPT?

GPT the is in the URL I posted above https://paste.ee/p/GeC4w#JhGSFjJvZToXmpW5yG68JLjZjnwqrg4j look at the output from “gpart show -r md0”.

At a guess as part of the testing in the factory of the blank SSD they connected maybe a windows phone via Pogo pins maybe. It probably ran an application to format it exFAT and that is how those files ended up there. Or maybe it was a windows PC, but again connected via Pogo pins.