Skip to content

Instantly share code, notes, and snippets.

View TheGammaSqueeze's full-sized avatar

TheGammaSqueeze

View GitHub Profile
@TheGammaSqueeze
TheGammaSqueeze / env_manager.sh
Created April 28, 2024 10:55
Decodes and Encodes Allwinner env files
#!/bin/bash
# Path to the environment file
ENV_FILE="$1"
# Function to decode the environment file to text
decode_env() {
# Skip the special header (assuming header length + null byte), convert null bytes to newlines, then strip trailing null bytes (represented by empty lines)
tail -c +6 "$ENV_FILE" | tr '\0' '\n' | sed '/^$/d' # Remove empty lines which are the result of trailing null bytes
}
@TheGammaSqueeze
TheGammaSqueeze / rg-cube-running-kernel.dts
Created June 10, 2024 22:14
Anbernic RG-Cube Running Kernel DTS
/dts-v1/;
/ {
cpuinfo_hardware = "Unisoc T820";
serial-number = "009180680a38c49d";
soc-manufacturer = "Spreadtrum";
#size-cells = <0x02>;
compatible = "sprd,ums9620";
#address-cells = <0x02>;
interrupt-parent = <0x01>;
@TheGammaSqueeze
TheGammaSqueeze / log.txt
Created June 11, 2024 18:49
RG Cube SPRD Factory Flash U-boot Log
[00004837] [c0] ** LK (0, restored from storage) **
[00004840] [c0] dram cs0 size 100000000
[00004841] [c0] dram cs1 size fffff000
[00004841] [c0] [sprd_timer_init]: done ....
[00004841] [c0] booting 3 cpus
[00004841] [c0]
[00004841] [c0] welcome to lk/MP
[00004843] [c0]
[00004844] [c0] boot args 0x0 0x65014238 0x650141e8 0x2a
[00004848] [c0] version:
@TheGammaSqueeze
TheGammaSqueeze / pocket-s.dts
Created July 4, 2024 20:05
AYANEO Pocket-S running kernel DTS
This file has been truncated, but you can view the full file.
/dts-v1/;
/ {
qcom,msm-id = <0x258 0x20000 0x207 0x20000 0x218 0x20000 0x259 0x20000 0x25b 0x20000 0x207 0x10000 0x218 0x10000>;
#size-cells = <0x02>;
compatible = "qcom,kalama-qrd\0qcom,kalama\0qcom,qrd";
qcom,board-id = <0x1000b 0x01>;
#address-cells = <0x02>;
interrupt-parent = <0x01>;
model = "Qualcomm Technologies, Inc. Kalama QRD,Graph-DVT";
@TheGammaSqueeze
TheGammaSqueeze / env_manager.sh
Created July 23, 2024 21:12
Manage Allwinner ENV partition file
#!/bin/bash
# Path to the environment file
ENV_FILE="$1"
# Function to decode the environment file to text
decode_env() {
# Skip the special header (assuming header length + null byte), convert null bytes to newlines, then strip trailing null bytes (represented by empty lines)
tail -c +6 "$ENV_FILE" | tr '\0' '\n' | sed '/^$/d' # Remove empty lines which are the result of trailing null bytes
}
@TheGammaSqueeze
TheGammaSqueeze / rk3562-firefly-aio-3562jq.dts
Created August 14, 2024 16:16
Firefly iCore-3562JQ device tree
/dts-v1/;
/ {
compatible = "rockchip,aio-3562jq\0rockchip,rk3562";
interrupt-parent = <0x01>;
#address-cells = <0x02>;
#size-cells = <0x02>;
model = "Firefly AIO-3562JQ MIPI-DSI";
aliases {
@TheGammaSqueeze
TheGammaSqueeze / UMIDIGI_G1_Tab_V1.0_20231225_20231225-1817-rk-kernel.dts
Created August 14, 2024 19:07
UMIDIGI_G1_Tab_V1.0_20231225_20231225-1817-rk-kernel.dts
/dts-v1/;
/ {
compatible = "rockchip,rk3562-rk817-tablet\0rockchip,rk3562";
interrupt-parent = <0x01>;
#address-cells = <0x02>;
#size-cells = <0x02>;
model = "Rockchip RK3562 RK817 TABLET LP4 Board";
aliases {
@TheGammaSqueeze
TheGammaSqueeze / UMIDIGI_G1_Tab_V1.0_20231225_20231225-1817-uboot.dts
Created August 14, 2024 19:17
UMIDIGI_G1_Tab_V1.0_20231225_20231225-1817-uboot.dts
/dts-v1/;
/ {
compatible = "rockchip,rk3562-evb\0rockchip,rk3562";
#address-cells = <0x02>;
#size-cells = <0x02>;
model = "Rockchip RK3562 Evaluation Board";
aliases {
gpio0 = "/pinctrl/gpio@ff260000";
@TheGammaSqueeze
TheGammaSqueeze / rp_mini_running_kernel.dts
Created October 5, 2024 07:09
Retroid Pocket Mini - running kernel device tree dump - Android 10
This file has been truncated, but you can view the full file.
/dts-v1/;
/ {
qcom,msm-id = <0x164 0x20001>;
#size-cells = <0x02>;
compatible = "qcom,kona-iot-hdk\0qcom,kona-iot\0qcom,hdk";
qcom,board-id = <0x1001f 0x01>;
#address-cells = <0x02>;
interrupt-parent = <0x01>;
model = "Qualcomm Technologies, Inc. kona-iot HDK";
@TheGammaSqueeze
TheGammaSqueeze / 406v-running-kernel.dts
Created October 15, 2024 08:35
Anbernic RG 406v Running Kernel DTS
/dts-v1/;
/ {
cpuinfo_hardware = "Unisoc T820";
serial-number = "009186260e4c0e0c";
soc-manufacturer = "Spreadtrum";
#size-cells = <0x02>;
compatible = "sprd,ums9620";
#address-cells = <0x02>;
interrupt-parent = <0x01>;