Skip to content

Instantly share code, notes, and snippets.

View pepe2k's full-sized avatar

Piotr Dymacz pepe2k

  • RTS/Freelancer
  • Warsaw, Poland
View GitHub Profile
@pepe2k
pepe2k / compile_all_boards.sh
Created October 5, 2017 14:32 — forked from mkresin/compile_all_boards.sh
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
@pepe2k
pepe2k / patchwork-apply.sh
Created August 20, 2017 14:48 — forked from jow-/patchwork-apply.sh
Script to fetch patchwork patch, apply it and confirm it in patchwork and via email.
#!/usr/bin/env bash
yesno() {
local prompt="$1"
local default="${2:-n}"
local input
while [ 1 ]; do
printf "%s y/n [%s] > " "$prompt" "$default"
read input
#!/bin/sh
KERNEL=$1
PATCHVER=$2
[ -z "$1" -o -z "$2" ] && {
echo "usage: refresh_kernel.sh <version> <release>"
echo "example: refresh_kernel.sh 3.18 3.18.30"
exit 1
}
@pepe2k
pepe2k / xiaomi_mijia_360_uart_bootlog
Created February 27, 2017 21:23
Xiaomi Mijia 360 UART bootlog
___ ___ _________ _
/ _ \ | \/ || ___ \ | |
/ /_\ \| . . || |_/ / ___ ___ | |_
| _ || |\/| || ___ \ / _ \ / _ \ | __|
| | | || | | || |_/ /| (_) || (_) || |_
\_| |_/\_| |_/\____/ \___/ \___/ \__|
----------------------------------------------------------
Amboot(R) Ambarella(R) Copyright (C) 2004-2014
Boot From: NAND 2048 RC BCH 6bit
SYS_CONFIG: 0x3007009A POC: 101
@pepe2k
pepe2k / ar724x.txt
Last active February 21, 2017 20:05
Atheros AR724x PLL/RST/PCI-E registers reset values
Below data was collected on:
TP-Link TL-WR842ND v1 (AR7241)
== JTAG signals ==
SIGNAL PACKAGE PIN LOCATION ON PCB
TDI PIN81 R774 (near U13, right bottom corner)
TDO PIN82 R617 (near U13, right bottom corner)
TMS PIN84 R561 (near "Internet"/"USB" LEDs)
TCK PIN85 R427 (near SOC, between SOC and FLASH chip)
@pepe2k
pepe2k / asus_rt-ac58u_ipq4018_bootlog.log
Created November 13, 2016 12:11
Asus RT-AC58U (IPQ4018 based) bootlog
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.1-00096
S - IMAGE_VARIANT_STRING=DAABANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
S - Boot Config, 0x00000021
S - Core 0 Frequency, 0 MHz
B - 261 - PBL, Start
B - 1339 - bootable_media_detect_entry, Start
B - 1679 - bootable_media_detect_success, Start
@pepe2k
pepe2k / ar8327_disable_all_leds_for_swconfig.patch
Created January 9, 2014 00:05
This patch adds an option in swconfig which allows to disable all leds in AR8327N switch (e.g. on TL-WDR3600/4300, TL-WR1043ND v2, etc.). For example, on TL-WR1043ND v2: "swconfig dev switch0 set disable_all_leds 1" will turn off all switch LEDs (WAN and 4x LAN) and "swconfig dev switch0 set disable_all_leds 0" will turn them on again. OpenWrt t…
Index: target/linux/generic/files/drivers/net/phy/ar8216.c
===================================================================
--- target/linux/generic/files/drivers/net/phy/ar8216.c (wersja 39210)
+++ target/linux/generic/files/drivers/net/phy/ar8216.c (kopia robocza)
@@ -1903,6 +1903,57 @@
return ret;
}
+static int
+ar8xxx_sw_set_disable_all_leds(struct switch_dev *dev,