Skip to content
Merged

v2 #3

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/tmp
/build/
12 changes: 3 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
[submodule "output"]
path = output
url = https://github.com/system76/thelio-io-output.git
[submodule "firmware"]
path = firmware
url = https://github.com/system76/thelio-io-firmware.git
[submodule "hardware"]
path = hardware
url = https://github.com/system76/thelio-io-hardware.git
[submodule "dkms"]
path = dkms
url = https://github.com/pop-os/system76-io-dkms.git
[submodule "firmware"]
path = firmware
url = https://github.com/system76/qmk_firmware.git
20 changes: 0 additions & 20 deletions Makefile

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Thelio Io
# Thelio Io v2

This is a master repository for the System76 Thelio Io device. Using `make`, you can update the outputs in the `output` submodule.
This is a master repository for the System76 Thelio Io device, version 2. For
verison 1, please see the [v1 branch](https://github.com/system76/thelio-io/tree/v1).
1 change: 0 additions & 1 deletion dkms
Submodule dkms deleted from 6bb263
2 changes: 1 addition & 1 deletion firmware
2 changes: 1 addition & 1 deletion hardware
Submodule hardware updated 61 files
+15 −3 .gitignore
+14 −25 README.md
+0 −4 fp-lib-table
+4,088 −0 lib/3D/171971-0004.stp
+11 −0 lib/3D/171971-0004_license.txt
+678 −0 lib/3D/SMTSO-M3-3-Body.step
+ lib/3D/SMTSO-M3-3.FCStd
+65 −0 lib/74LVC2G157.kicad_sym
+287 −0 lib/Logo.pretty/76.kicad_mod
+62 −0 lib/QSPI_flash.kicad_sym
+260 −0 lib/RP2040.kicad_sym
+0 −28 lib/SATA.dcm
+795 −0 lib/SATA.kicad_sym
+0 −244 lib/SATA.lib
+22 −15 lib/SATA.pretty/ATA_FLOPPY_POWER_4.kicad_mod
+43 −36 lib/SATA.pretty/SATA_COMBINED_22.kicad_mod
+40 −19 lib/SATA.pretty/SATA_DATA_7.kicad_mod
+80 −0 lib/SMTSO.pretty/SMTSO-M3-3.kicad_mod
+0 −9 lib/USB.dcm
+63 −0 lib/USB.kicad_sym
+0 −23 lib/USB.lib
+63 −0 lib/USB.pretty/USB_IDC.kicad_mod
+7 −0 pcb-nebula-io/fp-lib-table
+2,737 −0 pcb-nebula-io/nebula-io.kicad_pcb
+78 −0 pcb-nebula-io/nebula-io.kicad_prl
+533 −0 pcb-nebula-io/nebula-io.kicad_pro
+805 −0 pcb-nebula-io/nebula-io.kicad_sch
+7 −0 pcb-nebula-io/sym-lib-table
+7 −0 pcb-thelio-io-sata/fp-lib-table
+1 −0 pcb-thelio-io-sata/lib
+4 −0 pcb-thelio-io-sata/sym-lib-table
+6,936 −0 pcb-thelio-io-sata/thelio-io-sata.kicad_pcb
+77 −0 pcb-thelio-io-sata/thelio-io-sata.kicad_prl
+545 −0 pcb-thelio-io-sata/thelio-io-sata.kicad_pro
+1,861 −0 pcb-thelio-io-sata/thelio-io-sata.kicad_sch
+7 −0 pcb-thelio-io/fp-lib-table
+7 −0 pcb-thelio-io/sym-lib-table
+30,692 −0 pcb-thelio-io/thelio-io.kicad_pcb
+78 −0 pcb-thelio-io/thelio-io.kicad_prl
+533 −0 pcb-thelio-io/thelio-io.kicad_pro
+7,520 −0 pcb-thelio-io/thelio-io.kicad_sch
+0 −1 sch/.gitignore
+0 −118 sch/button.sch
+0 −332 sch/ec.sch
+0 −154 sch/fan.sch
+0 −851 sch/sas0.sch
+0 −893 sch/sas1.sch
+0 −893 sch/sas2.sch
+0 −893 sch/sas3.sch
+0 −753 sch/sata.sch
+0 −4 sym-lib-table
+0 −27 thelio-io-all-pos.csv
+0 −15 thelio-io-bom.csv
+0 −10 thelio-io-sas-all-pos.csv
+0 −4 thelio-io-sas-bom.csv
+0 −8,307 thelio-io-sas.kicad_pcb
+0 −66 thelio-io-sas.pro
+0 −94 thelio-io-sas.sch
+0 −3,376 thelio-io.kicad_pcb
+0 −65 thelio-io.pro
+0 −96 thelio-io.sch
1 change: 0 additions & 1 deletion output
Submodule output deleted from 9c43e4
124 changes: 124 additions & 0 deletions scripts/lvfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#!/usr/bin/env bash

set -e

if [ -z "$1" ]
then
echo "$0 [model] [description]" >&2
exit 1
fi
MODEL="$1"

if [ -z "$2" ]
then
echo "$0 [model] [description]" >&2
exit 1
fi
DESCRIPTION="$2"

BOOTLOADER_VID="03EB" # Raspberry Pi
RUNTIME_VID="3384" # System76
case "${MODEL}" in
"thelio_io_2")
BOOTLOADER_PID="0003" # RP2040
RUNTIME_PID="000B"
RUNTIME_REV="0001"
;;
*)
echo "$0: unknown model '${MODEL}'" >&2
exit 1
;;
esac

