FORUMS
Remove All Ads from XDA

[unofficial][linux3.0][native][tarchive][experimental] ArchLinuxARM for HTC HD2

211 posts
Thanks Meter: 340
 
Post Reply Email Thread
ArchLinuxARM for the leo (HTC HD2) - Native Boot
This is only tested with MAGLDR 1.13 on the T-Mobile US HD2, though there's no reason it shouldn't work on a global one, as NAND isn't touched.

Working:
Wi-Fi (with NetworkManager)

Not Working:
Bluetooth
2D & 3D Acceleration (though kgsl and freedreno drivers are in use, the userland isn't patched/installed/tested yet)
Audio

Installation (to the third partition of the SD card)
This procedure is intended only for advanced users. By providing a 6GB F2FS image, the system will boot reasonably quickly and not run out of space, however, it can't be stored as a file on the internal memory - it has to be a partition of its own because of the FAT32 filesize limit of 4GB.

You will need at least 3 MBR primary partitions on the SD card. The third one must be 6GB or larger. Since F2FS volumes can't yet be resized, any space above 6GB on that partition is useless. When this scheme is created, gunzip the provided root.img.gz and write it to the 3rd partition. Then, make the first FAT32 (if it isn't already), make a directory in root of the FAT32, and put the the linux kernel zImage.


Booting
Select the directory you created as the Android SD directory in MAGLDR and boot the system. There will be no console, and you will get a jumbled screen during boot. Eventually, lightdm will start up and you will be on your way.

Logging in
  • The username is "arch" and the password is "arch". Change the password ASAP.
  • For root, the username is "root" and the password is also "root". CHANGE THE PASSWORD ASAP!
  • You'll probably want to enable the On-Screen Keyboard (onboard) and set your Session to "MATE" up in the top right corner.
  • You can try to get reroute audio by modprobing "snd-mix-htc-leo" and setting the mixer settings. The system wasn't set to do this at each boot due to serious issues with the concept of copying a 2.6.32 alsa driver into 3.0 and just compiling - it barely works and has a huge propensity to hang during load.

Read Me
I realize this will be difficult to install for most users. I did not provide commands because I don't want anyone wiping and formatting the wrong disk. Eventually, I'll implement a way to make this installable via image. The initramfs issues with the kernel I'm using will first have to be investigated, and then the ext4 issues will. Since Arch Linux uses systemd, I can barely get it to boot with kernel = 3.0, let alone 2.6.32. All my other ports use 3.4, which already requires patches to work after the introduction of udevd version 217.

Downloads
root filesystem image compressed with gzip: https://drive.google.com/file/d/0B4W...ew?usp=sharing
3.0.101 kernel (thank you to maniacx at github for initially sharing the source): https://drive.google.com/file/d/0B4W...ew?usp=sharing

Kernel Source: https://github.com/willcast/kernel_leo

Also available for:
Nexus 7 2013 (flo): http://forum.xda-developers.com/nexu...-2013-t2969301
HP TouchPad: http://forum.xda-developers.com/hp-t...se-hp-t2969310
Nexus 10: http://forum.xda-developers.com/nexu...us-10-t2969450
Samsung Galaxy S III LTE: http://forum.xda-developers.com/gala...lease-t2969290
The Following 9 Users Say Thank You to castrwilliam For This Useful Post: [ View ] Gift castrwilliam Ad-Free
 
 
12th December 2014, 03:04 PM |#2  
Senior Member
Thanks Meter: 489
 
More
This phone just won't die.

This is what? The 20th OS to run on the HD2?
14th December 2014, 11:52 AM |#3  
hitman1376's Avatar
Senior Member
Flag zanjan
Thanks Meter: 425
 
Donate to Me
More
Question Hi There Dear friend ...
Hi there Dear @castrwilliam were looking for an OS for my HD2 to use it through Mouse and KB ( USB Host ) is there anyway I can get any os on My HD2 using them ? ( because mine's TS is broken and doesn't work ) ... Thanks in advance

With Best Wishes
Hitman1376
14th December 2014, 03:52 PM |#4  
OTG *should* work on this with external power. Bluetooth most likely does not. Do you have an SD card with a 6GiB third partition?
15th December 2014, 11:18 AM |#5  
hitman1376's Avatar
Senior Member
Flag zanjan
Thanks Meter: 425
 
