Skip to content

Instantly share code, notes, and snippets.

View mkresin's full-sized avatar

Mathias Kresin mkresin

  • Berlin, Germany
View GitHub Profile
CONFIG_OF_OVERLAY=y
CONFIG_OF_CONFIGFS=y
mount x /sys/kernel/config -t configfs
mkdir /sys/kernel/config/device-tree/overlays/foo
cp /boot/overlays/uart1.dtbo /lib/firmware/
echo uart1.dtbo > /sys/kernel/config/device-tree/overlay/foo/path
#!/bin/bash
CPUS=9
function build {
cat << EOF > .config
CONFIG_TARGET_${TARGET}=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_ALL_PROFILES=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
@mkresin
mkresin / compile_all_boards.sh
Last active October 5, 2017 14:32
compiles all targets or a whitespace seperated list of targets
#!/bin/bash
CPUS=9
function build {
cat << EOF > .config
CONFIG_TARGET_${TARGET}=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_ALL_PROFILES=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
Please use ```git commit --amend``` to add changes to your commit. Use ```git push --force``` to overwrite your github repository/branch. The PR will afterwards update automatically. Please don't close this PR and open a new one.
---
Please include <[dt-bindings/gpio/gpio.h](http://lxr.free-electrons.com/source/include/dt-bindings/gpio/gpio.h?v=4.4)> here as well and keep alphabetical order..
Use the GPIO_ACTIVE_LOW and GPIO_ACTIVE_HIGH macros afterwards in stead of 1 and 0 in the gpio parameters.
Check the recent [ramips board additions](https://github.com/lede-project/source/commits/master/target/linux/ramips) for examples.
@mkresin
mkresin / gpio_output_test.sh
Last active June 12, 2018 10:36
Test a range of pin, a single pin or all pins of either a specific GPIO controller or on all GPIO controller
#!/bin/sh
# Copyright (C) 2017 Mathias Kresin
#
# This is free software, licensed under the GNU General Public License v2.
#
# Test a range of pin, a single pin or all pins of either a specific GPIO
# controller or on all GPIO controller
#
# Usage:
@mkresin
mkresin / compile_all_dts.sh
Last active November 14, 2016 11:49
compile either all device tree source files of a given target or for all targets: ~/compile_all_dts.sh
#!/bin/bash
TARGET="*"
WITHPREPARE=1
# compile a target and copy the directory build_dir/target-*/linux-*/linux-4.4.30/scripts/dtc/
# to your LEDE base directory
DTC=./dtc/dtc
for i in "$@"; do
@mkresin
mkresin / compile_all_boards.sh
Last active November 11, 2016 17:55
compile all LEDE boards of a given target: ~/compile_all_boards lantiq
#!/bin/bash
set -e
CPUS=9
PLATFORM="$1"
PLATFORMDIR="target/linux/$PLATFORM"
function build {
cat << EOF > .config
@mkresin
mkresin / 0990-lantiq-add-a-bootrom-dumper-module.patch
Created November 28, 2015 13:43
Lantiq vrx200 bootrom dumper
diff --git a/arch/mips/lantiq/Makefile b/arch/lantiq/lantiq/Makefile
--- a/arch/mips/lantiq/Makefile
+++ b/arch/mips/lantiq/Makefile
@@ -8,5 +8,7 @@
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
+obj-$(CONFIG_DEBUG_FS) += bootrom.o
+
obj-$(CONFIG_SOC_TYPE_XWAY) += xway/