[Q] Can I use the VT-X feature on zenfone 2? - ZenFone 2 Q&A, Help & Troubleshooting

Hi folks,
Is there any one has experience to use the vt-x feature, hardware virtualization, on zenfone 2?
Or can anyone help me to read below register value by a rdmsr module ?
The first bit is to check whether this CPU support vtx hardware, and the second is to check whether this CPU's vtx feature is enabled by BIOS.
$ sudo modprobe msr
$ sudo rdmsr --bitfield 0:0 0x3a
1
$ sudo rdmsr --bitfield 2:2 0x3a
0
many thanks!
Houcheng Lin

houcheng said:
Hi folks,
Is there any one has experience to use the vt-x feature, hardware virtualization, on zenfone 2?
Or can anyone help me to read below register value by a rdmsr module ?
The first bit is to check whether this CPU support vtx hardware, and the second is to check whether this CPU's vtx feature is enabled by BIOS.
$ sudo modprobe msr
$ sudo rdmsr --bitfield 0:0 0x3a
1
$ sudo rdmsr --bitfield 2:2 0x3a
0
many thanks!
Houcheng Lin
Click to expand...
Click to collapse
Check this out, it should be possible since the processor does have vt-x.

kazuken said:
Check this out, it should be possible since the processor does have vt-x.
Click to expand...
Click to collapse
Hi,
Thanks! This looks very likely possible in znefone 2.

Related

[Q] isolated inc repo from cm7 gingerbread?

I am compiling using cm7 for the source but want to isolate the repo strictly to the incredible to prevent needless time and un needed files for the other devices. How do I edit my script to prevent the downloading of a kazillion other devices on my pc?
Code:
#!/bin/bash
cd;
mkdir -p ~/bin;
#to avoid destination errors later
mkdir -p ~/android/system/vendor/htc/inc;
#this will help prevent hundreds of copies of PATH=$PATH:$HOME/bin in .bashrc
#the -f flag means if the file exits
if [ -f ~/bin/repo ]; then
echo "repo detected"
else
curl http://android.git.kernel.org/repo > ~/bin/repo;
chmod a+x ~/bin/repo;
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc;
export PATH=$PATH:$HOME/bin;
fi
cd ~/android/system;
repo init -u http://github.com/greenromproject/GRPmanifest.git;
repo sync;
#we don't want this in $HOME we want it $HOME/proprietary
cd $HOME/proprietary;
wget https://github.com/downloads/Treken/htc-Inc/htc.zip --no-check-certificate;
unzip htc.zip;
mv ~/proprietary/ ~/android/system/vendor/htc/inc/;
rm htc.zip;
#we are using our overlay for everything. This will produce errors since I changed the build system to look in our overlay for rommanager
cd ~/android/system/vendor/greenromproject/;
./get-rommanager;
cd ~/android/system/;
repo sync;
. build/envsetup.sh && brunch inc;
make -j`grep 'processor' /proc/cpuinfo | wc -l` bacon;
cp ~/android/system/out/target/product/inc/update* ~/Desktop;
echo -e [=-build aosp androidmake-=];
#convention says always use exit status exit 0 is a successful execution of the script
exit 0
Treken said:
I am compiling using cm7 for the source but want to isolate the repo strictly to the incredible to prevent needless time and un needed files for the other devices. How do I edit my script to prevent the downloading of a kazillion other devices on my pc?
Code:
#!/bin/bash
cd;
mkdir -p ~/bin;
#to avoid destination errors later
mkdir -p ~/android/system/vendor/htc/inc;
#this will help prevent hundreds of copies of PATH=$PATH:$HOME/bin in .bashrc
#the -f flag means if the file exits
if [ -f ~/bin/repo ]; then
echo "repo detected"
else
curl http://android.git.kernel.org/repo > ~/bin/repo;
chmod a+x ~/bin/repo;
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc;
export PATH=$PATH:$HOME/bin;
fi
cd ~/android/system;
repo init -u http://github.com/greenromproject/GRPmanifest.git;
repo sync;
#we don't want this in $HOME we want it $HOME/proprietary
cd $HOME/proprietary;
wget https://github.com/downloads/Treken/htc-Inc/htc.zip --no-check-certificate;
unzip htc.zip;
mv ~/proprietary/ ~/android/system/vendor/htc/inc/;
rm htc.zip;
#we are using our overlay for everything. This will produce errors since I changed the build system to look in our overlay for rommanager
cd ~/android/system/vendor/greenromproject/;
./get-rommanager;
cd ~/android/system/;
repo sync;
. build/envsetup.sh && brunch inc;
make -j`grep 'processor' /proc/cpuinfo | wc -l` bacon;
cp ~/android/system/out/target/product/inc/update* ~/Desktop;
echo -e [=-build aosp androidmake-=];
#convention says always use exit status exit 0 is a successful execution of the script
exit 0
Click to expand...
Click to collapse
That's a good question..I just had to reinstall Linux so had to redownload the source. I don't have my PC on me right now so I can't check but how much of the actual source is specific devices? MB wise? Maybe you could include something to "rm" all devicesm trees not Inc...downside of thet is next time you run repo sync its just gonna redownload everything...so I'm not sure
Sent from my HTC Incredible using XDA App
/System = 3.4g
/Device = 247mb
doug piston said:
/System = 3.4g
/Device = 247mb
Click to expand...
Click to collapse
where does this go? I'm still learning how to make scripts
Doesn't go anywhere, I'm just saying the whole repo only takes up about 3.5 gigs.
Oh, don't understand what you were saying. It does take a while though. Making the repo device specific would be better for me. You don't know how to make it device specific?
Nope. Never saw a need to. Hardly takes any space to repo the whole thing.
doug piston said:
Nope. Never saw a need to. Hardly takes any space to repo the whole thing.
Click to expand...
Click to collapse
Was looking around...this would take forever to add to your script. but maybe you could potentially "git clone" all the packages you want, while bypassing what you didn't...would be a lot to add but thats the only possible solution i saw in about 20 min of being bored. lol
tcberg2010 said:
Was looking around...this would take forever to add to your script. but maybe you could potentially "git clone" all the packages you want, while bypassing what you didn't...would be a lot to add but thats the only possible solution i saw in about 20 min of being bored. lol
Click to expand...
Click to collapse
Is there a guide that explains how this is done? Don't mind spending the time to change the script if that will speed up the process for people
Not sure what you are trying to spend up. You repo the whole thing once and yes that takes awhile but after that a "repo sync" takes just minutes.
Good point. Thanks! I guess I have a tendency to make things more difficult than they really are.
Don't let me discourage you, if you want to do it keep at it.
Nah, that's ok. I need to channel my energy else where where it will be most beneficial, like getting the vender tree worked out.
Treken said:
Nah, that's ok. I need to channel my energy else where where it will be most beneficial, like getting the vender tree worked out.
Click to expand...
Click to collapse
there is a file in in .repo/project.list ....it lists all the repo's to sync with. you could remove all the other devices except inc but I don't know if a repo sync will overwrite it...i don't think it does though
edit; there is also the manifest.xml in the same file which tells git what the cm repo consists of...you could also try removing the lines from that file as well
Conap to the rescue! I'll take a look and find out, thanks.
Treken said:
Conap to the rescue! I'll take a look and find out, thanks.
Click to expand...
Click to collapse
Yup Conap is pure genius.
DINC|CM7|PROUD AMERICAN!

[Tutorial] How to compile your first Nexus Kernel

If you see mistakes please contact me. If you think something can be shorter, easier, feel free to suggest.
I have spent a lot of time figuring this out. Not to mention making this guide.
I DO NOT RESPOND TO PRIVATE MESSAGES. EVERYTHING YOU NEED IS IN HERE.
If this guide helped you feel free to donate.
There is more to come, using different toolchains, important files, adding overclocking etc.
Setting up the environment & building the kernel for the first time
Ubuntu 12.04 64-Bit
Linux Mint 13 64-Bit
Compiling Jelly Bean AOSP ROMs with these 2 is possible WITHOUT ADDITIONAL WORK.
If you want to use virtualization software, do NOT use Virtualbox. You can run into networking issues and so on. I suggest using VMWare Player instead, which is available for free on http://www.vmware.com
Installing latest updates & reboot.
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo reboot
Click to expand...
Click to collapse
Now we will download and install the latest Java 6 JDK from here. Look for Java 6 SE Update 33 or a later update version. Don't download Java 7 JDK. I am downloading the file below for this guide.
Linux x64 68.69 MB jdk-6u33-linux-x64.bin
Click to expand...
Click to collapse
This guide assumes you have downloaded the file in the folder
~/Downloads
Click to expand...
Click to collapse
$ cd ~/Downloads
$ sudo chmod +x jdk-6u33-linux-x64.bin
$ ./jdk-6u33-linux-x64.bin
$ sudo mkdir /usr/lib/jvm
$ sudo mv jdk1.6.0_33 /usr/lib/jvm/jdk1.6.0_33
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_33/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_33/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_33/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_33/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_33/bin/javadoc 1
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config jar
$ sudo update-alternatives --config javadoc
$ java --version
$ ls -la /etc/alternatives/java*
Click to expand...
Click to collapse
Now reboot is optional but welcome. Let's play safe.
$ sudo reboot
Click to expand...
Click to collapse
Install all required packages to play with Android.
Ubuntu 12.04
$ sudo apt-get update
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 git
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
$ sudo reboot
Click to expand...
Click to collapse
Configure USB ports.
$ sudo gedit /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
This file should get the contents:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
Click to expand...
Click to collapse
Don't forget to replace the red marked text with your username from Ubuntu or Linux Mint.
When building a kernel, you only need to start from here. Pick the appropriate branch from the git manually. My example below shows how to download the required files to build a Jelly Bean kernel. What I did was visiting the git repository each time and picked the appropriate branch.
https://android.googlesource.com/device/samsung/maguro
$ mkdir ~/Documents/kernel
$ cd ~/Documents/kernel
$ git clone https://android.googlesource.com/device/samsung/maguro -b jb-release
Click to expand...
Click to collapse
Again pick the right branch from https://android.googlesource.com/kernel/omap.git
$ cd maguro
$ git clone https://android.googlesource.com/kernel/omap.git -b android-omap-tuna-3.0-jb-pre1
Click to expand...
Click to collapse
Ensure the toolchain is in your path.
Default, Easy solution
$ git clone https://android.googlesource.com/platform/prebuilt -b jb-release
$ export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
Click to expand...
Click to collapse
$(pwd) is a variable holding the current working directory.
Bandwidth-friendly solution
You can also download the toolchain to another directory. Bit first write down the directory you are working at.
mkdir ~/Documents/toolchain
cd ~/Documents/toolchain
$ git clone https://android.googlesource.com/platform/prebuilt -b jb-release
export PATH=~/Documents/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
Click to expand...
Click to collapse
Instead of specifying the location of the toolchain with a relative path, we must specify the absolute path here.
Now we go back to where we were working.
cd ~/Documents/kernel/maguro
Click to expand...
Click to collapse
I hope you understand why I mentioned the bandwidth-friendly solution. With little insight you could have come up with it yourself.
Now let's build the kernel
$ cd omap
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ make tuna_defconfig
$ make
Click to expand...
Click to collapse
[*]Now you need to put it in a flashable zip.
Possible issues, things to avoid, FAQ
- Avoid downloading the kernel sources to directories which might require root/superuser access. This is one of the reasons I downloaded all sources to '~/Documents'. This will save a lot of time messing with chmod or chown commands.
- What is 'tuna', shouldn't this be maguro? No, actually not. Tuna is the board name, while maguro is the codename of the Nexus. Something you might want to remember when building kernels.
Interesting files and locations
<kernel_directory>/samsung/arch/arm/mach-s5pv210/cpu-freq.c
Overclocking
Voltages
Links to mods, source code, ...
Only do these when you are in the omap directory
Getting access to Ezekeel's work
git remote add ezekeel https://github.com/Ezekeel/GLaDOS-nexus-prime.git
git fetch ezekeel
Click to expand...
Click to collapse
If you want to change the text marked in red make sure to change the other one as well. You can think of this as a nickname for the remote repository.
Example of cherry-picking CUSTOM VOLTAGE
1. Go here: https://github.com/Ezekeel/GLaDOS-nexus-prime/commits/customvoltage_JB
2. Copy the SHA of the commit
3.
git cherry-pick 05ab84fa9bc1fa86e5a99c54266873e433ff15e2
Click to expand...
Click to collapse
template
git cherry-pick <SHA>
Click to expand...
Click to collapse
When encountering conflicts, you are on your own. I figured most of this out on my own. So if I can do it you can too.
Getting access to Francisco Franco's work
git remote add franco https://github.com/franciscofranco/Tuna_JB_pre1.git
git fetch franco
Click to expand...
Click to collapse
Getting access to http://www.kernel.org
git remote add kerneldotorg git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git fetch kerneldotorg
Click to expand...
Click to collapse
red 2 days ago yours guide linked in sig.you sad that with ubuntu 12.10 aosp rom are impossible to compile,it's fine only for kernel and for aosp rom should use version 10.xx.now instead you say 12.xx is good for kernel and rom compiling,but from JB and so on.(Compiling AOSP ROMs with these 2 is possible. Only Jelly Bean and later though will compile without additional work)
after that,i think (after reading yours words)that until iCS 12.xx doesn't compile and from jb a so on 12.xx works good?i'm right or i I misunderstood?i'm totally noob on this things,compiled my fist rom 15 days ago,begin with JB but compiled already in mint mate 13,mint cynnamon 13,ubuntu 10.10 and 12.04\10.
very thanks for this guide man,it's very usefull and having already the environment setted it's very fast also.followed instruction in yours sig days ago and with no luck.now i retry with this!on mint 13 cynnamon 64bit now.regards cherrypicking...what you wrote is all we have to known for or is a base?
rated 5 stars and thanked.like this 3ads aims to help everyone begin do things yourselves on android
Good tutorial. Thanks for taking the time to write this.
How many gigs do I need to compile the kernel? I only have a 120gb ssd and 75gb free.
Sent from my Galaxy Nexus using Tapatalk 2
you are safe..
Serious_Beans said:
How many gigs do I need to compile the kernel? I only have a 120gb ssd and 75gb free.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
They are enough
For kernel compiling we don't need any version of java
Inviato dal mio Galaxy Nexus con Tapatalk 2
sert00 said:
red 2 days ago yours guide linked in sig.you sad that with ubuntu 12.10 aosp rom are impossible to compile,it's fine only for kernel and for aosp rom should use version 10.xx.now instead you say 12.xx is good for kernel and rom compiling,but from JB and so on.(Compiling AOSP ROMs with these 2 is possible. Only Jelly Bean and later though will compile without additional work)
after that,i think (after reading yours words)that until iCS 12.xx doesn't compile and from jb a so on 12.xx works good?i'm right or i I misunderstood?i'm totally noob on this things,compiled my fist rom 15 days ago,begin with JB but compiled already in mint mate 13,mint cynnamon 13,ubuntu 10.10 and 12.04\10.
very thanks for this guide man,it's very usefull and having already the environment setted it's very fast also.followed instruction in yours sig days ago and with no luck.now i retry with this!on mint 13 cynnamon 64bit now.regards cherrypicking...what you wrote is all we have to known for or is a base?
rated 5 stars and thanked.like this 3ads aims to help everyone begin do things yourselves on android
Click to expand...
Click to collapse
ICS didn't compile here on Ubuntu 12.04. I believe I needed to do some additional work. ICS was also released before Ubuntu 12.04 was released. Jelly Bean will compile just fine.
The only thing that was difficult to figure out was how to setup the Java 6 JDK properly which I had to figure out by trial and error.
The cherry-picking is handy when you want to 'steal' someone else his work. Let's say 99% of the developers do this all the time here on XDA. I wanted to explain how to cherry-picking because it's useful to know. I spent a long time getting here.
Serious_Beans said:
How many gigs do I need to compile the kernel? I only have a 120gb ssd and 75gb free.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I think 4-5GB if you download everything. If you only download the Jelly Bean things by only downloading the branch you need you will use about maybe 1GB I am not sure. Try it out.
Download the toolchain to a separate directory. This will save lots of bandwidth in the future.
Good job on this guide. I learnt this ages ago though
Sent from my Galaxy Nexus using xda premium
i'm interesting about linaro but i don't know how set it up,can you say something about this?
Sent from my Galaxy Nexus
dxdiag32 said:
i'm interesting about linaro but i don't know how set it up,can you say something about this?
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Linaro is easy.
Google to download the linaro toolchain from their website. And then it's a bit trial and error to fill in:
CROSS_COMPILE line
it's not arm-eabi- anymore buy gnu-arm-eabi or something similar. It has to do with the directory structure or the filenames.
If you get a compile error about vfp or something you must correct this in a make file.
Take a look in francisco franco's github account or AIR Kernel. They have commit which describe what they did if they ran into compile errors. Normally you won't have to change anything I think.
Thanks OP. Maybe when I'm free I'll give this a try. I always wanted to try to make a stock kernel + colour tweaks + trinity contrast + 384 GPU for my own use. As this is considered I am "stealing" work, I wouldn't bother uploading this kernel I have compiled stock AOSP 4.0.4 (referring a guide) for the galaxy nexus. Except I didn't test out the rom as I didn't own a nexus back then.
Sent from my Galaxy Nexus using Tapatalk 2
thanks OP, but why apt-get install openjdk after manually install JDK 6? it is nothing about kernel compile but fail on the whole aosp compile.
Sent from my Galaxy Nexus
Thanks a lot for this tuto.
I'm trying to compile GlaDos kernel with Ubuntu 12.10 and i have this error :
Code:
[email protected]:~/android/kernel/GLaDOS-nexus-prime$ make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: « include/generated/mach-types.h » est à jour.
CC kernel/bounds.s
cc1: error: unrecognized command line option "-mno-unaligned-access"
kernel/bounds.c:1: warning: switch -mcpu=cortex-a9 conflicts with -march= switch
make[1]: *** [kernel/bounds.s] Erreur 1
make: *** [prepare0] Erreur 2
Do you have an idea where it may come from ?
What is the version of your toolchain?
Sent from my Galaxy Nexus using xda app-developers app
anarkia1976 said:
What is the version of your toolchain?
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
I took the one in the 1st post :
Code:
git clone https://android.googlesource.com/platform/prebuilt -b jb-release
It's arm-eabi-4.4.3
I tried with Ubuntu 12.04 to be exactly in the same conditions as described in the 1st post but I have exactly the same error...
That is really weird... Any ideas ?
Remove from makefile this:
-mno-unaligned-access
Otherwise you can use new toolchain from my github:
https://github.com/anarkia1976/AK-linaro
anarkia1976 said:
Remove from makefile this:
-mno-unaligned-access
Otherwise you can use new toolchain from my github:
https://github.com/anarkia1976/AK-linaro
Click to expand...
Click to collapse
Thanks anarkia1976 !
I've been able to compile with the last version of your toolchain. :good:
No problem .. if I can help it is a pleasure.
anarkia1976 said:
No problem .. if I can help it is a pleasure.
Click to expand...
Click to collapse
I noticed JZO54K has a crashing camera bug. I checked several times, redownloaded everything on different devices being maguro and grouper.
Has anyone managed to build CM10 or AOSP on Ubuntu 12.10 ? When installing the same packages I notice everything crashes. It's unclear if it's actually the packages or Google Chrome. I suspect one of the packages being the culprit.
I am going one by one through the packages in Ubuntu 12.10. Those willing to help me let me know. just install each package one by one.

[PORT] [ROM] WebOS Port - Build Setup

Overview
The following steps will help you to setup a complete build environment for the webos-ports project.
WE DO NOT CURRENTLY SUPPORT webos-image PLEASE BUILD webos-dev-image
Setup the build environment
Code:
$ sudo apt-get install gawk
$ sudo apt-get install diffstat
$ sudo apt-get install chrpath
$ sudo apt-get install texinfo (if not on Ubuntu or Debian it will be makinfo instead of texinfo)
$ cd into-your-build-directory
$ mkdir webos-ports && cd webos-ports
$ wget https://raw.github.com/openwebos/build-webos/master/scripts/prerequisites.sh
$ sudo sh prerequisites.sh
$ wget https://raw.github.com/webOS-ports/webos-ports-setup/master/Makefile
$ make setup-webos-ports
Before you can build, you will need some tools. If you try to build without them, bitbake will fail a sanity check and tell you about what's missing, but not really how to get the missing pieces.
This has been tested on Gentoo (shr-chroot) and Ubuntu-12.04 amd64 and should work almost everywhere where valid toolchain is provided.
You need a lot of RAM to link webkit-webos, make sure you have at least 6GB (it's OK when some of that is swap, because it's used only for short part of build).
Webkit needs so much ram to link because it's linking with debug symbols (huge files) which are stripped later in do_package after creating -dbg packages.
You can add extra 2GB of swap file like this:
Code:
$ dd if=/dev/zero of=swap_2gb.img bs=1024k count=2048
$ mkswap swap_2gb.img
$ sudo swapon swap_2gb.img
If you want it permanently add it to your /etc/fstab.
Building
To configure to build for tuna (notice '.' which is actually bash 'source' command):
Code:
$ cd into-your-build-directory/webos-ports/webos-ports
$ . ./setup-env
To update metadata
Code:
$ make update
# or if it shows warning about different bblayers.conf or layers.txt
$ make update-conffiles && make update
# you can also add UPDATE_CONFFILES_ENABLED = 1 to config.mk
# if you never want to have any uncommited changes in your checkouts RESET_ENABLED = 1 in config.mk
To build the webos-image for the gnex device:
Code:
$ MACHINE=tuna bb webos-ports-image
# or for the webos development image
$ MACHINE=tuna bb webos-ports-dev-image
If you get an error about missing qmake-palm, try this:
Code:
$ MACHINE=tuna bitbake -c cleansstate -f qt4-webos
If you get an error about missing QtWebKit #261, try this:
Code:
$ MACHINE=tuna bitbake -c cleansstate -f webkit-webos
If you get an error "The BBPATH variable is not set", then you forgot to call:
Code:
$ . setup-env
After the build completes, you will find your image in <build env>/tmp-eglibc/deploy/images/tuna/
==Speeding up the build==
You can tune bitbake to use more of your processor. Edit webos-ports/conf/local.conf and uncomment the PARALLEL_MAKE and BB_NUMBER_THREADS lines. PARALLEL_MAKE should be set to the number of processor cores you have (or the number you have made available to the VM in the case of a VM) and BB_NUMBER_THREADS can be set from one to two times that, depending upon RAM, processor speed, other tasks running and Hyper-threading support. Example values:
Code:
PARALLEL_MAKE = "-j 4"
BB_NUMBER_THREADS = "4"
I'm not in charge of this port. This thread is just here to help you, and discuss about this port made by team WEBOS-PORT.
Thanks for their work.
Installing and running the image
Once you have built the image, you'll likely want to install it and run it on your Nexus. See Testing Gnex for further details on that process.
Source and updates : http://webos-ports.org/wiki/Galaxy_Nexus_Build_Setup
Videos
Pictures
More Pictures : http://webos-ports.org/wiki/Galaxy_Nexus
Thanks for this, just having a go at this now
Edit: Damn it seems it doesn't like Ubuntu 10.10
Suppose I needed an excuse to update........
It would be pretty cool to have web os as a port for the Nexus. Wish you all the best
Sent from my Galaxy Nexus using Tapatalk 2
Nice, I hope webOS will be a succes on our Galaxy Nexuses!
Good luck!
nice work there ...
Really excited about this. Can't wait for a relatively stable port of the WebOS
So awesome, can't wait to see how this progresses.
Sent from my Galaxy Nexus using Tapatalk 2
The source was specified for Gnex, wasn't it?
Sent from my Galaxy Nexus using xda app-developers app
woot woot. niceeeee
Sound good....
Sent from my Galaxy Nexus using xda app-developers app
Awesome dude! Can't wait for a release. Hopefully in the future we can get this to dual boot with android, that would be awesome!
possibly to get instructions for toro?
waiting this on my gnex
New video added to post #2
exciiting stuff
Ok, this may be very embarrassing. I was able to follow the process to build the image but I cannot find the image nor how-to flash it on my Nexus. Any help like links, keywords to search for is very appreciated.
#1 updated with Latest revision as of 23:58, 10 October 2012
sounds interesting.. cant wait for build that i can flash
Bread Pitta said:
Ok, this may be very embarrassing. I was able to follow the process to build the image but I cannot find the image nor how-to flash it on my Nexus. Any help like links, keywords to search for is very appreciated.
Click to expand...
Click to collapse
Same here. Finally got it to build without errors, but no clue what to do next. My best Google sleuthing couldn't find any hints either