Donate to Me
More
Question Sure ...
Quote:
Originally Posted by castrwilliam

OTG *should* work on this with external power. Bluetooth most likely does not. Do you have an SD card with a 6GiB third partition?

I have an 8 GB SDcard ... with external power ? How ? ... Thank in advance

With Best Wishes
Hitman1376
16th December 2014, 07:35 PM |#6  
gilbert32's Avatar
Senior Member
Flag In the universe
Thanks Meter: 1,414
 
More
@castrwilliam
Great job!i will download, resize mmc, install, try...
whatever issues you are facing, post them, maybe i can help after squeezing some free time
The Following 3 Users Say Thank You to gilbert32 For This Useful Post: [ View ] Gift gilbert32 Ad-Free
17th December 2014, 05:27 PM |#7  
Main things are issues on the kernel.

When you try to boot with an initramfs that is compressed, you get either "garbage in compressed da" rand the kernel hangs right then - presumably before it even finishes that printk - or "unknown compression algorithm: " and then vorrupted garbage is output. This prevents me from making image boot doable.

I had this problem a long time ago with GCC 4.9 on a 3.4 flo kernel, but I've tried major versions of 4.6 through 4.9 and none get any further. Also, there's a commit upwards of mine that changed the kernel config from using ARM_UNWIND to FRAME_POINTER for debugging. I tried with each.

Also, when you boot with an ext4 rootfs on mmc, any attempt to write to root gets you an Invalid Argument, when the FS is mounted rw... very strange, but somehow I have a feeling it has to do with systemd trying to do something unsupported/untested on 3.0.x midway through boot, and f2fs lets it work either because it doesn't support it anyway, or because f2fs was backported - possibly with features that aren't in the ext4 driver already.
17th December 2014, 10:59 PM |#8  
gilbert32's Avatar
Senior Member
Flag In the universe
Thanks Meter: 1,414
 
More
Quote:
Originally Posted by castrwilliam

Main things are issues on the kernel.

When you try to boot with an initramfs that is compressed, you get either "garbage in compressed da" rand the kernel hangs right then - presumably before it even finishes that printk - or "unknown compression algorithm: " and then vorrupted garbage is output. This prevents me from making image boot doable.

regarding initramfs, we have problems with magldr and 3.0.x kernels, that needs a workaround.
there's a patch for kernel (which you probably have already) for magldr boot, where you need to add 6mb of 00's to initrd.gz (not sure if for initramfs too) in order to boot on magldr

more explained: https://github.com/Gilbert32/android...a37ba521fa70a9
The Following 2 Users Say Thank You to gilbert32 For This Useful Post: [ View ] Gift gilbert32 Ad-Free
31st December 2014, 01:06 AM |#9  
Robbie P's Avatar
Senior Member
Flag London
Thanks Meter: 3,899
 
More
wondering why the 3rd partition is not itself formatted to f2fs? It can be done from an f2fs sd recovery.
25th January 2015, 11:38 PM |#10  
Robbie P's Avatar
Senior Member
Flag London
Thanks Meter: 3,899
 
More
I can't get this to boot from magldr, I have ~3gb fat32 p1, ~4gb ext4 p2 and 6.4gb ext4 p3
It reboots within about 6 seconds after showing white stripes on screen (just as with boot attempts using 3.0 kernels without the 6mb of zeros in initrd.gz)
I get the attached dmesg
Edit; tried making a file with 6mb of zeros called initrd.gz and putting it in the boot folder on sdcard, but the same thing happens.
Attached Files
File Type: txt DMESG.TXT - [Click for QR Code] (30.9 KB, 22 views)
26th January 2015, 01:27 PM |#11  
Robbie P's Avatar
Senior Member
Flag London
Thanks Meter: 3,899
 
More
Quote:
Originally Posted by feherneoh

For me it works with both MAGLDR and cLK
But for cLK I have to do a liveboot from PC using fastboot

EDIT:
Why are you using EXT4 on mmcblk0p3? Seems like that is the problem, as as far as I know f2fs can only be mounted with fs type defined, so probably it will only accept an f2fs partition as root

I just assumed it would be ext4 with an f2fs image, no wonder no replies to my first post
will try it with f2fs partition when I have time, thanks
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