Skip to content

Instantly share code, notes, and snippets.

View riptidewave93's full-sized avatar

Chris Blake riptidewave93

View GitHub Profile
#!/bin/bash
NumCPU=$(grep -c ^processor /proc/cpuinfo)
NumJobs=$(calc -p "ceil(2*$NumCPU+1)")
export CONCURRENCY_LEVEL=$NumJobs
baseURL="https://www.kernel.org/pub/linux/kernel/v3.x/"
latest="$(curl -s $baseURL | sed -n 's|\(.*\)\(linux-\)\(.*\)\(\.tar\.xz<\)\(.*\)|\3|p' | sort --version-sort | tail -n1)"
[ ! "$latest" ] && { echo "Are we offline?" >&2; exit 1; }
@riptidewave93
riptidewave93 / air-oeap602.cfg
Created April 25, 2015 14:17
OpenOCD Board Cisco Air-OEAP602
#
# http://www.cisco.com/c/en/us/support/wireless/aironet-602-officeextend-access-point/model.html
#
set partition_list {
CFE { Bootloader 0xbc000000 0x00040000 }
firmware { "Kernel+rootfs" 0xbc040000 0x00400000 }
app1 { "app1" 0xbc440000 0x00400000 }
app2 { "app2" 0xbc840000 0x00400000 }
log { "log" 0xbcc40000 0x00340000 }
@riptidewave93
riptidewave93 / probe.sh
Created September 23, 2017 18:44
GPIO prober script
#!/bin/sh
gpiomin=480
gpiomax=511
echo "Exporting GPIOs"
for i in $(seq $gpiomin $gpiomax); do
echo "$i" > /sys/class/gpio/export
done
echo "Getting current state!"
for i in $(seq $gpiomin $gpiomax); do
cat /sys/class/gpio/gpio$i/value > /tmp/gpio$i
@riptidewave93
riptidewave93 / mr33-essedma.patch
Created October 10, 2017 15:22
Meraki MR33 GPL Source eth driver diff
diff -Nurp a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c
--- a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c 2017-09-19 21:59:00.852206367 +0200
+++ b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c 2017-09-24 20:00:30.181877681 +0200
@@ -13,15 +13,36 @@
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <linux/cpu_rmap.h>
#include <linux/of.h>
#include <linux/of_net.h>
=> printenv
bootdelay=3
baudrate=9600
loads_echo=1
loadaddr=1004000
netdev=eth0
uboot=u-boot.bin
loadaddr=1000000
consoledev=ttyS0
ramdiskaddr=2000000
[ 10.273726] hctosys: unable to open rtc device (rtc0)
[ 10.335487] VFS: Cannot open root device "ram" or unknown-block(1,0): error -6
[ 10.422011] Please append a correct "root=" boot option; here are the available partitions:
[ 10.522056] 1f00 256 mtdblock0 [ 10.570011] (driver?)
[ 10.598185] 1f01 256 mtdblock1 [ 10.646129] (driver?)
[ 10.674291] 1f02 40704 mtdblock2 [ 10.722244] (driver?)
[ 10.750408] 1f03 37760 mtdblock3 [ 10.798352] (driver?)
[ 10.826514] 1f04 8192 mtdblock4 [ 10.874460] (driver?)
[ 10.902635] 1f05 15104 mtdblock5 [ 10.950578] (driver?)
[ 10.978738] 1f06 128 mtdblock6 [ 11.026693] (driver?)
Oct 16 13:17:50 C6100-1-N4 OpenSM[3770]: SM port is down
Oct 16 13:17:50 C6100-1-N4 kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
Oct 16 13:17:50 C6100-1-N4 kernel: IP: ib_free_recv_mad+0x44/0xa0 [ib_core]
Oct 16 13:17:50 C6100-1-N4 kernel: PGD 0
Oct 16 13:17:50 C6100-1-N4 kernel: P4D 0
Oct 16 13:17:50 C6100-1-N4 kernel:
Oct 16 13:17:50 C6100-1-N4 kernel: Oops: 0002 [#1] SMP
Oct 16 13:17:50 C6100-1-N4 kernel: Modules linked in: iptable_filter openvswitch nf_conntrack_ipv6 nf_nat_ipv6 nf_conntrack_ipv4 nf_defrag_ipv4 softdog nf_nat_ipv4 nf_defrag_ipv6 nf_nat nf_conntrack libcrc32c nfnetlink_log nfnetlink ib_ipoib rdma_ucm ib_umad ib_uverbs bonding 8021q garp ipmi_ssif mrp intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc snd_pcm aesni_intel ast aes_x86_64 snd_timer crypto_simd ttm glue_helper snd cryptd dcdbas drm_kms_helper soundcore intel_cstate pcspkr drm joydev input_leds i2c_algo_bit fb_sys_fops syscopyarea sysfillr
cat .config | grep INFINIBAND
CONFIG_INFINIBAND=m
CONFIG_INFINIBAND_USER_MAD=m
CONFIG_INFINIBAND_USER_ACCESS=m
CONFIG_INFINIBAND_USER_MEM=y
CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
CONFIG_INFINIBAND_ADDR_TRANS=y
CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y
CONFIG_INFINIBAND_MTHCA=m
# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
### Keybase proof
I hereby claim:
* I am riptidewave93 on github.
* I am riptide_wave (https://keybase.io/riptide_wave) on keybase.
* I have a public key ASClkACnpqRB6Ps4el1uA4DtpubUVC0SivF0bwNHuYSsTgo
To claim this, I am signing this object:
@riptidewave93
riptidewave93 / distro
Created February 5, 2016 21:17
Observium Distro Script
#!/bin/sh
#
# Observium License Version 1.0
# =============================
#
# Copyright (c) 2013-2015 Joe Holden, (c) 2015-2016 Observium Limited
#
# The intent of this license is to establish the freedom to use, share and contribute to
# the software regulated by this license.
#