[15MAR][BOOTLOADER]+[RECOVERY] cLK v1.3.3

Search This thread

cedesmith

Retired Recognized Developer
Feb 3, 2010
270
456
cedesmith's (L)ittle (K)ernel bootloader v1.3.3


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).

Recovery
- CWM 3.0.1.4


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 :p.
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.

How To

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, you will need drivers and fastboot command from there
- 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

Known issues
RMNET does not work.

Downloads

NBH
- RUU 1.3.3
- 1.3.3 and 1.4 are are exactly the same function wise, only tools used to build them is different (1.4 includes nbgen written by me to replace osnbtool and nbmerge)
- recovery.img
ROM
- see post #3

Source code
git link
compile on a linux machine with wine and codesourcery toolchain in path by executing "sh compile" in root of source


Credits
- 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
 

Attachments

  • cLK_1.3.2_src.zip
    594.2 KB · Views: 5,570
  • cLK_1.3.3_src.zip
    594.2 KB · Views: 22,183
Last edited:

cedesmith

Retired Recognized Developer
Feb 3, 2010
270
456
kernel and recovery patches

17.03.2011
- small fix on get_boot_reason
- cwm off charge fully implemented, inspired by dan1j3l's code (http://gitorious.org/htc-hd2-android-libraries/cmon/blobs/master/cmon.c)
15.03.2011
- kernel patch to save reboot reason so is available on bootloader
- old patched in zip as pushed in most branches
25.02.2011
- CWM patch for charging, unpached CWM code is not properly reading kernel cmdline because /proc/cmdline file size is always 0 resulting in a always empty cmd line. I also changed the code to wait for key press then reboot phone to normal android.

20.02.2011
- cLK_power_clllapse patch adds detection of cLK to kernel and puts the reset vector at 0x11800000 where cLK will jump (+4) at power_collapse_exit
- off_mode_charging just prevents the kernel from BUG() if off mode charging and panel is off ( and not detectable )
- both of this patches are compatibile with current SD and magldr builds, please push them to your git trees
 

Attachments

  • kernel_reboot_reason.zip
    697 bytes · Views: 3,482
  • old_kernel_patches.zip
    1.4 KB · Views: 1,897
  • cwm_off_charge_v2.zip
    1.5 KB · Views: 2,527
Last edited:

cedesmith

Retired Recognized Developer
Feb 3, 2010
270
456
ROMS

HyperDroid-CM7 by pongster

cLK for Dummies by stirkac

Froyo Sense revolution 2.5 by arif-ali

CWM 3.0.1.4 with yes/no menu by seadersn

UD 3.1 by crawlingcity

Revolution HD v2.6 & SL v1.4 by arif-ali


TyphoonN 2.6.3 CM7 for cLK

- download cLK
- download recovery
- if you don't have it download fastboot,adb and drivers from here
- download TyphooN 2.6.3 Standard Edition rom from original thread
- download typhoon kernel(tytung_r7) and initrd for clk update

- put rom zip and clk update zip on sdcard
- unzip clk and recovery
- flash clk ruu
- fastboot flash recovery recovery.3.0.1.4_clk_1.3.3.img
- fastboot reboot
- hold HOME key down to boot recovery
- wipe data/factory reset (if not updating from my previous version)
- install zip from sdcard -> choose zip from sdcard -> TyphooN_CM7_v2.6.3.zip
- install zip from sdcard -> choose zip from sdcard -> typhoon2.6.3_tyung_r7_clk_update.zip
- wipe chache

Other?
- drop me a PM to include it on this post
 

Attachments

  • typhoon2.6.3_tyung_r7_clk_update.zip
    5.1 MB · Views: 6,139
  • recovery.3.0.1.4_clk_1.3.3.zip
    3.5 MB · Views: 49,492
  • clk_1.3.3_system_150M_cedesmith.zip
    30.3 KB · Views: 27,280
Last edited:

cedesmith

Retired Recognized Developer
Feb 3, 2010
270
456
clk changelog

1.4
  • nbgen for making .nb file
