yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] pongster:
when I enter this: fastboot -c "" -b 0x11800000 flash:raw boot zImage initrd.gz

i get this:

fastboot -c "" -b 0x11800000 flash:raw boot zImage initrd.gz

usage: fastboot [ <option> ] <command>

commands:

update <filename> reflash device from update.zip

flashall flash boot + recovery + system

flash <partition> [ <filename> ] write a file to a flash partition

erase <partition> erase a flash partition

getvar <variable> display a bootloader variable

boot <kernel> [ <ramdisk> ] download and boot kernel

flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it

devices list all connected devices

reboot reboot device normally

reboot-bootloader reboot device into bootloader

options:

-w erase userdata and cache

-s <serial number> specify device serial number

-p <product> specify product name

-c <cmdline> override kernel commandline

-i <vendor id> specify a custom USB vendor id

what should I be doing instead?
[HD2 Android NAND Development] drewestate:
I'll let the OP say for sure, but, I'm pretty sure a new kernel patch is required as well to make this work properly, I tried the tytung r7 kernel that he just updated on the first page and the reboot recovery option worked fine, but when I tried your v5 kernel it no longer works.
[HD2 Android NAND Development] drewestate:
Not the case for everyone, using a TMOUS HD2 here and 1.3.2 works fine, sounds like time for task29 and a fresh download of the pertinent files to be safe.
[HD2 Android NAND Development] pongster:
will check the new patches out. :)
[HD2 Android NAND Development] pongster:
I tried "dry run" before applying the patch and it gave me this:

sar@CLX ~/Documents/HyperKernel/tytungs-hastarins-linux_on_wince_htc $ patch -p0 –dry-run < kernel_reboot_reason.patchpatching file –dry-run

Hunk #1 FAILED at 714.

1 out of 1 hunk FAILED -- saving rejects to file –dry-run.rej

How should I be applying the patch in this case?
[HD2 Android NAND Development] drewestate:
PPP Wrapper

Thought I would provide this as a suggestion for anyone having issues with ppp disconnects still. Most of the roms use Letama's .7 version of the wrapper. However I did some extensive testing when he was making improvements back in the SD days and the most stable data connections for me were with the .6 wrapper, not sure why but .6 works notably better for me, your results may vary but might be worth a try if your having issues.

Drop it in /system/lib/
[HD2 Android NAND Development] arif-ali:
Try -p1 rather than -p0
[HD2 Android NAND Development] arif-ali:
So, some thoughts on the /cache partition.

The rom manager I think uses /cache/recovery, so ...

Rather than all chefs make amendments to init.rc, the idea to use init.d scripts sounds good with bind mounts or symlinks. Below is the overview on what the script should do, I will try to implement and test today

check from /proc/mtd which uses the cache partition, and check if it is mounted

if mounted in /cache then exit

if not mounted then mount in /mnt/cache

check for existence of /cache/recovery folder, and its contents. Move anything to /mnt/cache/recovery. Create /cache/recovery if it doesn't exist

bind mount or symlink /mnt/cache/recovery to /cache/recovery

Let me know your ideas
[HD2 Android NAND Development] arif-ali:
So, I tried all types if reboot today and the only one that didn't work for me were the adb commands to recovery and bootloader. Anything specific required here cedesmith?
[HD2 Android NAND Development] pongster:
Same error.. will probably do it manually and test :)

Sounds like a plan. :) would we still be able to keep /cache at 5mb and mount it to /data/cache like I'm doing now?

I was using an unpatched kernel (have yet to patch mine for testing) so that's probably why my reboot in recovery didn't work properly. :)
[HD2 Android NAND Development] arif-ali:
Yes, that is the whole idea, to minimise the partition of cache so that userdata partition doesn't get affected too much, and able to utilise rom manager and big market downloads at the same time

I will test and report back
[HD2 Android NAND Development] Dominic83:
Hi Pongster,

by me the same result. I use the patched hyperkernel 5 some page back from here.
[HD2 Android NAND Development] JDM Civic EG8:
Quick question.. How do I get fastboot to work? I can run cwm perfectly and in rom can reboot into downloader but when im there i can't do anything.
[HD2 Android NAND Development] maff1989:
great work cedesmith! I've always admired your creativity when I was still running Droid from the SD. Although I won't be using your CLK v1.1, I'm sure many dev's will find a way to implement some God-knows tweak/enhancement to our HD2's with this bootloader. The possibilities continue to rise!!

