Dobrica Pavlinušić's random unstructured stuff
Turris Omnia: Revision 11


documentation

reset modes

https://www.turris.cz/doc/en/howto/omnia_factory_reset

 Available reset modes:

    1 LED: Standard (re)boot
    2 LEDs: Rollback to latest snapshot
    3 LEDs: Rollback to factory reset
    4 LEDs: Re-flash router from flash drive
    5 LEDs or more: Boot to rescue shell

vlan

GPIO pinout

omnia-pin-header.png

PWM same on all pins

Debian

root@turris:/mnt/tmp# wget http://aule.elfove.cz/~brill/omnia-debian/omnia-medkit-20170330.tar.gz

# boot into rescue mode

root@(none):~# mount /dev/mmcblk0p1 /target/

root@(none):~# btrfs subvolume create /target/@debian


watchdog will timeout, but you will eventually have subvolume visible from u-boot (which is not case if you just create subvolume from Turris OS


root@turris:/# btrfs sub create @debian
Create subvolume './@debian'

root@turris:/# cd /@debian
root@turris:/@debian# tar xf /mnt/tmp/omnia-medkit-20170330.tar.gz 
root@turris:/@debian# btrfs fi df .
System, single: total=32.00MiB, used=4.00KiB
Data+Metadata, single: total=3.68GiB, used=2.25GiB
GlobalReserve, single: total=48.00MiB, used=0.00B

root@turris:/@debian# vi etc/network/interfaces
auto br0
iface br0 inet static
        bridge_ports wlan0 eth0 eth2
        address 192.168.3.254
        netmask 255.255.255.0
        gateway 192.168.3.1
root@turris:~# echo b > /proc/sysrq-trigger
[54760.278340] sysrq: SysRq : Resetting
[54760.282039] CPU1: stopping
   
U-Boot SPL 2015.10-rc2 (Aug 18 2016 - 20:43:35)
High speed PHY - Version: 2.0
SERDES0 card detect: NONE
   
Initialize Turris board topology
Detected Device ID 6820
board SerDes lanes topology details:
 | Lane #  | Speed |  Type       |
 --------------------------------
 |   0    |  5   |  PCIe0       |
 |   1    |  5   |  USB3 HOST0  |
 |   2    |  5   |  PCIe1       |
 |   3    |  5   |  USB3 HOST1  |
 |   4    |  5   |  PCIe2       |
 |   5    |  0   |  SGMII2      |
 --------------------------------
poll_op_execute: TIMEOUT
PCIe, Idx 0: detected no link
PCIe, Idx 1: detected no link
PCIe, Idx 2: detected no link
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.29.0
Memory config in EEPROM: 0x01
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
DDR3 Training Sequence - Ended Successfully

   
U-Boot 2015.10-rc2 (Aug 18 2016 - 20:43:35 +0200), Build: jenkins-omnia-master-23
   
SoC:   MV88F6820-A0
       Watchdog enabled
I2C:   ready
SPI:   ready
DRAM:  1 GiB (ECC not enabled)
Enabling Armada 385 watchdog.
Disabling MCU startup watchdog.
Regdomain set to **
MMC:   mv_sdh: 0
SF: Detected S25FL164K with page size 256 Bytes, erase size 64 KiB, total 8 MiB
*** Warning - bad CRC, using default environment
   
Model: Marvell Armada 385 GP
Board: Turris Omnia SN: 0000000B0000B8E5
Regdomain set to **
SCSI:  MVEBU SATA INIT
SATA link 0 timeout.
SATA link 1 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:   neta2
Hit any key to stop autoboot:  0
=> 

=> setenv debbootargs earlyprintk console=ttyS0,115200 rootfstype=btrfs rootwait root=/dev/mmcblk0p1 rootflags=subvol=@debian,commit=5 rw
=> setenv debboot 'setenv bootargs "$debbootargs cfg80211.freg=$regdomain"; btrload mmc 0 0x01000000 boot/vmlinuz @debian; btrload mmc 0 0x02000000 boot/dtb @debian; btrload mmc 0 0x03000000 boot/initrd.img @debian; bootz 0x01000000 0x03000000:$filesize 0x02000000'
=> saveenv
Saving Environment to SPI Flash...
SF: Detected S25FL164K with page size 256 Bytes, erase size 64 KiB, total 8 MiB
Erasing SPI flash...Writing to SPI flash...done

=> setenv defbootcmd "$bootcmd"
=> setenv debbootcmd 'i2c dev 1; i2c read 0x2a 0x9 1 0x00FFFFF0; setexpr.b rescue *0x00FFFFF0; if test $rescue -ge 2; then echo BOOT RESCUE; run rescueboot; else if test $rescue -ge 1; then echo BOOT eMMC TurrisOS FS; run mmcboot; else echo BOOT eMMC Debian FS; run debboot; fi; fi'
=> setenv bootcmd "$debbootcmd"
=> saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done