usbarmory / usbarmory

USB armory - The open source compact secure computer

Home Page:https://www.withsecure.com/en/solutions/innovative-security-hardware/usb-armory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't boot from emmc

bazuchan opened this issue · comments

Documentation doesn't cover how to boot from emmc. I tried to flash raw disk image to emmc, but it still boots from sdcard with both positions of the switch.

What image is flashed on eMMC?
Does it boot from eMMC when microSD is removed?

What I did:

  1. Flashed usbarmory-mark-two-debian_buster-base_image-20200505.raw to sdcard, resized partition, copied usbarmory-mark-two-debian_buster-base_image-20200505.raw to sdcard.
  2. Boot from sdcard and run dd if=/usbarmory-mark-two-debian_buster-base_image-20200505.raw of=/dev/mmcblk1 bs=1M
  3. Shutdown. Remove sdcard. Replug usbarmory.

Now blue and white leds constantly on and usbarmory not detected on usb. If I put sdcard back, it will boot from sdcard.

In 3. you should also move the boot switch to eMMC boot mode.
Check: https://github.com/f-secure-foundry/usbarmory/wiki/Boot-Modes-(Mk-II)

I have tried both positions of switch

The pre-build usbarmory-mark-two-debian_buster-base_image-20200505.raw is meant to be flashed on microSD only.
There are no pre-build images for eMMC. You can built an eMMC image by following the instruction on:
https://github.com/f-secure-foundry/usbarmory-debian-base_image#building

In the next release we will provide the binary version for both, microSD and eMMC.

I have build image with make all V=mark-two IMX=imx6ulz BOOT=eMMC. Flashed it. Still can't boot from emmc, but now it detected as empty freeascale device (SE Blank 6ULL) on usb.

Had no luck with image that was build by usbarmory-debian-base_image. But finally was able to boot from emmc with following steps:

  1. Flash usbarmory-mark-two-debian_buster-base_image-20200505.raw
  2. Compile u-boot with flags to boot from emmc (just like in image makefile). Run dd if=u-boot-dtb.imx of=/dev/mmcblk1 bs=512 seek=2 conv=fsync conv=notrunc
  3. Run mmc bootpart enable 0 0 /dev/mmcblk1.

Re-closing the issue as we have just confirmed that compiling the USB armory Debian image with
make all V=mark-two IMX=imx6ulz BOOT=eMMC and flashing to the eMMC with sudo dd if=usbarmory-*-debian_buster-base_image-YYYYMMDD.raw of=/dev/mmcblk1 bs=1M conv=fsync works as expected.

The following release contains the binary images for both, uSD and [eMMC.]
https://github.com/f-secure-foundry/usbarmory-debian-base_image/releases/tag/20200714