[GUIDE] Compiling your own AOKP (ICS Branch) from Source

Hi! Here's a complete guide for people who want to develop AOKP from source. I havent compiled any ROM from source because my internet connection is too slow. This guide will work, as far as I know. So lets start off by seeing the requirements.
Requirements :
Code:
1. A 64-bit environment. (64-bit is necessary for android 4.0 and plus builds)
2. Ubuntu 12.04 or 12.10 (with 64-bit architecture)
3. 2Ghz Dual Core Processor
4. 2GB Minimum ram
5. 50GB File Space (For only one rom source)
The device tree can be found here : Link. (thanks to whitexp for the device tree and percy_g2 to provide the correct links in the replies.
Now Open the terminal (CRTL+ALT+T) and go ahead as follows :
1. Update your OS
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
2. Download the required packages :
2A. Installing JDK:
Code:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer
Once its installed check weather its installed properly or not.
Code:
$ java -version
The output should be like this :
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
2B. Installing required packages.
Code:
apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
2C. LibGL shortcut issue solver:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
3. Setup installing repo
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
4. Create the working folder
Code:
$ mkdir aokp_ics
$ cd aokp_ics
5A. Making the directory for downloading the source
Code:
mkdir -p ~/rom/android/system
Now go into that folder by :
Code:
cd ~/rom/android/system
PATH=~/bin:$PATH
5B. Downloading the AOKP source:
Code:
$ repo init -u https://github.com/AOKP/platform_manifest.git -b ics
6. Sync repository:
Code:
$ repo sync
** Please note that this will take a long time. You need fast connection because the size repositories is 8 ~ 12 GB.
7. Setting up the source folder
Once the sync finishes without breaking all the folders will appear in rom/android/system folder, Execute :
Code:
mkdir -p ~/rom/android/system/device/samsung/totoro
and then for vendor, execute this :
Code:
mkdir -p ~/rom/android/system/vendor/samsung/totoro
8. Compiling
Code:
. build/envsetup.sh
lunch cm_totoro-eng
brunch cm_totoro-eng
** Your build will be located at /rom/android/system/out
All the best.. ​
And how will this work again?
Without proper source implementations from the device?
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
---------- Post added at 12:23 AM ---------- Previous post was at 12:19 AM ----------
Hmmm,
We can't even compile a stable ics build.
I'm not sure how well this works.
Can any senior GY devs verify this?
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
Good thread
deathnotice01 said:
And how will this work again?
Without proper source implementations from the device?
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
---------- Post added at 12:23 AM ---------- Previous post was at 12:19 AM ----------
Hmmm,
We can't even compile a stable ics build.
I'm not sure how well this works.
Can any senior GY devs verify this?
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
Click to expand...
Click to collapse
i am not an expert in this so I have said that this will work "as far as i know". I have gone till the step in which you have to sync repo. So I thought that this will surely work even ahead of that step.
Ya sure. Some senior GY dev must verify this.
There is a file called default.xml in repo/manifests. You have to change it according to your needs.
LoLz... Let CM9 get stable! AOKP and other ICS based source compiled roms come after!!
Also PPA no longer exists! Java won't install with the method given in the guide!
EDIT:
Also, If you haven't tried on your own you can't say it works -_-
And you didn't mention which device config to be used -_- People aren't pros like you #LOL
@prototype-U @percy_g2 @Deadly
EDIT:
Also the source is not 8-12GB its less than 8GB :silly:
EDIT 3:
More people need to see this :v
@gadgetroid
Arnav.G said:
LoLz... Let CM9 get stable! AOKP and other ICS based source compiled roms come after!!
Also PPA no longer exists! Java won't install with the method given in the guide!
EDIT:
Also, If you haven't tried on your own you can't say it works -_-
And you didn't mention which device config to be used -_- People aren't pros like you #LOL
@prototype-U @percy_g2 @Deadly
EDIT:
Also the source is not 8-12GB its less than 8GB :silly:
EDIT 3:
More people need to see this :v
@gadgetroid
Click to expand...
Click to collapse
Exactly.
The device tree is of most importance
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
deathnotice01 said:
Exactly.
The device tree is of most importance
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
Click to expand...
Click to collapse
Yeah, CM is AOSP with Major Modifications in Google AOSP Source for Performance!
Also instead of compiling ICS based roms you should first compile CM7/GingerBread roms! Coz if you directly start off with CM9/ICS I am sure you are going to get frustrated of the big big errors you are going to face!
This thread ironic! lol
deathnotice01 said:
Exactly.
The device tree is of most importance
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
Click to expand...
Click to collapse
AOKP or any aosp builds based on cm9 can be compiled but it will have same bugs like CM 9 and device tree can be found https://github.com/Whitexp/android_device_samsung_totoro/tree/ICS here for SGY .
Its useless until RIL is fixed
Also compiling isn't that tough!
But writing proper HAL's and fixing the bugs is tough!!
hmm thread is not a bit useful in this forum
aokp on galaxy y5360
make me laugh
we can dream for cm7.2 aosp is a milestone that cant be achieve
I am new here and not a professional.
I have tried this. But i didnt make the final build because my internet is too slow(256K modem). but i have reached the sync repo step successfully and so i thought i would share it. But now i see that sharing it was waste.
And yes, @Arnav.G its not a rule that CM must be maintained first and AOKP after that. Anyone can start the work of AOKP simultaneously. I was seeing your profile and i saw that you also have posted a guide on compiling CM, AOKP and all. I sincerely think that the guide is not so noob friendly, you should make it more simpler by separating the commands which you have pressed into one.
greetings.
robowarrior1377 said:
I am new here and not a professional.
I have tried this. But i didnt make the final build because my internet is too slow(256K modem). but i have reached the sync repo step successfully and so i thought i would share it. But now i see that sharing it was waste.
And yes, @Arnav.G its not a rule that CM must be maintained first and AOKP after that. Anyone can start the work of AOKP simultaneously. I was seeing your profile and i saw that you also have posted a guide on compiling CM, AOKP and all. I sincerely think that the guide is not so noob friendly, you should make it more simpler by separating the commands which you have pressed into one.
greetings.
Click to expand...
Click to collapse
Why bringing my guide here? lol
Also do you want to kang my guide!?
Ok.
So OP what device tree did you use to be exact?
This post is in compliance with the national potato safety regulation.
[Galaxy S 4 LTE]
AOKP and Galaxy Y look so funny together!
Btw you missed the major steps:
Setting up vendor
Setting up device tree
Setting up kernel source
And obtaining cm_totoro.mk
Anyways, its worth the try.. atleast you guys would be able to see AOKP
Subscribed to thread xD
Lets see what is his next reply
robowarrior1377 said:
I havent compiled any ROM from source because my internet connection is too slow.
Click to expand...
Click to collapse
makes a guide for something he doesn't know or has never done
robowarrior1377 said:
Requirements :
2. Ubuntu 12.04 or 12.10 (with 64-bit architecture)
Click to expand...
Click to collapse
I'm sure I built it on 11.10
robowarrior1377 said:
3. 2Ghz Dual Core Processor
Click to expand...
Click to collapse
1ghz single core
robowarrior1377 said:
4. 2GB Minimum ram
Click to expand...
Click to collapse
yawn. 512mb with a bit of swap
robowarrior1377 said:
5. 50GB File Space (For only one rom source)
Click to expand...
Click to collapse
20gb
robowarrior1377 said:
Now Open the terminal (CRTL+ALT+T) and go ahead as follows :
Click to expand...
Click to collapse
isn't working on debian. had to map my own shortcut
robowarrior1377 said:
1. Update your OS
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
Click to expand...
Click to collapse
Isn't necessary
2. Download the required packages :
robowarrior1377 said:
2A. Installing JDK:
Code:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer
Click to expand...
Click to collapse
can be problems for new distros. please use my method
cybojenix said:
first we download the required binary:
Code:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
then we need to run the binary, and move it to a shared location
Code:
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
finally, all the needed java binaries need to be installed, and given the highest priority. This will override any other java versions you have
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
now check that jdk1.6.0_45 is selected on these
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Click to expand...
Click to collapse
robowarrior1377 said:
5A. Making the directory for downloading the source
Code:
mkdir -p ~/rom/android/system
Click to expand...
Click to collapse
no comment.
robowarrior1377 said:
Code:
PATH=~/bin:$PATH
Click to expand...
Click to collapse
you'd be better off adding this to ~/bash.rc
robowarrior1377 said:
7. Setting up the source folder
Once the sync finishes without breaking all the folders will appear in rom/android/system folder, Execute :
Code:
mkdir -p ~/rom/android/system/device/samsung/totoro
and then for vendor, execute this :
Code:
mkdir -p ~/rom/android/system/vendor/samsung/totoro
Click to expand...
Click to collapse
WOOOOTTTT building with empty device folders. you must be a genius
robowarrior1377 said:
8. Compiling
Code:
brunch cm_totoro-eng
Click to expand...
Click to collapse
hmm. brunch totoro
robowarrior1377 said:
** Your build will be located at /rom/android/system/out
Click to expand...
Click to collapse
LOOOL
~/aokp-ics/rom/android/system/out/target/product/toroto
that's if you insist on using your directory.
I hope this helped you. trollojenix
cybojenix said:
makes a guide for something he doesn't know or has never done
I'm sure I built it on 11.10
1ghz single core
yawn. 512mb with a bit of swap
20gb
isn't working on debian. had to map my own shortcut
Isn't necessary
2. Download the required packages :
can be problems for new distros. please use my method
no comment.
you'd be better off adding this to ~/bash.rc
WOOOOTTTT building with empty device folders. you must be a genius
hmm. brunch totoro
LOOOL
~/aokp-ics/rom/android/system/out/target/product/toroto
that's if you insist on using your directory.
I hope this helped you. trollojenix
Click to expand...
Click to collapse
Ahahahhahahahahahhahahahahahha... xD Can't stop laughing
Trololololjenix xD

[dev][kernel][kexec]

Last Update : August, 19, 2014
Hi,
I'm still try to bypass the MMU protection.
I have fixe a lot of bug, like memory misalignment, bad adresses allocation, dtb correction, etc...
Last sources and binaries here :
kexec-tools V11.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2902912&stc=1&d=1408401794
kexec-tools binaries V11.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2902913&stc=1&d=1408401794
Sorry, i have always 13 sec reboot after new kernel boot.
"cpu_proc_fin" use a "mcr p15" to init cache and proc that cause freeze.
I try to find solution for that.
Last Update : June, 22, 2014
Hi,
My sources are horrible... but i give something new.
This kexec is for stock kernel only (tested on .757). I thinks theses sources work on other kernel too.
In "kexec-tools V10.zip", you have all my sources. It's highly recommended to mod them to have something OK.
In "kexec binaries.zip", you have binaries to install
=> "kexec_load.ko" and "procfs_rw.ko" must be placed in "/system/lib/modules" folder with "chmod 777"
=> "kexec" must be placed in /system/bin" folder with "chmod 777"
=> cd /system/lib/modules
=> insmod kexec_load.ko
For sources :
Mod and adapt all you want, it's free.
You have 2 scripts in Zip : "./compil-kexec" in "kexec-tools" folder to rebuild and send in device directly (install Adbtcp on device and send by tcp with : adb connect xxx.xxx.xxx.xxx) = work perfectly with me.
"scriptZ1" is for compil stock kernel or another kernel (doomlord kernel for eg)
You must rename "custom_final_files" folder after compil to "final_file" manually ; You can have guest kernel in "custom_final_files" and stock kernel in "final_files" for "kexec-tools" path ... Don't mix a guest and host kernel please ^^
I am tired... i let you test and say if it's ok for you...
Thank a lot to munjeni for his help.
kexec-tools V10.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2811994&stc=1&d=1403456181
kexec binaries.zip : http://forum.xda-developers.com/attachment.php?attachmentid=2811995&stc=1&d=1403456181
Last Update : November, 23, 2013
Hi,
For few days now, i haven't no more kernel panic with my kexec.
I have fixed few stuffs into sources, and add a lot.
These adds are, to include a "dt.img" image file into kexec load process.
This image file is a "device_tree" image to match hardware to software.
So, i assume to don't include atags into boot process, but pass bootloader informations by this DT.
I have programmed a little scan memory to found dynamicly all magic tags, because i found 3 device_tree into memory (magic is "0xd00dfeed").
These 2 device_tree are echo from first and nice structure.
The boot process need to have informations from this DT, and need all informations to initialize hardware (no HDW initialisation by the kernel)
I must first fix issues ; Regroup zImage and dt.img into memory to load a solid bloc to kexec_load module to boot into, and second, fix an offset i can't explain, 0x800 in memory causing misalignment memory
Keep tuned..
Last Update : November, 17, 2013
Hi everybody,
My kexec-tools work for Sony Xperia Z1 stock kernel "3.4.0-perf"
This tools can work on all locked bootloader for all locked device, not only Sony or Z1 models.
This kexec-tools add a kexec_load kernel module (LKM) and use a driver to grant a communication between "kexec" user program and kexec_load.ko module
what is for ?
"kexec" user program load in memory a custom kernel in zImage format, but can load ".tar" image too
This user tool load ramdisk in memory if necessary
This tool is for this purpose only, and don't keep in memory the custom kernel at device reboot.
It is a "user" program, not a "kernel" extension... So, to really do the magic, we need the host kernel (stock sony locked kernel) have a kexec_load capability to reboot in a new gest kernel (custom kernel).
Infortuntly, stock kernel don't have kexec_load capability.
Sony have compiled his stock kernel without this option, and "standard" kexec-tools "need" this option to work.
To see all system call capability of kernel, you can run theses command :
Code:
echo 0 > /proc/sys/kernel/dmesg_restrict
echo 0 > /proc/sys/kernel/kptr_restrict
cat /proc/kallsyms
Do all grep you want here.
The "echo 0" "restrict" is here to unmask logical adresses to "system calls"
Like you can see, "__NR_kexec_load" capability isn't here.
To add kexec_load capability in stock locked kernel, we need to add manualy a kernel module wich add this function into the kernel.
Why ? Because the way to keep in memory a custom kernel need to know a lot of parameters, and keep a specific memory range alive at reboot.
Only kernel can do this.
All user program will be terminated at reboot.
"Standard" kexec_load.ko module use a method to implement the "__NR_kexec_load" function in system call table.
Since 2.6.0 kernel, linux for security reason, have locked in memory the "system_call_table" ; No more add or modification is authorized.
If kexec tool try to add a value, "kexec_load" for us, we causes a kernel panic, and reboot device.
For this reason, i have modify kexec user program and kexec_load module to implement a driver to talk to each other.
this driver replace syscall method, and we no more need to use a system call table.
For this reason, this tool is now compatible with modern kernel like our "3.4.0"
For this reason, this tool must work for other device (Xperia X, P, S, etc...) and another brand
For this reason, if kernel is locked, we can bootstrap to run a new kernel.
Installation
First, you can compil your own kexec tool
Here, sources : http://forum.xda-developers.com/attachment.php?attachmentid=2397299&stc=1&d=1384689174
And here, the binaries : http://forum.xda-developers.com/attachment.php?attachmentid=2397305&stc=1&d=1384689406
(it's not a cwm zip, i have no time to create an installer for now ; use "./compil-kexec" if you want an automatic install)
Install *.ko in /system/lib/modules
Install kexec and kdump in /system/bin
Grant with "chmod 777"
Unzip in kexec-tools folder
Install a toolchain (sudo apt-get install gcc-arm-linux-gnueabi)
launch => ./compil-kexec
what's all
This script can do everythinks for you
- Compilation of tools
- Compilation of modules
- installation in device
This script can compil for every brand you have.
Except you must remove or adapt the patch (see below why)
Patch ??
This patch is because a module must be compiled in the same time the kernel himself.
For this reason a "vermagic", an identifier, is used by system to block every module not compil with kernel
Some custom kernel bypass this to authorize every modules.
But for stock kernel, it is not allowed.
You can easely strapp this by busybox.
"busybox modprobe" for help
"-f" to force load without vermagic
To see this vermagic :
Code:
# uname -r
This "uname -r" must be the same that
Code:
# strings kexec_load.ko | grep vermagic
vermagic=3.4.0-perf-g66807d4-02450-g9a218f1 SMP preempt mod_unload modversions ARMv7
If you want use automaticaly this vermagic, you can modify into the custom kernel this file :
Code:
"include/config/kernel.release" and add :
"3.4.0-perf-g66807d4-02450-g9a218f1"
This file will be use at module compil to match the vermagic.
Infortunatly, it is not enought. :silly:
The infamous "no symbol version for module_layout"
When a module compil is created, it use symbols link to system call function, translate by adresses
Theses symbols are not at same physical adresses in stock kernel and modules (compiled from DooMLoRD kernel).
So, theses adresses must be convert into modules itself to match with stock symbols adress.
A patch is needed.
If you use my script, modules are automatically patched.
Here patches :
Code:
sed -i 's/\x32\x76\x86\x29/\x72\xFF\x5E\x20/' procfs_rw.ko
sed -i 's/\x32\x76\x86\x29/\x72\xFF\x5E\x20/' kexec_load.ko
sed -i 's/\xBB\xD0\xF8\x4D/\x0E\x1C\x63\x77/' kexec_load.ko
sed -i 's/\xA6\x26\x81\x1A/\xD4\x56\x02\x7E/' kexec_load.ko
sed -i 's/\xA3\xD1\xEC\x96/\xEC\x43\x28\x1A/' kexec_load.ko
sed -i 's/\x8C\xE6\x6A\x5F/\x3D\xDF\x02\xF2/' kexec_load.ko
sed -i 's/\x3E\xF3\xEF\xE9/\x18\x7F\xA6\x8A/' kexec_load.ko
sed -i 's/\x8B\xD2\x92\x10/\xC8\x19\x08\x9C/' kexec_load.ko
sed -i 's/\x1C\xE8\x18\xE1/\x7C\x71\x9E\xEF/' kexec_load.ko
sed -i 's/\xAB\x2C\x2F\x8B/\x8E\xD7\x63\xC0/' kexec_load.ko
sed -i 's/\xF5\x62\xAA\x4B/\x34\x80\x1B\x74/' kexec_load.ko
sed -i 's/\x00\x52\xD6\xD7/\x6F\x80\x91\x20/' kexec_load.ko
sed -i 's/\x4F\x77\x57\x6A/\x0C\x57\xC7\x63/' kexec_load.ko
sed -i 's/\xCA\x2F\x65\x71/\x92\xB8\x7F\x53/' kexec_load.ko
sed -i 's/\x0F\xD0\xA0\x91/\xFA\x80\x15\xB4/' kexec_load.ko
sed -i 's/\x29\xA0\x6D\x48/\x6C\x6B\x96\x54/' kexec_load.ko
sed -i 's/\x6D\x1F\x1F\x37/\xCC\x5E\x79\x8B/' kexec_load.ko
sed -i 's/\xFD\x23\xD0\xFB/\xE3\xE3\x68\x52/' kexec_load.ko
You can use hexedit or hexdump to see these adresses :
Code:
hexdump kexec_load.ko | grep ff72
0003d50 b0b0 80ac ff72 205e 6f6d 7564 656c 6c5f
how does it work ?
# kexec --help
For kexec help... nothing more to say.
# lsmod
List loaded modules... You must see
kexec_load 31369 0 - Live 0x00000000 (O)
# rmmod kexec_load.ko
Remove kexec_load module from memory.
# grep kexec /proc/device
To see installed driver.
You must see :
100 kexec_driver
First number is "major" number to identify your driver in system.
# mknod /dev/kexec_driver c 100 0
Install driver.
Major number (here 100), is important for module.
This Major must be the same between module and driver.
By default, 100 is used.
# insmod kexec_load.ko
To install "LKM", kexec_load kernel module.
If another Major is needed, you can use "insmod kexec_load.ko 101" for Major 101
You can use "modprob" if you want, but you must configure the module folder.
How kexec and module exchange informations ?
By the driver.
Normal output for a kernel module is to write in "dmsg" file.
To see kernel output, launch this command :
Code:
# dmesg
To see last kernel log, see in :
Code:
# cat /proc/last_kmsg
For kexec module, this normal way still exist, and give a lot of informations, but to speak with, you must use the driver.
/dev/kexec_driver
You can yourself test communication:
Code:
# cat /dev/kexec_driver
You can send kernel by this communication channel.
Type following commands for help
=> echo help >/dev/kexec_driver
=> dmesg | grep Kexec
Code:
# echo help >/dev/kexec_driver
# cat /dev/kexec_driver
Last command : 'help'
Please type following command :
=> dmesg|grep Kexec
Every command send into driver is receive by kexec_load.ko module and running into the kernel.
The answer can by read thru the driver
Here, you can see that normal way to see messages is allway dmesg.
Code:
# dmesg|grep Kexec
<4>[15050.521628] Kexec: Starting kexec_module...
<6>[15050.521656] Kexec: kexec_driver_contener allocation
<6>[15050.521673] Kexec: kexec_memory_buffer allocation
<4>[15050.521691] Kexec:----------------------------------------------------
<4>[15050.521710] Kexec: kexec_driver created with major : '100'
<4>[15050.521728] Kexec: Please, prepare by typing the following commands :
<4>[15050.521746] Kexec: => mknod /dev/kexec_driver c 100 0
<4>[15050.521761] Kexec: => cat /dev/kexec_driver
<4>[15050.521775] Kexec:-----------------------------------------------------
<4>[15050.521791] Kexec: For help
<4>[15050.521803] Kexec: => echo help >/dev/kexec_driver
(...)
I have add a lot of informations to help to configure kexec.
rdtags, atags ??
Not sure for this part of kernel.
"atags" is the most used method to bootloader to parse commands and informations to kernel at boot.
"atags" is a form of structure in memory to organise informations.
At boot, a address chain is created and can be compulse in /proc/atags file.
This file is read only system.
"rdtags" is another way to bootloader to parse information to kernel.
"rdtags" is not stocked in "/proc"
But, as i see, stock kernel can use "atags" from bootloader.
kexec can substitute bootloader function to create fromscratch a atags chain, and parse to new kernel.
I have change this part to stock atags in "/data/atags", and reuse or change if need.
If this don't work, i must create a rdtags chain to replace atags ; It's not a hard work.
Status
For the moment, kexec tools works.
=> Phase one OK.
I can start Phase Two : new kernel patch.
If you want to help me...
Actually, load a custom kernel and boot into with kexec tools work.
But at boot into, a kernel panic occurs.
It seems, a part of kexec patch is missing in custom kernel.
Hi new thread created for kernel kexec development.
Status: not working: wrong values for mem defines under the kernel is giving segmentation fault as its attempting to write to memory areas that are currently being used byyyyy the system
Instructions:
Make kernel compatible?:
1. Download kernel diff patch from below
2. Terminal - diff patch > diff.txt
How to use:
1. Download kexec-tools (kexec binary) from below
2. Copy into system/bin directory and give it executable permission
3. Download compatible kernel
4. Terminal - kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x20000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Download links:
Kexec tool- https://db.tt/8DZXQ9eV
Ramdisk firmware 1.548 : https://db.tt/8DZXQ9eV
zImage (kernel):
Source code:
Kernel diff patch: https://db.tt/Xi2htT7Q (currently contains wrong values for mem defines)
Kexec-tools: https://db.tt/I22ofr3b
Special thanks: @delewer @krabappel2548
Reserved
Please move this thread to Xda Devdb, then I can also edit first post etc if I find new stuff
Sent from my C6903 using xda app-developers app
krabappel2548 said:
Please move this thread to Xda Devdb, then I can also edit first post etc if I find new stuff
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
Devdb?
Pm me i dont know what Devdb is lol
Recieved segmentation fault with delewers calculated mem values too
We need to write to memory where we have write access to, maybe lockedbootloader is not allowing us to write? Orrr we are just writing to wrong area of memory
If kexec works on the Z1, can it be ported over to Xperia Z/ZL/T/Ultra? I believe they don't all share the same processor.
Shaky156 said:
Devdb?
Pm me i dont know what Devdb is lol
Click to expand...
Click to collapse
Shaky156 said:
Recieved segmentation fault with delewers calculated mem values too
We need to write to memory where we have write access to, maybe lockedbootloader is not allowing us to write? Orrr we are just writing to wrong area of memory
Click to expand...
Click to collapse
I'll discuss with Kali- today if he's available.
Knucklessg1 said:
If kexec works on the Z1, can it be ported over to Xperia Z/ZL/T/Ultra? I believe they don't all share the same processor.
Click to expand...
Click to collapse
Doesn't need to be same processor, can be ported
Sent from my C6903 using xda app-developers app
Knucklessg1 said:
If kexec works on the Z1, can it be ported over to Xperia Z/ZL/T/Ultra? I believe they don't all share the same processor.
Click to expand...
Click to collapse
Yes it wont matter much, since its not s800 it should be easier for you guys , take the kexec-tool use that, implement the patch write to the correct mem addresses which is free, it should boot if you guys have issues let me know,
I need to calculate the correct addresses.
Ive noticed s800 uses a dt.img, might need to modify kexec-tool to support dt.img, not sure what dt.img does yet, only know it holds values
Shaky156 said:
I need to calculate the correct addresses.
Ive noticed s800 uses a dt.img, might need to modify kexec-tool to support dt.img, not sure what dt.img does yet, only know it holds values
Click to expand...
Click to collapse
the dt.img is needed by the kernel to boot, so I guess we need to load that too in kexec.
EDIT: people that wanna try add kexec patch to their kernel, check github: android_kernel_sony_msm8974/commits/kexec
krabappel2548, i have compil your kernel by my script (fromscratch)
My script (instruction in "DoomLord Build kernel thread" : scriptZ1 http://forum.xda-developers.com/attachment.php?attachmentid=2346163&d=1382568778
(for thoses who want to help us...)
You have a little mod to do here (bad compil) :
In "sound/soc/msm/qdsp6v2/rtac.c"
you must change
#include <q6voice.h>
by
#include "q6voice.h"
btw : no more ideas to load kexec for the moment ...
delewer said:
krabappel2548, i have compil your kernel by my script (fromscratch)
My script (instruction in "DoomLord Build kernel thread" : scriptZ1 http://forum.xda-developers.com/attachment.php?attachmentid=2346163&d=1382568778
(for thoses who want to help us...)
You have a little mod to do here (bad compil) :
In "sound/soc/msm/qdsp6v2/rtac.c"
you must change
#include <q6voice.h>
by
#include "q6voice.h"
btw : no more ideas to load kexec for the moment ...
Click to expand...
Click to collapse
Sorry, I'm trying to get caught up on the forum, but what seems to be the current standing issue to get kexec working?
Knucklessg1 said:
Sorry, I'm trying to get caught up on the forum, but what seems to be the current standing issue to get kexec working?
Click to expand...
Click to collapse
Read the OP
Status paragraph
Memory regions
00000000-07afffff : System RAM
00008000-00b79383 : Kernel code
00d04000-00f0cddb : Kernel data
0ff00000-779fffff : System RAM
7ff00000-7ff3ffff : rdtags_mem
7ff80000-7ffa0fff : last_kmsg
7ffa1000-7ffa5fff : last_amsslog
System RAM MEM = 00000000
So --min-mem=0x20000000
Now need to find a free memory area thatll allow us to write and hopefully the mmu/pmu on locked bootloader wont cancel it
@delewer? @DooMLoRD @kali @Bin4ry
I know I shouldn't disturb, but i must ask: if You achieve Your goal, would it be possible to port it to devices like Xperia P, S, T, U and other NXT? It would be great, many ppl are ready to give a prize for it. Thanks in advance, good luck and sorry again.
Sent from my LT22i using xda app-developers app
king960 said:
I know I shouldn't disturb, but i must ask: if You achieve Your goal, would it be possible to port it to devices like Xperia P, S, T, U and other NXT? It would be great, many ppl are ready to give a prize for it. Thanks in advance, good luck and sorry again.
Sent from my LT22i using xda app-developers app
Click to expand...
Click to collapse
These devices are not 2013 devices, they arent s800 socs, so they are much easier to do, simply take the kexec-tools from op, implement the patch in your kernel, write the correct memory values for your specific device and execute in terminal via the command in op, minmem depends on your device too, good luck
I think some1 tried it already, but it works only for unlocked devices... Anyway, thanks for help.
Sent from my LT22i using xda app-developers app
king960 said:
I know I shouldn't disturb, but i must ask: if You achieve Your goal, would it be possible to port it to devices like Xperia P, S, T, U and other NXT? It would be great, many ppl are ready to give a prize for it. Thanks in advance, good luck and sorry again.
Sent from my LT22i using xda app-developers app
Click to expand...
Click to collapse
Does doing this require having an Unlocked Boot loader prior to implementation?
Sent from my C6603 using xda app-developers app
A few informations about kexec-tools debug
in kexec.c
Fonction :
if (file_type.load(argc, argv, kernel_buf,
kernel_size, &info) < 0) {
fprintf(stderr, "Cannot load %s\n", kernel);
return -1;
}
With a forced execution of kexec (bypass error to see...)
--mem-min=0x90000000
kernel: 0xb6b9d008 kernel_size: 3e9340
debug: 1 - after get memory range
debug: 2 - after type test
debug: 3 - after type test
debug: 4 - after info.kexec
debug: Focus 1 - argc '5' ; argv 'be856774' ; kernel_buf 'b6b9d008' ; kernel_size '3e9340' ; info 'be856548' ; i '1' ; file_type.name 'zImage'
Could not find a free area of memory of 3f1340 bytes...
Cannot load zImage
debug: 10 - before trampoline
debug: 11 - after trampoline
debug: 12 - before segment load
debug: 13 - after segment load
debug: 8 - before sort_segment
debug: 9 - after sort_segment
debug: 6 - before purgatory
debug: 7 - after purgatory
kexec_load: entry = (nil) flags = 280004
nr_segments = 0
kexec_load failed: Function not implemented
entry = (nil) flags = 280004
nr_segments = 0
debug: 5 - return result : ffffffff
With a forced bypass on file_type.load , we have this :
--mem-min=0x20000000
debug: Focus 1 - argc '5' ; argv 'bef18774' ; kernel_buf 'b6bc7008' ; kernel_size '3e9340' ; info 'bef18548' ; i '1' ; file_type.name 'zImage'
Segmentation fault
delewer said:
A few informations about kexec-tools debug
in kexec.c
Fonction :
if (file_type.load(argc, argv, kernel_buf,
kernel_size, &info) < 0) {
fprintf(stderr, "Cannot load %s\n", kernel);
return -1;
}
With a forced execution of kexec (bypass error to see...)
--mem-min=0x90000000
kernel: 0xb6b9d008 kernel_size: 3e9340
debug: 1 - after get memory range
debug: 2 - after type test
debug: 3 - after type test
debug: 4 - after info.kexec
debug: Focus 1 - argc '5' ; argv 'be856774' ; kernel_buf 'b6b9d008' ; kernel_size '3e9340' ; info 'be856548' ; i '1' ; file_type.name 'zImage'
Could not find a free area of memory of 3f1340 bytes...
Cannot load zImage
debug: 10 - before trampoline
debug: 11 - after trampoline
debug: 12 - before segment load
debug: 13 - after segment load
debug: 8 - before sort_segment
debug: 9 - after sort_segment
debug: 6 - before purgatory
debug: 7 - after purgatory
kexec_load: entry = (nil) flags = 280004
nr_segments = 0
kexec_load failed: Function not implemented
entry = (nil) flags = 280004
nr_segments = 0
debug: 5 - return result : ffffffff
With a forced bypass on file_type.load , we have this :
--mem-min=0x20000000
debug: Focus 1 - argc '5' ; argv 'bef18774' ; kernel_buf 'b6bc7008' ; kernel_size '3e9340' ; info 'bef18548' ; i '1' ; file_type.name 'zImage'
Segmentation fault
Click to expand...
Click to collapse
Did you compile this kexec yourself? Or did you get this from krapabbel? I issued krapabbel to compile a new debug version have gave him the code but never heard back from him :/
Anywayz so cannot find free memory is the issue

Categories

Resources