-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milk-V Mars CM #22
Comments
Just plopped this board on my Compute Module 4 IO Board, and it seems to do some sort of boot process, arriving at a flashing green LED (two flashes, then 1 second break, repeating). The network LEDs light up too, but I don't see a new device on the network. No HDMI output, and I'm not 100% sure if the GPIO pinout is the same as Pi CM4, so I don't want to plug in UART yet... I tried accessing the 'Get Started' docs page listed on the side of the box (http://milkv.io/docs/mars-cm), but that page is currently giving a 404 Page Not Found. I've opened up an issue on the MilkV Community Forum: Mars CM - Getting Started guide missing?. It would be great if this JH7110-based board could run as a drop-in replacement of the Compute Module 4... we'll see! |
Attaching to UART using the same pins as Mars (see Serial Console docs), I was able to monitor boot output...
It looks like it does automatically boot into Debian, and it says an eth0 link is up... (this is with no microSD card attached). Trying to find it on my network now. |
I can't figure out the login/password. I tried Aha! It's |
SSH password authentication was disabled, so to enable it (without messing with vi/nano over UART), I ran the oneliners:
And restarted SSH with:
Now I can login via SSH! |
I'm in, but apt is incredibly slow (like in the single-digit-kilobytes per second range). Not sure why. Waiting for an install to complete so I can fetch some more info about the system. An |
The disk partition was not expanded initially, so I realized when I ran out of disk space (only about 4 GB is allocated by default), I had to run through the process documented on StarFive's website for extending the partition on the eMMC storage. Once I did that, I wound up with about 11 GB of usable disk space. Geekbench 6 preview downloaded about about 15 MB/sec, so not sure what was up with Apt... Judging by VisionFive's warning not to upgrade, maybe I shouldn't try an apt upgrade on here yet? |
I'm unable to install Ansible via So I'll run my Top500 benchmark through Ansible on my Mac, over SSH instead. |
From the image provided by MilkV, following the instructions previously reported:
Reading package lists... Done
Reading package lists... Done |
We use different images
|
To monitor the SoC temps, I installed
(That was with a heatsink only. SoC throttle limit seems to be 85°C.) |
It's funny, about 10 minutes after I boot the thing, I get a system message that it will suspend. Not sure why... and it doesn't actually suspend:
Looks like maybe it's a Gnome thing: https://forums.debian.net/viewtopic.php?t=156005 and https://discussion.fedoraproject.org/t/gnome-suspends-after-15-minutes-of-user-inactivity-even-on-ac-power/79801 |
I tried using
|
With regard to gnome not functioning after apt upgrade of the vendor provided OS via Debian unstable package repo, |
A number of the Phoronix Test Suite tests failed, for example, trying to do the mp3 encode test:
And then for things like the linux kernel build, it ran out of space. For now I'll leave those tests out, 16 GB isn't that much space to play with :) |
I still can't get WiFi to connect.
That was with my 5 GHz network. Trying two different 2.4 GHz networks (one is on an older router that works better with ancient or weird WiFi hardware), I could get nothing from either of those too (same errors). So maybe the WiFi driver's a bit flaky in the OS image I have installed? |
Checking on the JH7110 Linux kernel Upstreaming Status, it looks like most interfaces are upstream now, with the rest on their way. Quite nice! And happening more quickly than many of the Arm SoCs these days... |
Testing PCIe:
|
I formatted the 2TB NVMe SSD, then ran my disk benchmarks, and got 150 MB/sec for fio, and 250 MB/sec for 1M sequential read/write via iozone. Not amazing, but a lot better than built-in eMMC! See full benchmark results in OP. |
@christiancelona - Do you know why the buildroot image for these devices is still on kernel 5.15.x? |
I would have preferred not to write it to you :) With Ubuntu 23.10 the onboard GPU is not supported, USB are not supported by the 6.2 kernel and the OS do not work with the 6.5 kernel. I believe that there is little point in engaging in benchmarks of this SoC, except in the case in which you want to measure the benefits brought by good software support, which has so far been absent. I'm waiting for the new integrated SMB in kernel that might make my SBC more suitable for my purposes. Up until now I have always used Raspberry Pi but the latest one is absolutely not in my purchase plans and not because of the cost. For those who wanted to use the Milk-V Mars SBC as a low-power desktop, the biggest obstacle to using the new kernels was certainly the display controller driver for Verisilicon DC8200 (for me the Chinese ideograms are a big obstacle) and an HMDI driver, now patched, check again the documentation at the line HDMI/ DC8200. I am waiting for the new images from Armbian (Armbian 23.11 Topi release, announced today) on November 1st or 2nd a Debian Topi should be ready to try, or in future DietPi too. But perhaps you have clearer ideas about the propagation time of new kernels in Linux distributions. |
Update: It's better not to follow my experiments, I updated everything and still lost the graphic environment. I'm starting from scratch. |
Milk-V Mars, sbc-bench v0.9.49 result: http://ix.io/4KoX |
@christiancelona - Interesting, it looks like every score besides the memcpy/memset scores was slower in your run (compared to the one I ran on the StarFive kernel). |
I wondered if it could depend on the software and I redid the tests with a Raspberry Pi 4B and Armbian (non the same, lunar vs jammy). RPi 4 Model B Rev 1.4, sbc-bench v0.9.49 result: http://ix.io/4Kpg Remember that we are comparing two slightly different hardware too. I couldn't boot from SD with the same image as you, my testing time is over today. |
@christiancelona with 6.5 it doesn't look better (memory latency and CPU clockspeeds the same but scores for whatever reason slightly lower):
|
Thank you. I installed the StarFive image, they are different for SD or whatever. Indeed, the difference in performance is also noticeable in use, not only from the benchmarks, the system is more responsive. I have no idea what changes between kernels, other than the version, at the moment the image provided by the SoC manufacturer is the best, despite being older. Furthermore, the SoC temperature is now lower. |
Hey Folks - How can I help contribute here? |
Whoops, I should have tested that. Use |
You set me up, just to let me down 💔 |
/etc/apt/sources.list.d/debian.sources:
/etc/apt/sources.list.d/debian-experimental.sources:
There is a PCB revision needed to fix some problems and so the next batch of Mars CM is delayed until later this month (November 2023). Until I get a Mars CM in-hand I am following along with Debian riscv64 progress by a running qemu instance and the DQIB image as mentioned above. |
@eshattow oh super interesting to know! Can I ask what problems are being fixed if you have any insight? Ripper to see rv64 in unstable now, did not recall seeing that previously. Looks like it's got kernel 6.5 in there too; https://packages.debian.org/unstable/linux-image-6.5.0-4-riscv64 I've got a Mars SBC (not CM) I am tempted to test with. |
@platima I too am curious. That was the summary of a reply from the distributor customer support person. 🤷 |
oh, Crush? Hah
…------ Original Message ------
From "E Shattow" ***@***.***>
To "geerlingguy/sbc-reviews" ***@***.***>
Cc "platima" ***@***.***>; "Mention"
***@***.***>
Date 9/11/2023 4:40:41 PM
Subject Re: [geerlingguy/sbc-reviews] Milk-V Mars CM (Issue #22)
@platima <https://github.com/platima> I too am curious. That was the
summary of a reply from the distributor customer support person. 🤷
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADIYAQF7WCT3MIAKGBY2XDTYDSJITAVCNFSM6AAAAAA6TL34OGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBTGM4DCMJSG4>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@platima I installed the linux-image-riscv64 which installs 6.5.10-1 and a few other utils. Install goes fine, but haven't figured how to get the system to boot that kernel (no grub). Happy to try any ideas you have, so you don't have to switch over for nothing. |
Hey if it's all setup right, should just be a matter of modifying
/boot/extlinux/extlinux.conf from memory! You can even have both kernel
options in there just in case.
Eg see how the Ox64 image has two extlinux entries depending on the
platform:
https://github.com/openbouffalo/buildroot_bouffalo/blob/main/board/pine64/ox64/rootfs-overlay/boot/extlinux/extlinux.conf
Just make sure the kernels are both present and have unique names.
…------ Original Message ------
From "rhinot" ***@***.***>
To "geerlingguy/sbc-reviews" ***@***.***>
Cc "platima" ***@***.***>; "Mention"
***@***.***>
Date 18/11/2023 6:32:57 AM
Subject Re: [geerlingguy/sbc-reviews] Milk-V Mars CM (Issue #22)
@platima <https://github.com/platima> I installed the
linux-image-riscv64
<https://packages.debian.org/unstable/linux-image-riscv64> which
installs 6.5.10-1 and a few other utils.
Install goes fine, but haven't figured how to get the system to boot
that kernel (no grub). Happy to try any ideas you have, so you don't
have to switch over for nothing.
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADIYAQFUGFIDVPDP4EIKARLYE7QZTAVCNFSM6AAAAAA6TL34OGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWGYZDKMZSGA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks, @platima! That was helpful, as I tried loading the 6.5 kernel, it failed, and this allowed me to fall back to 6.1. Do you know where I can find what failed when the system tried to boot into my 6.5 kernel? |
Very welcome.
And damn, that's a tough one. Not too sure TBH, I'd just watch the debug
output via serial in PuTTy, and scroll back up to read it hah.
…------ Original Message ------
From "rhinot" ***@***.***>
To "geerlingguy/sbc-reviews" ***@***.***>
Cc "platima" ***@***.***>; "Mention"
***@***.***>
Date 18/11/2023 2:14:26 PM
Subject Re: [geerlingguy/sbc-reviews] Milk-V Mars CM (Issue #22)
Thanks, @platima <https://github.com/platima>!
That was helpful, as I tried loading the 6.5 kernel, it failed, and this
allowed me to fall back to 6.1.
For other's reference, I also found this extlinux.conf sample
<https://github.com/jetsonhacks/bootFromUSB/blob/main/sample-extlinux.conf>
clarifying.
Do you know where I can find what failed when the system tried to boot
into my 6.5 kernel?
I tried journalctl, but there is nothing even with the timestamps of the
attempted boot with that kernel.
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADIYAQFFVO7BVXGH4SKMBDDYFBG4FAVCNFSM6AAAAAA6TL34OGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGQYDSMBZGA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Identified chip markings overall:
The eeprom here has wrong data as it indicates a 16GB eMMC (E016) and there is no eMMC (E000). Correct this by shorting the eeprom Write Protect pin at "EN" test point to ground and write new value from U-Boot:
|
Fun fact you can use the U-Boot 'dhcp' command to set up the network PHY ahead of loading a kernel. Otherwise MOTORCOMM_PHY in addition to defconfig is needed for mainline Linux kernel, and if you want SD Card function that will be I2C_DESIGNWARE_PLATFORM && MFD_AXP20X_I2C && REGULATOR_AXP20X. No patches needed for SDCard and it seems "good enough" to use the in-tree DTB: starfive/jh7110-starfive-visionfive-2-v1.3b.dtb (although it doesn't exactly match the Mars CM hardware). The official debian-installer can be run successfully in EFI mode: |
Firmware (required)Adapted from U-Boot documentation: suggested build procedure for Milk-V Mars CM. Upstream OpenSBI and U-Boot source repositories:
Patches:
Build:
Attached:
Firmware errataThe vendor U-Boot devicetree changeset for SD Card on Milk-V Mars CM Lite is applied at runtime depending if your EEPROM indicates Mars CM ("MARC") and no eMMC (value "E000"). First production runs of Milk-V Mars CM Lite had wrong value "E016" in EEPROM data which is easily corrected. Mars CM Lite 8GB WiFi models had wrong RAM and eMMC values in EEPROM as well. Milk-V technical support has acknowledged this concern as of 14th Apr 2024:
Additionally, as of October 2024 there is an official document on the topic: https://milkv.io/docs/mars/compute-module/update-eeprom Recovery and flashing firmwareSerial terminal tio is known to work with a CP2102N UART adapter and tolerates the excess NAK bug present in JH7110 MaskROM XMODEM loader implementation. Milk-V Mars CM is factory pre-loaded with firmware flashed to SPI NOR consisting of a Secondary Program Loader (SPL) and a payload image that is flashed to SPI NOR at an offset. SPL and payload are from U-Boot software which includes OpenSBI dependency. JH7110 UART recovery using U-Boot (optional, as needed)
Flashing firmware to SPI NOR using U-Boot
Linux Kernel package (optional)PCIe host bus support on JH7110 CPU like Milk-V Mars CM/Lite was first released in Linux 6.11-rc1. Debian unstable archive: https://packages.debian.org/unstable/kernel/linux-image-riscv64 Upstream Linux Kernel source repository:
Build:
Linux Kernel errataThe vendor Linux devicetree changeset for SD Card on Milk-V Mars CM Lite does not appear yet in mainline Linux. This is set by the U-Boot SPL code for visionfive2 and not needed again unless the SD Card or eMMC interface are reset from Linux. Debian InstallerDebian installer netinst riscv64 daily builds are working unmodified as of April 2024 for SD Card or eMMC as a storage target, and for PCIe host attached technology like NVMe or the VL805 USB chipset (of VisionFive2, Milk-V Mars, Milk-V Mars CM when on carrier board that has VL805) as of Linux 6.11 (October 2024). Support for the JH7110 Cadence USB2.0 and USB3.0 interfaces are expected to be upstream in U-Boot and Linux in late 2024 or early 2025. Prepare SD Card
Use your preferred method to restore this disk image to a micro SD Card. Example given for Gnome Disks utility. Installation notes referring to TFTP method for source media can apply to UART (this will probably take many hours to transfer) if it is not possible to set up a local TFTP server. SD Card and PCIe attached storage devices may also be viable source media if accessible from U-Boot. USB is not yet functional on Mars CM/Lite in U-Boot. Prepare eMMC or SD Card from within U-Boot (optional)Examples of requisite loading debian-testing-riscv64-netinst.iso into memory Load mini.iso into memory
|
Make | Model | Fdt File (Debian debian-installer/Linux Kernel) |
---|---|---|
StarFive | VisionFive 1.2a | starfive/jh7110-starfive-visionfive-2-v1.2a.dtb |
StarFive | VisionFive 1.3b | starfive/jh7110-starfive-visionfive-2-v1.3b.dtb |
Pine64 | Star64 V1.1 | starfive/jh7110-pine64-star64.dtb |
Milk-V | Mars | starfive/jh7110-milkv-mars.dtb |
Milk-V | Mars CM | starfive/jh7110-milkv-mars.dtb |
Milk-V | Mars CM Lite | starfive/jh7110-milkv-mars.dtb |
(optional) Flash or change U-Boot settings from running GNU/Linux OS
apt install mtd-utils
cat /proc/mtd
dev: size erasesize name
mtd0: 000f0000 00001000 "spl"
mtd1: 00010000 00001000 "uboot-env"
mtd2: 00f00000 00001000 "uboot"
flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
flashcp -v u-boot.itb /dev/mtd2
apt install libubootenv-tool
echo "/dev/mtd1 0x0000 0x10000" > fw_env.config
fw_printenv -c fw_env.config
arch=riscv
baudrate=115200
board=visionfive2
...
echo "akey=avalue" | fw_setenv -c fw_env.config -s -
akey=avalue
arch=riscv
baudrate=115200
board=visionfive2
...
efibootmgr
I'm just a Gentoo user with no knowledge in embedded whatsoever trying to get something sane onto Mars CM. @eshattow instructions working nicely. Serial is flaky, tried multiple USB ones and FT232RL sort of worked. Debian netinst hanged a few times at package installs with CPU soft lockups during untar. Power cycle / repeat. Postinst to actually boot, since dtb is absent in EFI, used tftp again : @eshattow |
Hi moroznah. Thanks for the comment but this is not the forum for such discussion - here we talk about the performance of the SBC in question and/or benchmark results, if anything. I think ideally though, there should be minimal discussion as these 'Issues' are just a way to collaboratively store result data. Your best bet may be to reach out to @eshattow directly, else perhaps the uboot forums, Reddit or have a look at the starfive_tech repos. I know I broke this guideline myself, but that's a lesson learned. Cheers! |
@moroznah Thanks! Further discussion is welcome on the Matrix group chat https://matrix.to/#/#milkv-mars:matrix.org part of the Milk-V Matrix Space linked at their website. |
Thanks E! Have a great week everyone |
I haven't used that in quite a while with my jh7110 stuff. @xypron shared this with me and I've used it the couple times I have changed the firmware since: https://github.com/xypron/JH71xx-tools |
That is a serial transfer tool co-dependent on (not a replacement for) the StarFive recovery.bin SPL. It says right in the README.md |
@eshattow I guess https://github.com/starfive-tech/bootloader_recovery is what you are looking for. It produces jh7100_recovery_boot.bin. For the VisionFive 2 I found it much easier to set the DIP switches to boot from an SD card, flash the SPI flash from U-Boot and then reset the DIP switches. |
Is jh7100_recovery_boot.bin valid for JH7110? There is no JH7100 on the MilkV Mars CM. |
Hi! Have anyone tried running upstream kernel? Looks like most of the patches are already there for CPU. |
@shanduur Just tried booting the upstream 6.7.9 kernel on a working DietPi stock install (which currently is running a patched 6.1.81). System didn't boot. Nothing even in the kernel logs that I can share to help debug. |
Milk-V Mars CM Lite on DFRobot IoT Mini Router carrier, in DFRobot IoT Mini Router metal case: Notes: Rubber plug included to cover SMA mounting hole if unused. Same hole I think could be used to mount some kind of connector to route to the GPIO pins as desired, maybe a 3.5mm audio jack for UART? edit: Yep... using Panel Mount 1/8" / 3.5mm TRS Audio Jack Connector from Adafruit distributor without modification; however the 3-position jumper wire housing is trimmed down as short as is reasonable so that it allows clearance in the case when installed. |
Public Service Announcement:Bought up the last stock of Mars CM from Arace Tech this October 2024. Factory EEPROM data values are a joke:
Translation: You paid for 8GB model but it will only work as a 2GB model, and actually not at all because the eMMC data is also total bullshit. Since the last correspondence Milk-V had 10 months and failed to contact customers directly through Arace Tech or by posting updated documentation at the website. A similar EEPROM corrective procedure is applicable as was for the 4GB model before. Photos of the various component chips: |
Hi @eshattow I'm sorry that our negligence has caused you trouble. |
Basic information
Linux/system information
Benchmark results
CPU
Power
stress-ng --matrix 0
): 3.8 Wtop500
HPL benchmark: 3.6 WDisk
Built-in 16 GB eMMC Module
2TB Kioxia XG8 NVMe SSD (via PCIe Gen 2 x1 interface)
curl https://raw.githubusercontent.com/geerlingguy/pi-cluster/master/benchmarks/disk-benchmark.sh | sudo bash
Run benchmark on any attached storage device (e.g. eMMC, microSD, NVMe, SATA) and add results under an additional heading. Download the script with
curl -o disk-benchmark.sh [URL_HERE]
and runsudo DEVICE_UNDER_TEST=/dev/sda DEVICE_MOUNT_PATH=/mnt/sda1 ./disk-benchmark.sh
(assuming the device issda
).Also consider running PiBenchmarks.com script.
Network
iperf3
results:1 Gbps Ethernet (built-in)
iperf3 -c $SERVER_IP
: 920 Mbpsiperf3 --reverse -c $SERVER_IP
: 879 Mbpsiperf3 --bidir -c $SERVER_IP
: 941 Mbps up, 258 Mbps downWiFi (built-in)
iperf3 -c $SERVER_IP
: TODO Mbpsiperf3 --reverse -c $SERVER_IP
: TODO Mbpsiperf3 --bidir -c $SERVER_IP
: TODO Mbps up, TODO Mbps downGPU
Memory
tinymembench
results:Click to expand memory benchmark result
Phoronix Test Suite
Results from pi-general-benchmark.sh:
sbc-bench
resultsThe text was updated successfully, but these errors were encountered: