No USB on 5.9.0-rc2, running Debian built from scratch

Hello,

starting from github’s khadas/fenix, I built everything using the following configuration file:

KHADAS_BOARD=VIM3
LINUX=mainline
UBOOT=mainline
DISTRIBUTION=Debian
DISTRIB_RELEASE=buster
DISTRIB_TYPE=minimal
DISTRIB_ARCH=arm64
INSTALL_TYPE=SD-USB

I then copied the resulting image to an sdcard, and the boot went fine (Linux vim3 5.9.0-rc2 #0.9.5 SMP Sun Oct 11 11:11:08 CEST 2020 aarch64 GNU/Linux). However, my USB keyboard and mouse are not recognized, whether I use the USB2 or USB3 port. dmesg says:

[ 33.757643] USB_PWR: disabling

My problem looked similar to VIM3 Firmware upgrading - no mouse and keyboard, although on a much more recent kernel, so I did clobber the eMMC with dd if=/dev/zero count=666 > /dev/mmcblk2 and power-cycled, to no avail.

As a side note, I notice I do not have a /sys/class/mcu, so I can’t even try to change the usb3/pcie setting:

$ ls /sys/class/mcu
ls: cannot access '/sys/class/mcu/': No such file or directory

I’ve put my boot log at https://paste.debian.net/hidden/515b2d9c/, is there anything else you’d need in order to help me troubleshoot this further?


B

You have two ways to resolve this issue.

  • Cleanup the eMMC
  • Write the image to eMMC
    • sudo emmc-install

Hi Nick,

thanks a lot for taking the time to help me out, I really appreciate it.

I was under the impression that my dd command would have cleaned the eMMC, is that not the case? If not, how do I go about manually cleaning it? I’d like to keep using the sd-card as my / partition.

Please check here:

I don’t have a /dev/bootloader device, unfortunately:

 ls -l /dev/bootloader
ls: cannot access '/dev/bootloader': No such file or directory

lsblk reports:

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1      179:0    0 29.7G  0 disk 
├─mmcblk1p1  179:1    0  240M  0 part /boot
└─mmcblk1p2  179:2    0 29.2G  0 part /
mmcblk2      179:32   0 29.1G  0 disk 
mmcblk2boot0 179:64   0    4M  1 disk 
mmcblk2boot1 179:96   0    4M  1 disk 
zram1        254:1    0  256M  0 disk [SWAP]
zram2        254:2    0  256M  0 disk [SWAP]
zram3        254:3    0  256M  0 disk [SWAP]
zram4        254:4    0  256M  0 disk [SWAP]

Should I just clobber all of /dev/mmcblk2 with zeroes? Or both /dev/mmcblk2bootN?

Please remove the SD card first to boot from eMMC, then erase the eMMC.

It does not boot without the SD-card, the screen stays black. I’d assume because of my earlier dd if=/dev/zero count=666 > /dev/mmcblk2? Is there no way to erase the eMMC from my linux install?

Hello, You can use Krescue to erase the eMMC. I usually use the USB Burning Tool interrupt method to erase it.

Trying to boot krescue from an sdcard, I end up with the flashing white led and then a solid red one after a couple of seconds; nothing is ever displayed on my monitor. So the only media I seem to be able to boot is my existing Debian sd-card. What do you recommend I try at this point?

So for some reason I don’t get anything through HDMI, but I have the krescue prompt on the serial interface. What tool can I use from there to erase the eMMC?

mmc_erase followed by mmc_boot_erase did the trick: I now have USB available.

My next endeavor will be to enable an SSD drive on the pcie port.

1 Like

Still no /sys/class/mcu directory from my linux install, however I was able to use kbi portmode w 1 from uboot via serial, and my SSD does show up as /dev/nvme0n1.

Is the documentation about /sys/class/mcu incorrect on your help page? I’m mostly asking to understand the real nature of that problem, in case that may help others down that same road.

if u have problems with monitor

  1. try re-write last image from https://dl.khadas.com/Firmware/Krescue/system/
  2. krescue force setup basic fullHD - if u monitor not accept it its still not problem
    have many ways to get access for headless system too https://dl.khadas.com/Firmware/Krescue/system/README-rescue-access.txt
  3. and if krescue was started we can write images directly to emmc

Krescue and Fenix

Now we can write any Fenix image via Krescue
Ubuntu or Debian legacy or mainline

FENIX how to make images suitable for Krescue write

git clone --depth 1 https://github.com/khadas/fenix
cd fenix
source env/setenv.sh
make

Build Mainline compressed images

COMPRESS_IMAGE=yes make

Build Legacy/Vendor/4.9 compressed images

COMPRESS_IMAGE=yes INSTALL_TYPE_RAW=yes make

NOTE: this image not same as amlogic burn image which generated
by COMPRESS_IMAGE=yes make image for Legacy/Vendor/4.9 kernel

Write via network examples

write simple raw mainline image

curl krescue.lan/shell/write | sh -s - ./build/images/IMAGE_FILE.img

same via usb network

curl 172.22.1.1/shell/write | sh -s - ./build/images/IMAGE_FILE.img

write compressed vendor image

curl krescue.lan/shell/write | sh -s - ./build/images/IMAGE_FILE.raw.img.xz

write compressed mainline image

curl krescue.lan/shell/write | sh -s - ./build/images/IMAGE_FILE.img.xz

Other ways for Krescue GUI menu

  • put this images to Samba/Network shares
  • copy this images to SD card or any usb disk
  • automated download and write last images from dl.khdas.com
1 Like

Hi Hyphop,

thanks for the hints. As I was able to access krescue via the serial console, I’m all good on that front.

My only remaning question was therefore about the lack of /sys/class/mcu on my linux system: was there really no way for me to switch between pcie and usb3 modes from that, instead of having to use kbi in uboot in the serial console as I described above?

Thanks again for your time.


B

My only remaning question was therefore about the lack of /sys/class/mcu on my linux system: was there really no way for me to switch between pcie and usb3 modes from that, instead of having to use kbi in uboot in the serial console as I described above?

try next script from krescue which used for works with MCU just via userspace - without kernel support :wink: