Skip to content

Instantly share code, notes, and snippets.

View jodonoghue's full-sized avatar

Jeremy O'Donoghue jodonoghue

View GitHub Profile
@jodonoghue
jodonoghue / arm-rpi-qemu-config-append
Last active September 12, 2018 08:55
Raspbian Linux kernel configuration for ARM Versatile
cat >> .config << EOF
CONFIG_CROSS_COMPILE="$TOOLCHAIN"
CONFIG_CPU_V6=y
CONFIG_ARM_ERRATA_411920=y
CONFIG_ARM_ERRATA_364296=y
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y
CONFIG_PCI=y
CONFIG_PCI_VERSATILE=y
CONFIG_SCSI=y
@jodonoghue
jodonoghue / arm-rpi-qemu.patch
Created September 12, 2018 08:17
Raspbian Linux kernel patch for Kernel 4.14.69
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d1346a160760..8de93ddc6f27 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -670,7 +670,7 @@ config ARCH_MULTI_V5
select ARCH_MULTI_V4_V5
select CPU_ARM926T if !(CPU_ARM946E || CPU_ARM1020 || \
CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
- CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_FEROCEON)
+ CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_FEROCEON || CPU_V6)
@jodonoghue
jodonoghue / glcanvas.cpp
Created October 21, 2011 09:53
Old OpenGL support for wxHaskell
#include "wrapper.h"
#include "wx/glcanvas.h"
/* testing */
// #define wxUSE_GLCANVAS 0
/*-----------------------------------------------------------------------------
We want to include the function signatures always -- even on
systems that don't support openGL. This means that every function body is
surrounded by #ifdef wxUSE_GLCANVAS directives :-(
@jodonoghue
jodonoghue / Setup.hs
Created October 20, 2011 13:15
Building a C/C++ library from Cabal
--
-- Modified version of the wxcore Cabal setup.hs file which builds the C++ code in a buildhook
-- so that we have some control over how the linking works.
--
import Control.Monad (when)
import Data.List (foldl', intercalate, nub, lookup)
import Data.Maybe (fromJust)
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo, localPkgDescr, withPrograms, buildDir)