Files
monok8s/docs/flashing-usb.md

1.1 KiB

We have two type of flashing

  1. Flash the image directly into USB. And boot using it.
  2. Copy the files into the USB drive. Then boot into initramfs. Then flash the image into the eMMC.

Flashing into eMMC

  1. make release
  2. Format the USB in vfat
  3. Copy out/[RELEASE].img.gz and out/board.itb to your usb drive's root
  4. Run
usb start
usb tree
fatls usb 0:1   # For fat
ext4ls usb 0:1  # For ext4 if you insist
fatload usb 0 0x80000000 board.itb

setenv bootargs "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/ram0 rootwait rw"
bootm 0x80000000
  1. Inside initramfs, run
flash-emmc.sh
  1. Reboot into uboot, boot using the following commands
setenv boot_source emmc
setenv boot_part A

setenv rootpart 2;

setenv bootdev 0:${rootpart};
setenv rootdev emmc:2;

setenv kernel_addr_r 0xa0000000;

setenv bootargs "${bootargs_console} root=${rootdev} bootpart=${boot_part} rw rootwait rootfstype=ext4";
ext4load mmc ${bootdev} ${kernel_addr_r} /boot/kernel.itb && bootm ${kernel_addr_r};'
  1. tail /var/log/monok8s/bootstrap.log

Flashing into USB

On MacOS

  1. ./macos/flashusb.sh

On Windows (Work In Progress)