From 073ddbab3f9a09bbf6da2f3150d4b155721d7d2d Mon Sep 17 00:00:00 2001 From: "Peter D. Gray" Date: Mon, 13 Sep 2021 08:37:32 -0400 Subject: [PATCH] mk4 support --- graphics/Makefile | 6 ++++-- graphics/build.py | 7 ++++--- graphics/mk4_nfc_1.txt | 25 +++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 graphics/mk4_nfc_1.txt diff --git a/graphics/Makefile b/graphics/Makefile index be86d418..f4c92231 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -2,10 +2,12 @@ all: graphics.py -SOURCES = $(wildcard *.txt) $(wildcard *.png) +SOURCES = $(filter-out mk4_%, $(wildcard *.txt) $(wildcard *.png)) +MK4_SOURCES = $(wildcard mk4_*.txt) $(wildcard mk4_*.png) graphics.py: Makefile $(SOURCES) build.py - ./build.py $(SOURCES) + ./build.py graphics.py $(SOURCES) + ./build.py graphics_mk4.py $(MK4_SOURCES) up: all (cd ../shared; make up) diff --git a/graphics/build.py b/graphics/build.py index 0971f9f3..c3a69071 100755 --- a/graphics/build.py +++ b/graphics/build.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 # -# (c) Copyright 2018 by Coinkite Inc. This file is part of Coldcard -# and is covered by GPLv3 license found in COPYING. +# (c) Copyright 2018 by Coinkite Inc. This file is covered by license found in COPYING-CC. # import os, sys, pdb from PIL import Image, ImageOps @@ -66,6 +65,8 @@ def crunch(n): def doit(outfname, fnames): + assert outfname.endswith('.py') + assert outfname != 'build.py' assert fnames, "need some files" fp = open(outfname, 'wt') @@ -108,4 +109,4 @@ class Graphics: fp.write("\n# EOF\n") if 1: - doit('graphics.py', sys.argv[1:]) + doit(sys.argv[1], sys.argv[2:]) diff --git a/graphics/mk4_nfc_1.txt b/graphics/mk4_nfc_1.txt new file mode 100644 index 00000000..06f48b4a --- /dev/null +++ b/graphics/mk4_nfc_1.txt @@ -0,0 +1,25 @@ + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + xxx xxxxxxxxxxxxxxxxxx + xxx xxxxxxxxxxxxxxxxxx + xxx xxxxxxxxxxxxxxxxxx + xxx xxxxxxxxxxxxxxxxxx + xxx xxxxxxxxxxxxxxxxxx + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + xxx xxx xxx xxx xxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy + xxx xxx xxx xxx xxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy + xxx xxx xxx xxx xxxx yy n n ffffff ccccc yyyyyyyyyyy + xxx xxx xxx xxx xxxx yy nn n f c c yyyyyyyyyyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n f c yyyy yyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy + xxx xxx xxx xxx xxxx yy n n n f c yyyy yyy + xxx xxx xxx xxx xxxx yy n n n f c yyyyyyy yyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n nn f c yyyyyyyyyyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy + xxx xxx xxx xxx xxxx yy n n f ccccc yyyyyyyyyyy + xxx xxx xxx xxx xxxx yy yyyyyyyyyyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy