TS-7840 Boot over USB

From embeddedTS Manuals
Revision as of 14:34, 18 January 2022 by Lionel (talk | contribs) (Non-link text auto-updated for 2022 re-branding ( http://ftp.embeddedarm.com/ftp/ts-arm-sbc/ts-7840-linux/distributions/debian/tsa38x-debian-buster-latest.tar.xz →‎ http://ftp.embeddedTS.com/ftp/ts-arm-sbc/ts-7840-linux/distributions/debian/tsa38x-debian-buster-latest.tar.xz))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This board supports booting to an OS image written to a USB drive. This requires a Linux system to write the USB image.

Note: This can be run from the board while booted to eMMC, but this should not rewrite the same USB stick that the system has used to boot. Rewriting an image while it is used as the boot media will result in a corrupt image.

Check lsblk or dmesg to find your USB drive, but the following examples will assume /dev/sdc.

wget http://ftp.embeddedTS.com/ftp/ts-arm-sbc/ts-7840-linux/distributions/debian/tsa38x-debian-buster-latest.tar.xz
sudo sgdisk --zap-all /dev/sdc
sudo sgdisk -n 0:0:0 -t 0:8300 /dev/sdc
sudo mkfs.ext4 /dev/sdc1
sudo mkdir /mnt/usb/
sudo mount /dev/sdc1 /mnt/usb/
sudo tar --numeric-owner -xf tsa38x-debian-buster-latest.tar.xz -C /mnt/usb/
sudo umount /mnt/usb/

If this USB is plugged into USB on startup, it will be chosen instead of the onboard eMMC. For example:

U-Boot 2017.09-gc83820891f (Dec 01 2020 - 15:58:55 -0700)

SoC:   MV88F6820-A0 at 1332 MHz
I2C:   ready
DRAM:  2 GiB (666 MHz, ECC enabled)
MMC:   mv_sdh: 0
** First descriptor is NOT a primary desc on 0:1 **
Model: Technologic Systems TS-7840
FPGA Base 0xE8000000
No MAC programmed to board
SCSI:  MVEBU SATA INIT
SATA link 0 timeout.
AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
flags: 64bit ncq led only pmp fbss pio slum part sxs 
Net:   
Warning: ethernet@30000 (eth2) using random MAC address - c2:8f:8e:ad:1e:69
eth2: ethernet@30000
Warning: ethernet@34000 (eth3) using random MAC address - ce:73:52:8c:10:ef
, eth3: ethernet@34000
Warning: ethernet@70000 (eth1) using random MAC address - fe:21:66:02:6d:d7
, eth1: ethernet@70000
Press ESC twice to abort autoboot in 3 second(s)
Unknown command 'tsfpga' - try 'help'
starting USB...
USB0:   USB EHCI 1.00
USB1:   MVEBU XHCI INIT controller @ 0xf10f4000
Register 2000120 NbrPorts 2
Starting the controller
USB XHCI 1.00
USB2:   MVEBU XHCI INIT controller @ 0xf10fc000
Register 2000120 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... cannot reset port 2!?
2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor: UFD 3.0  Rev: 1100 Prod: Silicon-Power32G
            Type: Removable Hard Disk
            Capacity: 30944.0 MB = 30.2 GB (63373312 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /boot/boot.scr.uimg
643 bytes read in 327 ms (1000 Bytes/s)
root ## Executing script at 00200000
5681664 bytes read in 454 ms (11.9 MiB/s)
23047 bytes read in 307 ms (73.2 KiB/s)
Booting Debian from usb 0:1...
root ## Flattened Device Tree blob at 00100000
   Booting using the fdt blob at 0x100000
   Loading Device Tree to 0fff7000, end 0ffffa06 ... OK

Starting kernel ...

[    1.473899] rtc-ds1307 0-0068: hctosys: unable to read the hardware clock
[    2.084403] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[    2.093073] EXT4-fs (sda1): couldn't mount as ext2 due to feature incompatibilities

Welcome to Debian GNU/Linux 10 (buster)!