Hello! Is there a way on a Librem 14 running Qubes to change specific keys? Id love to swap my “up arrow” key for my “right shift” key. That half shift key is kicking my butt. Any help would be eternally appreciated. Noob here. Thanks for everything what a great community!
Make your changes in the default.c file in the EC firmware source code, then compile & reflash using the Purism flashing utility in Dom0.
The path to the default keymap file:
It’s what I do to remap keys.
Thanks for this tip. Thus far, I have done:
david@forschung:~/firmware$ git clone https://source.puri.sm/firmware/librem-ec.git Cloning into 'librem-ec'... remote: Enumerating objects: 8149, done. remote: Counting objects: 100% (331/331), done. remote: Compressing objects: 100% (197/197), done. remote: Total 8149 (delta 166), reused 279 (delta 131), pack-reused 7818 Receiving objects: 100% (8149/8149), 1.17 MiB | 1.44 MiB/s, done. Resolving deltas: 100% (4701/4701), done. david@forschung:~/firmware$ cd librem-ec/ david@forschung:~/firmware/librem-ec$ ls build doc ecflash ecsim ecspy LICENSE Makefile POWER.txt README.md rust-toolchain scripts src tool david@forschung:~/firmware/librem-ec$ sudo apt install sdcc # Small Device C Compiler ... david@forschung:~/firmware/librem-ec$ export BOARD=purism/librem_14 david@forschung:~/firmware/librem-ec$ make ... [edit ~/firmware/librem-ec/src/board/purism/librem_14/keymap/default.c to swap K_LEFT_ALT <--> K_LEFT_SUPER] david@forschung:~/firmware/librem-ec$ make ... david@forschung:~/firmware/librem-ec$ cd build/purism/librem_14/ david@forschung:~/firmware/librem-ec/build/purism/librem_14$ ls 1.9_2022-06-30 1.9-dirty_2022-06-30 david@forschung:~/firmware/librem-ec/build/purism/librem_14/1.9-dirty_2022-06-30$ ls arch common ec-1.9-dirty_2022-06-30.rom ec.ihx ec.map ec.rom include board ec ec-1M.rom ec.lk ec.mem flash scratch
But how should I now flash 1.9-dirty_2022-06-30.rom? Is there any advice for doing this safely, preserving an option to recover?
To clarify the background for my question, I have used the “ISO method” to update the EC firmware (described at https://puri.sm/posts/updating-librem-ec-on-your-librem-14/) and also updated PureBoot using Option 1 described at https://source.puri.sm/firmware/utility. Can the latter procedure also be used to update EC firmware, or do I need to create an ISO and use the former procedure?
Conceptually, I suppose my knowledge gap is about how flashing works. Can the flash utility inspect any *.rom and know ‘where it’s supposed to go’? Or would an attempt to flash 1.9-dirty_2022-06-30.rom overwrite everything?
To answer my own question: It was as straightforward as using
sudo ./purism_ectool flash_backup [..path/to..]/ec-1.9-dirty_2022-06-30.rom
as described at https://puri.sm/projects/librem-ec/.