On a separate note, I think you should port your Desire_HD2 to NAND. Why? Well, because it was simply awesome. NO OTHER BUILD is better, IMHO. Now, I'm no dev, but I'm sure it takes plenty of work to port an SD build to NAND, but I'm sure all of your fans will love you even more . You make my favorite builds, cedesmith. Keep up the amazing work!! :)

Btw, I realize I just added an unnecessary post, but where else would I put this? Q&A forum? please..
[HD2 Android NAND Development] john_matrix:
Hi Cedesmith!

Than you for your release!

It's nice to have an open source software to boot Android on NAND!
[HD2 Android NAND Development] brandi:
Hey, thank you for this awesome release!
[HD2 Android NAND Development] htc9420:
YES, we need the SD DHS ported to NAND

I've been following the nand development daily for the last months...and I've noticed there's no one to see that an LK based bootloader could be the SIMPLER solution to the freaky MAGDLR...I have work done in/on/for SDK, everybody knows Android's processor bootloader is derived from LK, so I've always wondered why they are stuck with a winCE loader instead of a linux one...

From what I saw on the last couple of weeks on IRC, I can tell you all that if Cedesmith wouldn't have told the others that he was close to releasing the LK, we were still stuck to SD versions....at least to say...that was on 28th dec....

so we should all thank Cedesmith for the DFT MAGDLR release, he DID in 3 days what took 5 months for others and I'm not saying that this was a simple job to do- the 5 months were essential as the kernel grew more stable, he did it because he chose, I think, the right way to do/adapt a bootloader that was available since 2009- a Linux one- designed open source for android and further developed by Qualcomm.

Great work, Cedesmith, this is the path every dev should follow.

Congratulations.

You released the untouched DHD with the right initrd-hence the wonderful speed of the build - and you released a native Linux bootloader for HD2. In ONE month. You changed the way twice.

Congratulations.

PS I almost forgot. In LK, the kernel shuts down and doesn't wake up for charging like in MAGDLR. You should be able to charge your phone while off.
[HD2 Android NAND Development] gunnroseclose:
That's why we ask for DHD NAND build from cedesmith.

So chef, please make our day :D:D:D
[HD2 Android NAND Development] g30rg10u:
cograzz man

u did it again! ;)
[HD2 Android NAND Development] g.lewarne:
To a point, I agree with you.

Dont get me wrong, I appreciate the amazing piece of work MAGLDR is and what it has allowed users and developers alike to achieve, and given that it all fits into 450 odd Kb is quite something. However, I agree with this post in respect that, perhaps, when DFT remained unchallenged (developmentally) everyone is somewhat at their mercy to their timescales and plans. Sometimes it takes a new, fresh idea, from someone "outside" to make people realise that they cannot always be the singular source of all things good, and to shake up any group or organisation to change their plans.

Perhaps the long delays from DFT were perhaps, in part to their wanting to release MAGLDR side by side with a working WP7 rom. This perhaps was a misunderstanding on their part, as the vast majority of users were screaming for NANDroid, and could not care less about WP7.

I too closely followed the IRC logs around the release date, and saw several posts on XDA by cedesmith and others hinting at his extremely rapid development of CLK and what it could achieve. Honestly, I was hoping that he would be able to "get to the finishing line" first, and if he had done so it would have been quite a coup, and i think things would be very, very different now.

Personally, however good MAGLDR is, i think it is vastly over featured and most of it is rather unnecessary - making it an inelegant solution. Why do we need Tetris in a bootloader? Why do we need USB Mass Storage in a bootloader? These "features" are just adding layers of complexity that are completely unnecessary to the core function of the program, and possibly introduce bugs and similar problems that are yet to be discovered.

"Months" of development, although evident, were almost certainly focused toward WP7 functionality, as evidenced by a critical bug in MAGLDR 1.10 (GOGOGO stuck) that really, really should have been spotted waaaaaay before general release. I think this is indicitive that as far as NANDroid was concerned, it was probably ready long long ago.

But i digress;

Cedesmith, i very very much look forward to you future developments on this, if i can be of any assistance at all please contact me!

But, please, dont forget those of us who adore non-sense android ;)

Gav
[HD2 Android NAND Development] dbshane:
How many colors can CLK show? 65k or 260k?:)
[HD2 Android NAND Development] htc9420:
...beside the fact that something wakes up the bootloader via ext power...and locks it....this would've been picked up also in testing....almost like the android location heartbeat issue, if only developers are using the MAGLDR, they can't spot things like that, you need to give them to the users for a real development...

as a wild guess,I would assume the MAGLDR was ready since the corruption was solved three months ago.

Now, there is a open source bootloader for anyone to use. Open source. So any dev can use it it.

Everything's changed again.
[HD2 Android NAND Development] singcheng:
downloading~
[HD2 Android NAND Development] 20mihalko:
if this is true, OS development on HD2 is starting to be a war.. dunno what can be better, maybe CLK now as it is native android (unix based) bootloader, but still don`t forget, maglrd can open WP7 development on HD2...
[HD2 Android NAND Development] VeEuzUKY:
+ 1 x 1000000000 :):):)
[HD2 Android NAND Development] 4D3:
nice! Rofl

mg
[HD2 Android NAND Development] 4D3:
Didnt want to quite the entire post but still +10000

MG
[HD2 Android NAND Development] corlygunnz:
Non-sense 1+

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

Device= HTC-HD2 (TMOUS)

Radio= 2.14.50.04

Nand= CM 6.1 (V.1.01a)

Data= RMNET
[HD2 Android NAND Development] hamdir:
if i understand correctly, this doesn't have the USB charging bug?

just give me a fully working DHD build, i will install it and never go back
[HD2 Android NAND Development] buzz killington:
Does CLK currently support booting directly from microsd?
[HD2 Android NAND Development] Unconn:
Love this. I will be trying it for sure. I like the idea of an Android bootloader. Fastboot flash recovery? Hell yeah!
[HD2 Android NAND Development] ZekeWolf:
I would love to se this bootloader together with Clockwork Mod.

And more devs releasing zip roms - the way every native Android phone upgrades.
[HD2 Android NAND Development] torquadon:
CLK archive seems to be damaged.
[HD2 Android NAND Development] arif-ali:
You need to run the fastboot commands from your pc while the phone is connected via usb
[HD2 Android NAND Development] JDM Civic EG8:
I clicked on fastboot on my pc and it ran a script really fast, then disappeard. im using the one from the folder you showed me earlier
[HD2 Android NAND Development] Dominic83:
You have to open cmd in the folder where you have the fastboot.exe and then you can use the fastboot commands at the cmd.
[HD2 Android NAND Development] arif-ali:
Fastboot is not an interactive application, where it will ask you questions.

First add it to your path, then run command prompt in windows and then you can run fastboot by typing fastboot.exe in the window with the relevant flags that have been specified in the first post. If again you just type fastboot.exe without any parameters it will show the help message, and the relevant flags that are possible.
[HD2 Android NAND Development] Blubster:
I jumped into the cLK bandwagon, and so far so good! It is so nice to have an HD2 that feels just like a real android device! ^^

I used Typhoon 2.6.3, and kernel from 3rd post, all flashed using latest CMR from seadersn. Then i restored my data, just the way it was with magldr. All feels brilliant, thank you everyone!!!

I am looking forward to using Rom Manager, as i was pleasentlty surprised to be able to reboot to recovery/fastboot from the rom itself... :)

I will report if i have any dropped PPP connection today... That's my only concern... ^^
[HD2 Android NAND Development] JDM Civic EG8:
Got it to work thanks guys now im going to install hyperdroid haha
[HD2 Android NAND Development] af974:
Press Shift and right-click in the folder where you have "fastboot" and open a command window here.

Type fastboot --help to see a list of commands.

Basically from here you can flash the recovery image :

fastboot flash recovery [I]name_of_recovery.img [/I]

or you can flash system, boot in the same way.

At the end type :

fastboot reboot

to reboot your phone, otherwise you need to pull out your battery.

You can also erase partition:

fastboot erase system

will erase system partition.

Forgot to say that your phone must be connected to your PC.
[HD2 Android NAND Development] pongster:
Quick update...

Manually patching the file worked and I'm able to reboot in recovery in HyperDroid...

Will post zip file for those that may want it as soon as I update my kernel post on my thread for GPL Compliance. :)
[HD2 Android NAND Development] Dominic83:
You´re the Best :)

Here is your Donation for HyperDroid v9 AND cLK Support

Ihre Spende ist nun abgeschlossen

Ihre Bestätigungsnummer lautet: 5HT55550TB835554U
[HD2 Android NAND Development] pongster:
Danke!? :) :)

Thanks again.
[HD2 Android NAND Development] seadersn:
nice german, maestro :) :D

i've had to patch the files manually too; there are "line differences" of roundabout 60 to 70 lines, which are causing this, i believe. (it's calling line 1117 for example, but the code to change is located at 1200). could this be the reason...?

but let's get a coffee first...
[HD2 Android NAND Development] arif-ali:
I patched my kernel without any problems using the patch command. So it seems that you guys might have extra/less code :)
[HD2 Android NAND Development] pongster:
when you did a dry run it gave no errors? whose source are you building from? :)
[HD2 Android NAND Development] arif-ali:
Here's the git source

branch test, still need to commit a few things, but that is what I am using

http://gitorious.org/~arif-ali/linux-on-wince-htc/aa-mdj-s
[HD2 Android NAND Development] ironheart:
First I want to thank Cedesmith for his great work done with cLK and also Arif-Ali and Seadersn for their impressive contributions!

For me - almost everythink works fine with cLK v1.3.2 (except CWM-Rommanager-support :p).

I'm using:

EU-HD2

SPL: HSPL 3.03

Bootloader: cLK v1.3.2 + 400Mb system partition

Build: Rafpigna-HD v4.01

Initrd: from Rafpigna-HD v4.01 (DHD v1.84 based)

Kernel: Arif-ali's AA v0.4

Recovery: Seadersn's CWM 3.0.1.4 v2

Installing Arif-Ali's AA v0.4 kernel togehter with Rafpigna's INITRD.gz gave me 2 issues:

(1) I had to manually hexedit the clk's partition layout because Arif-Ali's zImage + Rafpigna's INITRD.gz won't fit into the 5MB boot-partition (I had to change the boot-partition to 6MB, then it worked fine)

(2) After flashing the boot-&recovery-partition and applying Arif-Ali's kernel-ZIP via CWM i got stuck into fastboot-mode (probably bad "/boot"-flash via CWM?). I could fix that by manually reflashing the boot-partition via fastboot (fastboot -c "" -b 0x11800000 flash:raw boot zImage initrd.gz)

by now everything else worked fine including:

- powerdown coming from CWM-recovery

- reboot into recovery coming from CWM-recovery

- reboot into recovery coming from normal system

- reboot into fastboot coming from normal system

- restoring system via CWM 3.0.1.4

- restoring sd-ext via CWM 3.0.1.4

- everything else including phone, WIFI, PPP-data, charging, syncing (HTC, Google) etc.

If anyone is interested in using Rafpigna's build with cLK I can provide a quick how-to here (it can be done very easily).

I like Arif-Ali's kernel but I would like to use Lewarne's kernel again - for me it seems to be the fastest and most responsive one. Could anyone kindly patch his kernel with the latest patches cedesmith provided because Lewarne switched to DHD and isn't going to update his kernel anymore?

http://xdaforums.com/showthread.php?t=966786
[HD2 Android NAND Development] karendar:
Rockin'! You really are a beast, pongster... Love your work! ;)
[HD2 Android NAND Development] Satyan:
fastboot binary with -b

you are missing the binary with -b implementation, i had the same problem, i think i found somewhere this binary (aattached) should work on linux.
[HD2 Android NAND Development] pongster:
do you have one for mac? as I use that :)

Thanks
[HD2 Android NAND Development] Barlows:
So i've been testing my phone all day in my office with bad reception and as with the SD builds i'm getting alot of data drops :(

I have to keep turning airplane mode on/off
[HD2 Android NAND Development] pongster:
Found one in my build folder :)

Thanks.
[HD2 Android NAND Development] arif-ali:
cache init.d script

OK,

So I have a simple script that does the cache/recovery fix. Before anyone shouts, this is a simple script at the moment, and will continue to develop it with all the error checking and so on and so forth. At the moment, it only checks the fact if /cache is a symlink or not, and then does the rest. This is how it is in my ROM, and I think pongster's as well. If anyone else has it any different, then let me know, and I will make the necessary modifications.

02cache

I have just tested this, and this works for me. Let me know of any suggestions/comments, and if there is anything I else I can do.

things i can think of to check, will add more to this list as I get more feedback

check if cache is already mounted somewhere else

check to see if any of the directories conflict

create /cache and mount it there, if it doesn't exist
[HD2 Android NAND Development] karendar:
Doesn't seem to work for me. Does it have to be copied in init.d with the proper permissions?
[HD2 Android NAND Development] arif-ali:
so yes

chmod 750 02cache
chown 0.2000 02cache

is your /cache a symbolic link?

My suggestion is for debugging:

* copy the file

* change permissions

* run "df ; mount ; ls -l / ; ls -l /cache/ ; ls -l /cache/recovery"

* run the script (don't reboot) and list the output/error messages

* run "df ; mount ; ls -l / ; ls -l /cache/ ; ls -l /cache/recovery"

and send me the results. I will be able to diagnose from there
[HD2 Android NAND Development] karendar:
I think I'm missing something here. Does /cache have to be a symlink? As in moved to SD? Because my cache is a NAND partition. If it has to be symlinked, I can easily fix that... But I fail to see why it should be. ;) I'm such a n00b. :P
[HD2 Android NAND Development] arif-ali:
This script is for those people ho have /cache symlinked to somewhere else at the moment. The next step will be for users who have /cache as a directory and do al the checks.

for you ...

* check /proc/mtd, and check which block cache is on (in my case below it's on mtd4)

# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "misc"
mtd1: 00500000 00020000 "recovery"
mtd2: 00600000 00020000 "boot"
mtd3: 12c00000 00020000 "system"
mtd4: 00500000 00020000 "cache"
mtd5: 06800000 00020000 "userdata"

* check if the same one is mounted as /cache (in my case below is mounted at /mnt/cache)

# mount | grep mtdblock4
/dev/block/mtdblock4 on /mnt/cache type yaffs2 (rw,relatime)

* if it's the case /cache is mounted, then you only need to have /cache/recovery directory created using "mkdir /cache/recovery"

then you are all done
[HD2 Android NAND Development] karendar:
And... If it's not mounted?

I'm guessing I need the modified kernel that supports recovery, which I don't have... Ok, enough messing with this. Thanks for the information though! I appreciate your time!
[HD2 Android NAND Development] arif-ali:
then run the following commands

mkdir /cache
mount /dev/block/mtdblock4 /cache
chown 1000.2001 /cache
mkdir /cache/recovery
chown 1000.2001 /cache/recovery
chmod 0770 /cache/recovery

You need to have somewhere in your startup "mount /dev/block/mtdblock4 /cache", maybe have that in you 02cache script

Edit :

I have updated the script, hopefully should work for most possibilities. The other possibilities may not be working correctly, please report back

The link below again

02cache
[HD2 Android NAND Development] seadersn:
thanks, arif :) i'll test it and have a look.

so, for you rom manager is completely working now with this tweaks? you can for example say "install this zip and wipe dalvik-cache afterwards" with the corresponding menu points and it works?
[HD2 Android NAND Development] arif-ali:
So, yes

Using my rom, and my tweaks, I have been able to

reboot to recovery/fastboot from the normal reboot screen

reboot to recovery using rom manager

backup rom using rom manager (you can give you own name to it !!wicked!!, no more confusion)

Install Rom using rom manager

restore rom from backup using rom manager

adb reboot recovery works

adb reboot bootloader works (goes into fastboot)

The good thing about this is, that it automatically reboots after the operations. So do your stuff, leave your phone, wait about 10-15 mins, and you're back in the OS. very cool :p
[HD2 Android NAND Development] M..N:
All sounds good kinda making me want to move but ppp.
[HD2 Android NAND Development] Unconn:
Same here. This just keeps getting better though. As soon as data is more reliable(one protocol or the ) I will be back to stay. Maybe I will try that .6 wrapper posted a page or so back.
[HD2 Android NAND Development] pongster:
Nice one arif! Does using Rom manager replace seaders clk cwm when installed?

Sent from my HD2 powered by HyperDroidGBX
[HD2 Android NAND Development] wolfpack612:
this seems to be working really well for me thanks. i'm running clk1.3.2, cm7 nightly 0214, seader's cwm 3.0.1.4, applied cedesmith's patches to rafpigna 1.8oc_nosense kernel, and using pongster's initrd.gz. so far pretty smooth.

didn't replace it for me.
[HD2 Android NAND Development] karendar:
Just a head's up. If anyone uses IE to copy Arif-ali's code for 02cache, if you see &apos; inside the code, replace it with the apostrophe character ( ' )... Or use Firefox. ;) haha
[HD2 Android NAND Development] 2000impreza:
Rafpigna 1.8 kernel

Edit:

- Added zImage as a separate zip file.

- Added wifi supplicant. Thanks pongster for pointing this out.

Compiled from Rafpigna's git with no changes except the addition of clk patches from post 2. The initrd is from Tyween's build. I've only tested this on Typhoon cm7 build. Haven't tested on other builds.

Kernel info and source:

http://xdaforums.com/showthread.php?t=940823
[HD2 Android NAND Development] seadersn:
arif, i've copied over your script (without checking the mount points etc before, i just gave your init.d-script a shot) and it didn't work :( after that i've found out: pongster, your initrd.gz doesn't mount the cache partition :p but keep it as it is ;) here's my little workaround for this mini-issue:

mount the cache partition and create a bind of only the recovery folder into /cache folder. i've done this dirty with editing the 99complete init.d script, and it is working now :)

very nice :D

€dith: hmm, but wondering, why for wolfpack it worked...? maybe i've forgotten sth like permissions; i've thought, i did this...? :D i'm using modified cm7 from tyween, maybe this is the point.