Related
Sources are here:
opensource.motorola.com/sf/frs/do/viewRelease/projects.droidx/frs.droidx_source.shado_x3_1_13_5_10
Hopefully I'll get some time to work on tun.ko for openvpn or vpnc.
But if someone beats me to it, please post it here.
Jeb
Downloading the source and pre-req's now. Will work on the tun.ko when I get back from dinner if no one else has it done.
Droid X source code! What!? Does this mean a bright future could be ahead for us?
XDA App = Pwnage
jebc4 said:
Sources are here:
opensource.motorola.com/sf/frs/do/viewRelease/projects.droidx/frs.droidx_source.shado_x3_1_13_5_10
Hopefully I'll get some time to work on tun.ko for openvpn or vpnc.
But if someone beats me to it, please post it here.
Jeb
Click to expand...
Click to collapse
What exactly is this?
drew630 said:
Downloading the source and pre-req's now. Will work on the tun.ko when I get back from dinner if no one else has it done.
Click to expand...
Click to collapse
Good luck to you and all for any work on this sweet phone. You rock!
Sent from my DROIDX using XDA App
Hi Drew,
Did you have any luck with tun.ko?
Thanks & all the best!
You can click in the bottom right of that that link and download all the files in one zip. SHADO_X3_1.13.5.10.zip is around 275MB.
I have unzipped that, then untarred all the individual archives.
According to the README, you need some files from source.android.com, but their link doesn't work, so that will take some more digging. (maybe I missed something...)
It appears to be the complete build process. I was just hoping to jump in and get a tun.ko modules compiled, but I still can't find the kernel config (I was just quickly looking around).
Anyway, bottom line is that I will have to get up to speed on the android build process, not just the cross compiled kernel process. This will take me some more time.
If anyone gets one before me, please post.
Thanks, Jeb
Anyone had any luck yet?
Sent from my DROIDX using XDA App
hmmm... I think that you should be able to compile the kernel with the default config options, but just enable the tun/tap module... I don't think that the module would really depend too heavily on any of the other config options?
I have compiled the module multiple times with multiple config files but none work. I get a exec failed error which is presumably because i compiled for the wrong architecture.
I have tried all the omap3 configs i found and the defconfig with no luck. I am away today but will look at it again tomorrow.
Sent from my DROIDX using XDA App
I'm no droid expert but it looks like according to the droid readme file you want ARM arch, but the compiler that youo should be using is arm-eabi-gcc (comes from the prebuilt tools from android) - in the Makefile set CROSS_COMPILE to /path/to/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- (or whatever the path to the file is on your build environment)
All the best,
Okay, after a bunch of hours I finally got it compiled
The 'exec format error' that you were probably seeing is not because it was compiled for the wrong architecture. I originally compiled the kernel modules with the default .config file that 'make menuconfig' generated.
When I tried to load it, I got the 'exec format error'. 'dmesg' showed:
<3>[46706.378570] tun: version magic '2.6.29 mod_unload modversions ARMv5 ' should be '2.6.29 preempt mod_unload ARMv7 '
So, that gave me a big hint - after a few hours of customizing I finally got the .config file to a version that will properly compile and load the openvpn module.
I'm attaching the .config file (config.zip) and tun.ko file (tun.ko.zip)
*NOTE* - I have not tested the kernel module yet, so I have no idea if it works. Even if it does work, the .config file is the default one that I manipulated so that the tun module would compile. You probably don't want to use the .config file as it may not match all of the hardware and configs of the droid x. If someone has the actual droid x .config file used by motorola then that would be very helpful.
*update* - the attacked files *do not work*. The working version is available at http://forum.xda-developers.com/showthread.php?p=7417520
Hmm... it looks like tun.ko does compile and install, but is not working properly
# lsmod
tun 11392 0 - Live 0xbf00c000
sec 4808 0 - Live 0xbf000000
# cat /dev/net/tun
/dev/net/tun: No such device
#
The response should be 'cat: /dev/net/tun: File descriptor in bad state'
If we only had the .config file from motorola this would be a lot easier.
mab2 said:
Hmm... it looks like tun.ko does compile and install, but is not working properly
# lsmod
tun 11392 0 - Live 0xbf00c000
sec 4808 0 - Live 0xbf000000
# cat /dev/net/tun
/dev/net/tun: No such device
#
The response should be 'cat: /dev/net/tun: File descriptor in bad state'
If we only had the .config file from motorola this would be a lot easier.
Click to expand...
Click to collapse
I'll post on Motodev board for the running .config (they should have left it in the running kernel at /prog/config.gz ...)
Anyway, thanks trying -- could you post any tips on getting a dev env setup?
I've been using linux for years, but this is my first android setup.
jebc4 said:
I'll post on Motodev board for the running .config (they should have left it in the running kernel at /prog/config.gz ...)
Anyway, thanks trying -- could you post any tips on getting a dev env setup?
I've been using linux for years, but this is my first android setup.
Click to expand...
Click to collapse
I'm in the same boat as you - android newbie, linux veteran.
I started out by getting the whole android environment - http://source.android.com/source/download.html - and ran 'repo init -u git://android.git.kernel.org/platform/manifest.git' - all of that was just so I could get the prebuilt directory with the arm-eabi- files that will be used below.
Then I just downloaded the entire project from opensource.motorola.com - extracted it all, went into the kernel directory and hacked away at the .config file from there.
To compile the kernel I ran:
CROSS_COMPILE=/home/MY_USERNAME/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make -j 4 kernel
CROSS_COMPILE=/home/MY_USERNAME/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make modules
I spent a few hours with it - playing around with environment variables and modifying some Makefiles so I may have left out a small thing or two
It looks like running 'make mapphone_defconfig' created a functioning .config file and I used that to generate tun.ko.
I've posted the files at http://forum.xda-developers.com/showthread.php?p=7417520
Attachments removed as per OP's request.
mab2 said:
I'm no droid expert but it looks like according to the droid readme file you want ARM arch, but the compiler that youo should be using is arm-eabi-gcc (comes from the prebuilt tools from android) - in the Makefile set CROSS_COMPILE to /path/to/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- (or whatever the path to the file is on your build environment)
All the best,
Click to expand...
Click to collapse
Thanks but I already got that, been compiling kernels for other Android devices for a while...
drew630 said:
Thanks but I already got that, been compiling kernels for other Android devices for a while...
Click to expand...
Click to collapse
didn't know that - no harm intended
All the best,
mab2 said:
Okay, after a bunch of hours I finally got it compiled
The 'exec format error' that you were probably seeing is not because it was compiled for the wrong architecture. I originally compiled the kernel modules with the default .config file that 'make menuconfig' generated.
When I tried to load it, I got the 'exec format error'. 'dmesg' showed:
<3>[46706.378570] tun: version magic '2.6.29 mod_unload modversions ARMv5 ' should be '2.6.29 preempt mod_unload ARMv7 '
So, that gave me a big hint - after a few hours of customizing I finally got the .config file to a version that will properly compile and load the openvpn module.
I'm attaching the .config file (config.zip) and tun.ko file (tun.ko.zip)
*NOTE* - I have not tested the kernel module yet, so I have no idea if it works. Even if it does work, the .config file is the default one that I manipulated so that the tun module would compile. You probably don't want to use the .config file as it may not match all of the hardware and configs of the droid x. If someone has the actual droid x .config file used by motorola then that would be very helpful.
*update* - the attacked files *do not work*. The working version is available at http://forum.xda-developers.com/showthread.php?p=7417520
Click to expand...
Click to collapse
i'm having a similar issue, how did you fix this ARMvX Version problem when compiling a module? Thanks in advance!
This method should work for Android 2.2 releases. This only works for 1.2.6 and 1.5.7. It does not work with 1.8.3, and so will almost surely not work for Android 2.3 releases. They have said the week of July 8th they will release the 1.8.3 source. As an alternative, I have figured out how to load a sbf from Latin America that is also Android 2.2.2, and we have it's kernel source. I have tested compiling a custom kernel for it, and it works. I advise only people interested in playing with custom kernels use this method.
Install Ubuntu Maverick with the gnueabi.
Packages:
binutils-arm-linux-gnueabi
cpp-4.4-arm-linux-gnueabi
cpp-4.5-arm-linux-gnueabi
g++-4.4-arm-linux-gnueabi
gcc-4.4-arm-linux-gnueabi
gcc-4.4-arm-linux-gnueabi-base
gcc-4.5-arm-linux-gnueabi
gcc-4.5-arm-linux-gnueabi-base
gcc-arm-linux-gnueabi
Argentina SBF
Run sbf_flash -x against it to break it into CG files. You only need CG56(boot), CG57(system), and CG58(webtop). You might be able to stick with the 1.8.3 AT&T webtop, I haven't tested.
Use fastboot to write them to the phone. It has to be moto-fastboot.
fastboot flash system CG57.img
fastboot flash webtop CG58.img
Use split_bootimg.pl to split CG56 into the kernel and ramdisk files.
Once you have compiled your own kernel
fastboot flash:raw boot zImage CG56.img-ramdisk.gz
Compiling a custom kernel
Download /proc/config.gz from a phone running the release you want to compile a kernel for
mkdir ~/atrix-kernel
cd ~/atrix-kernel
tar zxf ~/kernel.tgz
cp -a ~/config.gz .
gunzip config.gz
cp -a config .config
Edit .config if you want
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
make oldconfig
make zImage
make modules
The resulting zImage is arch/arm/boot/zImage.
Use an existing ramdisk. Modify it if you want.
On phone:
dd if=/dev/block/mmcblk0p11 of=/tmp/boot.img
On computer, as root:
mkdir /mnt/boot
mount ~/boot.img /mnt/boot -o loop,ro
Use split_bootimg.pl to pull the ramdisk.gz out of boot.img
Read more at http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If it mounts, you have the boot image. I can't guarntee it is mmcblk0p11 in all cases. It should also be 8mb.
fastboot flash:raw boot zImage ramdisk.gz
or
fastboot flash boot boot.img
If you want to change kernel command line arguments use mkbootimg. Run dmesg | less on your phone to copy YOUR kernel arguments.
Example:
mkbootimg --kernel zImage --ramdisk ramdisk.gz --cmdline "[email protected] [email protected] [email protected] vmalloc=320M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:1100:100:800,kpanic:2500:400:800 security=tomoyo androidboot.serialno=AGGB2I1532" -o boot.img
moto-fastboot
http://forum.xda-developers.com/showthread.php?t=1138092
fastboot 64-bit
http://forum.xda-developers.com/attachment.php?attachmentid=634867&d=1308871353
fastboot 32-bit
http://forum.xda-developers.com/attachment.php?attachmentid=635031&d=1308879588
mkbootimg 32-bit, should work for 64-bit if you have the libraries:
http://proton.cygnusx-1.org/~edgan/mkbootimg
split_bootimg.pl
http://code.lardcave.net/entries/2010/11/24/164025/split_bootimg.pl
http://zen-droid.googlecode.com/files/split_bootimg.pl
sbf_flash
http://blog.opticaldelusion.org/2010/05/sbfflash.html
1.2.6 AT&T kernel.tgz
http://sourceforge.net/projects/atrix.motorola/files/Atrix ATT/OLYFR_U4_1.2.6/kernel.tgz/download
0.50.0 Personal Argentina kernel.tgz
http://sourceforge.net/projects/atrix.motorola/files/Atrix LATAM/OLYLA_U4_0.50.0/kernel.tgz/download
Excellent work Edgan!
i've been fumbling around for a while now getting things set up, i wish i would have known this before.
thanks for the post/instructions!
this is what moto says about it:
https://sourceforge.net/projects/atrix.motorola/files/Atrix ATT/OLYFR_U4_1.2.6/
1. Create a workspace containing vanilla 'android-2.2.1_r1' release from Google.
2. Overlay Motorola-provided published repos on top of original Google versions.
3. Build user space components (see end of this document for the list of supported targets):
cd <workspace>
. build/envsetup.sh
lunch generic-user
make TARGET_BOARD_PLATFORM=tegra TARGET_ARCH_VARIANT=armv7-a \ arch_variant_cflags="-march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16" \ BOARD_HAVE_BLUETOOTH=true BOARD_HAVE_BLUETOOTH_BCM=true \ BOARD_GPS_LIBRARIES= WPA_SUPPLICANT_VERSION=VER_0_6_X <list-of-targets>
4. Building kernel and kernel modules.
cd <workspace>/kernel
export ARCH=arm
export CROSS_COMPILE="arm-eabi-"
make tegra_olympus_android_defconfig
make FACTORY_BUILD=false BUILD_ID=OLYFR_U4_1.2.6
cd <workspace>/vendor/bcm/wlan/osrc/open-src/src/dhd/linux
make ANDROID_BUILD_TOP=<workspace> BUILD_ID=OLYFR_U4_1.2.6
Appendix A: list of supported targets
out/target/product/generic/system/bin/bluetoothd
out/target/product/generic/system/bin/brcm_patchram_plus
out/target/product/generic/system/bin/busybox
out/target/product/generic/system/bin/dnsmasq
out/target/product/generic/system/bin/dumpe2fs
out/target/product/generic/system/bin/dund
out/target/product/generic/system/bin/e2fsck
out/target/product/generic/system/bin/hciattach
out/target/product/generic/system/bin/iptables
out/target/product/generic/system/bin/iwconfig
out/target/product/generic/system/bin/iwevent
out/target/product/generic/system/bin/iwgetid
out/target/product/generic/system/bin/iwlist
out/target/product/generic/system/bin/iwpriv
out/target/product/generic/system/bin/iwspy
out/target/product/generic/system/bin/mke2fs
out/target/product/generic/system/bin/pand
out/target/product/generic/system/bin/resize2fs
out/target/product/generic/system/bin/sdptool
out/target/product/generic/system/bin/tc
out/target/product/generic/system/bin/tune2fs
out/target/product/generic/system/framework/jcifs-krb5-1.3.12.jar
out/target/product/generic/system/lib/bluez-plugin/audio.so
out/target/product/generic/system/lib/bluez-plugin/input.so
out/target/product/generic/system/lib/liba2dp.so
out/target/product/generic/system/lib/libbluetoothd.so
out/target/product/generic/system/lib/libbluetooth.so
out/target/product/generic/system/lib/libext2_blkid.so
out/target/product/generic/system/lib/libext2_com_err.so
out/target/product/generic/system/lib/libext2_e2p.so
out/target/product/generic/system/lib/libext2fs.so
out/target/product/generic/system/lib/libext2_profile.so
out/target/product/generic/system/lib/libext2_uuid.so
out/target/product/generic/system/lib/libiprouteutil.so
out/target/product/generic/system/lib/libnetlink.so
out/target/product/generic/system/lib/libwbxmlparser.so
out/target/product/generic/system/xbin/avinfo
out/target/product/generic/system/xbin/hciconfig
out/target/product/generic/system/xbin/hcitool
out/target/product/generic/system/xbin/l2ping
i had problems compiling, but i hope tonight my luck is better. vanilla compiled fine, but not after i added the Atrix stuff to it.
i took everything and untar'd it in my working directory and created any directory structures that didn't exist, but i was a little uncertain as to what to do with a handful of them, like the kernel.tgz. you supposed to created that directory then untar it?
Should be stickified. This will be a useful resource for prospective rom builders.
Sent from my MB860 using XDA App
This is awesome! Thank you. I have been playing around with a build environment for a day or two. When I try the "make tegra_olympus_android_defconfig " it spits out an error at me...prolly missing something.
Sorry, I don't really know all that much about this, but could we use this to compile CM6? It wouldn't be ideal, but would be better than stock until someone who knows what they're doing makes a CM7 build.
Sent from my MB860 using XDA App
lunder said:
Sorry, I don't really know all that much about this, but could we use this to compile CM6? It wouldn't be ideal, but would be better than stock until someone who knows what they're doing makes a CM7 build.
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
kholk said earlier he got CM7 and will release when he is home.
anyways
I got my kernel build, now how do i use it to create a custom rom, could someone point me towards the info, or atlest give me som sort of hint!
samcripp said:
kholk said earlier he got CM7 and will release when he is home.
Click to expand...
Click to collapse
Some point me in the direction of where this was stated... been away from the computer since Friday... thanks
Swiftks said:
Some point me in the direction of where this was stated... been away from the computer since Friday... thanks
Click to expand...
Click to collapse
he said this on irc
samcripp said:
he said this on irc
Click to expand...
Click to collapse
did he say he had it or he was working it... to my understanding, porting CM7 is a long task. dont get me wrong, kholk is phenomenal but its hard to belive development has started, and its released soon. would be nice though, maybe hes been working hardcore on it and the port is going smoothly
Regardless, either way it's good news. I also hear that the official CM7 dev team is getting or has already gotten a Atrix too. Hope that maybe some time in the not to distant future we can get an "official" CM7 rom, built specifically around the Atrix & its hardware.
Sent from my MB860 using XDA Premium App
Swiftks said:
Regardless, either way it's good news. I also hear that the official CM7 dev team is getting or has already gotten a Atrix too. Hope that maybe some time in the not to distant future we can get an "official" CM7 rom, built specifically around the Atrix & its hardware.
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
agreed bud, couldent have said it any better
how many of you could compile an oc kernel? maybe thermal throttling disabled
anybody already working on it?
Swiftks said:
Regardless, either way it's good news. I also hear that the official CM7 dev team is getting or has already gotten a Atrix too. Hope that maybe some time in the not to distant future we can get an "official" CM7 rom, built specifically around the Atrix & its hardware.
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
Kholk has a engineering device and not a retail ATT model.
It is completely realistic that he could have a CM7 build that he was developing the whole time on his device but waiting for the bootloader to get unlocked to release it.
We just have to wait and see what goodies kholk desides to release.
Edit: sorry this is all way off topic and I should not have added additional comments based on off-topic items.
we will be getting a 4.1.83 source release around the 7 or 8th of july.
Watch out my thread at moto's open source forum:
http://sourceforge.net/motorola/atrix/discussion/general_comments/thread/c63fc4c9/
franciscojavierleon said:
we will be getting a 4.1.83 source release around the 7 or 8th of july.
Watch out my thread at moto's open source forum:
http://sourceforge.net/motorola/atrix/discussion/general_comments/thread/c63fc4c9/
Click to expand...
Click to collapse
That is great news. We are dying on irc without those
Sent from my MB860 using XDA Premium App
That is great news That the 4.1.83 kernel source is coming out in a week or so. Since it has not released yet, we won't be getting a 2.3.4 kernel for a bit I don't think. I am a bit new to this kind of stuff.
If you have an AOSP system.img and ram disk, do you just package the ram disk with the kernel into a boot.img and run it (and maybe pray )? I don't believe its as simple as that but that is why I ask
What channel are you guys hanging out on re: IRC? I would love to chip in on the kernel dev/community rolls as I have a lot of relevant experience.
Hi guys
After few days of tinkering around with Zenfone 4 stock ROM
I could finally modify Shaka Huang's Zenfone Boot Tools to work with stock Zenfone 4 boot images.
The tool can successfully extract and repack ramdisk and kernel from the Kitkat versions of boot.img.
Ramdisk repacking is still not proper ..
But yeah , unpacking boot.img can provide lot of device specific info for porting ROMs.
Download and extract the boot-tools-zenfone4 archive
To compile the tools urself ..
Just run make . in the src directory
or use the prebuilt tools from the bin directory
USAGE
========
To extract kernel (bzImage) and initrd (ramdisk.cpio.gz) from boot.img (or recovery.img):
./unpack boot.img bzImage ramdisk.cpio.gz
===========================================================
To repack the ramdisk(ramdisk.cpio.gz) and kernel (bzImage) into boot.img
./pack boot.img bzImage ramdisk.cpio.gz new_boot.img
Here boot.img is the original unmodified boot.img(required for boot headers) and new_boot.img is the modified new boot.img
Thanks
I don't know how to say this,but I love you. I spent all night on internet trying to find how to unpack boot and recovery images from zenfone,and I finaly found it. THANK YOU. Btw. I used this tools with Zenfone 5,and it worked
custom recovery for zenfone 4
http://forum.xda-developers.com/group.php?do=discuss&group=&discussionid=3610
finally a custom recovery for zenfone 4 a400cg.
zenfone 5
I have successfully used this code to unpack a zenfone 5 image. we need these tools to create custom ROMs easily, so I suggest implementing this in a more proper manner. Anyone want to help? My coding skills are weak.
Actually it seems this code doesn't quite function correctly... The bzImage is good but the rest...
Sent from my ASUS_T00F using XDA Free mobile app
correction
The kernel and ramdisk are ok, but there is another 4 M of info , which is likely the second stage?
nevermind
ignore those last two messages, I was in error
i wanna asking in zenny . how to turn off the vibrate when the popup battery 15% showed? thanks !
Sent from my ASUS_T00I using xda Forums PRO
ناهید
Sent from my GT-I9300 using Tapatalk
there are some tool to unpack repack using cygwin ?
Some one please make a miui or RR of CM11 of stock lollipop or 6.0 for Asus ZenFone 400cg.....
Why big developers cant make it....
I would have made it if i knew how to build roms...
Sent from my ASUS_T00I using XDA Free mobile app
Does anyone knows how to change Asus boot logo in zenfone 5 ?
(NOTE: I am not talking about bootanimation, I am talking about asus boot logo which appears before bootanimation)
---------- Post added at 07:50 PM ---------- Previous post was at 07:48 PM ----------
Evictus said:
I don't know how to say this,but I love you. I spent all night on internet trying to find how to unpack boot and recovery images from zenfone,and I finaly found it. THANK YOU. Btw. I used this tools with Zenfone 5,and it worked
Click to expand...
Click to collapse
How did you unpack boot.img of zenfone 5 ? Did you use windows PC or just zenfone 5 phone ?
Hi i want to port android one (sprout) rom to another media tek based devices .Any help will be appreciated.
Hello Ab200000,
This is a lecagy boot.img, MTKIMG dont work on it because there is no MTK header at the begining of each bloc.
I will modify MTKIMG to handle this case but for tide you i manually unpack kernel and ramdisk.
In the next message i will explain you how i do
Hop this help you (Dont forgot to click on thank button )
To manually extract your boot.img this is how i do :
I use mtkimg to get the image layout
Code:
> mtkimg.exe info boot.img
MTKIMG V0.44(win64) by rom1nux
Image header :
Signature : ANDROID!
Kernel size : 4931048 bytes
Kernel load address : 0x80008000
Ramdisk size : 1075216 bytes
Ramdisk load address : 0x84000000
Second stage size : 0 bytes
Second stage load address : 0x80F00000
Tags address : 0x80000100
Page size : 2048 bytes
Product name : ''
Command line : ''
ID : 12FF85BE30433CB9FCDBF9C90DC5EE8BCBC70C04
Image layout :
Bloc Offset Pages Size (bytes)
------------------------------------------------
Header 0x00000000 1 2048
Kernel 0x00000800 2408 4931584
Ramdisk 0x004B4800 526 1077248
Free 0x005BB800 2185 4474880
------------------------------------------------
Total 5120 10485760
------------------------------------------------
With an hexadecimal editor i extract kernel from 0x800 to 0x4B4800 from boot.img
I check for valid kernel at offset 0x24 we need to find magic 0x18 0x28 0x6F 0x01, good it's a "Linux ARM zImage"
With an hexadecimal editor i extract ramdisk from 0x4B4800 to 0x5BB800 from boot.img
I check for valid gzip at offset 0x00 we need to find magic 0x1F 0x8B, good it's a cpio.gz
I try to extract the ramdisk, no error, well, all good
I will modify mtkimg soon as possible
Hope this help you
(Dont forget to click on thank button)
Thank you for this
rom1nux said:
To manually extract your boot.img this is how i do :
I use mtkimg to get the image layout
Code:
> mtkimg.exe info boot.img
MTKIMG V0.44(win64) by rom1nux
Image header :
Signature : ANDROID!
Kernel size : 4931048 bytes
Kernel load address : 0x80008000
Ramdisk size : 1075216 bytes
Ramdisk load address : 0x84000000
Second stage size : 0 bytes
Second stage load address : 0x80F00000
Tags address : 0x80000100
Page size : 2048 bytes
Product name : ''
Command line : ''
ID : 12FF85BE30433CB9FCDBF9C90DC5EE8BCBC70C04
Image layout :
Bloc Offset Pages Size (bytes)
------------------------------------------------
Header 0x00000000 1 2048
Kernel 0x00000800 2408 4931584
Ramdisk 0x004B4800 526 1077248
Free 0x005BB800 2185 4474880
------------------------------------------------
Total 5120 10485760
------------------------------------------------
With an hexadecimal editor i extract kernel from 0x800 to 0x4B4800 from boot.img
I check for valid kernel at offset 0x24 we need to find magic 0x18 0x28 0x6F 0x01, good it's a "Linux ARM zImage"
With an hexadecimal editor i extract ramdisk from 0x4B4800 to 0x5BB800 from boot.img
I check for valid gzip at offset 0x00 we need to find magic 0x1F 0x8B, good it's a cpio.gz
I try to extract the ramdisk, no error, well, all good
I will modify mtkimg soon as possible
Hope this help you
(Dont forget to click on thank button)
Click to expand...
Click to collapse
Thank you rom1nux
I appreciate the work you done on this mediatek boot.img . I hope i can port rom now without any problem.
Yes it will be helpful if you include this method in your future mtkimg tool. As it will increase the porting possibilities android one roms
Mtk 6582 KitKat 4.4.4 miui rom available ,is it possible to port for android one
android one uses
android one uses legacy boot.img
sheshank said:
Mtk 6582 KitKat 4.4.4 miui rom available ,is it possible to port for android one
Click to expand...
Click to collapse
@Ab20000
I guess you could also try AIK for unpacking stock boot.img. I was able to unpacked sprout recoveries without any issue
1cefire said:
@Ab20000
I guess you could also try AIK for unpacking stock boot.img. I was able to unpacked sprout recoveries without any issue
Click to expand...
Click to collapse
do you have any android one device? Does it have alarm function even when the phone is powered off? As other media tek phones have it.
I want to port android one rom to other mediatek based soc of mine. I am not sure what else i need to besides editing ramdisk, using device's original kernel , fixing updater script , original specific drivers and what else?
Ab20000 said:
do you have any android one device? Does it have alarm function even when the phone is powered off? As other media tek phones have it.
I want to port android one rom to other mediatek based soc of mine. I am not sure what else i need to besides editing ramdisk, using device's original kernel , fixing updater script , original specific drivers and what else?
Click to expand...
Click to collapse
yes, one of the sprout4 variant. I haven't had any chance to verify if the alarm function is working while powered off. Sorry dude, i wish i could help you, but my porting abilities is very limited Better ask ricky_adhitya, as i was saying, he was able to port RR 5.1.1 to other mtk6582 devices
I will contact him,
1cefire said:
yes, one of the sprout4 variant. I haven't had any chance to verify if the alarm function is working while powered off. Sorry dude, i wish i could help you, but my porting abilities is very limited Better ask ricky_adhitya, as i was saying, he was able to port RR 5.1.1 to other mtk6582 devices
Click to expand...
Click to collapse
Thanks for the boot.img method, did anyone succed to make it work ? (Ex with CM12.1 port from Spout)
I'll try this when im at home.
I usually use this tutorial for porting LL : http://mtkromsxda.blogspot.fi/2015/08/how-to-port-cm12cm121-lollipop-based.html
But i just found this !! : http://techintact.com/how-to-port-cm-12-1-for-mt6582-from-android-one/
Ill try them when im home
Ab20000 said:
Hi i want to port android one (sprout) rom to another media tek based devices .Any help will be appreciated.
Click to expand...
Click to collapse
Can you help me to port Android one marshmallow update to port into mt6582 running Lollipop based phone using kernel 3. 10. x? please email me at [email protected]
4.9 was released and Nexus 5 it's support by mainline kernel
http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.9-ARM-Pull
Interesting. This might bring development back to the phone. Also 4.8 and 4.9 have some amazing features and speed improvements.
Will any dev merge and update our kernel? will this function with our android latest version?
santi1993 said:
Will any dev merge and update our kernel? will this function with our android latest version?
Click to expand...
Click to collapse
No, it's probably not even functional in many aspects, there will be a lot of patching/fixing needed to get it to work.
There is already been discussed about his.
Yes, it's impossible use 4.9 without patch related to panel, exc exc
So what does exactly the "Nexus 5 support" on this kernel mean if you can't run Android on it without patching? Would it potentially help running Linux distros on our devices or?
TheReduxPL said:
So what does exactly the "Nexus 5 support" on this kernel mean if you can't run Android on it without patching? Would it potentially help running Linux distros on our devices or?
Click to expand...
Click to collapse
There is support for the kernel, so yes, you could now run Arch, Debian, OpenWRT, or DD-WRT much more easily.
Android utilizes old libraries that are not compatible with new kernels (that's at least my understanding of the matter), so you would need to patch it to run a newer kernel, and that could only get you so far.
The newest kernel version that anyone had managed to boot Android with is the latest 4.4.x LTS release.
I wonder if someone could backport the necessary changes from 4.9 to the latest 4.4.x release though, that would already be something.
Thank you! I really like the concept of running *WRT on Nexus - I wonder how would functionality like network booting work like...
Could the mainline kernel also be used for other non-Android OSs like Ubuntu (Touch) or Sailfish OS?
TheReduxPL said:
Thank you! I really like the concept of running *WRT on Nexus - I wonder how would functionality like network booting work like...
Could the mainline kernel also be used for other non-Android OSs like Ubuntu (Touch) or Sailfish OS?
Click to expand...
Click to collapse
I don't think so, as they rely on Android bits to work with the bootloader and recovery.
But perhaps there is a chance with the new OS that KDE are cooking, which is supposed to be completely independent of Android.
The 4.10 kernel brings in mainline support for the Nexus 6P and the Nexus 5X.
I wish that mainline support would arrive for the Nexus 4.
moriel5 said:
The newest kernel version that anyone had managed to boot Android with is the latest 4.4.x LTS release.
Click to expand...
Click to collapse
Update: Apparently Android 6.0.x and up can now utilize kernel 4.9.x.
As there is a build of Android 7.1.x for the x86 platform (I have no idea whether it is an official build of Android-x86, nor do I know the precise Android version, though) with a 4.9.x kernel (again, I have no idea precisely which version).
My source is a newly thread opened in the Remix OS forum, in which the OP asks for the possibility of updating the kernel in Remix OS, and mentions that he/she managed to boot it (only in debug mode, though) with the aforementioned kernel.
The source: https://forum.xda-developers.com/remix/remix-os/remix-3-0-207-kernel-t3546057
anyone managed to boot a hh from any kind of 4.9 compilation?
Sent from my Nexus 5 CAF using Tapatalk
Hey folks!
I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice
But anyway this is another story.
santi1993 said:
anyone managed to boot a hh from any kind of 4.9 compilation?
Click to expand...
Click to collapse
Yeah i did!
Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz
... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb
Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb
Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)
Then via adb:
reboot bootloader
... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img
See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.
Cheers,
scholbert
scholbert said:
Hey folks!
I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice
But anyway this is another story.
Yeah i did!
Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz
... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb
Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb
Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)
Then via adb:
reboot bootloader
... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img
See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.
Cheers,
scholbert
Click to expand...
Click to collapse
Linux version 4.9.27 ([email protected])
Wow, you are one of the coolest users on there! i doubt anyone could boot it up!
You rock! hope we can get a public release to test it out!
scholbert said:
Hey folks!
I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice
But anyway this is another story.
Yeah i did!
Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz
... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb
Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb
Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)
Then via adb:
reboot bootloader
... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img
See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.
Cheers,
scholbert
Click to expand...
Click to collapse
Hey that's amazing. I've been working on this too. So where exactly did you enter the command line parameter for console? Can you list out that command?
Sent from my Nexus 5 using XDA Labs
santi1993 said:
Linux version 4.9.27 ([email protected])
Wow, you are one of the coolest users on there! i doubt anyone could boot it up!
You rock! hope we can get a public release to test it out!
Click to expand...
Click to collapse
Thanks for appreciation, but what do you expect from "public release"?
As many other already posted here, this kernel is far away from the 3.4 Images for daily use.
So this is just for fun of course :angel:
Icyphox said:
Hey that's amazing. I've been working on this too. So where exactly did you enter the command line parameter for console? Can you list out that command?
Sent from my Nexus 5 using XDA Labs
Click to expand...
Click to collapse
Have a look at the tool abootimg.
You could use a bootimg.cfg fle and change the cmdline for your boot image individually.
E.g.:
Code:
bootsize = 0xe48800
pagesize = 0x800
kerneladdr = 0x8000
ramdiskaddr = 0x2900000
secondaddr = 0xf00000
tagsaddr = 0x2700000
name =
cmdline = console=ttyMSM0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 androidboot.selinux=permissive
The other parameters are fixed values for hammerhead... and the bootsize value depends on the size needed for your image.
In this case it's just the default value used for TWRP.
Then use the tool like this:
abootimg --create hammerhead-kernel4.img -f bootimg.cfg -k zImage-dtb -r initrd.img
Best regards,
scholbert
scholbert said:
Thanks for appreciation, but what do you expect from "public release"?
As many other already posted here, this kernel is far away from the 3.4 Images for daily use.
So this is just for fun of course :angel:
Have a look at the tool abootimg.
You could use a bootimg.cfg fle and change the cmdline for your boot image individually.
E.g.:
The other parameters are fixed values for hammerhead... and the bootsize value depends on the size needed for your image.
In this case it's just the default value used for TWRP.
Then use the tool like this:
abootimg --create hammerhead-kernel4.img -f bootimg.cfg -k zImage-dtb -r initrd.img
Best regards,
scholbert
Click to expand...
Click to collapse
Wonderful! The heads-up I needed was the bootimg.cfg. Thanks a bunch. Also, is your ROM usable with this kernel?
Sent from my Nexus 5 using XDA Labs
Icyphox said:
Wonderful! The heads-up I needed was the bootimg.cfg. Thanks a bunch. Also, is your ROM usable with this kernel?
Sent from my Nexus 5 using XDA Labs
Click to expand...
Click to collapse
No far away from any use together with a ROM or even anything the TWRP image uses inside.
No graphics... no usb...
This is just a proof of concept, playing around with the dts files and kernel. Nothing more.
If someone would create a console based ramdisk with some tools included, you may dig a little deeper into the soc or check which parts are responsive or not.
Cheers,
scholbert
It has been quite some time.
Does anyone think that using PostMarketOS's kernel as a stepping stone may help get at least kernel 4.4 to a daily-driver ready status?
Update: Perhaps it would also be a good idea to use the Nexus 7 (2013)'s sources to try porting the newer kernel there to the Nexus 4 (as they share the same SOC).
scholbert said:
Hey folks!
I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice
But anyway this is another story.
Yeah i did!
Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz
... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb
Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb
Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)
Then via adb:
reboot bootloader
... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img
See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.
Cheers,
scholbert
Click to expand...
Click to collapse
From the logs, it looks like the reason the boot stops is because of init.rc errors. I might be able to help with that, but my nexus 5's battery is toast.