From 5e88282a7ba7c45abdf753dc5cf4a46ac8effce2 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Tue, 19 Apr 2016 19:39:23 +1000 Subject: [PATCH] Add x230 image and infrastructure --- .gitmodules | 3 +++ Makefile | 13 ++++++++++++- g2uj23us.iso.sha1 | 1 + mec-tools | 1 + x220.8DHT34WW.extract | 8 +++++++- x230.G2HT35WW.extract | 20 ++++++++++++++++++++ x230.G2HT35WW.img.sha1 | 1 + 7 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 100644 g2uj23us.iso.sha1 create mode 160000 mec-tools create mode 100755 x230.G2HT35WW.extract create mode 100644 x230.G2HT35WW.img.sha1 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3da232f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "mec-tools"] + path = mec-tools + url = https://github.com/eigenmatt/mec-tools diff --git a/Makefile b/Makefile index fd4db18..a77b1b9 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,17 @@ install.radare.projects: # # If we have an extractor for this image, use it %.img: %.extract %.img.sha1 - ./$< > $@ + ./$< $@ sha1sum -c $@.sha1 +mec-tools/Makefile: + git submodule update --init --remote + +mec-tools/mec_encrypt: mec-tools/Makefile + make -C mec-tools + +# +# TODO: +# - most of these dependancies could be automatically calculated +x220.8DHT34WW.extract: 8duj27us.iso +x230.G2HT35WW.extract: g2uj23us.iso mec-tools/mec_encrypt diff --git a/g2uj23us.iso.sha1 b/g2uj23us.iso.sha1 new file mode 100644 index 0000000..30c8c7f --- /dev/null +++ b/g2uj23us.iso.sha1 @@ -0,0 +1 @@ +d4f9d597ea792f966257c01c3b5442354f0b3cc8 g2uj23us.iso diff --git a/mec-tools b/mec-tools new file mode 160000 index 0000000..5e30f2b --- /dev/null +++ b/mec-tools @@ -0,0 +1 @@ +Subproject commit 5e30f2bf7dcfe3ee084b65f237ee50a6936eec89 diff --git a/x220.8DHT34WW.extract b/x220.8DHT34WW.extract index 4cfae36..99f283b 100755 --- a/x220.8DHT34WW.extract +++ b/x220.8DHT34WW.extract @@ -6,5 +6,11 @@ # - a tool that is portable to Windows # - should output dependancy information -dd if=8duj27us.iso bs=$[0x005e2a00] skip=1 | dd bs=196608 count=1 +OUTPUT="$1" +if [ -z "$OUTPUT" ]; then + echo Need output filename + exit 1 +fi + +dd if=8duj27us.iso bs=$[0x005e2a00] skip=1 | dd bs=196608 count=1 of="$OUTPUT" diff --git a/x230.G2HT35WW.extract b/x230.G2HT35WW.extract new file mode 100755 index 0000000..fbc2fee --- /dev/null +++ b/x230.G2HT35WW.extract @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Quick and dirty extracter to get the EC image out of the iso file +# +# TODO: +# - a tool that is portable to Windows +# - should output dependancy information + +OUTPUT="$1" +if [ -z "$OUTPUT" ]; then + echo Need output filename + exit 1 +fi + +OUT1="${OUTPUT}.encrypted.orig" + +dd if=g2uj23us.iso bs=$[0x01076600] skip=1 | dd bs=196608 count=1 of="$OUT1" + +mec-tools/mec_encrypt -d "$OUT1" >"$OUTPUT" + diff --git a/x230.G2HT35WW.img.sha1 b/x230.G2HT35WW.img.sha1 new file mode 100644 index 0000000..7a1d4a5 --- /dev/null +++ b/x230.G2HT35WW.img.sha1 @@ -0,0 +1 @@ +d70f5434ef316a66a6195651d9e231e84a2464a1 x230.G2HT35WW.img