Hatchery support
Add app directories to the path and change menu to use the provided metadata.
ELF apps are listed, but people can also include them with apps. I think they should be published in the hatchery together with an init.py containing something like:
import os
os.exec("/apps/myapp/mybinary.elf")
It lists all ELF files found in /elf
Merge request reports
Activity
ping @q3k
Hatchery now has support for
.elf
files . . https://github.com/badgeteam/Hatchery/commit/39b20d4e3c40d1eca10e3408d4cb6be16a645f9bI share the concern that distributing binary blobs is questionable on a hacker event, and that a transparent source->bin way would be preferable, but given the time constraints, this is probably the most user friendly way to get more code on more card10's
I think we should not make central distribution of l0dables available until we have a proper solution here. @q3k said he can get something up quickly but he was busy the last few days ...
If I can help @q3k in any way to make it more easily usable, please let me know :)
13 24 14 25 def list_apps(): 15 """Create a list of available apps.""" 16 apps = sorted(os.listdir(".")) 17 18 # Filter for apps 19 apps = [app for app in apps if app.endswith(".elf") or app.endswith(".py")] 20 21 if "menu.py" in apps: 22 apps.remove("menu.py") 26 """Create a list of available apps.""" 27 appFolders = sorted(os.listdir("/apps")) 28 29 apps = [] 30 for appFolder in appFolders: 31 apps.append([appFolder, read_metadata(appFolder)]) changed this line in version 3 of the diff
Sorry, it looks like this Merge Request has some code quality issues!
The pipeline lint has failed - look at its failure output to understand what sort of diffs we'd like you to apply.
You can also use
tools/code-style.sh
to fix files that have issues.Good luck! I will update this comment when I detect you have applied your fixes.
I don't think we should try to build a fake sense of security into this. If some script wants to be malicious it has all the possibilities it wants. We can't protect against that anyway.
The main rationale behind the whole
elf
story for me was, that I want to at least give people certainty about the source-code of the binary blob; If we just allow uploading random blobs, there is no guarantee about what sources it was built from and thus you don't have the option to look at the sources and evaluate for yourself whether that looks legit.If we only allow uploading source-files which are then built (and optionally signed) by some CI-server, you at least know how the C-code looks which the l0dable was built from.
mentioned in merge request !143 (merged)
Based of your work, we've implemented https://git.card10.badge.events.ccc.de/card10/firmware/merge_requests/143
For now we will work on some opt-in feature for elfs, until we have working infrastructure.