Skip to content

Instantly share code, notes, and snippets.

View jnettlet's full-sized avatar

Jon Nettleton jnettlet

View GitHub Profile
@jnettlet
jnettlet / gist:0182f65e297758247cfd9c2600c2d276
Created March 4, 2023 07:39
Flashing Bootloader and firmware to Creality Ender 2
Built AVRDude with initial support from the repository, https://github.com/maxxproff/avrdude-ch341.git
Only built with ch341a support and not bitbang using SPI on my atmega1842p clocked at 16Mhz, the bitbang support
requires linking to a library not compatible with Linux Aarch64, and I don't need it.
Grabbed optiboot firmware from the Sanguino project, https://github.com/Lauszus/Sanguino/blob/master/bootloaders/optiboot/optiboot_atmega1284p.hex
./avrdude -p atmega1284p -c ch341a -C avrdude.conf -e -u -U lock:w:0x3f:m -U efuse:w:0xFD:m -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m
./avrdude -p atmega1284p -c ch341a -C avrdude.conf -e -u -U flash:w:optiboot_atmega1284p.hex -U lock:w:0x0f:m
Then built TH3D_Unified2_Creality_Melzi with Microsoft Visual Code for Linux Aarch64 and optiplex
and flashed the firmware over usbserial with the following command.
From ea5c8b0792ed73fcd50d368b439e1b90b39fb0f6 Mon Sep 17 00:00:00 2001
From: Jon Nettleton <jon@solid-run.com>
Date: Tue, 18 Oct 2022 20:52:26 +0200
Subject: [PATCH] drm/amd/display: Re-enable Arm64 support for Navi and newer
GPUs
This is a WIP patch working on enabling Navi and newer support
for Arm64. It requires breaking out all code that use floating point
and compiling those targets with -mgeneral-regs-only. Then all the
calling targets or called functions are wrapped in DC_FP_START()
@jnettlet
jnettlet / 0001-Add-support-for-NXP-LX2160a.patch
Created October 4, 2022 06:50
LX2160a support for Nvidia open-gpu-kernel-modules
From c99b1d78d79e9f8fb9bf1995fc20138397996836 Mon Sep 17 00:00:00 2001
From: Jon Nettleton <jon@solid-run.com>
Date: Fri, 5 Aug 2022 12:00:07 +0200
Subject: [PATCH] Add support for NXP LX2160a
Signed-off-by: Jon Nettleton <jon@solid-run.com>
---
src/nvidia/arch/nvalloc/common/inc/nvcst.h | 4 ++++
src/nvidia/arch/nvalloc/common/inc/nvdevid.h | 2 ++
src/nvidia/src/kernel/platform/chipset/chipset_info.c | 11 +++++++++++
@jnettlet
jnettlet / 01-honeycomb-x11.conf
Created April 6, 2022 08:33
Workaround X11 corruption with amdgpu on HoneyComb with mesa 22
<driconf>
<!-- Please always enable app-specific workarounds for all drivers and
screens. -->
<device>
<application name="XWayland" executable="Xwayland">
<option name="mesa_extension_override" value="-GL_ARB_buffer_storage" />
</application>
<application name="Xorg" executable="Xorg">
<option name="mesa_extension_override" value="-GL_ARB_buffer_storage" />
</application>
@jnettlet
jnettlet / ObjectDetection_on_mx8mp.py
Created March 14, 2022 13:03
Quick script to get full performance using the NN accelerator on the iMX8MP
import os
import argparse
import cv2
import numpy as np
import signal
import sys
import time
from threading import Thread
import importlib.util
@jnettlet
jnettlet / hc_setup.txt
Last active January 18, 2022 11:21
Setting up HoneyComb
installation
modprobe.blacklist=amdgpu
kernel commandline:
grubby --args="amdgpu.pcie_gen_cap=0x4 usbcore.autosuspend=-1 arm-smmu.disable_bypass=0 iommu.passthrough=1" --update-kernel=ALL
Early Boot dracut
/etc/dracut.conf.d/amdgpu.conf
add_drivers+=" amdgpu "
install_items+=" /lib/firmware/amdgpu/polaris*.bin.xz "
@jnettlet
jnettlet / 99-asus-falchion.hwdb
Last active May 1, 2024 07:22
Stop Asus ROG Falchion mechanical keyboard from sending POWER and SLEEP key presses when the keyboard goes to sleep. Put in /etc/udev/hwdb.d and then run sudo systemd-hwdb update
evdev:input:b*v0B05p193Ee0111*
KEYBOARD_KEY_10081=reserved
KEYBOARD_KEY_10082=reserved
KEYBOARD_KEY_70070=reserved
KEYBOARD_KEY_70071=reserved
KEYBOARD_KEY_70072=reserved
KEYBOARD_KEY_70073=reserved
KEYBOARD_KEY_70074=reserved
KEYBOARD_KEY_70075=reserved
KEYBOARD_KEY_70076=reserved
From 6cf513dc8c5ab758072d894f10a58fbb4a146bd6 Mon Sep 17 00:00:00 2001
From: Jon Nettleton <jon@solid-run.com>
Date: Wed, 6 Oct 2021 09:16:35 -0400
Subject: [PATCH] Aarch64: Make memcpy more compatible with device memory
For normal non-cacheable memory ACE supports 4x128 bit r/w WRAP
transfers or 1x128 bit r/w INCR transfers. By re-ordering the
stp's in memcpy / memmove we can accomodate this better without
impacting the existing code.
@jnettlet
jnettlet / fb_test.c
Created September 25, 2021 09:19
Test for framebuffer memcpy bugs.
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
@jnettlet
jnettlet / Unvanquished_aarch64.diff
Created September 19, 2020 12:29
Unvanquished_aarch64.diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08d3ceb8..27678144 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -428,10 +428,6 @@ if (NACL)
add_library(srclibs-nacl-module EXCLUDE_FROM_ALL ${NACLLIST_MODULE})
set_target_properties(srclibs-nacl-module PROPERTIES POSITION_INDEPENDENT_CODE 1 FOLDER "libs")
set(LIBS_BASE ${LIBS_BASE} srclibs-nacl-module)
-else()
- add_library(srclibs-nacl-native EXCLUDE_FROM_ALL ${NACLLIST_NATIVE})