1.3.3
1.3.2
  • ROMHDR base addr is spl virtual 0x80000000 = 11800000 physical, LK will relocate to correct address (MEMBASE)
  • save reboot reason at 0x2FFB0000 (ramconsole - 0x1000 (PAGE_SIZE)) and @0x2FFB0004 XOR 0x004b4c63 (cLK signature)
  • added oem cmd to fastboot and oemcmd.bat for PC. supported commands are:
    • dmesg - kernel debug messages
    • smesg - spl messages
    • pwf addr len - dump memory
    • set[c,w,s] addr value - set char(1byte), word(4 byes), or string
 
Last edited:

simax

Senior Member
Jul 29, 2010
351
13
can this be used as replacement for magldr?

if yes.. can i finally charge my battery while turned off? :D
 

yamensaleh

Senior Member
Oct 20, 2010
238
25
Kuwait
interesting

this is interesting, specially it is from cedesmith, seriously this man work is amazing, i was waiting for him to release his Desire HD2 as a nand build, but he surprised us with this, keep the good work man
cheers
 

windroidHD

Senior Member
Dec 20, 2010
247
87
simplemobdev.blogspot.com
no offense, but I see "senior members" complaning on how people don't use search in these forums before posting the question, but let's look at this thread...

1. There is absolutely no info on why this software was written and what problems it's solving? I am sorry but most people are not mind readers.

2. Software gets "shown off" and bunch of "senior members" post replies of "thanks...." instead of using "Thanks" button. These posts are not adding any value.
 

TheATHEiST

Senior Member
Sep 29, 2008
4,327
965
Hull
Samsung Galaxy S9+
Samsung Galaxy S21
Nice!!!!!!! downloading..............

Errr no your not! There is no download yet wingnut! :confused:



-------------------------------------


I'm all for the HD2 dev growing and its second wind but what does this really do that magldr doesnt, Is there any advantages of using this rather then magldr because as far as I can tell it does the same (boot from nand) but without the extra functionality that we have option for on magldr?

So what would be (if any) the advantage of using this rather then magldr?

That isnt a dig or anything im just curious.
 

stony007_de

Senior Member
Sep 9, 2008
344
20
hi guys,
sorry for that question but, where is the benefit in this loader?

CLK vs. magldr???
 

refuge27

Senior Member
Sep 26, 2009
54
1
thanks for what what does this do no info no download link nothing come come on lol this is useless
 

Top Liked Posts

  • There are no posts matching your filters.
  • 123
    cedesmith's (L)ittle (K)ernel bootloader v1.3.3


    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).

    Recovery
    - CWM 3.0.1.4


    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 :p.
    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.

    How To

    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, you will need drivers and fastboot command from there
    - 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

    Known issues
    RMNET does not work.

    Downloads

    NBH
    - RUU 1.3.3
    - 1.3.3 and 1.4 are are exactly the same function wise, only tools used to build them is different (1.4 includes nbgen written by me to replace osnbtool and nbmerge)
    - recovery.img
    ROM
    - see post #3

    Source code
    git link
    compile on a linux machine with wine and codesourcery toolchain in path by executing "sh compile" in root of source


    Credits
    - 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
    119
    Tutorial: cLK for Dummies V3

    Tutorial will be updated with next release of cLK, ETA +-2 weeks

    Please use cLK for Dummies V3 (click on this link)
    -Due to site limitations, i had to upload pdf to google docs(above) and only docx can be attached. Thanks for understanding.
    -V1 and V2 is not maintained and is kept just for backup purposes!


    Hit me or dkephart "Thanks" if guide helped you! Also, check this post if you wish to contribute to it by translating!

    Edit 10.4.2011: updated link for recovery that did not work
    Edit 27.4.2001: updated to v3, with huge help of dkephart (my "english teacher" lol)
    Edit 26.5.2011: just changed link to google docs, thanks for all support, there may be sth coming in next weeks :)
    Edit 12.6.2011: removed auto-installer link since it now has no purpose (try hd2 NAND Toolkit from fellow XDA user ksubedi)
    Edit 23.8.2011: updated with new release time
    22
    kernel and recovery patches

    17.03.2011
    - small fix on get_boot_reason
    - cwm off charge fully implemented, inspired by dan1j3l's code (http://gitorious.org/htc-hd2-android-libraries/cmon/blobs/master/cmon.c)
    15.03.2011
    - kernel patch to save reboot reason so is available on bootloader
    - old patched in zip as pushed in most branches
    25.02.2011
    - CWM patch for charging, unpached CWM code is not properly reading kernel cmdline because /proc/cmdline file size is always 0 resulting in a always empty cmd line. I also changed the code to wait for key press then reboot phone to normal android.

    20.02.2011
    - cLK_power_clllapse patch adds detection of cLK to kernel and puts the reset vector at 0x11800000 where cLK will jump (+4) at power_collapse_exit
    - off_mode_charging just prevents the kernel from BUG() if off mode charging and panel is off ( and not detectable )
    - both of this patches are compatibile with current SD and magldr builds, please push them to your git trees
    22
    ROMS

    HyperDroid-CM7 by pongster

    cLK for Dummies by stirkac

    Froyo Sense revolution 2.5 by arif-ali

    CWM 3.0.1.4 with yes/no menu by seadersn

    UD 3.1 by crawlingcity

    Revolution HD v2.6 & SL v1.4 by arif-ali


    TyphoonN 2.6.3 CM7 for cLK

    - download cLK
    - download recovery
    - if you don't have it download fastboot,adb and drivers from here
    - download TyphooN 2.6.3 Standard Edition rom from original thread
    - download typhoon kernel(tytung_r7) and initrd for clk update

    - put rom zip and clk update zip on sdcard
    - unzip clk and recovery
    - flash clk ruu
    - fastboot flash recovery recovery.3.0.1.4_clk_1.3.3.img
    - fastboot reboot
    - hold HOME key down to boot recovery
    - wipe data/factory reset (if not updating from my previous version)
    - install zip from sdcard -> choose zip from sdcard -> TyphooN_CM7_v2.6.3.zip
    - install zip from sdcard -> choose zip from sdcard -> typhoon2.6.3_tyung_r7_clk_update.zip
    - wipe chache

    Other?
    - drop me a PM to include it on this post
    17
    Compilation howto: Windows

    before I start, don't forget to click THANKS

    OK, two ways, first way is to do everything yourself, so follow the steps below, i.e. start from Step 1.

    If you want the easy way, then download the following zip file from the llink, then unzip it, and then double click "setup.bat". This automatically do all the steps listed below in bullet points

    cLK_win.zip

    * install cygwin, and all dependancies
    * download cLK from git
    * download codesourcery toolchain
    * download yang

    and now skip to Step 2

    Step 1: Prepare environment
    Download, the following file, and execute it

    http://www.cygwin.com/setup.exe

    • Click Next
    • Click "Install from internet" and click Next
    • Click Next (to accept the default directory to install)
    • Click Next (to accept the default directory for local Package directory)
    • Click "Direct Connection", and click Next
    • Select a "local mirror", and click Next
    Now in the search bar, you need to search for the following things to install

    • gcc
    • make
    • git
    • wget
    • zip
    • unzip
    Once selected click Next to continue, and Finish

    Now you will have an icon for Cygwin on the desktop, double-click this

    now in the window that appears, run the following command

    Code:
    git clone git://github.com/cedesmith/cLK.git

    then run the following commands to download the codesourcery toolchain

    Code:
    wget http://www.codesourcery.com/sgpp/lite/arm/portal/package5354/public/arm-none-eabi/arm-2009q3-68-arm-none-eabi-i686-mingw32.tar.bz2
    tar xvfj arm-2009q3-68-arm-none-eabi-i686-mingw32.tar.bz2
    wget http://htc-flasher.googlecode.com/files/yang-1.1_win32.zip
    cd cLK/bin
    rm -rf yang
    mkdir yang
    unzip ../../yang-1.1_win32.zip yang/yang.exe
    mv yang/yang.exe .
    cd ..
    sed -i s/yang/yang.exe/g compile

    Step 2: Change partition sizes
    To change your values for cache, system, boot etc... you need to change the following files

    • lk/target/htcleo/rules.mk
      • line 8 - system
    • lk/target/htcleo/init.c
      • line 28 - misc
      • line 32 - recovery
      • line 36 - boot
      • line 43 - cache

    These will be located in c:\cygwin\home\<username>\cLK on your windows machine

    Step 3: Compile cLK
    Now you can compile by running the following command

    Code:
    export PATH=$HOME/arm-2009q3/bin:$PATH
    cd cLK
    ./compile clean

    Now your RUU_signed.nbh will be located in the following folder

    Code:
    bin/RUU_signed.nbh

    Hopefully that should work, I have just tested this on my machine.

    Anyone have any issues, let me know, I will amend the howto