Skip to content

Instantly share code, notes, and snippets.

View telent's full-sized avatar

Daniel Barlow telent

View GitHub Profile
# nix-build -E 'with import <nixpkgs> {}; pkgs.callPackage ./. {}' ; nix-env -i result/
{ stdenv
, lib
, fetchzip
, wrapFirefox
, firefox-esr-unwrapped
, fetchFirefoxAddon }:
with { inherit (builtins) readFile replaceStrings; };
let
diff --git a/support/builders/allwinner-a64/default.nix b/support/builders/allwinner-a64/default.nix
index 7ffddc1..e8efef8 100644
--- a/support/builders/allwinner-a64/default.nix
+++ b/support/builders/allwinner-a64/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildTowBoot, TF-A, imageBuilder, runCommandNoCC, spiInstallerPartitionBuilder }:
+{ lib, buildTowBoot, crustFirmware, TF-A, imageBuilder, runCommandNoCC, spiInstallerPartitionBuilder }:
# For Allwinner A64 and Allwinner A64 compatible based hardware
{ withSPI ? false, ... } @ args:
{
"tag": {
"ble_sm_sc_oob_data": {
"members": {
"r": {
"offset": 0,
"type": {
"array": {
"count": 15,
"of": {
(let [buf (unsafe.alloc 25)]
(unsafe.poke buf 0 1 0x55)
(unsafe.poke buf 1 1 0xaa)
(unsafe.poke buf 2 1 0x11)
(unsafe.poke buf 3 1 0xff)
(unsafe.poke buf 4 4 0xdeadbeef)
(assert (= 0x11 (unsafe.peek buf 2 1)))
(assert (= 0xdeadbeef (unsafe.peek buf 4 4)))
;; this next one is confusing, because
;; imagining that `data` exists only in the body
;; of this mac, so that it can't be called except
;; in the context of an active window
(with-window [10 10 80 80]
(data [0x00 0xff 0x00 0xff])
(print "doing stuff")
(data [0xff 0x00 0xff 0x00])
(something-else)
(data [0x00 0xff 0x00 0xff])
(data [0x77 0x77 0x77 0x77]))
diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp
index fd7017a..aa10944 100644
--- a/src/displayapp/DisplayAppRecovery.cpp
+++ b/src/displayapp/DisplayAppRecovery.cpp
@@ -48,6 +48,8 @@ void DisplayApp::Process(void* instance) {
}
void DisplayApp::InitHw() {
+ brightnessController.Init();
+ brightnessController.Set(Controllers::BrightnessController::Levels::High); // Controllers::BrightnessController::Levels.
diff --git a/src/platforms/f4discovery/Makefile.inc b/src/platforms/f4discovery/Makefile.inc
index ae6b75a..578aebb 100644
--- a/src/platforms/f4discovery/Makefile.inc
+++ b/src/platforms/f4discovery/Makefile.inc
@@ -26,10 +26,11 @@ $(info Load address 0x08004000 for BMPBootloader)
LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8004000
CFLAGS += -DDFU_SERIAL_LENGTH=9
else
-LDFLAGS += $(LDFLAGS_BOOT)
+LDFLAGS += $(LDFLAGS_BOOT) -Wl,-Ttext=0x8000000
{ config, pkgs, ... }:
let projectroot = "/home/git/"; # where are the repos on the disk?
subdir = "private-git"; # url path prefix
staticFilesPath = "cgit-static"; # url path to cgit's static assets
# /home/git/published-by-cgit contains the list of projects
# that cgit will show
cgitrc = pkgs.writeText "cgitrc"
''
# default paths to static assets
css=/${staticFilesPath}/cgit.css
/nix/store/vv9ij1wd45vckp9bm1xp776zb51h4wcq-gcc-wrapper-9.3.0/bin/cc -o scripts/kconfig/nconf scripts/
kconfig/nconf.o scripts/kconfig/nconf.gui.o scripts/kconfig/confdata.o scripts/kconfig/expr.o scripts/kcon
fig/lexer.lex.o scripts/kconfig/menu.o scripts/kconfig/parser.tab.o scripts/kconfig/preprocess.o scripts/k
config/symbol.o scripts/kconfig/util.o -L /nix/store/4wsq4c9v3hjlmbiaq8d8r1al7pm27jib-ncurses-6.2/lib -l
ncursesw -lmenuw -lpanelw
cho "no-op"
/bin/sh: cho: not found
make[1]: *** [scripts/kconfig/Makefile:48: nconfig] Error 127
guessing this was introduced by the gnarly sed expression in kernel/builder.nix
# this is Work In Progress configuration.nix for cross-compiling
# a Kodi appliance based on the Odroid C2
{ config, lib, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
# make-tarball is hardcoded to use pixz, but waqnts a host