[VIM2][VIM3] Board bringup

192 views
Skip to first unread message

Jeremiah James

unread,
Jan 6, 2021, 10:40:02 PM1/6/21
to drivers-dev
Hello, everyone!

I recently bought both the Khadas VIM2 Pro and VIM3 Pro to begin looking at Fuchsia for development. This is my first time seriously looking at Fuchsia, so the errors I am running into very well could be self-caused. But, here it goes.

I initially wanted to get the VIM3 up and going and attempted to follow instructions here (Google translate helped in getting through some of it) but had little success. I did not log anything but recall stopping after I received HDMI errors - I believe in Zedboot, but could be wrong on that. After that, I tried applying some of these and other steps for other devices on the VIM3, but it doesn't even boot. (See below.)

Because it failed, I decided to try the VIM2 and follow the "official" document here but had problems, also. I scoured the web high and low, looking at document going back a few years to mid-2020 and tried the various combinations of SPI booting, uSD booting, 

I've noticed the compilation to be different between the two with regard to FIP. - which is probably why the VIM3 isn't booting.


Another oddity I found was powering the VIMs from the computer doesn't yield the best results as it seems some components are not getting enough juice. I can't confirm this, but it doesn't quite pass the sniff test because when I boot the same device but boots further with the Khadas 24W adapter.

I am happy to follow, test, verify, and post any logs needed to help. But, because it appears there were/are different ways we can build for these boards, I'd prefer to show logs from instructions provided by others as I'm not entirely confident in my steps.

Last thought: am I just trying to get working on this too early? Do I need to wait for more stability to even think about evaluating Fuchsia/Zircon as a feasible solution for embedded devices of the future?

Thanks for the time and input.

Best,
Jeremiah

Carlos Pizano

unread,
Jan 6, 2021, 11:22:08 PM1/6/21
to drivers-dev, jwja...@gmail.com


On Wednesday, January 6, 2021 at 7:40:02 PM UTC-8 jwja...@gmail.com wrote:
Hello, everyone!

Welcome! 
No, you are not too early, basic boot in VIM 3 should work. Given timezones more help should arrive tomorrow.

Sam Hansen

unread,
Jan 7, 2021, 1:43:49 PM1/7/21
to Carlos Pizano, drivers-dev, jwja...@gmail.com
Hi Jeremiah!
kvim3_defconfig does not set CONFIG_ZIRCON_BOOT_IMAGE, which includes
zircon image compatibility. You probably want to use kvim3_zircon (or
otherwise create a .config which includes CONFIG_ZIRCON_BOOT_IMAGE=y).
This option is specified in board/khadas/Kconfig

You'll also need your own aarch64 cross-compiler toolchain, which can
be passed to Kbuild using the CROSS_COMPILE environment variable (see
root Makefile for more info).

Does that get you further along?
> --
> All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
> ---
> To unsubscribe from this group and stop receiving emails from it, send an email to drivers-dev...@fuchsia.dev.

Sam Hansen

unread,
Jan 7, 2021, 2:10:31 PM1/7/21
to Carlos Pizano, drivers-dev, jwja...@gmail.com
Oh, also.. about the power thing. I would be leery about running one
of the vim boards off a usb-c port that does not have power-delivery
support. I think the vim3 assumes <24W, but I'm not sure what the
idle/typical draw is. If you're seeing power draw problems, ensure
that your usb port is capable of supplying up to 24W. If you're using
a usb3.0 A -> type-c cable, I think in some situations your usb port
might only be rated up to 5W, so keep an eye out for that.

https://docs.khadas.com/vim3/index.html#VIM3-Power-Supply

You should know there was a vim3 board revision a few months ago that
fixes a pcb issue in which it's possible to ground your usb rail
(causing damage) if using both the Vin pinheader and usb-c. So, check
your board revision, and if you have the older pcb, don't power both
from a bench supply and usb-c. More info here:

https://www.khadas.com/post/vim3-v13-whats-new

Jeremiah James

unread,
Jan 12, 2021, 2:54:23 AM1/12/21
to drivers-dev, Sam Hansen, drivers-dev, Jeremiah James, Carlos Pizano
Thanks, Sam, for the prompt reply and sorry for my delay.

I was finally able to get it up and running (I think) by using ./mk kvim3_zircon instead of make kvim3_zircon_defconfig; CROSS_COMPILE=<toolchain> make -j8, as well as getting and putting the toolchains listed in the Makefile in their respective locations (for ease)

I know it's been said that the Khadas documentation is in need of an update, but would someone be able to share what is and is not working with the VIM2/VIM3 boards? A 30,000 foot overview would be great, if possible.

I'm still getting my feet wet and reading over a fair amount of documentation, but if there are any "next steps" anyone could point to or suggest, that'd be nice.

Thanks for the tips, suggestions, and help. I'm looking forward to digging into Fuchsia.

Sam Hansen

unread,
Jan 12, 2021, 5:24:04 PM1/12/21
to Jeremiah James, drivers-dev, Carlos Pizano
Inline below.

On Mon, Jan 11, 2021 at 11:18 PM Jeremiah James <jwja...@gmail.com> wrote:
>
> Thanks, Sam, for the prompt reply and sorry for my delay.
>
> I was finally able to get it up and running (I think) by using ./mk kvim3_zircon instead of make kvim3_zircon_defconfig; CROSS_COMPILE=<toolchain> make -j8, as well as getting and putting the toolchains listed in the Makefile in their respective locations (for ease)

Awesome!

>
> I know it's been said that the Khadas documentation is in need of an update, but would someone be able to share what is and is not working with the VIM2/VIM3 boards? A 30,000 foot overview would be great, if possible.

What works today:
- With a bootloader update (facilitating booting of a zircon image),
the OS and kernel image should boot.
- Serial/UART works on pins 17,18,19 of the 2x20 pinheader.
- The type-c usb port comes up in cdc-ethernet device mode (i.e. the
attached host should see it as a networking interface).
- The onboard ethernet port works.
- GPIO support has been added for the three buttons on the side.

That's what immediately comes to mind. Things that come to mind which
aren't brought up yet:
- The display driver (driving the HDMI port)
- Bluetooth support
- Wifi support (I believe shared on the same Ampac discrete IC as the bluetooth)

About wifi/BT, the VIM3 assumes a newer revision of Ampac 802.11/BT
IC. Off the top of my head, I'm not sure if it's drop-in compatible
with the chip in the VIM2 - there may be some driver support required
for the newer chip (I'm just not sure, haven't looked into it).
Reply all
Reply to author
Forward
0 new messages