FORUMS
Remove All Ads from XDA

[BUILD][18.11.2010] Desire Spot (new initrd, no rootfs, incremental updates)

270 posts
Thanks Meter: 464
 
By cedesmith, Retired Recognized Developer on 18th November 2010, 02:27 PM
Post Reply Email Thread
Desire Spot (clean) 2.0 based on HTC Desire 2.29
new initrd.gz, no rootfs, incremental updates


Features:
- cedesmith initrd ( see post 3 )
- no rootfs
- incremental updates
- based on desire 2.29
- spot clean, system.img is a exact dump of unyaffs (with permissions) to ext2, not 1 bit modified
- auto set apn ( update )
- everything should work
- great for understanding android on h2

Not working:
- 720p video recording
- rmnet

Notes:
- i don't want yet another build, i made this mainly for my own use and to show the power of my initrd and exemplify incremental updates options it offers
- i hope that chefs will like and use my initrd.gz and a update to X build will work on all builds ( or all builds based on same rom: ex: desire, cm6 )
- i think we relay need a unified update system for all builds especially with development soon forking between nand and sdcard builds
- this is for purists, the ones that have stock windows rom and reluctant to change
- tested on stock 3.14 rom

Included updates:
- update.kernel.linux-on-wince-htc.15.11.2010
- install.init.15.11.2010
- install.hd2_libs.15.11.2010
- install.ril_wrapper.15.11.2010
- update.camera.15.11.2010
- install.busybox.cm6.14.11.2010
- install.su.15.11.2010

Credits and big thanks:
- Cotulla, NetRipper, danij3l, Markius, Rajko, LeTama, gauner1986, Cass, hastarin
- anyone who worked on hd2 android port and i forgot to mention

Disclaimer:
- all this comes without any warranty not even that it does something useful
- IF YOU USE IT YOU DO IT ON YOUR OWN RISK

Download and install:
- desire_cs.7z 2.0
- update.initrd.gz.20.11.2010 ( fix reboots for cards formatted in windows )
- update.autoapn (only if you have a data plan)
- extract to desire_cs on card ( case sensitive )
Attached Thumbnails
Click image for larger version

Name:	cap1.jpg
Views:	3632
Size:	39.6 KB
ID:	443921   Click image for larger version

Name:	cap2.jpg
Views:	4058
Size:	42.3 KB
ID:	443922  
The Following 2 Users Say Thank You to cedesmith For This Useful Post: [ View ] Gift cedesmith Ad-Free
 
 
18th November 2010, 02:28 PM |#2  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
More
Updates
Download updates you want/need and extract on desire_cs directory on sdcard

Mandatory updates:
- update.initrd.gz.20.11.2010 fix reboot at startup

Optional updates:
- update.kernel.hastarin_8.5_eb.23.11.2010 (thanks vartp )
- update.kernel.hastarin_8.5.23.11.2010 (thanks vartp )
- fingerprint.19.11.2010 restore default desire fingerprint if you have problem with marketplace
- evo_keyboard.19.11.2010 (thanks vartp, see post )
- kernel hastarin_8.4_eb.18.11.2010 (extended battery)
- kernel hastarin_8.4_18.11.2010
- autoapn auto set apn

Read readme in archive, keep readme folder to record what you have installed and what version.

Attached updates in this post except autoapn are included in build
Dev info:
- install.init.15.11.2010 is the only mandatory update to install, your build will not boot without it
The Following User Says Thank You to cedesmith For This Useful Post: [ View ] Gift cedesmith Ad-Free
18th November 2010, 02:28 PM |#3  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
More
initrd.gz
Description:
- I build my initrd.gz mainly to allow updated and to be more like android phones boot process.
- It contains the directory structure of boot.img from desire 2.29 + /bin directory
- /bin contains a small busybox (with necessary commands to booth the phone ) + dosfsck + e2fsck all compiled with android toolchain and uClibc.
- It supports different partition on sdcard for system and data but probably nobody will use that.
- It only supports ext2 (for now) but i think nobody used anything else for hd2
- it is backward compatible (common cases)

Boot process:
- mounts sd card to /mnt/sdcard_boot not to interfere with android mount points
- checks and mounts /system and /data
- copy init.rc, init.htcleo.rc, default.prop, bootcomplete.htcleo.rc, shutdown.htcleo.rc ( blanks ) to /system if they don't exist
-- this is done to allow persist as / is ramfs
- execute uninstal*.sh then install*.sh in update directory
- copy AndroidApps and root as previous versions did
- execute update*.sh in update directory
- execute /system/init*.sh to perform build specific init tasks ( this can be installed by previous operations )
- symlink ( and creates dir ) /cache to /data/.cache if /cache not configured by build /system/init*.sh
- deletes /bin directory to free ram used by ramfs for busybox, dosfsck and e2fsck
- executes init.android - original android init program
- someware in process moves /sbin/adbd to /system/xbin/adbd and creates sysmlink in /sbin to free ram

