Hey, I sucesfully booted froyo from nand (my sd version release). It booting, initrd is dirty packed (wifi not working - can not load dongle firmware - not understand why... say error) but it booting! Our release is for guys who want to play again with Froyo version! Lk bootloader is also recocfigured and included in attachment (system partition is ~270mb needed for our version) so you need to flash lk first! Touch recovery (fixed and stable now) is also included in archive. Kernel 2.6.35 is from derefas repo with a lot of my changes (patch for kernel is included in archive) including some changes with adsp queues that I can not able to test becouse wifi can not working. If you fix wifi than we will test it! Fill free to give your comment!
froyo.2.2_nand.zip
I love sense version
i love sense, but 2.2 froyo is old. is it possible to port gingerbread 2.3.3 with sense to hd mini?
Thanks! Glad to finally see sense!
Hope you can get rid of the bugs
for 2.2 with 2.6.35 we need to use 204 firmware and bcm4329 driver, or try to use firmware from cm7
munjeni,thanks for uploade froyo.but i cant download from your sites that uploaded.
please uploade from mediafire.thanks
munjeni why you don't use acoustic system for wince by schlund? without this phone reboot when play sound in nand
bt and wifi need to fix initrd
I think I found problem for bluetooth and wifi:
Code:
/system/bin/brcm_patchram_plus
open(/sys/module/board_photon/parameters/bdaddr) failed: No such file or directory
ls:
Code:
ls /sys/module/board_photon
parameters
# ls /sys/module/board_photon/parameters
ls /sys/module/board_photon/parameters
bdaddress
bt_fw_version
bt_chip_id
#
derefas said:
munjeni why you don't use acoustic system for wince by schlund? without this phone reboot when play sound in nand
bt and wifi need to fix initrd
Click to expand...
Click to collapse
I using your kernel. Your kernel have schlund acoustic system?
BT FIX
init.photon.rc
service hciattach /system/bin/brcm_patchram_plus --enable_hci \
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
user bluetooth
group bluetooth net_bt_admin
disabled
Click to expand...
Click to collapse
to
service btld /system/bin/logwrapper /system/bin/btld -lpm 1 -hb 3000000
user root
group bluetooth net_bt_admin
disabled
oneshot
Click to expand...
Click to collapse
WIFI FIX:
use bcm4329 204 module from 2.6.32
Ok, but what about audio system? Your kernel have ported schlund audio?
use schlund kernel
github.com/schlund
about system side , i ported it, will upload later with wifi,bt fix
Code:
#ifndef CONFIG_SERIAL_MSM_HS_PURE_ANDROID
/* for bcm */
static char bdaddress[20];
extern unsigned char *get_bt_bd_ram(void);
static void bt_export_bd_address(void)
{
unsigned char cTemp[6];
memcpy(cTemp, get_bt_bd_ram(), 6);
sprintf(bdaddress, "%02x:%02x:%02x:%02x:%02x:%02x",
cTemp[0], cTemp[1], cTemp[2], cTemp[3], cTemp[4], cTemp[5]);
printk(KERN_INFO "YoYo--BD_ADDRESS=%s\n", bdaddress);
}
module_param_string(bdaddress, bdaddress, sizeof(bdaddress), S_IWUSR | S_IRUGO);
MODULE_PARM_DESC(bdaddress, "BT MAC ADDRESS");
#endif
What about if I change bdaddress to bdaddr? brcm_patchram_plus need path bdaddr instead of bdaddress!
munjeni did you fix the wifi and call echo problem. and I hope battery drain is fixed. if you say yes I will be load your nand version.
Derefas, I ported old wifi driver but again same problem with "dhdsdio_download_nvram: error reading nvram file: 0", maybe you know why?
Blutooth is fixed!
Problem with audio is located (I comented that line so its reason why audio reboot phone) in board_photon.c: //htc_acoustic_wce_board_data = &htcphoton_acoustic_data; becouse in struct:
Code:
static struct htc_acoustic_wce_board_data htcphoton_acoustic_data = {
.set_headset_amp = photon_headset_amp,
};
photon_headset_amp is not defined corectly!!! Function for photon_headset_amp is defined:
Code:
void photon_headset_amp(int enabled)
{
if (enabled)
{
/* Power up headphone amp */
gpio_configure(PHOTON_GPIO_HEADSET_AMP, GPIOF_DRIVE_OUTPUT | GPIOF_OUTPUT_HIGH);
msleep(30);
gpio_set_value(PHOTON_GPIO_HEADSET_AMP, 1);
} else {
/* Power down headphone amp */
gpio_configure(PHOTON_GPIO_HEADSET_AMP, GPIOF_DRIVE_OUTPUT | GPIOF_OUTPUT_LOW);
msleep(30);
gpio_set_value(PHOTON_GPIO_HEADSET_AMP, 0);
}
}
Did you see there something strange? I see: if we call "photon_headset_amp" without an argument "int enable" it mean we caled it like photon_headset_amp(0) so it mean we called /* Power down headphone amp */
EDIT:
ok, problem for wifi is not bcm4329, problem for wifi is: nvram error in dmesg is error about /proc/calibration becouse calibration data not exist! But why htc_wifi_nvs nand not working? Is there new wifi_nvs driver that is not pushed to github?
munjeni please uplode nand froyo 2.2 from mediafire,because i
When I fix audio and wifi I will upload new version!
EDIT:
wifi fixed! With smartass2+bfk (245-806mhz) its abnormally fast only need to fix audio becouse android reboot when receive any audio signal! Who want to try here is new boot.img, just open zip and replace boot.img with boot.img and replace modules in /system/lib/modules with modules in archive, replace updater-script in /META-INF/com/google/android/ with updater-script from archive. Please let me know how it working to you, I have aria so I could not test keypad buttons becouse its diferent than photon and not working for me.
thanks munjeni,
is cut screen in this froyo fixed?
Thank you Munjeni, but how can I get into fastboot?
youkid90 said:
Thank you Munjeni, but how can I get into fastboot?
Click to expand...
Click to collapse
Power device, wait lk screen, that press volume down
всем привет это прошивка андройд 2.2 ? с htc sense ? и как ее установить напишите плиз
Related
Here's the thread for tech details. No questions in this thread, please.
My input:
Rooting the Rogers Dream
Download the tools required
Extract to anywhere on your computer.
Place update.zip on the root of your sd card.
Reboot the device into SPL (power off, hold camera button, boot, press "back" or "send" [check prompt on device] to enter "FASTBOOT" instead of "HBOOT")
Code:
fastboot boot recovery.img
Apply update, wait until phone idles, press HOME+BACK, it will reboot, finish writing hboot, then reboot again into recovery by itself. Do not interrupt it at all until it's done.
HOME+BACK to reboot into regular device.
Power off, hold camera, boot, go back into FASTBOOT
Code:
fastboot flash recovery recovery.img
Code:
fastboot flash boot boot.img
Code:
fastboot reboot
that's it!
Rooting the HTC Magic / Sapphire: http://android-dls.com/wiki/index.php?title=Magic_Rooting
Developer notes (for devs and rom builders):
Dev's (cyanogen, i'm looking at you [you requested this info ]) you can download my hacked up mkbootimg and some other tools here: http://www.mediafire.com/?njl4x5ozldm
these are all baked up by me in a flurry of rush and etc, so excuse the sloppiness
You will have 2 tools to use now, compileboot and compilebootmagic.
compileboot creates a regular g1 boot img (and the vodafone magic as well supports these old boot locations)
compilebootmagic has 2 options.
compilebootmagic -1 will create an image supported by the HTC Dream (rogers), all new magic devices, and most likely the hero and etc (these new locations are based on ram size pretty much)
compilebootmagic -2 will create an image with user supplied arguments (it says dream but disregard it, i made it before finding out the new codes matched -1)
Discovering new boot locations!
This is a fun (and easy) bit.
Just grab a boot.img from the device you'd like to learn about, and follow the chart below:
Code:
0xf-0xc (backwards): kernel addr
0x17-0x14 (backwards): ramdisk addr
0x1f-0x1c (backwards): second addr
0x23-0x20 (backwards): tags addr
you can also use this script (linux users):
Code:
#!/usr/bin/php
<?php
function bootloc($file) {
$handle = fopen($file, 'rb');
$data = stream_get_contents($handle);
fclose($handle);
$text = "";
for($a = 0; $a < 8; $a++) {
$text .= $data[$a];
}
if($text == "ANDROID!") {
$out = sprintf("Kernel addr : 0x%02x%02x%02x%02x", ord($data[hexdec('f')]), ord($data[hexdec('e')]), ord($data[hexdec('d')]), ord($data[hexdec('c')]))."\n";
$out .= sprintf("Ramdisk addr: 0x%02x%02x%02x%02x", ord($data[hexdec('17')]), ord($data[hexdec('16')]), ord($data[hexdec('15')]), ord($data[hexdec('14')]))."\n";
$out .= sprintf("Second addr : 0x%02x%02x%02x%02x", ord($data[hexdec('1f')]), ord($data[hexdec('1e')]), ord($data[hexdec('1d')]), ord($data[hexdec('1c')]))."\n";
$out .= sprintf("tags addr : 0x%02x%02x%02x%02x", ord($data[hexdec('23')]), ord($data[hexdec('22')]), ord($data[hexdec('21')]), ord($data[hexdec('20')]))."\n";
return $out;
} else {
return false;
}
}
if($argc < 2) {
echo "Usage:\n";
echo $argv[0]." <img file/s>\n";
echo "example:\n";
echo $argv[0]." boot.img boot-new.img recovery.img recovery-new.img\n";
} else {
for($a = 1; $a < $argc; $a++) {
$out = bootloc($argv[$a]);
if($out) {
echo $argv[$a],":\n";
echo $out;
} else {
echo $argv[$a]," is not a boot/recovery img!\n";
}
}
}
usage: bootlocations.php <boot.img, more than one can be supplied>
example: bootlocations.php boot.img boot-new.img
NOTE: i will try to keep adding to this until it's full. any information that isn't in here, feel free to request via pm.
Reserved for future postings
Once again, great work Haykuro
Okay, I see the trickery now.
Thanks for this info, I'll build a version of CM for Rogers later
Another thing.. Does this device use the same libhtc_ril.so as the G1 ROM and/or does it need different RIL properties in build.prop? I am thinking it does because of the different radio, but I've only seen G1 "ports" of the ROM.
cyanogen said:
Another thing.. Does this device use the same libhtc_ril.so as the G1 ROM and/or does it need different RIL properties in build.prop? I am thinking it does because of the different radio, but I've only seen G1 "ports" of the ROM.
Click to expand...
Click to collapse
lol the g1 ports of the rom never changed the lib much (if not at all [do an md5sum ;P])
the phone is practically identical to ours, aside some physical things (crystals, etc)
thx for the tools
cheers
Thanks again Haykuro! This is great information.
thank you for this! Hopefully intructions on how to root the mytouch will come soon!
Tried to make a version of CM-3.6 for the Rogers Dream and it isn't booting according to the testers.. Doesn't even get adbd started.
I set the boot.img up properly.
Code:
Kernel addr : 0x19208000
Ramdisk addr: 0x1a200000
Second addr : 0x1a100000
tags addr : 0x19200100
Something else has to be different, or that device hates my kernel.
EDIT:
Haykuro sent me the kernel config from a running Dream device, and there are some options enabled in it that aren't part of any Linux kernel.
CONFIG_MSM_AMSS_SUPPORT_256MB_EBI1=y
CONFIG_CPU_FREQ_GOV_MSM7K=y
So we are going to need whatever they patched in to be able to build custom kernels. Interestingly, the device is also using cpufreq settings of 384MHz/528MHz by default.
Great job haykuro, but ive been hearing reports that you cannot flash any rom (only rogers based roms) Any news on this? Thanks again!
I commend your turn around, Steve, and am quite impressed.
cyanogen said:
EDIT:
Haykuro sent me the kernel config from a running Dream device, and there are some options enabled in it that aren't part of any Linux kernel.
CONFIG_MSM_AMSS_SUPPORT_256MB_EBI1=y
CONFIG_CPU_FREQ_GOV_MSM7K=y
So we are going to need whatever they patched in to be able to build custom kernels. Interestingly, the device is also using cpufreq settings of 384MHz/528MHz by default.
Click to expand...
Click to collapse
That is my stumbling block too. It's not just those two options, config diff is quite significant. I've sent a couple of emails to htc kernel devs a few weeks ago, but got no response. HTC must release the patched source, though, to comply with GPL2. I'm not sure what's be the best way to persuade them to.
Can't ender code in SPL
Once I boot into SPL how do I enter the code. nothing happens when I press the keys on my keyboard.
stongest said:
Once I boot into SPL how do I enter the code. nothing happens when I press the keys on my keyboard.
Click to expand...
Click to collapse
Wow this was pretty dead and you just revived it from its slumber among the dead.
Theres no code to enter
You have to install once you get a custom rec.
Ace42 said:
Wow this was pretty dead and you just revived it from its slumber among the dead.
Theres no code to enter
You have to install once you get a custom rec.
Click to expand...
Click to collapse
At least he searched for it
stongest said:
Once I boot into SPL how do I enter the code. nothing happens when I press the keys on my keyboard.
Click to expand...
Click to collapse
through adb
ok.. I am getting closer to understanding this!
But, still no luck.
I downloaded this file
http://sapphire-port-dream.googlecode.com/files/spl-signed.zip
then saved it to my SD card and renamed it to update.zip
Then I do this
Reboot the device into SPL (power off, hold camera button, boot, press "back" or "send" [check prompt on device] to enter "FASTBOOT" instead of "HBOOT")
and nothing happens.. any ideas?
You install .zip things like that, like the SPL and new roms in the recovery mode, not bootloader. You'll start up with home + power to get to that.
However, given that you don't know this yet, I'd spend a *lot* more time getting comfortable with the whole flashing roms/messing with your phone stuff before installing that SPL, that's a pretty good way to brick your phone if you don't know a bit more about what you're doing.
Sorry for necro posting, i'm new to the whole rooting thing. My phone info is:
Firmware: 1.5
Baseband Version: 62.59S.20.23U_3.22.26.17
Kernel Version: 2.6.27-d5acf552
Build Number: 1.89.631.1 146733 CL#94714
I have a rogers HTC dream for Canada.
What files do i exactly need, and once acquiring them I just follow the instructions in the first post?
CM6 for Huawei U8120
This is an unofficial port of cm6 (froyo) for huawei u8120 (vodafone joy/845).
It may work on u8100/u8110 models but I dont know because I havent any of these devices.
I would like to make it clear that this is an unofficial cm6 port, it is not fully tested
and it has some bugs.Its still under development and NOT for daily use.Only for bug fixing/testing.
If all bugs get fixed we can try to make it official.I work also on a
cm7(gingerbread) port with quite a success so far, but it has more mayor bugs than cm6 port.I will create
the corresponding thread for cm7 port when it reaches a usable state.
Any help it would be great.Some of the bugs are common in froyo and cm7 port.So if
they are fixed on one port it may be fixed on the others to.
Kernel: kalt kaffe's 2.6.29
Jit enabled
Android : 2.2.1 / CM6.2
Working:
RIL
Audio - not so good volume states.Too low.
Bluetooth
Wifi
TSCalibration - use it with a pen/stick
Bugs/Not working:
Camera can take pictures.Still to fix : b/w preview and video record crashes on stop
SDCard mount via notification bar
Broken layout in dialer FIXED
Key lights FIXED
Missing AGPS
Missing FM
For any bugs you find please provide a logcat output if you can.
Build instructions on git.
Releases:
v.0.2 Fixed lights,use libloc api, add boot splash image
v.0.1. Initial Build
Im not responsible for any damage that this software may cause on your device.Dont expect support.
gapps
github
gonna test it and report any bug. thanks
i'm in finished with car gona test after work
Nice Any idea what wrong with camera?
bitye said:
Nice Any idea what wrong with camera?
Click to expand...
Click to collapse
The same reason as the other ports.I have built it without camera support
Actually I will get to the camera problem after the sdcard bug.I think that its more important.I may have fixed the key lights.Im going to test it later because now Im working.
What you know, Camera, SD Card mount on PC, and I found an other, phone can't recognize my SD when ext2 available on that. I formated to fat only now works. Dialer layout broken, wifi and Bluetooth OK, Calibration ok, dpad ok.
bitye said:
What you know, Camera, SD Card mount on PC, and I found an other, phone can't recognize my SD when ext2 available on that. I formated to fat only now works. Dialer layout broken, wifi and Bluetooth OK, Calibration ok, dpad ok.
Click to expand...
Click to collapse
How about the mac-adress?
And plz make the CM7 Treath fast so we can See you fixes and help you.
thx
I have no problem with audio volumes
Sensors not working
Can you upload cm7?
CM7 is not in a functional state right now so I will not make a thread/upload the configs.Also I'm sure that the're going to be roms based
on it as soon as possible
And I don't think that's right.
Please let me explain my opinion:
Take for example the cm6 port.
The cm6 port is not fully tested (I have run it for just a day or two and I haven't tested all the provided features).
So if cedric123 or bitye or any other guy, that is cooking roms (very good roms to be honest) ,
provide roms based on the cm6 port (as already have ) then we will have this situation:
+ the number of users/testers will grow (that's good because bugs and possible fixes are discovered more quickly)
- because of the already known bugs and the undocumented ones, many users, who have not the experience/knowledge
of the rom state and the whole procedure,will get disappointed and frustrated about cyanogenmod.So this is bad and
unfair for the cm team because they are doing an awesome job.
That's the reason I'm providing only img files and not a complete rom zip.To avoid unexperienced users
To make it clear that's just my opinion/point of view.
tas0s said:
CM7 is not in a functional state right now so I will not make a thread/upload the configs.Also I'm sure that the're going to be roms based
on it as soon as possible
And I don't think that's right.
Please let me explain my opinion:
Take for example the cm6 port.
The cm6 port is not fully tested (I have run it for just a day or two and I haven't tested all the provided features).
So if cedric123 or bitye or any other guy, that is cooking roms (very good roms to be honest) ,
provide roms based on the cm6 port (as already have ) then we will have this situation:
+ the number of users/testers will grow (that's good because bugs and possible fixes are discovered more quickly)
- because of the already known bugs and the undocumented ones, many users, who have not the experience/knowledge
of the rom state and the whole procedure,will get disappointed and frustrated about cyanogenmod.So this is bad and
unfair for the cm team because they are doing an awesome job.
That's the reason I'm providing only img files and not a complete rom zip.To avoid unexperienced users
To make it clear that's just my opinion/point of view.
Click to expand...
Click to collapse
Absolutely right. Besides: from a practical point of view, its will be easier to implement a CM7 port once a CM6 port has successfully tackled the quirks and required changes to adapt the code to the U81*.
CyanogenMod
Interesting: Tom Giordano has merged Huawei U8220/U8230 into the CM repository, which will eventually make it a officially supported device.
See: http://review.cyanogenmod.com/#change,3670
poruid said:
Interesting: Tom Giordano has merged Huawei U8220/U8230 into the CM repository, which will eventually make it a officially supported device.
See: http://review.cyanogenmod.com/#change,3670
Click to expand...
Click to collapse
To talk about the huawei 8220 device
this device is almost the same as ours........
so cant we use some of their drivers and libs to fix the camera and sd mount???
cedric123 said:
To talk about the huawei 8220 device
this device is almost the same as ours........
so cant we use some of their drivers and libs to fix the camera and sd mount???
Click to expand...
Click to collapse
I have looked in tomgiordano's device tree from the begining
We have different camera from the u8220 as I know.
Im working on camera and sdcard bug.Im looking in other device trees also to
see whats wrong.
tas0s said:
I have looked in tomgiordano's device tree from the begining
We have different camera from the u8220 as I know.
Im working on camera and sdcard bug.Im looking in other device trees also to
see whats wrong.
Click to expand...
Click to collapse
Nice please post your archievments and bug fixes and plx make a threath about cm7 cuz i want to know what you fixed so i can get to work too...
Seached a bit
HTC ledgend cm6 mod is running 2.6.29 kernel too and HAD a sd mount bug + camera bug.........
They fixed sd card bug by enabling USB-debugging(Just enable it and it will work????)
Camera i dont know how they fixed it..
Are you planning to fix Mac-adresss too?
i have still problems with sources my repo is not building right my ubuntu 64 is [email protected] up again and the git -u command is not working
cd <cm6 source>/device/
mkdir -p huawei/u8120
git init -u git://github.com/tas0s/cm_huawei_U8120.git ---- not working
cd huawei/u8120
git init
git pull git://github.com/tas0s/cm_huawei_U8120.git
git checkout
Code:
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/DisplayActivity.java:96: cannot find symbol
symbol : variable ELECTRON_BEAM_ANIMATION_ON
location: class android.provider.Settings.System
Settings.System.ELECTRON_BEAM_ANIMATION_ON, value ? 1 : 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/DisplayActivity.java:102: cannot find symbol
symbol : variable ELECTRON_BEAM_ANIMATION_OFF
location: class android.provider.Settings.System
Settings.System.ELECTRON_BEAM_ANIMATION_OFF, value ? 1 : 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/DisplayActivity.java:108: cannot find symbol
symbol : variable ACCELEROMETER_ROTATE_180
location: class android.provider.Settings.System
Settings.System.ACCELEROMETER_ROTATE_180, value ? 1 : 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIActivity.java:125: cannot find symbol
symbol : variable OVERSCROLL_EFFECT
location: class android.provider.Settings.System
Settings.System.OVERSCROLL_EFFECT, 1);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIActivity.java:196: cannot find symbol
symbol : variable OVERSCROLL_EFFECT
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.OVERSCROLL_EFFECT,
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
11 errors
make: *** [out/target/common/obj/APPS/CMParts_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)
Would CM5.0.8 eclair be faster than our eclair ROM now??
anryl said:
i have still problems with sources my repo is not building right my ubuntu 64 is [email protected] up again and the git -u command is not working
cd <cm6 source>/device/
mkdir -p huawei/u8120
git init -u git://github.com/tas0s/cm_huawei_U8120.git ---- not working
cd huawei/u8120
git init
git pull git://github.com/tas0s/cm_huawei_U8120.git
git checkout
Code:
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/DisplayActivity.java:96: cannot find symbol
symbol : variable ELECTRON_BEAM_ANIMATION_ON
location: class android.provider.Settings.System
Settings.System.ELECTRON_BEAM_ANIMATION_ON, value ? 1 : 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/DisplayActivity.java:102: cannot find symbol
symbol : variable ELECTRON_BEAM_ANIMATION_OFF
location: class android.provider.Settings.System
Settings.System.ELECTRON_BEAM_ANIMATION_OFF, value ? 1 : 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/DisplayActivity.java:108: cannot find symbol
symbol : variable ACCELEROMETER_ROTATE_180
location: class android.provider.Settings.System
Settings.System.ACCELEROMETER_ROTATE_180, value ? 1 : 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIActivity.java:125: cannot find symbol
symbol : variable OVERSCROLL_EFFECT
location: class android.provider.Settings.System
Settings.System.OVERSCROLL_EFFECT, 1);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIActivity.java:196: cannot find symbol
symbol : variable OVERSCROLL_EFFECT
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.OVERSCROLL_EFFECT,
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
11 errors
make: *** [out/target/common/obj/APPS/CMParts_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)
Click to expand...
Click to collapse
Sorry anryl you are right.
Try
git clone git://github.com/tas0s/cm_huawei_U8120.git
EDIT: maybe the pull/checkout procedure is more correct.Updated
For the compilation error just do
cd packages/apps/CMParts && git checkout 69613a248519fed7d971bd6292013d36097d0107
Something is missing in CMParts master
I have updated the README in github with the corrections.Thanx
tas0s said:
Sorry anryl you are right.
Try
git clone git://github.com/tas0s/cm_huawei_U8120.git
EDIT: maybe the pull/checkout procedure is more correct.Updated
For the compilation error just do
cd packages/apps/CMParts && git checkout 69613a248519fed7d971bd6292013d36097d0107
Something is missing in CMParts master
I have updated the README in github with the corrections.Thanx
Click to expand...
Click to collapse
ok it worked so gona start test.ing
EDIT nice first try no rill used boot.img from AOSP
updated ramdisk lets see ---- ok RILL FINE
removed partitions on sdcard left with fat32 only
restoring apps with titanium
calibration ok
gps working
QtADB WORKING fine
for starters AOK thnx
cedric123 said:
Nice please post your archievments and bug fixes and plx make a threath about cm7 cuz i want to know what you fixed so i can get to work too...
Seached a bit
HTC ledgend cm6 mod is running 2.6.29 kernel too and HAD a sd mount bug + camera bug.........
They fixed sd card bug by enabling USB-debugging(Just enable it and it will work????)
Camera i dont know how they fixed it..
Are you planning to fix Mac-adresss too?
Click to expand...
Click to collapse
I have no MAC problems, please explain what's wrong with yours. (Maybe special for me)
USB Debugging not fix the problem here, I tested.
I think everyone now knows about the wifi country code problem in ICS roms ( its a row in setting provider database that set every time we try to enable wifi and it read the value from sim card. if its not US or EU or... you can not use some features like wifi, face unlock,.... )
I have done many searches please dont say its already done :-" I know there is a simple script which runs with script manager every time the wifi status changed and it works fine for aosp roms but the problem is with sense 3.5 ICS. in aosp roms the phone says wifi is turning on and after a sec script manager does the work and your good to go but in sense rom it says turning on and the phone hangs so script manager does not work for that! i found another solution for this problem here: http://forum.xda-developers.com/showthread.php?t=1372074 but its for nexus s i tried the file in that thread also other firmwares from sensation sense 3.5 gb roms ... and i can not find an answer ( noob )
can some one plese help and make a similar solution for sensation
this is what they said in that thread:
avostrik said:
Update:
created update.zip file with Broadcom firmware 4.218.248.18.
This update.zip will run only on "crespo", i.e. Nexus S.
Should work for non-rooted device via boot recovery, if someone could test and provide results, it would be great.
Disclaimer: use this update on your own risk.
------
I had connection problems with 802.11n router in WPA2-PSK configuration. According to log authentication timeout occurred on every try to connect.
Here is snippet of typical error (used 'adb shell su -c "wpa_cli log_level 0"' to enable verbose wi-fi logging):
Code:
D/wpa_supplicant(11118): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(11118): Wireless event: cmd=0x8c02 len=33
D/wpa_supplicant(11118): WEXT: Custom wireless event: 'Conn ConfigMismatch 01 00'
D/wpa_supplicant(11118): wpa_driver_wext_driver_cmd SCAN-ACTIVE len = 4096
D/wpa_supplicant(11118): wpa_driver_wext_driver_cmd SCAN-ACTIVE len = 0, 11
D/wpa_supplicant(11118): Ongoing scan action - reject new request
D/wpa_supplicant(11118): wpa_driver_wext_driver_cmd SCAN-PASSIVE len = 4096
D/wpa_supplicant(11118): wpa_driver_wext_driver_cmd SCAN-PASSIVE len = 0, 12
I/wpa_supplicant(11118): wlan0: Authentication with <AP MAC ADDRESS> timed out.
On my Nexus S it was solved by rolling back wi-fi firmware to version used in Gingerbread.
Wi-Fi firmware version that have problems (integrated into ICS) 4.218.248.20, 4.218.248.23.
fw_bcm4329.bin file can be obtained from AOSP sources:
$git clone https://android.googlesource.com/platform/hardware/broadcom/wlan
$cd wlan
$git checkout android-2.3.7_r1
Firmware ver. 4.218.248.18 file located at ./bcm4329/firmware/fw_bcm4329.bin
It is needed to have rooted device to change firmware. Steps:
Turn OFF wi-fi on the device.
>adb push fw_bcm4329.bin /sdcard/
>adb shell
$su
#mount -o,remount rw /system
#cp /sdcard/fw_bcm4329.bin /system/vendor/firmware/
#mount -o,remount ro /system
enable wi-fi.
----
Cyanogen 9 (ICS) Alpha 18 on Nexus S
Radio: I9020XXKF1
Click to expand...
Click to collapse
thanks in advance
I used script and its working on sense 3.5... just do the following..
1- Turn wifi off
2- set script to run on boot + SU
and reboot
everytime u reboot, wait to see that scriptmanager got permissions (means it ran) then turn on Wifi,, it works..
I ll give more info and post file later i hope. goodl uck
Thank you fearkillerr it works even for sense roms!
welcome bro
fearkillerr said:
I used script and its working on sense 3.5... just do the following..
1- Turn wifi off
2- set script to run on boot + SU
and reboot
everytime u reboot, wait to see that scriptmanager got permissions (means it ran) then turn on Wifi,, it works..
I ll give more info and post file later i hope. goodl uck
Click to expand...
Click to collapse
Would you please post the link to the file?
Thanks.
For the guys that this script worked for does wifi calling now work?
wifi problem
omar302 said:
Would you please post the link to the file?
Thanks.
Click to expand...
Click to collapse
here is the script
http://forum.xda-developers.com/showthread.php?t=1403801
haririan said:
here is the script
http://forum.xda-developers.com/showthread.php?t=1403801
Click to expand...
Click to collapse
Thanks, but now there is a full guide here.
omar302 said:
Thanks, but now there is a full guide here.
Click to expand...
Click to collapse
THANK YOU
IT WORKED 90% I DONT NEED TO RERUN THE SCRIPT
another method for doing this but it is so much easier
Sent from my HTC Sensation Z710e using xda premium
Final Fix
A permanent fix to this problem is to fake the provider mcc, to do so,
1. your phone has to be rooted
2. install SQLite Editor from aptoide
3. open SQLite Editor
4. goto /data/data/com.android.providors.telephony/databases
5. select carriers
6. find your gsm providor
7. change the mcc value of your provider to 310 which is US
8. close, and check if it works
whenever the phone get the mcc (after reboot, airplane mode, network disconnect) the value of mcc=310 and the wifi_country_code = us
Hope it works for everybody
Regards,
Ali
Please compile, if possible, your embedded recovery kernels without the sensorhub defconfig options.
CONFIG_SENSORS_SSP=y
CONFIG_SENSORS_SYSFS=y
CONFIG_SENSORS_SSP_ACCELEROMETER_POSITION=7
CONFIG_SENSORS_SSP_GYROSCOPE_POSITION=7
CONFIG_SENSORS_SSP_MAGNETOMETER_POSITION=7
CONFIG_SENSORS_SSP_LSM330=y
CONFIG_SENSORS_SSP_CM36651=y
CONFIG_SENSORS_SSP_AK8963C=y
CONFIG_SENSORS_SSP_BMP182=y
CONFIG_SENSORS_SSP_AT32UC3L0128=y
CONFIG_SENSORS_SSP_SENSORHUB=y
The kernel flashes over the sensorhub firmware on every single entry of recovery, and rebooting into the normal kernel, if the embedded kernel firmware mismatches the live hardware firmware. I consider this dangerous because firstly I don't know what happens if a firmware flash fails on boot, and secondly, the whole procedure is done over the I2C bus and takes about 22 seconds, increasing the boot time (and recovery entry) dramatically. The firmware changes relatively often and we have like 4 different versions out there in the wild at this moment and they will surely increase.
Off-topic: The sensorhub is a new dedicated micro-controller chip found on the Note 2 which handles all device sensors, instead of them being handled by the main CPU itself. The point of the thing is to offload that work from the CPU to vastly improve battery life.
Thank you a lot for the feedback and input about this issue
When compiling recoveries, we get the binary (recovery file) and the kernel. Sorry if I seem noob here, but I do not compile kernels, I am only used to cwm source. And in the recovery binary sources, there is no sensors flashed, it is the kernel that is repacked with it.
Now, if I take a recovery.img as it is outputted when compiled from cm10 sources, that is packed with a cm10 kernel, the recovery will boot without a delay.
However, that will break exfat support since we cannot insmod the external modules
So, the only choice is to repack the recovery ramdisk with a stock Samsung kernel, and that's what I do in my recoveries. However, this seems to induce the boot delay for people using custom kernels built around some sources (redpill, Perseus)
These recoveries repacked with a Samsung kernel will run fine along stock kernels and Note2core custom kernel (also a 4.1.2 source).
One of the potential causes is this part of code I believe (have no Note 2 to debug it)
drivers/sensor/ak8963.c
Code:
if (retry_count < 5) {
retry_count++;
pr_warn("############################################");
pr_warn("%s, retry_count=%d\n", __func__, retry_count);
pr_warn("############################################");
goto retry;
} else {
There is a check routine repeated 5 times, and on each repeat count a goto loop. The retry loop restarts much above in the code
retry:
Code:
#ifdef FACTORY_TESTstatic int ak8963c_selftest(struct akm8963_data *ak_data, int *sf){
.
.
.
retry:
/* read device info */
i2c_smbus_read_i2c_block_data(ak_data->this_client,
AK8963_REG_WIA, 2, buf);
pr_info("%s: device id = 0x%x, info = 0x%x\n",
__func__, buf[0], buf[1]);
/* set ATSC self test bit to 1 */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_ASTC, 0x40);
/* start self test */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_CNTL1,
AK8963_CNTL1_SELF_TEST);
/* wait for data ready */
while (1) {
msleep(20);
if (i2c_smbus_read_byte_data(ak_data->this_client,
AK8963_REG_ST1) == 1) {
break;
}
}
i2c_smbus_read_i2c_block_data(ak_data->this_client,
AK8963_REG_HXL, sizeof(buf), buf);
/* set ATSC self test bit to 0 */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_ASTC, 0x00);
x = buf[0] | (buf[1] << 8);
y = buf[2] | (buf[3] << 8);
z = buf[4] | (buf[5] << 8);
/* Hadj = (H*(Asa+128))/256 */
x = (x*(ak_data->asa[0] + 128)) >> 8;
y = (y*(ak_data->asa[1] + 128)) >> 8;
z = (z*(ak_data->asa[2] + 128)) >> 8;
pr_info("%s: self test x = %d, y = %d, z = %d\n",
__func__, x, y, z);
if ((x >= -200) && (x <= 200))
pr_info("%s: x passed self test, expect -200<=x<=200\n",
__func__);
else
pr_info("%s: x failed self test, expect -200<=x<=200\n",
__func__);
if ((y >= -200) && (y <= 200))
pr_info("%s: y passed self test, expect -200<=y<=200\n",
__func__);
else
pr_info("%s: y failed self test, expect -200<=y<=200\n",
__func__);
if ((z >= -3200) && (z <= -800))
pr_info("%s: z passed self test, expect -3200<=z<=-800\n",
__func__);
else
pr_info("%s: z failed self test, expect -3200<=z<=-800\n",
__func__);
sf[0] = x;
sf[1] = y;
sf[2] = z;
if (((x >= -200) && (x <= 200)) &&
((y >= -200) && (y <= 200)) &&
((z >= -3200) && (z <= -800))) {
pr_info("%s, Selftest is successful.\n", __func__);
return 1;
} else {
if (retry_count < 5) {
retry_count++;
pr_warn("############################################");
pr_warn("%s, retry_count=%d\n", __func__, retry_count);
pr_warn("############################################");
goto retry;
}
These are many retries using a non efficient goto loop.
Basically, here's the current possibilities I see:
- if we repack the recovery with your kernel or redpill, people will get delay issues on stock ROMs/Kernels
- if we use cm10 kernel: no delays but we loose exfat support
- if we use note2core kernel we'll probably loose exfat support
- if I recompile kernel from samsung sources without the sensors, it seems it will also break exfat
So, at the end I do not see a good choice that will satisfy every one. Either I wait for Samsung to release their sources so that you fix the kernel or I repack with 2 kernels: Samsung stock and redpill, so people can chose
Hope I am not getting it all wrong, but that's how I understand it
All that code is totally irrelevant and has nothing to do with the issue. I also don't understand what you want to say about that loop? Goto is inefficient? Nonsense.
The firmware flash and logic happens in /drivers/sensorhub/ssp_firmware.c and its just a few lines of code. The whole flash process is logged in kmsg at boot so you can just retrieve that and see for yourself.
And you're missing the point, as long as you embed ANY kernel with the sensorhub drivers, they will flash it. There are stock kernels out there with versions 91100, 92600, 92800, 102600 (just from the top of my head, might differ). If you use any recovery kernel whose version mismatches the boot.img kernel firmware, you will get the issue.
And to be honest, I don't understand what the fuss is about fixing it, TWRP includes now a kernel with exFat and removed sensor drivers. You just have to do the same.
Phil3759 said:
Either I wait for Samsung to release their sources so that you fix the kernel
Click to expand...
Click to collapse
There is nothing to fix from the live kernel side, I hope you understand that...
AndreiLux said:
All that code is totally irrelevant and has nothing to do with the issue. I also don't understand what you want to say about that loop? Goto is inefficient? Nonsense.
The firmware flash and logic happens in /drivers/sensorhub/ssp_firmware.c and its just a few lines of code. The whole flash process is logged in kmsg at boot so you can just retrieve that and see for yourself.
And you're missing the point, as long as you embed ANY kernel with the sensorhub drivers, they will flash it. There are stock kernels out there with versions 91100, 92600, 92800, 102600 (just from the top of my head, might differ). If you use any recovery kernel whose version mismatches the boot.img kernel firmware, you will get the issue.
And to be honest, I don't understand what the fuss is about fixing it, TWRP includes now a kernel with exFat and removed sensor drivers. You just have to do the same.
There is nothing to fix from the live kernel side, I hope you understand that...
Click to expand...
Click to collapse
AndreiLux said:
Sorry but you're a bit out of bound here with accusing kernel developers and doing such claims about the source of the issue while you seem pretty ignorant about the technical aspects of the problem.
As I said and explained in the thread you linked, the problem lies with the recovery and not the boot kernel. You're the one who will have to adapt your embedded kernel that you include here.
Click to expand...
Click to collapse
You also seem a bit ignorant about recoveries
TWRP doesn't included any custom kernel with exfat support. It comes with cm9 kernel and maybe now cm10.1 since they moved sources to 4.2 recently. Their source is just the android/bootable/recovery part built around cyanogenmod source. CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay. That's the only reason why twrp won't have the delay. I can also include cm10 kernel and no more delays, but say good bye to exfat.
TWRP includes native exfat support where as CM and AOKP choose to not include it in their source (thus cwm) because it is not legal (MS patent). Only thing cwm devs can do:
- import twrp source for exfat support and break the MS patent
- use Samsung genuine kernel to get exfat support
So, not an easy decision / move as you suggest
Phil3759 said:
TWRP doesn't included any custom kernel with exfat support. It comes with cm9 kernel and maybe now cm10.1 since they moved sources to 4.2 recently. Their source is just the android/bootable/recovery part built around cyanogenmod source. CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay. That's the only reason why twrp won't have the delay. I can also include cm10 kernel and no more delays, but say good bye to exfat.
TWRP includes native exfat support where as CM and AOKP choose to not include it in their source (thus cwm) because it is not legal (MS patent). Only thing cwm devs can do:
- import twrp source for exfat support and break the MS patent
- use Samsung genuine kernel to get exfat support
So, not an easy decision / move as you suggest
Click to expand...
Click to collapse
Sorry but almost everything you said its wrong.
TWRP includes a modified CM kernel with added exFat and since I've made Bigbiff aware, also removes the sensorhub drivers.
CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay.
Click to expand...
Click to collapse
The CM kernel is based on the Samsung sources and has the flash logic intact, because it's obviously needed in the OS to even have functioning sensors. It's not flashing in your case because you have matching firmwares, and that's all.
Sorry but I suggest you inform yourself here a bit more, I've explained it pretty clearly yet you seem to be ranting about things which are just not correct.
delete
In this post, I would like to explain what kexec-hardboot patch is and also bring it to light a bit more since until now, it was only burried in MultiROM thread.
@kernel developers: I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows me to boot any kernel without changing the boot partition. I realize that it is no small request, but the patch is not big, touches relatively stable parts of kernel and should not cause any problems. Thank you.
What is kexec?
It is syscall of Linux kernel, which allows you to boot another Linux kernel without restarting the device - "Linux boots itself". The functionality is equivalent to fastboot -c *cmdline* boot zImage initrd.img, but without PC and fastboot. It is fairly known thing, so more info at wikipedia and man kexec.
Standard kexec call unfortunatelly does not work on Nexus 7. It freezes somewhere, and it is very difficult to find out where - probably some of the drivers are not shut down/re-initialized properly, it is a commong thing among Android devices, which is why kexec-hardboot was made.
What is the difference between normal and hardboot exec?
Kexec-hardboot patch adds a real device restart to that process, so that all the drivers can be properly reinitialized. It stores new kernel to RAM, reboots the device as usual, and kernel from boot partition immediately jumps to the one which was stored to RAM before reboot.
Another difference is that both kernels must be patched. The "host" kernel requires a full patch, the one which is being kexecd' requires only two small compatibility patches.
To sumarize the process:
kexec --load-hardboot.... is called and kernel it loaded into RAM.
kexec -e is called. Special info is written to memory (to area which is not overwritten on reboot) and the device is rebooted.
After reboot, very early in the boot process, kernel checks if that special info is present in RAM and if so, it loads new kernel from RAM and jumps to it.
Kexecd' kernel starts and boots.
For more info, read the original thread.
Patches:
Full kernel patch: https://gist.github.com/4558647, 4.1 kernel repo, cm 10.1 kernel repo
This is the full kernel patch. Kernels with this patch can be both "host" and "guest" kernels.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
CONFIG_GROUPER_HARDBOOT_RECOVERY=n
First three options must be enabled. Last one, GROUPER_HARDBOOT_RECOVERY, specifies if the kexec call should reboot to normal mode or to recovery. This can be useful if you don't have the kernel in boot partition but only as kernel in recovery partition. You usualy want to disable this option.
Compatibility patch: https://gist.github.com/4458581
This patch only makes the kernel bootable via kexec, ie. it can't be the host kernel. This was made for Ubuntu kernel (and it was accepted), because I did not want to drag the whole patch in there. If your kernel is for Android ROMs, you should use the full patch.
Userspace kexec binary: View attachment kexec-tools.zip
That ZIP file contains kexec source, patches and README. It is from the original patch from Mike Kasick. It also contains precompiled, statically linked kexec binary, so you probably just want to use that.
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x85000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Note the command line parameter - cmdline from bootloader is not added automatically, you have to put it there by yourself.
Currently used by:
MultiROM - I use it to boot different kernels (eg. Ubuntu).
MOSLO - Part of Plasma Active for Nexus 7, also usefull tool for every N7 developer - read more: http://ruedigergad.com/2012/12/09/nexus-7-easily-flashaccess-entire-userdata-partition/
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices, one of them is Asus Transformer TF201 - I used patch from TF201 and modified it a bit (basically just changed few SoC specific constants). People at #ubuntu-arm helped me out with that, thanks.
Hi Tasssadar,
im trying to get this to work on the HOX in order to have a shot at multiboot,
the patched applied with no problem... however on compiling i gett this error
"Adress for kexec hardboot page not defined"
ask this error naturely defined to kick in with every device beside N7 i that comment completely....
and that ended up giving me an error about KEXEC_HB_PAGE_ADDR not defined,
so i readded it, but i removed the "#if defined(CONFIG_MACH_GROUPER)"
now trying to compile it, its gets pretty close to the end... but failed with unexpected string error at line OUTPUT_ARCH(arm) in file linux/arch/arm/boot/compressed/vmlinux.lds
Code:
/*
* linux/arch/arm/boot/compressed/vmlinux.lds.in
*
* Copyright (C) 2000 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
/DISCARD/ : {
*(.ARM.exidx*)
*(.ARM.extab*)
/*
* Discard any r/w data - this produces a link error if we have any,
* which is required for PIC decompression. Local data generates
* GOTOFF relocations, which prevents it being relocated independently
* of the text/got segments.
*/
*(.data)
}
. = 0;
_text = .;
.text : {
_start = .;
*(.start)
*(.text)
*(.text.*)
*(.fixup)
*(.gnu.warning)
*(.glue_7t)
*(.glue_7)
}
.rodata : {
*(.rodata)
*(.rodata.*)
}
.piggydata : {
*(.piggydata)
}
. = ALIGN(4);
_etext = .;
.got.plt : { *(.got.plt) }
_got_start = .;
.got : { *(.got) }
_got_end = .;
_edata = .;
. = ALIGN(8);
__bss_start = .;
.bss : { *(.bss) }
_end = .;
. = ALIGN(8); /* the stack must be 64-bit aligned */
.stack : { *(.stack) }
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
}
also, im booted into windows now... so i can't provide the exact error.
I'm afraid "comment everything which doesn't work" won't work here. The KEXEC_HB_PAGE_ADDR and END_MEM is device-specific, it will most likely be different for HTC One X. You can find out what address is it supposed to be by examining /proc/iomem on your device. For example, here's memory map from grouper:
Code:
...
80000000-be9fffff : System RAM
80008000-808faba7 : Kernel text
80940000-80b8228f : Kernel data
beb00000-bebfffff : ram_console
...
So, for grouper, END_MEM is 0xbe9fffff + 1 = 0xbea00000.
KEXEC_HB_PAGE_ADDR is located 1MB before console RAM, which is in this case also immediatelly after System RAM, so for grouper, it is also 0xbea00000.
but failed with unexpected string error at line OUTPUT_ARCH(arm) in file linux/arch/arm/boot/compressed/vmlinux.lds
Click to expand...
Click to collapse
That doesn't seem to be related to this patch. Are you using correct cross-compiler?
Tasssadar said:
I'm afraid "comment everything which doesn't work" won't work here. The KEXEC_HB_PAGE_ADDR and END_MEM is device-specific, it will most likely be different for HTC One X.
Click to expand...
Click to collapse
i figured
but im walking you through what i did.
You can find out what address is it supposed to be by examining /proc/iomem on your device. For example, here's memory map from grouper:
Code:
...
80000000-be9fffff : System RAM
80008000-808faba7 : Kernel text
80940000-80b8228f : Kernel data
beb00000-bebfffff : ram_console
...
So, for grouper, END_MEM is 0xbe9fffff + 1 = 0xbea00000.
KEXEC_HB_PAGE_ADDR is located 1MB before console RAM, which is in this case also immediatelly after System RAM, so for grouper, it is also 0xbea00000.
Click to expand...
Click to collapse
Code:
7d000000-7d003fff : tegra-udc.0
7d000000-7d003fff : tegra-otg
7d000000-7d003fff : tegra-udc
7d004000-7d007fff : tegra-ehci.1
80000000-beafffff : System RAM
80008000-8094000f : Kernel text
809a8000-810b940f : Kernel data
beb00000-bebfffff : ram_console
bec00000-beffffff : fbmem
bf000000-bf7fffff : fbmem
0xbeafffff + 1 = 0xbeb00000
grrr that would put me inside the ram_console...
aaaa would it wok if i used the address before??
7d00800
Edit:
or did your ram RAM end earlier because you set you END_MEM 0xbea00000
in that case, it works out just the same with the HOX
That doesn't seem to be related to this patch. Are you using correct cross-compiler?
Click to expand...
Click to collapse
i would have guessed so, but the kernel compiled and is working before the patch.
im using the one provided by google (Android NDK r9) while it contains booth gcc 4.6/4.8 im using 4.6 (arm-linux-androideabi-)
The patch will move ram_console 1MB further, see https://gist.github.com/Tasssadar/4558647#file-n7_hardboot-diff-L387 . You'll have to modify this part of the patch, it will be in different file for your device.
Tasssadar said:
The patch will move ram_console 1MB further, see https://gist.github.com/Tasssadar/4558647#file-n7_hardboot-diff-L387 . You'll have to modify this part of the patch, it will be in different file for your device.
Click to expand...
Click to collapse
HOX is also a Tegra 3 device... so im guessing i wont need to touch a thing?
also note... that iomem provided is from an unpatched kernel (as i cant compile a patched one)
also,
im currently on freenode #htc-one-x
if you dont mind joining.
I've been looking through the kexec-hardboot patch these last few days, trying to actually understand it instead of just blindly porting it and after several hours of messing with assembler with no means to debug it, I've managed to remove the need for guest kernel to be patched. This is not really useful for grouper, since thanks to multirom and accepting kernel devs, nearly every third-party kernel has the proper patches. But, if I'll port multirom to some other device (hello, flo), it will be very useful
To know more see the changes in this commit, but you'll probably need to understand how the patch does things: https://github.com/Tasssadar/androi...mmit/2ce4130061f72430a8ddfde25346c4e528c5c30b
@mkasick: Could you please look over this? I'm afraid there's some good reason why you didn't do this in the first place, like rewriting some part of memory which shouldn't be rewritten or something like that. Thank you.
Tasssadar said:
I've been looking through the kexec-hardboot patch these last few days, trying to actually understand it instead of just blindly porting it and after several hours of messing with assembler with no means to debug it, I've managed to remove the need for guest kernel to be patched. This is not really useful for grouper, since thanks to multirom and accepting kernel devs, nearly every third-party kernel has the proper patches. But, if I'll port multirom to some other device (hello, flo), it will be very useful
To know more see the changes in this commit, but you'll probably need to understand how the patch does things: https://github.com/Tasssadar/androi...mmit/2ce4130061f72430a8ddfde25346c4e528c5c30b
@mkasick: Could you please look over this? I'm afraid there's some good reason why you didn't do this in the first place, like rewriting some part of memory which shouldn't be rewritten or something like that. Thank you.
Click to expand...
Click to collapse
Perfect timing, just finished my last exam
Edit:
Also, this applies on top of the original patch right??
Edit2:
i can't seem to get it to kexec boot, but i didn't do much testing, maybe 2morrow night!
Edit3:
fixed, it was a problem with min-addr,
changed it to 0x82000000 and it worked
One more question...
TEGRA_PMC_BASE is also device specific, ain't it???
So, for a Qualcomm device, what should I be using? I am guessing it is MSM_RPM_BASE, which I got from here: http://forum.xda-developers.com/showpost.php?p=31127486&postcount=7
Yes, it is SoC-specific. This is using some special register to reset the chip, I'm not sure if that is available on msm chips - probably yes, but in some different form. Your best chance is to examine restart sequence in arch/arm/mach-msm/restart.c and port it to assembler.
Tasssadar said:
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0xA0000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Click to expand...
Click to collapse
The address of 0xA0000000 is not necessarily the best choice going forward. It originally made perfect sense, as it is well above everything else. But now that we can boot unpatched guest kernels, we can hit the interesting situation where the guest decompression may take a full minute. At least it's when I've seen on the Ouya game console that's running the next chip after Grouper.
When I realized what's going on, I changed to 0x8E000000, as it gets me just below the 256 MB limit of cache-enabled memory that's present on a typical guest at that early decompression stage. It's enough to hold a typical 8 MB boot image kernel/ramdisk. Now the guest kernel startup is fast in all cases.
Thank you Tasssadar for continuing your work in this area, especially with finding that way to allow unpatched guests.
Indeed, that's actually what I'm using in MultiROM for flo and mako (and grouper, but it is useless 'cause not all 3rd-party kernels have been updated), I just kinda "forgot" to update these threads.
Would it work on devices with locked bootloaders (Xperias). I mean :does the idea of this patch would also work on bootloader unlock allowed :no devices?
Sent from my LT22i using xda app-developers app
I am trying to build a kexec patched kernel integrated into a ROM. I make sure that the following code is there in the defconfig:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
The ROM works well, except that it does not boot my secondary ROMs - kexec hardboot patch missing. I have multi ROM and TWRP recovery installed
What am I missing?
Logs or it didn't happen.
Show me dmesg from normal boot into android, with MultiROM and your kernel installed.
Code:
adb shell
su
dmesg > /data/local/tmp/dmesg.txt
exit
exit
adb pull /data/local/tmp/dmesg.txt
Porting?
Tassadar which things do I need to boot kexec kernel on my device (Motorola Electrify 2) .
@Tasssadar, Sorry for picking up this kinda "old topic" but I'm sadly experiencing some problems while trying to port kexec-hardboot to the Sony Xperia Z2 (aka sirius). I applyed all needed commits (cherry-picked from a apparently working Z1 repo for stock kernel) to my CM based custom kernel (https://github.com/Myself5/android_kernel_sony_msm8974/tree/kexec-cm-12.0) and it does not boot at all. It's stuck on the Sony Logo, and it seems like I can't get any log either. I also tryed the stock cm kernel with the patch (https://github.com/Myself5/android_kernel_sony_msm8974-kexec) cause I tought it might be some incompatibility, but sadly it wasn't. Hope you have any ideas to solve my problems, cause I'm out of ideas ATM. I also checked the kexec commits for other devices (namely the One Plus One) and it seems like I got everything needed.
Thanks in Advance
Tasssadar said:
In this post, I would like to explain what kexec-hardboot patch is and also bring it to light a bit more since until now, it was only burried in MultiROM thread.
@kernel developers: I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows me to boot any kernel without changing the boot partition. I realize that it is no small request, but the patch is not big, touches relatively stable parts of kernel and should not cause any problems. Thank you.
What is kexec?
It is syscall of Linux kernel, which allows you to boot another Linux kernel without restarting the device - "Linux boots itself". The functionality is equivalent to fastboot -c *cmdline* boot zImage initrd.img, but without PC and fastboot. It is fairly known thing, so more info at wikipedia and man kexec.
Standard kexec call unfortunatelly does not work on Nexus 7. It freezes somewhere, and it is very difficult to find out where - probably some of the drivers are not shut down/re-initialized properly, it is a commong thing among Android devices, which is why kexec-hardboot was made.
What is the difference between normal and hardboot exec?
Kexec-hardboot patch adds a real device restart to that process, so that all the drivers can be properly reinitialized. It stores new kernel to RAM, reboots the device as usual, and kernel from boot partition immediately jumps to the one which was stored to RAM before reboot.
Another difference is that both kernels must be patched. The "host" kernel requires a full patch, the one which is being kexecd' requires only two small compatibility patches.
To sumarize the process:
kexec --load-hardboot.... is called and kernel it loaded into RAM.
kexec -e is called. Special info is written to memory (to area which is not overwritten on reboot) and the device is rebooted.
After reboot, very early in the boot process, kernel checks if that special info is present in RAM and if so, it loads new kernel from RAM and jumps to it.
Kexecd' kernel starts and boots.
For more info, read the original thread.
Patches:
Full kernel patch: https://gist.github.com/4558647, 4.1 kernel repo, cm 10.1 kernel repo
This is the full kernel patch. Kernels with this patch can be both "host" and "guest" kernels.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
CONFIG_GROUPER_HARDBOOT_RECOVERY=n
First three options must be enabled. Last one, GROUPER_HARDBOOT_RECOVERY, specifies if the kexec call should reboot to normal mode or to recovery. This can be useful if you don't have the kernel in boot partition but only as kernel in recovery partition. You usualy want to disable this option.
Compatibility patch: https://gist.github.com/4458581
This patch only makes the kernel bootable via kexec, ie. it can't be the host kernel. This was made for Ubuntu kernel (and it was accepted), because I did not want to drag the whole patch in there. If your kernel is for Android ROMs, you should use the full patch.
Userspace kexec binary: View attachment 1653562
That ZIP file contains kexec source, patches and README. It is from the original patch from Mike Kasick. It also contains precompiled, statically linked kexec binary, so you probably just want to use that.
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x85000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Note the command line parameter - cmdline from bootloader is not added automatically, you have to put it there by yourself.
Currently used by:
MultiROM - I use it to boot different kernels (eg. Ubuntu).
MOSLO - Part of Plasma Active for Nexus 7, also usefull tool for every N7 developer - read more: http://ruedigergad.com/2012/12/09/nexus-7-easily-flashaccess-entire-userdata-partition/
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices, one of them is Asus Transformer TF201 - I used patch from TF201 and modified it a bit (basically just changed few SoC specific constants). People at #ubuntu-arm helped me out with that, thanks.
Click to expand...
Click to collapse
I'm sorry for picking up this older topic as well, but I always played with the thought of merging kexec support into a kernel and I'm doing one right now.. But my secondary device is a LG G2 and since the era of Lollipop began, somehow MultiBoot just stopped working and nobody can figure out why. I think they even started to build some new concept now.. So before I spark a heated debated by Note 4 users I'd love to know if you have any idea if this patch is still applicable? Altough the only way to find out is to probably just try it lol.
Tasssadar said:
In this post, ....
Click to expand...
Click to collapse
Bro can you please mention on your wiki that kexec isnt supported for x64 devices? It will be great help and save developers hours! I was porting for oneplus 2 when a dev told me that kexec isnt there for x64. I was shocked
Is any alternative available for that? Please reply! Thanks.
All other devs, who cant make multirom to work (lollipop is the x64 era) stop working. Kexec isnt supported for x64. Find an alternative for it.
Can Anyone help me to port this? Here is my patched kernel (ignore arch/arm64) and this is /proc/iomem.
Code:
80000000-854fffff : System RAM
80008000-80fa43ef : Kernel code
81112000-817bf797 : Kernel data
8cb00000-9fefffff : System RAM
9ff00000-9ff3ffff : persistent_ram
9ff40000-9ff7ffff : persistent_ram
9ff80000-9fffffff : persistent_ram
a0000000-ffffefff : System RAM
For kexec_hb_page_addr the value i inseted is 85500000 coz as tasssadar said 884fffff + 1 = 85500000, but I don't know what value add for
Code:
#elif defined(CONFIG_ARCH_MSM8916)
/* Restart using the PMIC chip, see mach-msm/restart.c */
ldr r0, =MSM8916_HARDBOOT
mov r1, #0
str r1, [r0, #0]
loop: b loop
MSM8916_HARDBOOT, and if I compile the kernel it stucks on samsung logo.