Skip to content

Instantly share code, notes, and snippets.

View jessicah's full-sized avatar

Jessica Hamilton jessicah

View GitHub Profile
@jessicah
jessicah / README.md
Last active June 6, 2017 17:30
Extract HVIF Icons from Applications

Extract HVIF Icons from Applications

gcc -o rdef2bin rdef2bin.c
chmod a+x extract_hvif_resources.sh
extract_hvif_resources.sh /boot/system/apps/DocumentViewer

This will create a directory matching the filename of the app, and create numbered HVIF files in the created directory.

@jessicah
jessicah / 0001-debug-runtime-loader.patch
Created December 13, 2016 10:42
Debugging of runtime_loader problems
From f372671ab7b33ccae88578f3fe508437f83232f5 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <[email protected]>
Date: Tue, 13 Dec 2016 23:41:27 +1300
Subject: [PATCH] debug runtime loader
---
src/system/kernel/vm/vm.cpp | 2 +-
src/system/libroot/os/image.cpp | 6 ++++++
src/system/runtime_loader/elf.cpp | 7 +++++++
src/system/runtime_loader/images.cpp | 2 +-
@jessicah
jessicah / uefi-debugging.patch
Created December 13, 2016 09:39
patch for UEFI debugging; as-is, makes page faults disappear
commit 1347a7d0a5bbd05ae0b57b7fa2e20e7699b3d632
Author: Jessica Hamilton <[email protected]>
Date: Sat Dec 10 22:34:26 2016 +1300
debugging: uefi page faults disappear with debug added >_<
diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules
index 03a6f3b..7346ec1 100644
--- a/build/jam/ArchitectureRules
+++ b/build/jam/ArchitectureRules
@jessicah
jessicah / example.cpp
Last active October 1, 2016 22:34
Automatic upgrade of kernel arg versions to current
/*
* See also actual implementations:
* kernel_args: https://github.com/haiku/haiku/blob/master/headers/private/kernel/boot/kernel_args.h
* platform args: https://github.com/haiku/haiku/blob/master/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h
* arch args: https://github.com/haiku/haiku/blob/master/headers/private/kernel/arch/x86/arch_kernel_args.h
*/
typedef struct {
...
} _PACKED arch_kernel_args_v1;
@jessicah
jessicah / generate_kernel_arg_sizes.sh
Last active September 15, 2016 07:30
Generating kernel_arg sizes per version
rm -f $(1)
TEMPFILE=$(mktemp)
OUTFILE=$(mktemp)
GENERATORFILE=$(mktemp)
COUNTER=1
CONTINUE=1
cat <<EOF > $GENERATORFILE
#include <kernel_args.h>
#if CURRENT_KERNEL_ARGS_VERSION > MAX_KERNEL_ARGS_VERSION
#error "Unsupported version"
@jessicah
jessicah / keybase.md
Created February 10, 2016 04:20
My Keybase Identity for GitHub

Keybase proof

I hereby claim:

  • I am jessicah on github.
  • I am jessicah (https://keybase.io/jessicah) on keybase.
  • I have a public key ASC6RgDO-tdNN8ArmGqd_t5SjzN4hy3LYT3yys0O__Qz0Qo

To claim this, I am signing this object:

@jessicah
jessicah / patching-with-haikuporter.md
Last active December 12, 2015 08:21
Example of patching software with HaikuPorter

Patching Walkthrough

Let's say we are creating a recipe for cpio. We'll delete the patchset, and walk through the steps to create it again.

Assuming you're at the root of the ports tree you cloned, we'll start with the following:

> cd app-arch/cpio
> mv patches/cpio-2.12.patchset patches/cpio-2.12.patchset.old
> lpe cpio-2.12.recipe
# in Pe, delete the PATCHES line, save and close
@jessicah
jessicah / build.log
Created September 5, 2015 04:08
EDK II: Building HelloWorld sample
/Data/edk2/edk2> build
Build environment: Haiku-1-BePC-x86-32bit
Build start time: 16:04:58, Sep.05 2015
WORKSPACE = /Data/edk2/edk2
ECP_SOURCE = /Data/edk2/edk2/EdkCompatibilityPkg
EDK_SOURCE = /Data/edk2/edk2/EdkCompatibilityPkg
EFI_SOURCE = /Data/edk2/edk2/EdkCompatibilityPkg
EDK_TOOLS_PATH = /Data/edk2/edk2/BaseTools
@jessicah
jessicah / output.log
Created June 7, 2015 15:38
Installation Failure - GHC 7.8.3 on Haiku
Installing library in
/packages/ghc_x86-7.8.3-1/.self/lib/x86/ghc-7.8.3/terminfo-0.4.0.0
"inplace/bin/ghc-cabal" copy libraries/haskeline dist-install ":" '' '/packages/ghc_x86-7.8.3-1/.self' '/packages/ghc_x86-7.8.3-1/.self/lib/x86/ghc-7.8.3' '/packages/ghc_x86-7.8.3-1/.self/documentation/packages/ghc_x86/html/libraries' 'v dyn thr p debug l'
Installing library in
/packages/ghc_x86-7.8.3-1/.self/lib/x86/ghc-7.8.3/haskeline-0.7.1.2
"inplace/bin/ghc-cabal" copy compiler stage2 ":" '' '/packages/ghc_x86-7.8.3-1/.self' '/packages/ghc_x86-7.8.3-1/.self/lib/x86/ghc-7.8.3' '/packages/ghc_x86-7.8.3-1/.self/documentation/packages/ghc_x86/html/libraries' 'v dyn thr p debug l'
Installing library in
/packages/ghc_x86-7.8.3-1/.self/lib/x86/ghc-7.8.3/ghc-7.8.3
"inplace/bin/ghc-cabal" copy libraries/old-time dist-install ":" '' '/packages/ghc_x86-7.8.3-1/.self' '/packages/ghc_x86-7.8.3-1/.self/lib/x86/ghc-7.8.3' '/packages/ghc_x86-7.8.3-1/.self/documentation/packages/ghc_x86/html/libraries' 'v dyn thr p debug l'
Inst
@jessicah
jessicah / build.mk
Created June 7, 2015 15:37
Installation Failure - GHC 7.8.3 on Haiku
V = 1
GhcLibWays = v dyn thr p debug l
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O2 -fasm
GhcHcOpts = -Rghc-timing
GhcLibHcOpts = -O2
DYNAMIC_BY_DEFAULT = YES