Compare commits

...

10 Commits

Author SHA1 Message Date
6c5bac7ad3 fix compile error 2011-12-08 19:32:53 +00:00
a57a973d36 reverted: merged from dan1j3l, 1.6.5 DE
will add to lk, rather than build-htcleo later
2011-08-12 11:21:00 +01:00
628f6708c1 fixed a typo on creating the different sized, missed 150, and updated to 1.4.0.1 2011-05-09 00:24:44 +01:00
f5de287492 modified to add version.h, and ther rest of the places, to use this variable 2011-05-08 02:06:18 +01:00
d3ad9449ec added clk= into cmdline 2011-05-05 23:48:26 +01:00
8967792670 Added README, and changed path to toolchain relative to out path 2011-04-09 00:54:24 +01:00
62e11adcee changed compile-all such that different cache sizes can be created, Added 5M and 44M options 2011-04-07 18:01:19 +01:00
2bdc73ec37 create makefile rather than work with a script
changed the compile-all to utilise this
2011-03-28 12:55:42 +01:00
87370fbba5 Added my quick build environment
changed make files and code, to dynaically change cache
added the other files that I forgot
2011-03-27 21:24:52 +01:00
45e1245f9e Added my quick build environment
changed make files and code, to dynaically change cache
2011-03-27 21:20:40 +01:00
9 changed files with 208 additions and 5 deletions

28
Makefile Normal file
View File

@ -0,0 +1,28 @@
export VERSION=1.4.0.1
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)

93
README Normal file
View File

@ -0,0 +1,93 @@
=================
cLK by cedesmith
=================
URL: http://forum.xda-developers.com/showthread.php?t=901305
1. Disclaimer
2. FAQ
3. How To
3.1. Flash cLK
3.2. Compiling cLK
4. Known Issues
5. Credits
================
1. DISCLAIMER
================
This comes with no warranties, if you use it you do it on your own risk.
Please read carefully the flowing information and make sure you know what you are doing.
I don't have time or patience for questions and support. If you use it you are on your own (well and this community).
================
2. FAQ
================
Q&A
Q: What it is ?
A: A bootloader for android like magldr.
Q: Is it better then magldr ?
A1: NO, it is missing tetris .
A2: NO, magldr has some nice features like partitioning and rmnet.
Q: Can i use last 24MB of nand with this?
A: NO, SPL will erase them. When i have some time i may try to fix it.
Q: Does battery charge with this ?
A: YES, from version 1.3
Q: Does it boot WP7?
A: NO. I am only interested in android but in can load and execute any program.
Q: Should i install it ?
A: If you had to ask probably not. If has no functional benefits over magldr.
=================
3. How To
=================
3.1 Flash cLK
--------------
- make sure you have hspl
- enter SPL by holding VOL DOWN key while powering/resting the phone.
- flash with customruu like you would a windows rom and/or magldr
Flash a ROM
- download android sdk (or rather, just adb, drivers and fastboot)
- fastboot flash recovery recovery.img
- after recovery you can reboot and use CWM or you can flash with fastboot
(fastboot flash boot boot.img, fastboot flash system system.img, fastboot flash userdata userdata.img)
Start recovery / fastboot / text console
- holding down any key ( except power ) will show text console
- home key will enter recovery ( if flashed )
- back key will enter fastboot mode
The following URL has a fantastic howto by stirkac
http://forum.xda-developers.com/showpost.php?p=12327648&postcount=844
3.2 Compiling cLK
-----------------
Linux: http://forum.xda-developers.com/showpost.php?p=12461912&postcount=934
Windows: http://forum.xda-developers.com/showpost.php?p=12461551&postcount=932
=================
4. Known issues
=================
RMNET does not work.
=================
5. Credits
=================
- cedesmith for make LK available for the HD2
- codeaurrora for making LK and for making it open
- Martin Johnson for his tinboot witch was a great inspiration
- Martijn Stolk for his kernel segfault solving code and and cotulla for pointing it and his contribution to android on HD2
- all how worked on making linux kernel possible on hd2

BIN
build-stuff/CustomRUU.exe Executable file

Binary file not shown.

19
build-stuff/readme.txt Normal file
View File

@ -0,0 +1,19 @@
cLK 1.4
---------
Built by arif-ali from xda-developers
using 2009q3 of Codesourcery Toolchain
misc 1M
recovery 5M
boot 8M
system 90M
cache 5M
userdata remaining
Thanks and credits
------------------
* cedesmith
* seadersn
- 27 Mar 2011

41
compile-all Executable file
View File

@ -0,0 +1,41 @@
#!/bin/bash
export ARM=$PWD/../../../toolchain/arm-2009q3/bin
export PATH=$ARM:$PATH
export VERSION=1.4.0.1
#export SIZES="`echo {80..150..10} {160..460..20} 250 350 450`"
export SIZES="`echo {80..450..10}`"
export CACHE="5 44"
export OUTPUT=$PWD/../cLK-out
export O_ALL=$OUTPUT/allInOne
export O_ZIP=$OUTPUT/zips
make clean
mkdir -p $O_ALL
mkdir -p $O_ZIP
rm -rf $O_ALL/{*.nbh,*.zip}
rm -rf $O_ZIP/*.zip
for cache in $CACHE
do
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/system\ .*/system\ ${size}M/ build-stuff/readme.txt
sed -i s/cache\ .*/cache\ ${cache}M/ build-stuff/readme.txt
make partition
pushd build-stuff
rm -rf $O_ZIP/cLK_${VERSION}_${size}_${cache}.zip
mv ../bin/RUU_signed.nbh .
zip -9Dr $O_ZIP/cLK_${VERSION}_${size}_${cache}.zip readme.txt CustomRUU.exe RUU_signed.nbh
cp RUU_signed.nbh $O_ALL/RUU_signed-${size}-${cache}.nbh
rm -rf RUU_signed.nbh
popd
done
done
pushd $O_ALL
rm -rf cLK_${VERSION}_layouts_arif.zip
zip -9Dr cLK_${VERSION}_layouts_arif.zip *.nbh
popd

View File

@ -46,6 +46,7 @@
#include "recovery.h"
#include "bootimg.h"
#include "fastboot.h"
#include "version.h"
#define EXPAND(NAME) #NAME
#define TARGET(NAME) EXPAND(NAME)
@ -292,8 +293,11 @@ unified_boot:
} else {
cmdline = DEFAULT_CMDLINE;
}
dprintf(INFO, "cmdline = '%s'\n", cmdline);
strcat(cmdline," clk=");
strcat(cmdline,cLK_version);
dprintf(INFO, "cmdline = '%s'\n", cmdline);
dprintf(INFO, "\nBooting Linux\n");
boot_linux((void *)hdr->kernel_addr, (void *)TAGS_ADDR,
(const char *)cmdline, board_machtype(),
@ -384,6 +388,9 @@ continue_boot:
} else {
cmdline = DEFAULT_CMDLINE;
}
strcat(cmdline," clk=");
strcat(cmdline,cLK_version);
dprintf(INFO, "cmdline = '%s'\n", cmdline);
/* TODO: create/pass atags to kernel */
@ -646,6 +653,8 @@ void aboot_init(const struct app_descriptor *app)
/* Check if we should do something other than booting up */
if (keys_get_state(KEY_HOME) != 0)
boot_into_recovery = 1;
//if (keys_get_state(KEY_SOFT1) != 0)
// try_flash_recovery = 1;
if (keys_get_state(KEY_BACK) != 0)
goto fastboot;
if (keys_get_state(KEY_CLEAR) != 0)

7
lk/include/version.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef __VERSION_H
#define __VERSION_H
static const char *cLK_version = "1.4.0.1";
#endif

View File

@ -13,6 +13,8 @@
#include <platform/iomap.h>
#include <reg.h>
#include "version.h"
#define LINUX_MACHTYPE 2524
#define HTCLEO_FLASH_OFFSET 0x219
@ -40,7 +42,7 @@ static struct ptentry board_part_list[MAX_PTABLE_PARTS] __attribute__ ((aligned
.length = SYSTEM_PARTITION_SIZE /* In MB */,
},
{
.length = 44 /* In MB */,
.length = CACHE_PARTITION_SIZE /* In MB */,
.name = "cache",
},
{
@ -148,7 +150,10 @@ void target_init(void)
}
void display_lk_version()
{
_dputs("cedesmith's LK (CLK) v1.4\n");
char *version = "cedesmith's LK (CLK) v";
strcat(version,cLK_version);
strcat(version,"\n");
_dputs(version);
}
struct fbcon_config* fbcon_display(void);
void htcleo_fastboot_init()

View File

@ -5,8 +5,9 @@ INCLUDES += -I$(LOCAL_DIR)/include -I$(LK_TOP_DIR)/platform/msm_shared
PLATFORM := qsd8k
#define system partition size (in MB), if not defined my custom (from magldr) layout is used. see init.c
DEFINES += SYSTEM_PARTITION_SIZE=150
#DEFINES += SYSTEM_PARTITION_SIZE=250
DEFINES += SYSTEM_PARTITION_SIZE=90
#DEFINES += SYSTEM_PARTITION_SIZE=90
DEFINES += CACHE_PARTITION_SIZE=5
#cedesmith note: MEMBASE requires edit in platform/qsd8k/rules.mk
# maximum partition size will be about 340mb ( MEMBASE-SCRATCH_ADDR)