Skip to content

Instantly share code, notes, and snippets.

View frederic's full-sized avatar
🎯
Focusing

Frédéric frederic

🎯
Focusing
View GitHub Profile
@frederic
frederic / S905D3_dump_bootrom.c
Last active February 9, 2021 07:05
S905D3 bootrom dump tool
/*
* S905D3_dump_bootrom.c - S905D3 bootrom dump tool
* $ aarch64-linux-gnu-gcc -O3 -nostdlib -Wl,--build-id=none -o S905D3_dump_bootrom.elf S905D3_dump_bootrom.c
* $ aarch64-linux-gnu-objcopy -O binary -j .text S905D3_dump_bootrom.elf S905D3_dump_bootrom.bin
*
* derived from https://github.com/khadas/u-boot/blob/khadas-vims-pie/arch/arm/cpu/armv8/g12a/firmware/scp_task/uart.c
*
* Copyright (C) 2015 Amlogic, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@frederic
frederic / functions.sh
Created November 3, 2017 07:09
Updated OpenWRT /lib/functions.sh file for Netgear R7800, to enable compatibility with recent (Chaos Calmer) ipk packages
#!/bin/sh
# Copyright (C) 2006-2014 OpenWrt.org
# Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de>
# Copyright (C) 2010 Vertical Communications
debug () {
${DEBUG:-:} "$@"
}
mount() {
@frederic
frederic / MIPS-ath79-dhp-1565-a1-enable-AR7400-port.diff
Last active February 16, 2016 09:43
OpenWrt patch to enable PLC chipset on DHP-1565 board
Enable port 6 of AR8327 switch on DHP-1565 board to allow communication between CPU & AR7400 PLC chipset.
Signed-off-by: Frédéric Basse <contact@fredericb.info>
---
target/linux/ar71xx/files/arch/mips/ath79/mach-dhp-1565-a1.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dhp-1565-a1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dhp-1565-a1.c
index ae47764..2963463 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dhp-1565-a1.c
@frederic
frederic / unpack_bootldr!_img.c
Created December 2, 2014 13:32
Tool to unpack Android boot images
/**
* unpack_bootldr!_img : tool to unpack Android boot images
* https://gist.github.com/frederic/
**/
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@frederic
frederic / ida-armv7a-cpsr_c.py
Created November 6, 2014 18:44
IDAPython plugin - ARMv7-A CPSR_C enum
from idautils import *
from idaapi import *
from idc import *
Message("%s starting...\n" % __file__)
CPSR_C_enum_id = GetEnum("CPSR_C_enum")
if CPSR_C_enum_id == BADADDR:
CPSR_C_enum_id = AddEnum(-1, "CPSR_C_enum", hexflag())
SetEnumBf(CPSR_C_enum_id,1);