Skip to content

Instantly share code, notes, and snippets.

View telent's full-sized avatar

Daniel Barlow telent

View GitHub Profile
"""
My first application
"""
import toga
from toga.style import Pack
from toga.style.pack import COLUMN, ROW
from rubicon.java import JavaClass, JavaInterface
from rubicon.java.jni import java
This file has been truncated, but you can view the full file.
/discover
Script started on 2021-05-25 19:22:12+01:00 [TERM="screen" TTY="/dev/pts/4" COLUMNS="143" LINES="34"]
[]0;dan@loaclhost: ~/src/nixos-potter/mobile-nixosdan@loaclhost:~/src/nixos-potter/mobile-nixos]$ NIX_PATH="nixpkgs=../nixpkgs-for-mobile" nix-build examples/hello/ -A build.default --argstr de
evice motorola-potter --show-trace
trace: **************************************
trace: * Evaluating device: motorola-potter *
trace: **************************************
trace: Building with crossSystem?: aarch64-linux != x86_64-linux → we are.
[ 0.112344,0] scm_call failed: func id 0x42000101, ret: -1, syscall returns: 0x0, 0x0, 0x0
[ 0.116810,1] cpuidle: using governor ladder
[ 0.123472,2] cpuidle: using governor menu
[ 0.130108,2] cpuidle: using governor qcom
[ 0.131784,2] vdso: 2 pages (1 code @ ffffffc000e96000, 1 data @ ffffffc001444000)
[ 0.131821,2] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.132670,2] software IO TLB: mapped [mem 0xed400000-0xed800000] (4MB)
[ 0.133472,2] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.138307,2] __of_mpm_init(): MPM driver mapping exists
[ 0.140063,2] platform soc:qcom,kgsl-hyp: assigned reserved memory node gpu_region@0
potter:/sdcard # aplay -v -v -v --dump-hw-params out.wav
Playing WAVE 'out.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
HW Params of device "default":
--------------------
ACCESS: MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE MU_LAW A_LAW IMA_ADPCM S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE U18_3BE
SUBFORMAT: STD
SAMPLE_BITS: [4 64]
FRAME_BITS: [4 640000]
CHANNELS: [1 10000]

Audio

(This is still quite exploratory: when some of the questions have been answered and we find out if our suppositions are right, we can build a configuration option to enable audio cleanly)

To enable the audio subsystem, you first need to write to /dev/subsys_adsp

# echo 1 > /dev/subsys_adsp
[dan@noetbook:~/src/odroid/uboot]$ cat default.nix
with import <nixpkgs> {} ;
pkgsCross.aarch64-multiplatform.ubootOdroidC2.override {
extraPatches = [
(pkgs.fetchPatch {
url="https://source.denx.de/u-boot/u-boot/-/commit/a246e21351778a93805b3f52302a420f4b268601.diff";
sha256 = lib.fakeHash;
})];
}
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
# 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
/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
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