From 2bdc73ec37fa2b398bea80df04908a30fdf2d7a8 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Mon, 28 Mar 2011 12:55:42 +0100 Subject: [PATCH] create makefile rather than work with a script changed the compile-all to utilise this --- Makefile | 28 ++++++++++++++++++++++++++++ compile-all | 23 ++++++++++++++--------- compile-arif | 39 --------------------------------------- 3 files changed, 42 insertions(+), 48 deletions(-) create mode 100644 Makefile delete mode 100755 compile-arif diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..703e293 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ + +export VERSION=1.4 +export TOOLCHAIN_PREFIX=arm-none-eabi- + +default: bin/RUU_signed.nbh + +clean: + $(MAKE) -C lk htcleo clean + rm -rf lk/build-htcleo + rm -rf bin/nbgen + rm -rf bin/lk.bin + rm -rf bin/os.nb.payload + rm -rf bin/os.nb + rm -rf bin/RUU_signed.nbh + +bin/nbgen: + gcc -std=c99 nbgen.c -o bin/nbgen + +bin/RUU_signed.nbh: bin/nbgen + $(MAKE) -C lk htcleo DEBUG=1 + cp lk/build-htcleo/lk.bin bin/ + cd bin ; ./nbgen os.nb + cd bin ; ./yang -F RUU_signed.nbh -f os.nb -t 0x400 -s 64 -d PB8110000 -c 11111111 -v CLK$(VERSION) -l WWE + +partition: + rm -rf lk/build-htcleo/target/htcleo/init.* + rm -rf bin/RUU_signed.nbh + $(MAKE) diff --git a/compile-all b/compile-all index 3cd6a89..e373dd6 100755 --- a/compile-all +++ b/compile-all @@ -1,19 +1,24 @@ #!/bin/bash -version=1.4 -SIZES="100 150 200 210 250 300 350 400" -cache=5 +export ARM=$HOME/android/HD2/android/toolchain/arm-2009q3/bin +export WINE=/opt/cxoffice/bin +export PATH=$ARM:$WINE:$PATH +export VERSION=1.4 +export SIZES="100 150 200 210 250 300 350 400" +export CACHE=5 + +make clean for size in $SIZES do sed -i s/DEFINES\ +=\ SYSTEM_PARTITION_SIZE=.*/DEFINES\ +=\ SYSTEM_PARTITION_SIZE=${size}/ lk/target/htcleo/rules.mk -sed -i s/DEFINES\ +=\ CACHE_PARTITION_SIZE=.*/DEFINES\ +=\ CACHE_PARTITION_SIZE=${cache}/ lk/target/htcleo/rules.mk +sed -i s/DEFINES\ +=\ CACHE_PARTITION_SIZE=.*/DEFINES\ +=\ CACHE_PARTITION_SIZE=${CACHE}/ lk/target/htcleo/rules.mk sed -i s/system\ .*/system\ ${size}M/ build-stuff/readme.txt -./compile-arif clean +make partition pushd build-stuff -rm -rf ../../cLK-out/cLK${version}_system_${size}M_arif-ali.zip -cp ../bin/RUU_signed.nbh . -zip -9Dr ../../cLK-out/cLK${version}_system_${size}M_arif-ali.zip readme.txt CustomRUU.exe RUU_signed.nbh -rm -rf RUU_signed.nbh +rm -rf ../../cLK-out/cLK${VERSION}_system_${size}M_arif-ali.zip +mv ../bin/RUU_signed.nbh . +zip -9Dr ../../cLK-out/cLK${VERSION}_system_${size}M_arif-ali.zip readme.txt CustomRUU.exe RUU_signed.nbh popd +rm -rf RUU_signed.nbh done diff --git a/compile-arif b/compile-arif deleted file mode 100755 index c9c2905..0000000 --- a/compile-arif +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -export ARM=$HOME/android/HD2/android/toolchain/arm-2009q3/bin -export WINE=/opt/cxoffice/bin -export PATH=$ARM:$WINE:$PATH - -[ `which arm-none-eabi-gcc` ] && TOOLCHAIN_PREFIX="arm-none-eabi-" || TOOLCHAIN_PREFIX="arm-eabi-" -export TOOLCHAIN_PREFIX - -if [ "$1" = "clean" ]; then - cd lk - make htcleo clean - cd .. - rm bin/nbgen -fi - -rm bin/lk.bin -rm bin/os.nb.payload -rm bin/os.nb -rm bin/RUU_signed.nbh - -if [ ! -f bin/nbgen ]; then - gcc -std=c99 nbgen.c -o bin/nbgen -fi - -cd lk -make htcleo DEBUG=1 -[ $? -eq 0 ] || exit 1 -cp build-htcleo/lk.bin ../bin/ -cd .. - -cd bin -chmod +x yang -./nbgen os.nb -./yang -F RUU_signed.nbh -f os.nb -t 0x400 -s 64 -d PB8110000 -c 11111111 -v CLK1.4 -l WWE -cd .. - - -