Skip to content

Instantly share code, notes, and snippets.

View eblot's full-sized avatar

Emmanuel Blot eblot

  • France, Provence
View GitHub Profile
@eblot
eblot / homebrew-pothos-1.patch
Created August 13, 2018 13:53
Proposed recipe update for latest Homebrew version
$ git diff
diff --git a/pothospython.rb b/pothospython.rb
index e8b4dd4..0c08129 100644
--- a/pothospython.rb
+++ b/pothospython.rb
@@ -10,7 +10,7 @@ class Pothospython < Formula
depends_on "poco"
depends_on "nlohmann/json/nlohmann_json"
depends_on "python2" => :optional
- depends_on "python3" => :recommended
@eblot
eblot / ruamel.yaml.patch
Last active June 26, 2018 15:13
Force pure Python ruamel.yaml installation (till a proper solution is found)
--- a/ruamel.yaml-0.15.40/setup.py
+++ b/ruamel.yaml-0.15.40/setup.py
@@ -706,6 +706,7 @@
test existence of compiler by using export CC=nonexistent; export CXX=nonexistent
"""
+ return []
if hasattr(self, '_ext_modules'):
return self._ext_modules
if '--version' in sys.argv:
@eblot
eblot / buildroot-fakeroot-musl.patch
Created June 16, 2018 15:01
Fix fakeroot build from buildroot with musl libc
--- a/package/fakeroot/fakeroot.mk
+++ b/package/fakeroot/fakeroot.mk
@@ -14,7 +14,8 @@
# so they're of no real use
HOST_FAKEROOT_CONF_ENV = \
ac_cv_header_sys_capability_h=no \
- ac_cv_func_capset=no
+ ac_cv_func_capset=no \
+ CFLAGS="${CFLAGS} -D_STAT_VER=0"
@eblot
eblot / ina3221.patch
Created June 15, 2018 13:54
Add configuration capabilities to INA3221
diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
index e6b49500c52a..0b437df22448 100644
--- a/drivers/hwmon/ina3221.c
+++ b/drivers/hwmon/ina3221.c
@@ -46,7 +46,8 @@
enum ina3221_fields {
/* Configuration */
- F_RST,
+ F_RST, F_EN1, F_EN2, F_EN3,
@eblot
eblot / dts.patch
Created June 15, 2018 13:51
Enable TWI0 master and INA3221 slave on OrangePi Zero
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index 84cd9c061227..07990e935dac 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -132,6 +132,15 @@
status = "okay";
};
+&i2c0 {
+ status = "okay";
@eblot
eblot / newlib-arm-eabi-3.0.0.patch
Last active September 14, 2018 10:29
Newlib 3.0.0 patch for ARM EABI bare-metal
diff --git a/libgloss/arm/Makefile.in b/libgloss/arm/Makefile.in
index e1bad17..f3eb7c6 100644
--- a/libgloss/arm/Makefile.in
+++ b/libgloss/arm/Makefile.in
@@ -35,9 +35,9 @@ MULTICLEAN = true
MULTI_FLAGS_FOR_TARGET = MULTI_DEFAULT_FLAGS
MULTI_DEFAULT_FLAGS = -DSEMIHOST_V2
-MULTIDIRS += semihv2m
-MULTIDIR_semihv2m_FLAGS = $(MULTI_DEFAULT_FLAGS) -DSEMIHOST_V2_MIXED_MODE
@eblot
eblot / CMakeLists.txt
Last active May 3, 2018 21:38
CMake file to build compiler_rt for Cortex-M bare metal (with Homebrew)
CMAKE_MINIMUM_REQUIRED (VERSION 3.4)
PROJECT (builtins C ASM)
IF (NOT XTARGET)
MESSAGE (FATAL_ERROR "XTARGET not defined")
ENDIF ()
IF (NOT XCPU)
MESSAGE (FATAL_ERROR "XCPU not defined")
ENDIF ()
@eblot
eblot / compiler_rt-cortex-m.diff
Created September 11, 2017 10:36
CMake file to build compiler_rt for Cortex-M bare metal
diff --git a/cortex-m/CMakeLists.txt b/cortex-m/CMakeLists.txt
new file mode 100644
index 000000000..d3c517bab
--- /dev/null
+++ b/cortex-m/CMakeLists.txt
@@ -0,0 +1,217 @@
+CMAKE_MINIMUM_REQUIRED (VERSION 3.4)
+
+PROJECT (builtins C ASM)
+
Index: ELF/LinkerScript.cpp
===================================================================
--- ELF/LinkerScript.cpp (revision 312533)
+++ ELF/LinkerScript.cpp (working copy)
@@ -550,6 +550,7 @@
}
void LinkerScript::output(InputSection *S) {
+ uint64_t Before = advance(0, 1);
uint64_t Pos = advance(S->getSize(), S->Alignment);
@eblot
eblot / armv7em_arch_fix.diff
Created September 6, 2017 08:32
LLVM-5.0 patch to support ARMv7em target (https://bugs.llvm.org/show_bug.cgi?id=31601)
Index: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp (revision 312622)
+++ lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp (working copy)
@@ -846,6 +846,7 @@
break;
case ARM::AK_ARMV7M:
+ case ARM::AK_ARMV7EM:
setAttributeItem(CPU_arch_profile, MicroControllerProfile, false);