Reform issueshttps://source.mnt.re/groups/reform/-/issues2024-03-22T17:02:20Zhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/12Should a root password be set instead of disabling the root account?2024-03-22T17:02:20ZJohannes Schauer Marin RodriguesShould a root password be set instead of disabling the root account?Currently, one of the steps is to provide a root password. This is useful because by default, the `root` user has no password set and can login without providing one. On the other hand, setting a root password allows a login as the super...Currently, one of the steps is to provide a root password. This is useful because by default, the `root` user has no password set and can login without providing one. On the other hand, setting a root password allows a login as the superuser. Is this intended? Instead of setting a root password, the root account could also be completely disabled and instead the new user account can be added to the `sudo` group.https://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/13Grow the root partition2024-03-20T12:24:07ZJohannes Schauer Marin RodriguesGrow the root partitionThe one feature that the setup wizard is missing compared to what I wrote in https://source.mnt.re/reform/reform-system-image/-/merge_requests/43 is growing the root partition. After growing the partition, `resize2fs` also works on mount...The one feature that the setup wizard is missing compared to what I wrote in https://source.mnt.re/reform/reform-system-image/-/merge_requests/43 is growing the root partition. After growing the partition, `resize2fs` also works on mounted filesystems. Essentially, you'd run:
parted -s $rootdev resizepart $rootpart_nr 100%
udevadm settle
partprobe $rootdev
resize2fs -p $rootpart
See https://source.mnt.re/reform/reform-system-image/-/merge_requests/43/diffs#9c5cfbce9c117db04e0ea45a417597e19e8d3494_0_52https://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/11Defaults2024-03-16T17:27:38ZminuteDefaults- from Keyboard Layout, remove "A user-defined custom Layout"
- in Keyboard Layout, default to "English (US)"
- in Time, default to "Europe/Berlin"- from Keyboard Layout, remove "A user-defined custom Layout"
- in Keyboard Layout, default to "English (US)"
- in Time, default to "Europe/Berlin"plomplomhttps://source.mnt.re/reform/reform-system-image/-/issues/26New Setup Wizard Integration2024-03-15T15:07:07ZminuteNew Setup Wizard Integration# MNT Reform/Pocket Reform New setup/login process TODO
- [ ] lower console loglevel for less console spam (in mkimage.sh?)
- [x] mkimage.sh: deploy script to `/etc/profile.d` which launches reform-setup
- [ ] reform-setup's cleanup h...# MNT Reform/Pocket Reform New setup/login process TODO
- [ ] lower console loglevel for less console spam (in mkimage.sh?)
- [x] mkimage.sh: deploy script to `/etc/profile.d` which launches reform-setup
- [ ] reform-setup's cleanup has to remove this script @heller
- [x] mkimage.sh: deploy autologin for root account: `/etc/systemd/system/getty@tty1.service.d/override.conf`
- [ ] reform-setup's cleanup has to remove this file and reload systemd @heller
- [ ] reform-tools: include `/usr/share/reform-tools/reform-setup-sway-config`
```
# SPDX-License-Identifier: GPL-3.0+
# Copyright 2024 MNT Research GmbH
#
# This is a special configuration file for sway so we can
# use sway as a minimal compositor for running the
# MNT Reform Setup Wizard (a GTK4 application).
# We use sway as it ships with Reform and is much more
# customizable than cage, while still being lightweight.
#
# import variables into system-user enviroment
# based on the instructions in the sway wiki
# see also https://github.com/swaywm/sway/issues/5732
# and https://github.com/systemd/systemd/blob/dfc637d0ff756889e8e5b7cb4ec991eb06069aa1/xorg/50-systemd-user.sh
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
# emergency/debug terminal
set $mod Mod4
bindsym $mod+Return exec foot
# reload the configuration file
bindsym $mod+Shift+c reload
# workaround for RK3588, to be removed
output HDMI-A-2 disable
# background image
exec swaybg -i /usr/share/backgrounds/reform-mountains.jpg
# start gnome xsettings daemon
exec /usr/libexec/gsd-xsettings
# default theme settings
exec gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark'
exec gsettings set org.gnome.desktop.interface font-name 'Inter Medium 11'
exec gsettings set org.gnome.desktop.interface monospace-font-name 'Iosevka Term 11'
exec gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
exec gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
# remove sway's decorations
default_border pixel 0
hide_edge_borders both
# ADW_DISABLE_PORTAL so that dark theme works
exec ADW_DISABLE_PORTAL=1 reform-setup
```
- [ ] reform-tools: download tuigreet binary from our CI, deploy in /usr/bin/ or /usr/libexec? @josch
- [ ] reform-tools: download reform-setup-wizard binary from our CI, deploy in /usr/bin/ or /usr/libexec? @josch
- [ ] reform-setup-wizard:
- [ ] write `/etc/greetd/config.toml` that launches sway or wayfire @heller
```
[terminal]
# The VT to run the greeter on. Can be "next", "current" or a number
# designating the VT.
vt = 7
# The default session, also known as the greeter.
[default_session]
command = "/usr/local/bin/tuigreet --window-padding 4 --remember --asterisks --cmd /usr/bin/sway"
# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "_greetd"
```https://source.mnt.re/reform/reform/-/issues/18LPC should not report 0% battery before having "learned" the battery capacity2024-03-14T18:25:05ZJohannes Schauer Marin RodriguesLPC should not report 0% battery before having "learned" the battery capacityCurrently, the LPC will report 0% battery long before they are actually empty. This means that desktop environments or upower will power down the system shortly before and as a result the system will never switch off because it *really* ...Currently, the LPC will report 0% battery long before they are actually empty. This means that desktop environments or upower will power down the system shortly before and as a result the system will never switch off because it *really* was out of battery and thus the LPC is unable to learn the actual battery capacity. This means that users who do not have automatic shutdown on critical battery levels temporarily disabled will not be able to utilize the actual capacity of their battery. This means that there are reports that the Reform with A311D would last less than 3 hours even though it can last 5.5 hours with fresh cells, full display brightness, wifi connected and casual coding, web browsing and email.
I think the user should not have to temporarily disable the automatic shutdown feature of their desktop environment temporarily so that the system switches off because the batteries were really empty at least once. The conservative defaults of the LPC were maybe chosen because at that time, there were no protected battery boards, and the 2000mAh eremit cells were not the default yet.
Maybe the LPC firmware could be changed to either:
- keep track whether the system already powered off because of missing battery charge at least once (i don't know if it keeps track of that already) and if not, do not report charging levels below 10% to the OS, preventing it from doing a soft-shutdown or
- change some default value in the LPC (probably the default battery capacity?) and make it large enough such that even with the most capable cell, the LPC would think it went down to 0% before the cells were actually empty at which point it will learn their actual capacityhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/5Desktop Setup2024-03-12T21:24:22ZminuteDesktop Setup1. For desktop selection: include an icon for each desktop (from anri)
2. After user creation (!), write desktop selection to ly config file
- https://github.com/fairyglade/ly
- A file `/etc/ly/save` with 2 lines. The first line is t...1. For desktop selection: include an icon for each desktop (from anri)
2. After user creation (!), write desktop selection to ly config file
- https://github.com/fairyglade/ly
- A file `/etc/ly/save` with 2 lines. The first line is the username that was created. The second line contains an integer which is an index to the wayland desktops, for now lets do 0 = sway, 1 = wayfire.plomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/10Password validation2024-03-12T19:27:55ZminutePassword validation- min. 1 character
- regex:
```regex
[a-zA-Z0-9\!\"\#\$\%\&\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\]\^\_\`\{\|\}\~\ \\]+
```- min. 1 character
- regex:
```regex
[a-zA-Z0-9\!\"\#\$\%\&\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\]\^\_\`\{\|\}\~\ \\]+
```plomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/1Keyboard Setup2024-03-12T19:27:54ZminuteKeyboard Setup# 1. Which keyboard layouts do we list? All available on the system
- query these XML files:
- /usr/share/X11/xkb/rules/base.xml
- /usr/share/X11/xkb/rules/base.extras.xml
# 2. Places where keyboard config is written
- write ...# 1. Which keyboard layouts do we list? All available on the system
- query these XML files:
- /usr/share/X11/xkb/rules/base.xml
- /usr/share/X11/xkb/rules/base.extras.xml
# 2. Places where keyboard config is written
- write the file /etc/default/keyboard:
```
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="${LAYOUT}"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
```
- keyboard layout has to edit the following skel files:
- for sway: write out https://source.mnt.re/reform/reform-tools/-/blob/main/etc/skel/.config/sway/config.d/input?ref_type=heads
- for wayfire: sed "xkb_layout" in the file https://source.mnt.re/reform/reform-tools/-/blob/main/etc/skel/.config/wayfire.ini?ref_type=heads#L150plomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/2Timezones Setup2024-03-08T19:00:45ZminuteTimezones Setup1. Make timezones searchable, default to Europe/Berlin
2. Sort timezones alphabetically1. Make timezones searchable, default to Europe/Berlin
2. Sort timezones alphabeticallyplomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/8Alert when commands fail2024-03-08T18:57:14ZminuteAlert when commands failCheck return of each command, alert with complete error message if it is unexpected. Otherwisee, handle some common errors gracefully. In any case, don't crash if command could not be executed.Check return of each command, alert with complete error message if it is unexpected. Otherwisee, handle some common errors gracefully. In any case, don't crash if command could not be executed.plomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/9Username validation2024-03-08T17:27:16ZminuteUsername validation- Compliant with "Common Core" from https://systemd.io/USER_NAMES/#common-core
- Regex: `^[a-z][a-z0-9-]{0,30}$`
- Explain the rules- Compliant with "Common Core" from https://systemd.io/USER_NAMES/#common-core
- Regex: `^[a-z][a-z0-9-]{0,30}$`
- Explain the rulesplomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/3Order of Steps2024-03-08T17:13:56ZminuteOrder of Steps1. Root password shall be second-to-last step
2. Account shall be the last step. Committing the account ends the wizard, one can't go back from there.1. Root password shall be second-to-last step
2. Account shall be the last step. Committing the account ends the wizard, one can't go back from there.plomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/4Explain what happens2024-03-07T14:39:38ZminuteExplain what happensEach step gets a question mark button that shows on click some more details about the commands that are about to be executed.Each step gets a question mark button that shows on click some more details about the commands that are about to be executed.plomplomhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/7Friendly Error Messages2024-03-07T14:37:35ZminuteFriendly Error MessagesTBDTBDhttps://source.mnt.re/reform/mnt-reform-setup-wizard/-/issues/6Cleanup2024-03-07T14:37:14ZminuteCleanup- mark that setup wizard has run. TBD: how?
- enable ly
- log out
- hopefully ly will start- mark that setup wizard has run. TBD: how?
- enable ly
- log out
- hopefully ly will starthttps://source.mnt.re/reform/reform/-/issues/16Build CI pipeline for CAD2024-01-21T15:50:34ZJ WBuild CI pipeline for CADGoal: Reduce amount of (boring) work, reduce (human) errors and try out Computer Aided Engineering (CAE) CI ideas on a real project.
(Also it should reduce the amount of files and folders in the repo)
This is supposed to be the summary ...Goal: Reduce amount of (boring) work, reduce (human) errors and try out Computer Aided Engineering (CAE) CI ideas on a real project.
(Also it should reduce the amount of files and folders in the repo)
This is supposed to be the summary issue of the whole endeavor. I would create another issue for each non-trivial PR, but track overall progress here.
Some history: In 2016/2017 I was in the Formula Student Team "Lions Racing" developing among other things a PCB for the high voltage battery system. Back then I also got into software development and asked myself whether it is possible to create a CI pipeline for CAE similar how it is done in most software projects. Back then I used Eagle and that was really hard to automate since it always needed a GUI, so my efforts werent very successful. After leaving the team I never got around doing PCB design anymore. Then I met Lukas at 37C3 and they was interested in something like that.
A lot has happened since I was in Formula Student and there have been a few examples in this direction (see references). I would like to do this step by step first starting with a proof of concept consisting of two PRs. For this to work changes to the existing CAD files need to be done. I will probably not be able to do those or need some guidance, because I am new to KiCAD (coming from Eagle) and not familiar with the design. It would be great if someone could regularly invest some time into this so I dont get stuck for too long. As for the proof of concept I would go very low tech just using the KiCAD CLI from the docker container. After that I will for example look into KiBot.
Let me know if this sounds like a plan? It is important to me to focus on what is relevant to the team (according to the goal above). So what are task that you do often and/or are annoying/laborious or which are very prone to errors? (And of course which could be automated using CI)
Proof of concept:
- [Export BOM to artifacts](https://source.mnt.re/reform/reform/-/issues/17)
- Website to view/download the BOM on Gitlab pages like [readthedocs](https://about.readthedocs.com/?ref=readthedocs.com) for branches, tags, etc.
Further ideas:
- Export interactive BOM
- Create PDF of schematic
- Export CAD of PCB
- Run ERC/DRC
- Run collision check (CAD)
- Create CAD render with Blender
KiCAD version:
- 5.1.6+dfsg1-1 (reform2-motherboard-r2c.pdf)
- 5.1.8+dfsg1-1+b1 (reform2-motherboard.kicad_pcb)
Is this correct? Docker images only exist for KiCAD 7.X.X. I am not familiar with incompatibilities across versions, but here all KiCAD files might need updating.
References:
- https://github.com/INTI-CMNB/kicad-ci-test-spora
- https://sschueller.github.io/posts/ci-cd-with-kicad-and-gitlab/J WJ Whttps://source.mnt.re/reform/reform/-/issues/17Export BOM in CI to artifacts2024-01-21T15:50:00ZJ WExport BOM in CI to artifactsSee [this issue](https://source.mnt.re/reform/reform/-/issues/16) for a summary and the plan.
I decided to use this [docker image](ghcr.io/inti-cmnb/kicad7_auto:1.6.1) and used these bash commands
```bash
kicad-cli sch export netlist r...See [this issue](https://source.mnt.re/reform/reform/-/issues/16) for a summary and the plan.
I decided to use this [docker image](ghcr.io/inti-cmnb/kicad7_auto:1.6.1) and used these bash commands
```bash
kicad-cli sch export netlist reform2-motherboard25-pcb/reform2-motherboard25.kicad_sch --format kicadxml
kibom reform2-motherboard25.xml reform2-motherboard.csv
```
to generate [this BOM](/uploads/a226b5b71aa44dafde3c3678ae00070a/reform2-motherboard_bom_2.5D-2.csv). I spent ~~too much~~ a lot of time comparing this with [BOM in the repository](https://source.mnt.re/reform/reform/-/blob/master/reform2-bom/reform2-motherboard.csv). Although I could find a lot of similarities, I couldnt verify whether this is the correct export. Could you (@mntmn) please take a look, then I will move on and implement running this in CI.J WJ Whttps://source.mnt.re/reform/reform-handbook/-/issues/4How to map the hardware to its revision and to which firmware file to use2023-11-27T22:54:57ZJohannes Schauer Marin RodriguesHow to map the hardware to its revision and to which firmware file to useMith more and more components having more than one revision it starts becoming important to identify what revision one owns and what firmware is suited for it. Here is an overview.
| badge | identifier | name | filename | notes |
| ----...Mith more and more components having more than one revision it starts becoming important to identify what revision one owns and what firmware is suited for it. Here is an overview.
| badge | identifier | name | filename | notes |
| ----- | ---------- | ---- | -------- | ----- |
|![reform2-motherboard-badge](/uploads/82ddef0d7f27c24076c0be663b3d5034/reform2-motherboard-badge.png) | MREFPMOB20R02 | MNT Reform Motherboard 2.0 | `firmware-20_R3.bin` | badge can be found under the SSD, the firmware is R3 even though the badge says R02 because R3 is R2 modified by MNT (resistor bodge) |
![reform2-motherboard-badge](/uploads/7679b5c791125151c511007c19d8128a/reform2-motherboard-badge.png) | MREFPMOB25R02 | MNT Reform Motherboard 2.5 | `firmware-25-R2.bin` | badge can be found under the SSD |
|![mntreform-keyboard-badge](/uploads/f4581836be51cad21a502a9849782355/mntreform-keyboard-badge.png) | MREFPKBD20R01 | MNT Reform Keyboard 2.0 | `keyboard-2-standalone.hex` (standalone variant), `keyboard-2.hex` (built into reform) |
![mnt-reform-keyboard-r2-badge](/uploads/b6cd0fabae50b837ff16d5f37dbaf699/mnt-reform-keyboard-r2-badge.png) | MREFPKBD20R02 | MNT Reform Keyboard 3.0 | `keyboard-3-standalone.hex` (standalone variant), `keyboard-3.hex` (built into reform) |
![reform2-trackball-badge](/uploads/81fc51d3b28a8a22018eaf05e775c00f/reform2-trackball-badge.png) | MREFPTBC20R01 | MNT Reform Trackball Module (ATmega32u2) | `Mouse.hex` |
![mntreform-trackball-badge](/uploads/669bfee27eadc4a26bfbb90b77391e44/mntreform-trackball-badge.png) | MREFPTBC20R02 | MNT Reform Trackball Module 2 (rp2040) | firmware not yet built by CI |
|![reform2-oled-r1-badge](/uploads/0e83d7def3e7177a159f8a0dfa658aad/reform2-oled-r1-badge.png) | MREFPOLE20R01 | MNT Reform Keyboard OLED Module | no firmware |
![reform2-batterypack-badge](/uploads/1b4181e59fce5f6977978faa5d936014/reform2-batterypack-badge.png) | MREFPBAT20R01 | MNT Reform Battery Board (unprotected) | no firmware |
![reform2-protected-batterypack-badge-d2](/uploads/6a2e8f91d0df82b3a7edce72f21fd6e9/reform2-protected-batterypack-badge-d2.png) | MREFPBAT20D02 | MNT Reform Battery Board (protected) | no firmware |
|![reform2-trackball-sensor-badge](/uploads/884f60e275e4b1d8af2c00b14bc3ef34/reform2-trackball-sensor-badge.png) | MREFPTBS20R01 | MNT Reform Trackball Sensor | no firmware |https://source.mnt.re/reform/reform-system-image/-/issues/25System V4: reform-boot-config fails to unmount boot partition on SD card when...2023-11-21T19:41:04ZbnysSystem V4: reform-boot-config fails to unmount boot partition on SD card when switching to NVMe bootreform-boot-config nvme starts to work but cannot unmount the boot partition from the SD card and fails, whether run on its own or as part of reform-migrate. Doesn't matter if running as superuser or root. Not very user friendly that it ...reform-boot-config nvme starts to work but cannot unmount the boot partition from the SD card and fails, whether run on its own or as part of reform-migrate. Doesn't matter if running as superuser or root. Not very user friendly that it can't just eject the partition as part of the script.
> /dev/mmcblk1p1 is still mounted somewhere.
> Please unmount before running this script
> reform-boot-config FAILED to runhttps://source.mnt.re/reform/reform-debian-packages/-/issues/4some DEBUG messages in the patched sn65dsi86 driver make KERN_ALERT spam2023-11-21T17:52:17Zminutesome DEBUG messages in the patched sn65dsi86 driver make KERN_ALERT spamexample by mhoye:
```
[ 1299.440185] DEBUG: ti_sn_bridge_atomic_post_disable skipped.
```example by mhoye:
```
[ 1299.440185] DEBUG: ti_sn_bridge_atomic_post_disable skipped.
```