echo "MODEL: ${MODEL}"
echo "DESCRIPTION: ${DESCRIPTION}"

BOOTLOADER_ID="USB\\VID_${BOOTLOADER_VID}&PID_${BOOTLOADER_PID}"
echo "BOOTLOADER_ID: ${BOOTLOADER_ID}"

BOOTLOADER_UUID="$(appstream-util generate-guid "${BOOTLOADER_ID}")"
echo "BOOTLOADER_UUID: ${BOOTLOADER_UUID}"

RUNTIME_ID="USB\\VID_${RUNTIME_VID}&PID_${RUNTIME_PID}&REV_${RUNTIME_REV}"
echo "RUNTIME_ID: ${RUNTIME_ID}"

RUNTIME_UUID="$(appstream-util generate-guid "${RUNTIME_ID}")"
echo "RUNTIME_UUID: ${RUNTIME_UUID}"

make -C firmware distclean
make -C firmware "system76/${MODEL}:default"

VERSION_HEADER="firmware/.build/obj_system76_${MODEL}_default/src/version.h"

REVISION="$(grep QMK_VERSION "${VERSION_HEADER}" | cut -d '"' -f2)"
echo "REVISION: ${REVISION}"

DATE="$(grep QMK_BUILDDATE "${VERSION_HEADER}" | cut -d '"' -f2 | cut -d '-' -f1,2,3)"
echo "DATE: ${DATE}"

NAME="${MODEL}_${REVISION}"
echo "NAME: ${NAME}"

SOURCE="https://github.com/system76/thelio-io"
echo "SOURCE: ${SOURCE}"

BUILD="build/lvfs/${NAME}"
echo "BUILD: ${BUILD}"

rm -rf "${BUILD}"
mkdir -pv "${BUILD}"

cp "firmware/.build/system76_${MODEL}_default.uf2" "${BUILD}/firmware.uf2"

echo "writing '${BUILD}/firmware.metainfo.xml'"
cat > "${BUILD}/firmware.metainfo.xml" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2022 System76 <info@system76.com> -->
<component type="firmware">
<id>com.system76.${MODEL}.firmware</id>
<name>Thelio Io</name>
<summary>System76 Thelio Io Firmware</summary>
<description>
<p>
The System76 Thelio Io firmware is based on QMK and provides power button
and fan control functionality
</p>
</description>
<provides>
<!-- ${RUNTIME_ID} -->
<firmware type="flashed">${RUNTIME_UUID}</firmware>
</provides>
<url type="homepage">https://github.com/system76/thelio-io</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<developer_name>System76</developer_name>
<releases>
<release urgency="high" version="${REVISION}" date="${DATE}" install_duration="15">
<checksum filename="firmware.uf2" target="content"/>
<url type="source">${SOURCE}</url>
<description>
<p>${DESCRIPTION}</p>
</description>
</release>
</releases>
<categories>
<category>X-Device</category>
</categories>
<keywords>
<keyword>uf2</keyword>
</keywords>
<custom>
<value key="LVFS::UpdateProtocol">com.microsoft.uf2</value>
<value key="LVFS::VersionFormat">plain</value>
</custom>
</component>
EOF

gcab \
--verbose \
--create \
--nopath \
"${BUILD}.cab" \
"${BUILD}/"*

echo "created '${BUILD}.cab'"
103 changes: 0 additions & 103 deletions test.sh

This file was deleted.

6 changes: 0 additions & 6 deletions update.sh

This file was deleted.