Skip to content

Instantly share code, notes, and snippets.

@Tasssadar
Tasssadar / atags_print.c
Created November 24, 2013 18:02
A little C program to dump contents of /proc/atags - count, size and md5 checksums
#ifndef _DMADORE_MD5_H
#define _DMADORE_MD5_H
struct md5_ctx {
/* The four chaining variables */
unsigned long buf[4];
/* Count number of message bits */
unsigned long bits[2];
/* Data being fed in */
unsigned long in[16];
program priklad_soubory;
var soubor:text; // proměnná pro uchování otevřeného souboru
i:byte; // počítadlo
cisla:array[1..10] of integer; // pro uložení načtených čísel
begin
// ********* NAČTENÍ 10 ČÍSEL ZE SOUBORU *********
// přiřazení jména souboru (vstup.txt) k proměnné soubor
assign(soubor, 'vstup.txt');
@Tasssadar
Tasssadar / flo.xml
Created October 11, 2013 11:43
Manifest for flo, for B2G build
<?xml version="1.0" ?><manifest>
<include name="base-jb.xml"/>
<remote fetch="git://github.com/Tasssadar/" name="tasssadar"/>
<default remote="caf" revision="refs/tags/android-4.3_r2.1" sync-j="4"/>
<!-- flo specific things -->
<project name="android_device_asus_flo" path="device/asus/flo" remote="tasssadar" revision="b2g-4.3_r2.1" />
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon"/>
@Tasssadar
Tasssadar / mako-aosp-Implement-kexec-hardboot.patch
Last active January 7, 2022 17:10
kexec-hardboot for LG Nexus 4 (mako)
From a5c71c50da839c6932af1903bcc0036daa033f7e Mon Sep 17 00:00:00 2001
From: Vojtech Bocek <vbocek@gmail.com>
Date: Mon, 30 Sep 2013 18:02:43 +0200
Subject: [PATCH] Implement kexec-hardboot
"Allows hard booting (i.e., with a full hardware reboot) to a kernel
previously loaded in memory by kexec. This works around the problem of
soft-booted kernel hangs due to improper device shutdown and/or
reinitialization."
More info in /arch/arm/Kconfig.
@Tasssadar
Tasssadar / m7-cm102-Implement-kexec-hardboot.patch
Last active January 7, 2022 17:27
Kexec-hardboot for HTC One (M7)
From 074ac0e9087ab1ecf95bba019787b4aa4b82bef6 Mon Sep 17 00:00:00 2001
From: Vojtech Bocek <vbocek@gmail.com>
Date: Fri, 27 Sep 2013 20:47:54 +0200
Subject: [PATCH] Implement kexec-hardboot
"Allows hard booting (i.e., with a full hardware reboot) to a kernel
previously loaded in memory by kexec. This works around the problem of
soft-booted kernel hangs due to improper device shutdown and/or
reinitialization."
More info in /arch/arm/Kconfig.
/*
* This file contains device specific hooks.
* Always enclose hooks to #if MR_DEVICE_HOOKS >= ver
* with corresponding hook version!
*/
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
@Tasssadar
Tasssadar / flo-aosp-Implement-kexec-hardboot-2.patch
Last active January 7, 2022 17:13
Kexec-hardboot patch for Nexus 7 (2013), the flo
From fb20bb58ba93d13c52f532e1ad445d764e1144e8 Mon Sep 17 00:00:00 2001
From: Vojtech Bocek <vbocek@gmail.com>
Date: Wed, 25 Sep 2013 22:18:49 +0200
Subject: [PATCH] Implement kexec-hardboot
"Allows hard booting (i.e., with a full hardware reboot) to a kernel
previously loaded in memory by kexec. This works around the problem of
soft-booted kernel hangs due to improper device shutdown and/or
reinitialization."
More info in /arch/arm/Kconfig.
This is how fstab looks like:
====================================
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery
/misc emmc /dev/block/platform/msm_sdcc.1/by-name/misc
#/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
#/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata
#/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
/sbl1 emmc /dev/block/platform/msm_sdcc.1/by-name/sbl1
/sbl2 emmc /dev/block/platform/msm_sdcc.1/by-name/sbl2
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3c3b868..5903cec 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1993,6 +1993,32 @@ config ATAGS_PROC
Should the atags used to boot the kernel be exported in an "atags"
file in procfs. Useful with kexec.
+config KEXEC_HARDBOOT
+ bool "Support hard booting to a kexec kernel"
@Tasssadar
Tasssadar / copy_atags.patch
Created January 4, 2013 23:50
Support copying of atags in the decompressor.
From 9d8b8f75aec0029210fe578f0c95197582d37a67 Mon Sep 17 00:00:00 2001
From: Vojtech Bocek <vbocek@gmail.com>
Date: Thu, 22 Nov 2012 20:45:33 +0100
Subject: [PATCH] UBUNTU: Support copying of atags in the decompressor.
OriginalAuthor: Mike Kasick <mike@kasick.org>
Ported from Jens Andersen <jens.andersen@gmail.com>'s
kernel for Asus TF201 [3].