Notes:
- if you create a install/update script please include readme file
- if you create a install/update script use a proper editor (notepad++) and convert file to unix format, line endings in dos format \r\n will brake sh
18th November 2010, 02:29 PM |#4  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
More
------ reserved -------
18th November 2010, 02:31 PM |#5  
Senior Member
Flag 苍城
Thanks Meter: 15
 
More
Post
thanks for your great work
18th November 2010, 02:31 PM |#6  
Senior Member
Flag Melbourne
Thanks Meter: 607
 
More
Sounds interesting. I look forward to reading more about it.

Sent from my HTC HD2
18th November 2010, 02:42 PM |#7  
pack21's Avatar
Senior Member
Thanks Meter: 207
 
More
Thanks,

We always appreciate fresh blood.

18th November 2010, 02:51 PM |#8  
jubeh's Avatar
Senior Member
Thanks Meter: 20
 
More
I don't know how much this, if any, is based on the work of zegobit (who eventually got copied by shui8), but I'm very interested in this.
Coming from an android-on-Dream background, I've always thought of the rootfs as unecessary, and seeing how zegobit's initrd handled updates, I always thought that his way of doing things was the best (the rootfs used on most builds now came from the XDAndroid project which is made to support as many devices as necessary, something of a waste if you're building only for Leo).

You say your ext2 is just a re-packed, unyaffs'd image of the Desire rom, if so, are your leo-specific files stored in the initrd?
How will you handle updates?
And, this is for my learning, how is it you handle mounting and booting from SD. I'm trying to come up with an initrd that can be used to make an AOSP vendor that will produce a ramfs and an ext2 image that can be booted on Leo with little or no modification.
Any pointers you could give me.

In the mean time, I'm trying, and this might be, my main build.
18th November 2010, 03:20 PM |#9  
jubeh's Avatar
Senior Member
Thanks Meter: 20
 
More
Wow, very well documented. Kudos. Favortie build starting now.
18th November 2010, 03:29 PM |#10  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
More
Quote:
Originally Posted by jubeh

I don't know how much this, if any, is based on the work of zegobit (who eventually got copied by shui8), but I'm very interested in this.

and i thought i was completely original
unfortunately i did not see zegobit's work before, things might been easier.
on the other hand the most tricky part was compiling busybox 1.17.3, dosfsck and e2fsck with google toolchain ( well with codesourcery too but it produces 50% bigger exe )

Quote:
Originally Posted by jubeh

Coming from an android-on-Dream background, I've always thought of the rootfs as unecessary, and seeing how zegobit's initrd handled updates, I always thought that his way of doing things was the best (the rootfs used on most builds now came from the XDAndroid project which is made to support as many devices as necessary, something of a waste if you're building only for Leo).

this should work on any device also as long it works with cortex-a8 compiler optimizations and rename the init.htcleo.rc bootcomplete.htcleo.rc and shutdown.htcleo.rc as this are device dependent.
extracting initrd is simple: gzip -d -c initrd.gz | cpio
remaking: find . | cpio -o -H newc | gzip > ../initrd.gz
remember to do it on linux to preserve permissions
but ppl plz don't go rampage and make your own just because you can


i think they went rootfs because the utilities needed to boot are big ( 4mb old initrd and ~16MB rootfs ) and initrd uses ram for storage vs rootfs witch is on sd
i decided to make initrd after i got the tools to ~500Kb and read that memory is freed after file delete ( that is why i delete /bin directory when no longer needed ).


Quote:
Originally Posted by jubeh

You say your ext2 is just a re-packed, unyaffs'd image of the Desire rom, if so, are your leo-specific files stored in the initrd?
How will you handle updates?
And, this is for my learning, how is it you handle mounting and booting from SD. I'm trying to come up with an initrd that can be used to make an AOSP vendor that will produce a ramfs and an ext2 image that can be booted on Leo with little or no modification.
Any pointers you could give me.

In the mean time, I'm trying, and this might be, my main build.

blank init files are in initrd that is why install.init is only required update/ package
blank files also allows for this to work with CM6 builds
also all my install/update script edit files with sed not just drop file on /system

edit: install.init contains desire boot.img init files unedited (renamed .bravo.=>.htcleo. tho), install sh script does the editing. this way is crystal clear what is modified.

oh not to forget... : do not sed -i 's///' /init.rc and co, sed creates files and breaks symlink, your changes will revert after reboot. use sed -i 's///' /system/init.rc
18th November 2010, 04:36 PM |#11  
jubeh's Avatar
Senior Member
Thanks Meter: 20
 
More
I got robot voice on T-MOUS 3.14 rom. All else works wonderfully.

--edit---
ah, nevermind. A reboot fixed the problem. Perfect.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes