% tree -L 2 (v1.4.2-onefinity)onefinity-firmware . ├── build │ ├── bdist.linux-armv7l │ ├── http │ ├── lib │ └── scripts-3.5 ├── build-mac.sh ├── build.sh ├── CHANGELOG.md ├── CODE_TAG ├── docs │ ├── bbdev-chroot.md │ ├── buildbotics_architecture_overview.png │ ├── buildbotics_controller.png │ ├── cross_compile_rpi_kernel_module.md │ ├── development.md │ └── emu_chroot.md ├── jshint.json ├── LICENSE ├── Makefile ├── MANIFEST.in ├── node_modules │ ├── acorn │ ├── acorn-globals │ ├── acorn-node │ ├── acorn-walk │ ├── align-text │ ├── ansi-escapes │ ├── ansi-regex │ ├── ansi-styles │ ├── anymatch │ ├── asap │ ├── asn1.js │ ├── assert │ ├── assign-symbols │ ├── atob │ ├── available-typed-arrays │ ├── babel-runtime │ ├── babel-types │ ├── babylon │ ├── balanced-match │ ├── base64-js │ ├── binary-extensions │ ├── bl │ ├── bn.js │ ├── brace-expansion │ ├── braces │ ├── brorand │ ├── browserify │ ├── browserify-aes │ ├── browserify-cipher │ ├── browserify-des │ ├── browserify-rsa │ ├── browserify-sign │ ├── browserify-zlib │ ├── browser-pack │ ├── browser-resolve │ ├── buffer │ ├── buffer-from │ ├── buffer-xor │ ├── builtin-status-codes │ ├── cached-path-relative │ ├── call-bind │ ├── call-bind-apply-helpers │ ├── call-bound │ ├── camelcase │ ├── center-align │ ├── chalk │ ├── character-parser │ ├── chardet │ ├── chokidar │ ├── cipher-base │ ├── clean-css │ ├── cli │ ├── cli-cursor │ ├── cli-spinners │ ├── cliui │ ├── cli-width │ ├── clone │ ├── color-convert │ ├── color-name │ ├── combine-source-map │ ├── commander │ ├── concat-map │ ├── concat-stream │ ├── console-browserify │ ├── constantinople │ ├── constants-browserify │ ├── convert-source-map │ ├── core-js │ ├── core-util-is │ ├── create-ecdh │ ├── create-hash │ ├── create-hmac │ ├── crypto-browserify │ ├── css │ ├── css-parse │ ├── dash-ast │ ├── date-now │ ├── debug │ ├── decamelize │ ├── decode-uri-component │ ├── defaults │ ├── defined │ ├── define-data-property │ ├── define-properties │ ├── deps-sort │ ├── des.js │ ├── detective │ ├── diffie-hellman │ ├── doctypes │ ├── domain-browser │ ├── domelementtype │ ├── domhandler │ ├── dom-serializer │ ├── domutils │ ├── dunder-proto │ ├── duplexer2 │ ├── elliptic │ ├── emoji-regex │ ├── entities │ ├── escape-html │ ├── escape-string-regexp │ ├── es-define-property │ ├── es-errors │ ├── es-object-atoms │ ├── esutils │ ├── events │ ├── evp_bytestokey │ ├── exit │ ├── extend-shallow │ ├── external-editor │ ├── fast-safe-stringify │ ├── figures │ ├── fill-range │ ├── for-each │ ├── fs.realpath │ ├── function-bind │ ├── get-assigned-identifiers │ ├── get-intrinsic │ ├── glob │ ├── glob-parent │ ├── gopd │ ├── has-ansi │ ├── has-flag │ ├── hash-base │ ├── hash.js │ ├── hasown │ ├── has-property-descriptors │ ├── has-symbols │ ├── has-tostringtag │ ├── hmac-drbg │ ├── htmlescape │ ├── htmlparser2 │ ├── https-browserify │ ├── iconv-lite │ ├── ieee754 │ ├── immutable │ ├── inflight │ ├── inherits │ ├── inline-source-map │ ├── inquirer │ ├── insert-module-globals │ ├── is-arguments │ ├── isarray │ ├── is-binary-path │ ├── is-buffer │ ├── is-callable │ ├── is-core-module │ ├── is-expression │ ├── is-extendable │ ├── is-extglob │ ├── is-fullwidth-code-point │ ├── is-generator-function │ ├── is-glob │ ├── is-interactive │ ├── is-number │ ├── isobject │ ├── is-plain-object │ ├── is-promise │ ├── is-regex │ ├── is-typed-array │ ├── is-unicode-supported │ ├── jshint │ ├── jsonparse │ ├── JSONStream │ ├── js-stringify │ ├── jstransformer │ ├── jstransformer-escape-html │ ├── jstransformer-scss │ ├── jstransformer-stylus │ ├── kind-of │ ├── labeled-stream-splicer │ ├── lazy-cache │ ├── lodash │ ├── lodash.memoize │ ├── lodash.merge │ ├── log-symbols │ ├── longest │ ├── math-intrinsics │ ├── md5.js │ ├── miller-rabin │ ├── mimic-fn │ ├── minimalistic-assert │ ├── minimalistic-crypto-utils │ ├── minimatch │ ├── minimist │ ├── mkdirp │ ├── mkdirp-classic │ ├── module-deps │ ├── ms │ ├── mute-stream │ ├── normalize-path │ ├── object-assign │ ├── object.assign │ ├── object-inspect │ ├── object-keys │ ├── once │ ├── onetime │ ├── ora │ ├── os-browserify │ ├── os-tmpdir │ ├── pako │ ├── parents │ ├── parse-asn1 │ ├── path-browserify │ ├── path-is-absolute │ ├── path-parse │ ├── path-platform │ ├── pbkdf2 │ ├── picomatch │ ├── possible-typed-array-names │ ├── process │ ├── process-nextick-args │ ├── promise │ ├── public-encrypt │ ├── pug │ ├── pug-attrs │ ├── pug-cli │ ├── pug-code-gen │ ├── pug-error │ ├── pug-filters │ ├── pug-lexer │ ├── pug-linker │ ├── pug-load │ ├── pug-parser │ ├── pug-runtime │ ├── pug-strip-comments │ ├── pug-walk │ ├── punycode │ ├── qs │ ├── querystring-es3 │ ├── randombytes │ ├── randomfill │ ├── readable-stream │ ├── readdirp │ ├── read-only-stream │ ├── regenerator-runtime │ ├── repeat-string │ ├── resolve │ ├── resolve-url │ ├── restore-cursor │ ├── right-align │ ├── ripemd160 │ ├── run-async │ ├── rxjs │ ├── safe-buffer │ ├── safer-buffer │ ├── sass │ ├── sax │ ├── semver │ ├── set-function-length │ ├── sha.js │ ├── shasum-object │ ├── shell-quote │ ├── side-channel │ ├── side-channel-list │ ├── side-channel-map │ ├── side-channel-weakmap │ ├── signal-exit │ ├── simple-concat │ ├── source-map │ ├── source-map-js │ ├── source-map-resolve │ ├── source-map-url │ ├── stream-browserify │ ├── stream-combiner2 │ ├── stream-http │ ├── stream-splicer │ ├── string_decoder │ ├── string-width │ ├── strip-ansi │ ├── strip-json-comments │ ├── stylus │ ├── subarg │ ├── supports-color │ ├── supports-preserve-symlinks-flag │ ├── syntax-error │ ├── through │ ├── through2 │ ├── timers-browserify │ ├── tmp │ ├── to-fast-properties │ ├── token-stream │ ├── to-regex-range │ ├── tslib │ ├── tty-browserify │ ├── typedarray │ ├── type-fest │ ├── @types │ ├── uglify-js │ ├── uglify-to-browserify │ ├── umd │ ├── undeclared-identifiers │ ├── urix │ ├── url │ ├── util │ ├── util-deprecate │ ├── vm-browserify │ ├── void-elements │ ├── wcwidth │ ├── which-typed-array │ ├── window-size │ ├── with │ ├── wordwrap │ ├── wrap-ansi │ ├── wrappy │ ├── xtend │ └── yargs ├── onefinity-firmware.code-workspace ├── package.json ├── package-lock.json ├── pakage-lock.json ├── plans ├── pug-opts.js ├── README.md ├── scripts │ ├── 11-automount.rules │ ├── avr109-flash.py │ ├── bbctrl-logrotate │ ├── bbctrl.service │ ├── browser │ ├── check-config-vars.py │ ├── config-screen │ ├── config-wifi │ ├── config-wifi-external │ ├── cron_d_reboot │ ├── cron_reboot_logrotate │ ├── delete-cookies.py │ ├── demo-chroot │ ├── edit-boot-config │ ├── edit-config │ ├── gplan-build.sh │ ├── gplan-init-build.sh │ ├── gplan-init-dev-img.sh │ ├── install.sh │ ├── log-position-to-gcode │ ├── next-rc │ ├── pathtools-0.1.2.tar.gz │ ├── ratpoisonrc │ ├── rc.local │ ├── reset-video │ ├── resize2fs_once │ ├── resize_root_fs.sh │ ├── rpi-chroot.sh │ ├── sethostname │ ├── setup_rpi.sh │ ├── ssh-bbctrl │ ├── svg2abs.js │ ├── update-bbctrl │ ├── upgrade-bbctrl │ ├── watchdog-v0.10.6.tar.gz │ ├── xinitrc │ ├── xorg.conf │ └── Xresources ├── setup.cfg ├── setup.py ├── src │ ├── avr │ ├── bbserial │ ├── boot │ ├── jig │ ├── js │ ├── pug │ ├── pwr │ ├── py │ ├── resources │ ├── splash │ ├── static │ └── stylus ├── upload └── venv ├── bin ├── include ├── lib ├── pyvenv.cfg └── share 335 directories, 61 files bbmc@onefinity ~/onefinity-firmware % (v1.4.2-onefinity)onefinity-firmware # Run from project root bbmc@onefinity ~/onefinity-firmware % # Run from project root (v1.4.2-onefinity)onefinity-firmware bbmc@onefinity ~/onefinity-firmware % cat setup.py (v1.4.2-onefinity)onefinity-firmware #!/usr/bin/env python3 from setuptools import setup import json pkg = json.load(open('package.json', 'r')) setup( name = pkg['name'], version = pkg['version'], description = 'Buildbotics Machine Controller', long_description = open('README.md', 'rt').read(), author = 'Joseph Coffland', author_email = 'joseph@buildbotics.org', platforms = ['any'], license = pkg['license'], url = pkg['homepage'], package_dir = {'': 'src/py'}, packages = ['bbctrl', 'inevent', 'lcd', 'camotics','iw_parse'], include_package_data = True, entry_points = { 'console_scripts': [ 'bbctrl = bbctrl:run' ] }, scripts = [ 'scripts/update-bbctrl', 'scripts/upgrade-bbctrl', 'scripts/sethostname', 'scripts/reset-video', 'scripts/config-wifi', 'scripts/config-screen', 'scripts/edit-config', 'scripts/edit-boot-config', 'scripts/browser', ], install_requires = 'tornado sockjs-tornado pyserial pyudev smbus2 watchdog'.split(), zip_safe = False, ) bbmc@onefinity ~/onefinity-firmware % (v1.4.2-onefinity)onefinity-firmware # Run from project root cat package.json # If exists bbmc@onefinity ~/onefinity-firmware % # Run from project root (v1.4.2-onefinity)onefinity-firmware bbmc@onefinity ~/onefinity-firmware % cat package.json # If exists (v1.4.2-onefinity)onefinity-firmware { "name": "bbctrl", "version": "1.4.2", "homepage": "https://onefinitycnc.com/", "repository": "https://github.com/OneFinityCNC/onefinity", "license": "GPL-3.0+", "scripts": { "build": "./node_modules/.bin/pug -o build/http src/pug && ./node_modules/.bin/browserify -o build/http/js/app.js src/js/app.js" }, "devDependencies": { "browserify": "^17.0.0", "glob": "^8.0.3", "inquirer": "^8.2.4", "jshint": "^2.13.4", "jstransformer-escape-html": "^1.1.0", "jstransformer-scss": "^2.0.0", "jstransformer-stylus": "^1.5.0", "lodash.merge": "4.6.2", "pug-cli": "^1.0.0-alpha6" }, "dependencies": { "semver": "^7.5.4" } } bbmc@onefinity ~/onefinity-firmware % cat requirements.txt # If exists (v1.4.2-onefinity)onefinity-firmware cat: requirements.txt: No such file or directory bbmc@onefinity ~/onefinity-firmware % (v1.4.2-onefinity)onefinity-firmware # Run from project root bbmc@onefinity ~/onefinity-firmware % # Run from project root (v1.4.2-onefinity)onefinity-firmware bbmc@onefinity ~/onefinity-firmware % cat Makefile # If exists (v1.4.2-onefinity)onefinity-firmware DIR := $(shell dirname $(lastword $(MAKEFILE_LIST))) NODE_MODS := $(DIR)/node_modules PUG := $(NODE_MODS)/.bin/pug STYLUS := $(NODE_MODS)/.bin/stylus TARGET_DIR := build/http HTML := index HTML := $(patsubst %,$(TARGET_DIR)/%.html,$(HTML)) RESOURCES := $(shell find src/resources -type f) RESOURCES := $(patsubst src/resources/%,$(TARGET_DIR)/%,$(RESOURCES)) TEMPLS := $(wildcard src/pug/templates/*.pug) AVR_FIRMWARE := src/avr/bbctrl-avr-firmware.hex GPLAN_MOD := rpi-share/camotics/gplan.so GPLAN_TARGET := src/py/camotics/gplan.so GPLAN_IMG := gplan-dev.img RSYNC_EXCLUDE := \*.pyc __pycache__ \*.egg-info \\\#* \*~ .\\\#\* RSYNC_EXCLUDE := $(patsubst %,--exclude %,$(RSYNC_EXCLUDE)) RSYNC_OPTS := $(RSYNC_EXCLUDE) -rv --no-g --delete --force VERSION := $(shell sed -n 's/^.*"version": "\([^"]*\)",.*$$/\1/p' package.json) PKG_NAME := bbctrl-$(VERSION) SUBPROJECTS := avr boot pwr jig ifndef HOST HOST=onefinity.local endif ifndef PASSWORD PASSWORD=onefinity endif all: $(HTML) $(RESOURCES) @for SUB in $(SUBPROJECTS); do $(MAKE) -C src/$$SUB; done pkg: all $(AVR_FIRMWARE) bbserial ./setup.py sdist bbserial: $(MAKE) -C src/bbserial gplan: $(GPLAN_TARGET) $(GPLAN_TARGET): $(GPLAN_MOD) cp $< $@ $(GPLAN_MOD): $(GPLAN_IMG) ./scripts/gplan-init-build.sh cp ./scripts/gplan-build.sh rpi-share/ chmod +x rpi-share/gplan-build.sh sudo ./scripts/rpi-chroot.sh $(GPLAN_IMG) /mnt/host/gplan-build.sh $(GPLAN_IMG): ./scripts/gplan-init-build.sh .PHONY: $(AVR_FIRMWARE) $(AVR_FIRMWARE): $(MAKE) -C src/avr update: pkg http_proxy= curl -i -X PUT -H "Content-Type: multipart/form-data" \ -F "firmware=@dist/$(PKG_NAME).tar.bz2" -F "password=$(PASSWORD)" \ http://$(HOST)/api/firmware/update @-tput sgr0 && echo # Fix terminal output build/templates.pug: $(TEMPLS) mkdir -p build cat $(TEMPLS) >$@ node_modules: package.json npm install && touch node_modules $(TARGET_DIR)/%: src/resources/% install -D $< $@ src/svelte-components/dist/%: cd src/svelte-components && rm -rf dist && npm run build $(TARGET_DIR)/index.html: build/templates.pug $(TARGET_DIR)/index.html: $(wildcard src/static/js/*) $(TARGET_DIR)/index.html: $(wildcard src/static/css/*) $(TARGET_DIR)/index.html: $(wildcard src/pug/templates/*) $(TARGET_DIR)/index.html: $(wildcard src/js/*) $(TARGET_DIR)/index.html: $(wildcard src/stylus/*) $(TARGET_DIR)/index.html: src/resources/config-template.json $(TARGET_DIR)/index.html: $(wildcard src/resources/onefinity*defaults.json) $(TARGET_DIR)/index.html: $(wildcard src/svelte-components/dist/*) FORCE: $(TARGET_DIR)/%.html: src/pug/%.pug node_modules FORCE cd src/svelte-components && rm -rf dist && npm run build @mkdir -p $(TARGET_DIR)/svelte-components cp src/svelte-components/dist/* $(TARGET_DIR)/svelte-components/ @mkdir -p $(TARGET_DIR) $(PUG) -O pug-opts.js -P $< -o $(TARGET_DIR) || (rm -f $@; exit 1) clean: rm -rf rpi-share git clean -fxd .PHONY: all install clean tidy pkg gplan lint pylint jshint bbserial%