What changed, and why it matters
This commit simply deletes three unused or deprecated files: a Vagrant virtual-machine configuration, a font-build helper script, and the README section that described the deprecated script. There is no change to the actual Krux firmware, wallet logic, or security-sensitive code, so it does not introduce or fix a security vulnerability.
No security action required; treat as routine repository maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes Vagrantfile (VirtualBox USB-filter setup for development), firmware/font/bdftokff.sh (deprecated BDF-to-KFF font build script), and the matching DEPRECATED section in firmware/font/README.md. No runtime code, cryptographic code, build toolchain dependencies, or firmware binaries are modified. The deletions are purely cleanup of developer-only artifacts.
Changed components
Inspect captured patch +0 / −163
diff --git a/Vagrantfile b/Vagrantfile
deleted file mode 100644
index d5c872e..0000000
--- a/Vagrantfile
+++ /dev/null
@@ -1,100 +0,0 @@
-# The MIT License (MIT)
-
-# Copyright (c) 2021-2023 Krux contributors
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-Vagrant.configure("2") do |config|
- config.vm.box = "hashicorp/bionic64"
- config.vm.provision :docker
-
- config.vm.provider "virtualbox" do |vb|
- vb.memory = 4096
- vb.customize ['modifyvm', :id, '--usb', 'on']
- # M5StickV https://devicehunt.com/view/type/usb/vendor/0403/device/6001
- vb.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'FT232', '--vendorid', '0403', '--productid', '6001']
- # Amigo + Bit https://devicehunt.com/view/type/usb/vendor/0403/device/6010
- vb.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'FT2232', '--vendorid', '0403', '--productid', '6010']
- # Dock https://devicehunt.com/view/type/usb/vendor/1a86/device/7523
- vb.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'CH340', '--vendorid', '1a86', '--productid', '7523']
- end
-end
-
-class VagrantPlugins::ProviderVirtualBox::Config < Vagrant.plugin("2", :config)
- def update_customizations(customizations)
- @customizations = customizations
- end
-end
-
-class VagrantPlugins::ProviderVirtualBox::Action::Customize
- alias_method :original_call, :call
- def call(env)
- machine = env[:machine]
- config = machine.provider_config
- driver = machine.provider.driver
- uuid = driver.instance_eval { @uuid }
- if uuid != nil
- lines = driver.execute('showvminfo', uuid, '--machinereadable', retryable: true).split("\n")
- filters = {}
- lines.each do |line|
- if matcher = /^USBFilterVendorId(\d+)="(.+?)"$/.match(line)
- id = matcher[1].to_i
- vendor_id = matcher[2].to_s
- filters[id] ||= {}
- filters[id][:vendor_id] = vendor_id
- elsif matcher = /^USBFilterProductId(\d+)="(.+?)"$/.match(line)
- id = matcher[1].to_i
- product_id = matcher[2].to_s
- filters[id] ||= {}
- filters[id][:product_id] = product_id
- end
- end
- config.update_customizations(config.customizations.reject { |_, command| filter_exists(filters, command) })
- end
- original_call(env)
- end
-
- def filter_exists(filters, command)
- if command.size > 6 && command[0] == 'usbfilter' && command[1] == 'add'
- vendor_id = product_id = false
- i = 2
- while i < command.size - 1 do
- if command[i] == '--vendorid'
- i += 1
- vendor_id = command[i]
- elsif command[i] == '--productid'
- i += 1
- product_id = command[i]
- end
- i += 1
- end
- if vendor_id != false && product_id != false
- filters.each do |_, filter|
- if filter[:vendor_id] == vendor_id && filter[:product_id] == product_id
- return true
- end
- end
- end
- end
- return false
- end
-end
diff --git a/firmware/font/README.md b/firmware/font/README.md
index f742e93..e329951 100644
--- a/firmware/font/README.md
+++ b/firmware/font/README.md
@@ -24,15 +24,3 @@ From there, you can run the `hexfill.py` script which takes in a `.hex` file and
The `hexmerge.py` script takes a list of `.hex` font files and merges them into one combined `.hex` file sorted by unicode codepoint. If multiple files refer to the same character, the earliest non-zero glyph will be used.
Finally, the `hextokff.py` script takes a `.hex` font file and font width and height and converts it into the 1D sparse bitmap array format that Krux needs. Importantly, this script scans the `i18n/translations` folder and builds the set of unique codepoints used across all translations to drastically reduce the number of glyphs stored.
-
-To simplify this process, a `bdftokff.sh` bash script has been added that invokes the aforementioned scripts as needed to compile one `.kff` file given a list of fonts.
-
-### DEPRECATED shell script
-To rebuild the font for all devices, run:
-```
-./bdftokff.sh ter-u14n 8 14 > m5stickv.kff
-./bdftokff.sh ter-u16n 8 16 > bit_dock_yahboom.kff
-./bdftokff.sh ter-u24b 12 24 > amigo.kff
-```
-
-Once you have `.kff` files, for each project that you want to use the updated fonts, edit `../MaixPy/projects/*/compile/overrides/components/micropython/port/src/omv/img/include/font_device.h` (substituting `maixpy_amigo` for `*` if only for an amigo) and replace the array contents in the `unicode` variable with the byte array found within the appropriate `.kff` file, then rebuild the firmware.
\ No newline at end of file
diff --git a/firmware/font/bdftokff.sh b/firmware/font/bdftokff.sh
deleted file mode 100755
index 7fde141..0000000
--- a/firmware/font/bdftokff.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-# The MIT License (MIT)
-
-# Copyright (c) 2021-2023 Krux contributors
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-set -e
-
-fonts=$1
-width=$2
-height=$3
-
-# Convert from bdf to hex for all fonts
-for font in $(echo $fonts | sed "s/,/ /g")
-do
- poetry run python bdftohex.py $font.bdf > $font.hex
- poetry run python hexfill.py $font.hex $width $height > tmp.hex && cat tmp.hex > $font.hex && rm tmp.hex
-done
-
-# Merge all hex files into one
-hexes=()
-for font in $(echo $fonts | sed "s/,/ /g")
-do
- hexes+=( $font.hex )
-done
-poetry run python hexmerge.py ${hexes[@]} > merged.hex
-
-# Convert merged hex to krux format
-poetry run python hextokff.py merged.hex $width $height
-
-# Remove generated files
-rm merged.hex
-for font in $(echo $fonts | sed "s/,/ /g")
-do
- rm $font.hex
-done
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.