Related
As we are able to fastboot, it make sense to have choice
As it is done now. Normal booting using 2ndinit
PC booting, not using 2ndinit (as the proper files can be inside the boot.img)
The drawback of 2. are obvious. if battery die, etc... but then 1. can be used. so i think 2. will have spread usage.
The pros of 2. are obvious too (no 2nd init, kernel can be modifed e.g. swap etc...) and not so obvious .... But it can be tested / used without compromising the phone usage (e.g. a plain reboot will go to 1.).
Having that in mind, fjfalcon your boot.img are working. (mine doesn't, mioze7ae`s too, there is some old post in some thread about that, but let's stick to this one).
So could you be so kind to share how to build usable (e.g. working) boot.img ?
Then using mio`s knowledge of preparing fastboot openrecovery it will be easy to implement inits, which don't rely on 2ndinit.
And then the real work can begin . Patching the kernel
I have found good starting point of patches:
http://omappedia.org/wiki/Patches_being_done_on_2.6.29_Android_kernel_not_yet_submitted_upstream
had checked some of them (there are not in our moto-compiled kernel), and most of them seems promising...
Of-course this will be just the beginning.
We can try to "patch" discovered goodies (via modules) to the moto-kernel
we can try to use newer version of the kernel (using 2./
etc...
i used motoroi devtree from opensource and kernel.tar.gz from 2.1.
Also i just patched some files... and that should be all.
I think when i get free time i will post our kernel to git.
But, idea about move 2ndinit away is back...
Much better idea will be usyng 2ndinit both times, with if/else statements.
Also, i'am almost done to building uart for kernel testing. I hope it will work.
I pushed mine kernel to https://github.com/CyanogenModXT720/android_kernel with xt720 branch. When it will be finished it will appear.
I need to run, good luck.
I also using command to build: make -j8 -f kernel/kernel.mk BLD_CONF=mine3
10x,
when i build modules, i had issue... they just did not load to the kernel... it turns out that my toolchain was not the right one... using another fixed the modules loading....
about 2ndinit we can brainstorm it later (i have mind floating around about the location of init_prep_keypad.sh)
i am curious about uart, where should we hook the wires :?)
i am curious more because of that commit comment
commit 9638a7f382b7ac1629cfa431bd32790362e3af70
Author: Muhammed Siju <[email protected]>
Date: Thu Jun 17 11:02:09 2010 +0530
IKSTR-401.Disable TV out accessory detection.
TV out code is currently enabled in kernel.So some 3.5mm accessory is getting detected as TV cable.However the TV out service APK was removed from the build.
This causes issues like accessory removal not getting detected and TTY cable failures.This is workaround to treat high impedence cables as headset without mic instead
Click to expand...
Click to collapse
i am not sure how to interpret the bolded one (and i am afraid to hope )
http://xt720.ru/foto mine uart.
Sent from my Milestone XT720 using xda premium
stock recovery adb ?
i just take a look at
cg35.img (e.g. boot image, when boot normaly) and
cg47.img (e.g. boot image, when booted in stock recovery)
equals: kernel
differs: kernel cmdline, and the ramdisk.
in the normal boot.img there is no cmdline, in the recovery one there is
Code:
console=ttyS2,115200n8 rw [email protected] init=/init ip=off motobldlabel=none mtdparts=omap2-nand.0:128k(mbmloader),640k(mbm),640k(mbmbackup),384k(bploader),384k(cdt),1536k(pds),384k(lbl),384k(lbl_backup),384k(cid),1536k(sp),384k(devtree),640k(logo),384k(misc),3584k(boot),3840k(bpsw),4608k(recovery),8960k(cdrom),384k(unused0),204416k(system),384k(unused1),106m(cache),177280k(userdata),1536k(cust),384k(unused2),2m(kpanic),512k(rsv)
kernel cmdline is curious to me, and will need more investigate, mostly because it is present in the normal boot too. (have to compare to the recovery one). I suppose, that the bootloader passes it to the normal boot ...
about initial ramdisk there is something interesting in it
mainly the adbd
service is defined in init.rc
Code:
service adbd /sbin/adbd recovery
on property:persist.service.adb.enable=1
start adbd
on property:persist.service.adb.enable=0
stop adbd
but disabled in default.prop
Code:
persist.service.adb.enable=0
as we are able to fastboot, it will be very interesting to see what can be done within the recovery shell (just have to modify default.prop using unpackbootimg and mkbootimg )
Personally i plan to do it near future (e.g. have time, did not test long term stability etc....)
recovery.img afaik also signed.
peshovec said:
i just take a look at
cg35.img (e.g. boot image, when boot normaly) and
cg47.img (e.g. boot image, when booted in stock recovery)
equals: kernel
differs: kernel cmdline, and the ramdisk.
in the normal boot.img there is no cmdline, in the recovery one there is
Code:
console=ttyS2,115200n8 rw [email protected] init=/init ip=off motobldlabel=none mtdparts=omap2-nand.0:128k(mbmloader),640k(mbm),640k(mbmbackup),384k(bploader),384k(cdt),1536k(pds),384k(lbl),384k(lbl_backup),384k(cid),1536k(sp),384k(devtree),640k(logo),384k(misc),3584k(boot),3840k(bpsw),4608k(recovery),8960k(cdrom),384k(unused0),204416k(system),384k(unused1),106m(cache),177280k(userdata),1536k(cust),384k(unused2),2m(kpanic),512k(rsv)
kernel cmdline is curious to me, and will need more investigate, mostly because it is present in the normal boot too. (have to compare to the recovery one). I suppose, that the bootloader passes it to the normal boot ...
Click to expand...
Click to collapse
Normal boot ignores cmdline and uses atags struct from cdt.bin table (CG31) instead. Recovery boot ignores atags struct and uses cmdline from recovery.img. This is why:
xt720mod.sbf uses normal Milestone XT720 boot.img (UK) but has Motoroi partition structure and recovery--the cmdline inside boot.img is ignored--partition locations come from CDT. If the normal boot used cmdline, xt720mod.sbf could never work using the Milestone XT720 kernel--we'd have to use the Motoroi kernel.
Normal boot has boot.img read-only and missing bpsw etc, but booting into stock recovery has all of the missing ones and they are read/write (because recovery.img uses the cmdline instead of atags)
Tangentially, there's also the devtree (CG61). For some reason the vulnerable Motoroi recovery.img used in xt720mod.sbf doesn't work with Milestone XT720 devtree {=stuck at (M)} *but* Milestone XT720 boot.img does work with Motoroi devtree ... sensorfix.ko tries to correct for some of the Milestone/Motoroi devtree differences (most of the devtree data is actually identical--just some subtle differences), but I haven't gotten to all of them yet (sensorfix.ko at the moment just corrects the accelerator axis mapping--I suspect there's something weird going on with the light sensor, too but I haven't figured that out yet).
fjfalcon said:
recovery.img afaik also signed.
Click to expand...
Click to collapse
I think he's talking about making a fastboot recovery. That's also what I did here: http://forum.xda-developers.com/archive/index.php/t-1477752.html and http://forum.xda-developers.com/showthread.php?p=23965193#post23965193. I thought about putting in a different recovery at first--but the more I thought about it, I couldn't find any reason to justify using a recovery different from openrecovery--just about anything you'd want to do in a custom recovery requires a sdcard to be present and openrecovery is already field-tested on XT720. I can't remember if fastbooted recovery uses the atags or cmdline... I don't think I ever figured out if the difference is in the bootloader or in the kernels.
Edit: when I created the fastboot-openrecovery.img I used the kernel from normal boot.img and used a custom ramdisk that was derived from recovery.img. And I didn't add any command line:
Code:
rm ramdisk.cpio.gz
cd ramdisk/
find . | cpio -o -H newc | gzip > ../ramdisk.cpio.gz
cd ..
rm openrecovery-fastboot.img
mkbootimg \
--kernel stock-boot.img-zImage \
--ramdisk ramdisk.cpio.gz \
--cmdline '' \
--base 10000000 \
--pagesize 00000800 \
-o openrecovery-fastboot.img
I can't remember if I tried using the recovery.img kernel or if I just decided not to risk that the recovery.img kernel wasn't flexible enough--I wanted the same fastboot recovery to work on both stock.sbf's and xt720mod.sbf... i.e. I explicitly wanted to use the atags data in cdt.bin that will always match the installed sbf rather than a static command line... and the mtdhack.ko I've made for XT720 is carefully crafted to work on both Milestone XT720 and Motoroi sbfs by relying on atags... so... I doubt I ever pursued using the recovery kernel.
Normal boot ignores cmdline and uses atags struct from cdt.bin table (CG31) instead. Recovery boot ignores atags struct and uses cmdline from recovery.img.
Click to expand...
Click to collapse
10x
will have to play using simultaneously fastboot and pressing the buttons, which screamed "stock recovery" just to check if we can benefit from cmdline somehow..
however i tried to automate the boot.img repack.
https://github.com/CyanogenModXT720/fastboot-repack
the default generated image (boot-custom.img) should work as test proofing
(will use the init*rc from my testing build, and will avoid 2ndint), the kernel is still stock (yet).
When i will find enough time to test, will start playing with different kernel (mainly the above mentioned patches )
p.s. yes i know fastbooting is annoying, but if there are charger near where, it will be perfectly usable for a long time...
One thing I've wanted to try is creating a basically stock kernel+compcache/ramz. Nadlabak says it's very helpful on A853 (he has a motorola development grade A853 that has high-security mode disabled so he can flash anything). The idea is you could fastboot to have a ram boost without using a swap partition (ramz does swap into a compressed region of ram).
Nadlabak says it's very helpful on A853 (he has a motorola development grade A853 that has high-security mode disabled so he can flash anything)
Click to expand...
Click to collapse
interesting, i have read something like that somewhere, but it was stated this is just rumor....
the approach with starting with stock kernel, then just enable some useful options (like swap), then start observing patches fits my vision too
peshovec said:
i tried to automate the boot.img repack.
https://github.com/CyanogenModXT720/fastboot-repack
Click to expand...
Click to collapse
I was just reading through the repository and saw the comment about replacing /init with one that handles parameters properly for insmod. You can also replace /init just before 2nd-init for the hijacked boot (2nd-init kills* /init and it gets restarted fresh). nadlabak's been doing this to add udev support on a853. I think fjfalcon's done that, too iirc.
*not really kill, it causes the original /init to exec /init
it can be done in the squisher...
# Rootfs stuff
mkdir -p $REPACK/ota/system/etc/rootfs/sbin
cp $OUT/root/sbin/adbd $REPACK/ota/system/etc/rootfs/sbin/adbd
cp $OUT/root/init $REPACK/ota/system/etc/rootfs/init
Click to expand...
Click to collapse
(nadlabak "Replaces" init and adbd)
then have to set permission in sh_hijack ...
probably will do that sometime in the future (if we had for example usb otg, probably we should have benefit of udev, but right now, it is just the feeling to be on the edge/latest and greatest ......e.g. not so high priority )
ok, run some tests
successful boot is achieved after
Code:
export CROSS_COMPILE=.......cyano/nadlabak/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
will try to attach the .config (swap enabled and the zImage
(attached in kernel_plus_config.tar )
of course i had some troubles mainly because the stock modules, are build with gcc 4.4.0 . Before seeing that, i was using different prebuilt toolchains ... and the kernel was tainted, paniced etc.....
using the above right now....
Code:
<6>[ 0.000000] Initializing cgroup subsys cpu
<5>[ 0.000000] Linux version 2.6.29-omap1 ([email protected]) (gcc version 4.4.0 (GCC) ) #2 PREEMPT Tue Apr 24 10:17:21 EEST 2012
/system/xbin/dd if=/dev/zero of=/sdcard/swap.img bs=1M count=50
mkswap /sdcard/swap.img
swapon /sdcard/swap.img
~ # free
total used free shared buffers
Mem: 230256 219232 11024 0 212
-/+ buffers: 219020 11236
Swap: 51192 1700 49492
So Mio, you can now try the swapz/
i will play with other options (moto has at least hdmi and camera driver, which are not present in later version of the omap 2.6.29 ... so i will try to merge
the gsm radio is very easy to break ...
i discovered, that if some module did not load 100% clean, the phone will lock/reboot ....
Then i start playing around that. Did not load any modules, and when load the modules about radio i discovered the title (e.g. still no radio, but phone lock/reboot again....)
So till now, my best combination (which i plan to test for a long (few days atleast) period) is:
plain stock + swap + 250, 500, 600, 800 Mhz (the default were always strange to me 250, 500, 550, 720 )
Also till now, i was not able to compile zram module
p.s. btw, i hope everybody knows, that actually there is no need for a separate swap partition,for somebody to use the swap, right ?
linkdriver
the following commit is very interesting to me ...
Code:
commit 1b533b8c037ae496a329e8e6c5e793232310b559
Author: Wei-Yu-Neng Loic <[email protected]>
Date: Tue Jun 9 17:48:14 2009 +0200
Add netmux_linkdriver and compile the netmux drivers in modules and not static
I wonder if before this commit, the radio was working?
Also this commit adds some harcoded configs ...
Code:
drivers/misc/netmux_linkdriver/usb/ModKconfig
....
+title = netmux_linkdriver
+obj_tree =
+depends =
+kconfig = Kconfig
+config = .config
+autoconf_header = modkconfig/autoconf.h
+config_header = modkconfig/config.h
.....
the autoconf.h and config.h are basically the kernel config ...
I suspect, that if we change the kernel config, in such way, that the modules will not be able to load, then we have to modify the modkonfig headers too...
I have created a kernel that has ramz and the ramzswap module for testing/experimentation.
Built from compcache-0.6.2 with the notify patches applied
Kernel source: ramz branch @ https://github.com/CyanogenModXT720/android_kernel
Rough notes on how to make your own bootz.img:
Compile using 4.4.0 toolchain from the android NDK version 5c. Something like:
Code:
export ARCH=arm
export CROSS_COMPILE=path/to/android-ndk-r5c/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
export KERNEL_DIR=path/to/android_kernel
cd $KERNEL_DIR
make str_ramz_defconfig
make
Create bootz.img something like this:
Code:
mkbootimg \
--kernel path/to/android_kernel/arch/arm/boot/zImage \
--ramdisk path/to/uk-boot.img-ramdisk.gz \
--cmdline "" \
--base 10000000 \
--pagesize 00000800 \
-o bootz.img
Build the ramzswap.ko something like this:
Code:
cd compcache-0.6.2
# edit compat.h as described in "HIGHLY RECOMMENDED" section of README to enable use of the notify patch
make -C $KERNEL_DIR SUBDIRS=`pwd` modules
The kernel config I used is modified from str_defconfig, added as str_ramz_config (basically add swap, lzo_compress/lzo_decompress, /proc/config.gz) Link to config: https://github.com/CyanogenModXT720/android_kernel/blob/ramz/arch/arm/configs/str_ramz_defconfig
I haven't figured out how to cross-compile the rzscontrol yet so the CM compcache script doesn't work. OG Droid builds it as part of CM, so we can probably snag theirs.
Example of manual use (after fastboot boot bootz.img):
Code:
# Create 20MB zram
insmod ramzswap num_devices=1 disksize_kb=20480
# Enable swap on the new ramzswap0 device
swapon /dev/block/ramzswap0
# Set swappiness
echo 100 > /proc/sys/vm/swappiness
Be sure to check if your sdcard has a swap partition, you may want to disable the script that turns on swap there--it's usually in /system/etc/init.d/ with the name "swap" in the filename. I'm not sure how android sets priorities on different swap devices, the usual linux command isn't supported.
I have no idea what size of ramz people use. sholes (OG Droid) has compcache support in their CM7, so I'll probably look there next.
I've only tested this on a custom-tweaked version of peshovec's Apr 4 CM7 build running on xt720mod.sbf--I don't expect problems, but ymmv and you should be very aware of what the various /system/etc/init.d scripts (and possibly /system/etc/rootfs/*.rc) are up to.
The config can also be obtained from /proc/config.gz -- I propose we "insist" that custom kernels use that feature and then shell scripts can easily test existence of /proc/config.gz to detect custom kernels. On the other hand, that file consumes 16k...
Mioze7Ae said:
[*]Built from compcache-0.6.2 with the notify patches applied
Click to expand...
Click to collapse
hehe, that explain my troubles with compiling
i had used https://github.com/a853/a853_compcache
now tried the same setup with the old plain 0.6.2 and it compiles ...
Sweet. On peshovec's CM7 with a 40mb ramzswap, I'm able to keep XDA, HackerNews, Diode and Gh4a all running and switch between any of them instantly (also note I was already very happy with memory use on peshovec's CM7 without ramzswap). Probably not big news for people who've been using a swap partition, but compcache/ramzswap is swap without a swap partition--so no sdcard chewing. My perspective is: phone is perfectly usable without ramz if a reboot happens, but if I keep it charged I get some extra boost. For now, this is what I'm using as /system/etc/init.d/02ramz:
Code:
#!/system/xbin/busybox sh
# Don't do anything unless custom boot.img
[ -f /proc/config.gz ] || exit
# Create 40MB zram
/system/xbin/insmod /system/lib/modules/ramzswap.ko num_devices=1 disksize_kb=40960
/system/xbin/swapon /dev/block/ramzswap0
echo 100 > /proc/sys/vm/swappiness
hopefully in some days i will gather enough information, about how much exactly memory we are missing...
preliminary results are:
about 25 swap (pure one) needed,
-
about 5 which can be recovered with pkill at 4am (hello cron)
equal to about 20 MB more ram needed for full pleasure
This number can be used for calculating the percentage of ramz (which obviously is a trade between more RAM and faster RAM )
Doh! The device is automatically created as /dev/block/ramzswap0 on android not /dev/ramzswap0. I've updated my posts above appropriately.
First off I would like to thank sp3dev for his awesome work in getting u-boot to work on our devices.
WARNING!!! Do not attempt this on a device that you normally can't use i9100 roms on, eg SHW-M250L. This has been confirmed to work on the SHW-M250S/K (by me). Of course it works on the i9100.
WARNING!!!(2) You won't be able to access recovery(looking into it). You can use SBL download mode as usual and ktool or mobile odin to change kernels.
1. Create an 'android' folder under /sdcard/ and copy to it kernel.uimg. It's dorimanx kernel as an example.
2. Flash the attached u-boot.bin, it includes some minor modifications to use a 2nd boot source.
3. Use heimdall to flash the included siyah-uImage to RECOVERY partition.
4. Reboot.
Now you have four options:
a) Do not hold any keys pressed during boot. This will boot Siyah off the RECOVERY partition.
b) Hold VOL_DOWN after you see the boot logo with the yellow triangle. This will boot Siyah CWM recovery off the RECOVERY partition.
c)Hold VOL_UP after you see the boot logo with the yellow triangle. This will boot the kernel located at /sdcard/android/kernel.uimg.
d)Hold BUTTON_OK(HOME) after you see the boot logo with the yellow triangle. This will boot the kernel located at /sdcard/boot/vmlinux.uimg.
Troubleshooting
If you get errors when you try to boot the kernel at /sdcard/android/ then format the internal storage from android and try again. It seems to happen when you have too many files and/or folders.
If you have any questions post them here.
NOTE: Due to an error instead of attaching the files here I have uploaded them to DevHost @ http://d-h.st/users/MemoryController/?fld_id=5685#files
RootFS build guide will come tomorrow.
Brilliant memory controller, just checked in to find your post, nice one.
Looking forward to rootfs guide.
Thanks alot for the guide.
Sent from my GT-I9100 using Tapatalk 2
Also at some point maybe a guide on how to roll the kernel for when siyah is updated or someone wants to use a different kernel.
Is the siyah kernel used the latest one?
Sent from my GT-I9100 using Tapatalk 2
Hello,
great news, i flashed uboot.
couple of issues i have had, i can't access siyah recovery or the kernal in /sdcard/android folder.
it tries to find the kernel at /sdcard/boot/vmlinux.uimg but fails as of course i havnt put it there.
joesnose said:
Hello,
great news, i flashed uboot.
couple of issues i have had, i can't access siyah recovery or the kernal in /sdcard/android folder.
it tries to find the kernel at /sdcard/boot/vmlinux.uimg but fails as of course i havnt put it there.
Click to expand...
Click to collapse
Do you have serial cable for i9100? We need to see if it's u-boot related. If you do please boot to uboot and start pressing space or RETURN to stop autoboot.
Then issue: "fatls mmc 0:b /" and paste or pm me the output. If you don't have serial i will pm you a uboot.bin to test it automatically.
Sent from my GT-I9100 running CM10
joesnose said:
Also at some point maybe a guide on how to roll the kernel for when siyah is updated or someone wants to use a different kernel.
Is the siyah kernel used the latest one?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
It's version 4.1.5+.
Hello MemCo,
i have a usb cable that i plug a keyboard into, is this what you mean by serial cable? unfortunately I only wave a wireless usb keyboard and it seems the drivers dont load until my android rom is booting, if i get a cabled usb keyboard would this be solved.
I am also having another issue, though i have not established if uboot is the culprit yet, but seeing as it was the last change i made on my phone yesterday i am guessing it is the issue.
Today nobody can hear me when i make or receive calls. i have booted both of my installed android roms and they both have this issue. i have yet to reflash siyah kernel to establish if this is the problem.
thanks.
Sent from my GT-I9100 using Tapatalk 2
joesnose said:
Hello MemCo,
i have a usb cable that i plug a keyboard into, is this what you mean by serial cable? unfortunately I only wave a wireless usb keyboard and it seems the drivers dont load until my android rom is booting, if i get a cabled usb keyboard would this be solved.
I am also having another issue, though i have not established if uboot is the culprit yet, but seeing as it was the last change i made on my phone yesterday i am guessing it is the issue.
Today nobody can hear me when i make or receive calls. i have booted both of my installed android roms and they both have this issue. i have yet to reflash siyah kernel to establish if this is the problem.
thanks.
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
No I don't mean that, I will send you a uboot bin via pm. As for the sound issues I don't have them so I don't know about it
Sent from my GT-I9100 running CM10
Would have been much more useful if you had posted the sources and what you did to them to make it work!! Perhaps a Github link or something...
E:V:A said:
Would have been much more useful if you had posted the sources and what you did to them to make it work!! Perhaps a Github link or something...
Click to expand...
Click to collapse
I will send a pull request to sp3dev once I get my git working
Sent from my GT-I9100 running CM10
Can u add faq to first Page on what's the advantage of uboot and can u get back to stock bootloader
Sent from my GT-I9100 using Tapatalk 2
bluefa1con said:
Can u add faq to first Page on what's the advantage of uboot and can u get back to stock bootloader
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
uboot allows for booting two different kernels, which means for instance dual booting ics and gb or dual booting android and native linux. And I have tried it and then reflashed kernel using odin, the uboot bootloader does not overwrite the samsung bootloader it chainloads from it.
Just to confirm bugs that have affected me MemCo.
I was unable to boot to siyah recovery. It went past the post screen but then nothing or rather every 5 seconds or so the screen would flicker but so fast and still black screen, it was hard to tell there was any activity.
My mic didn't work in calls, I can't confirm if it worked in other apps as I failed to try it. It was fixed as soon as I reflashed siyah kernel.
Thanks again for sharing your work.
Sent from my GT-I9100
Hello,
Just wondering how things are coming along. I am still surprised that this project and thread are not receiving more interest!
Sent from my GT-I9100 using Tapatalk 2
Hello I have been reading alot of info but it is a real mish mash of info.
So I think I have got together a rootfs but I don't understand how to use it still. Do I need a boot script or does my kernel need compiling with the path to the rootfs? And can I use a standard linux kernel to build my kernel.uimg or does it have to be an android specific kernel.
Thanks.
Sent from my GT-I9100 using Tapatalk 2
Hello MemoryController,
Could this howto be easily edited to work for s2?
Code:
= Ubuntu Maverick on USB (minimal rootfs) =
== Generating the rootfs ==
At your host (using Maverick) install the rootstock package: $ sudo apt-get install rootstock
Then identify the latest kernel image for OMAP 4 at http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-ti-omap4/. In my case, http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-ti-omap4/linux-image-2.6.35-903-omap4_2.6.35-903.12_armel.deb.
Run rootstock, giving the correct paramters to generate a maverick image: $ sudo rootstock --fqdn panda-maverick --login ubuntu --password ubuntu --serial ttyO2 --components "main universe multiverse" --kernel-image http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-ti-omap4/linux-image-2.6.35-903-omap4_2.6.35-903.12_armel.deb
After running rootstock your rootfs will be at your current directory, called armel-rootfs-<DATE>.tgz
Now just extract the rootfs at your USB disk partition, preferred with an ext3 FS.
== Generating the boot partition ==
To be able to boot your Panda you'll need the X-Loader, U-Boot, Kernel and Initrd and a boot script file.
X-Loader: - Download http://ports.ubuntu.com/ubuntu-ports/pool/main/x/x-loader-omap4/x-loader-omap4_L24.9git20100901-0ubuntu1_armel.deb - Extract it with dpkg (dpkg -X x-loader-omap4.deb .) - Copy the MLO file
U-Boot: - Download http://ports.ubuntu.com/ubuntu-ports/pool/main/u/u-boot-linaro/u-boot-linaro-omap4-panda_2010.09~rc1.1-0ubuntu3_armel.deb - Extract it with dpkg (dpkg -X u-boot.deb .) - Copy the u-boot.bin file
Kernel: - After generating the rootfs with rootstock you'll find a file like vmlinuz-2.6.35-903-omap4 at the same directory you generated the rootfs - Install uboot-mkimage - Generate the uImage: mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux" -d vmlinuz-2.6.35-903-omap4 uImage - Copy the uImage file
Initrd: - After generating the rootfs with rootstock you'll find a file like initrd.img-2.6.35-903-omap4 at the same directory you generated the rootfs - Generate the uInitrd: mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d initrd.img-2.6.35-903-omap4 uInitrd - Copy the uInitrd file
boot.scr: - Set up a file called boot.script with the following content: """ fatload mmc 0:1 0x80000000 uImage fatload mmc 0:1 0x81600000 uInitrd setenv bootargs ro elevator=noop vram=32M root=/dev/sda1 fixrtc console=ttyO2,115200 [email protected] [email protected] bootm 0x80000000 0x81600000 """ - Change the root paramter if needed - Generate the boot.scr file: mkimage -A arm -T script -C none -n "Ubuntu boot script" -d boot.script boot.scr - Copy the boot.scr file
Grab a SD card, create the first partition as a FAT 32 one and copy the files u-boot.bin, MLO, uImage, uInitrd and boot.scr on it.
Sorry to keep bumping this thread but still after masses of reading cannot work this out.
Hello.
Is this project dead?
Sent from my GT-I9100 using Tapatalk 2
After readin both thread over and over im stumped...
Someone somebody help please lol
Id love this on my sgs2.
Tried done bored of chroot
Have tried and half suceeded turning of android ui and hijacking fb0 graphics
This looks like and is what i want on my phone..
Ill donate to whoever can wrap this into a step by step easy to follow tutorial, im sure others would like this but are to finding
The instructions a bit hard, thanks
Greate news! Thank you!
joesnose said:
Hello,
Just wondering how things are coming along. I am still surprised that this project and thread are not receiving more interest!
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
because the phone remain closed source (EFS, SBL1, SBL2, MODEM, UMS etc.)
kernel sources for Xperia SP (C5302, C5303, C5306, M35h) {FW: 12.0.A.1.257} are available...
link to download sources:
http://dl-developer.sonymobile.com/code/copylefts/12.0.A.1.257.tar.bz2
i will keep pushing stock kernel sources to my git tree at the following branch:
https://github.com/DooMLoRD/android_kernel_sony_msm8960t/tree/sony_sources
following are the build instructions for developers who plan to work on this device....
toolchain recommended: Google GCC 4.7
Building kernel (zImage):
for Xperia SP:
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make viskan_huashan_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8
incase u get errors like:
Code:
error : /scripts/gcc-wrapper.py
just correct the permissions of that file
Code:
chmod 755 ./scripts/gcc-wrapper.py
here is patch for compatibility with GCC 4.7 compilation
regards,
DooMLoRD
Instructions for building kernel.elf
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8960t_viskan
Sony using the ELF format (similar to the 2012 devices)...
build kernel.elf
u can directly use the files posted at my git repo for build tools
or
use the following command:
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
the correct RPM.bin & bootcmd are posted at my git tree for build tools...
regards,
DooMLoRD
@DooMLoRD
I have to answer a lot of questions when compiling like board selection etc (have been clicking y and and enter for about 30 minutes now) is this normal?
View attachment 2411564
Hi Doomlord.
Being a fresh Xperia User, never heard about u on HTC forums. But glad to know you are helping a lot of people around here. I was wondering whether you could help me in understanding a bit about xperia phones before i dive into kernel kanging n stuff.
What i know from HTC devices
Partitions are like this:
Boot (separate partition on NAND)
Recovery (separate partition on NAND)
System like above
Data, same
Cache, same
etc
There, we used to flash boot.img to boot. boot.img contained kernel zImage+ramdisk
For recovery, we have recovery.img which contained zImage+recoveryramdisk
Then system and data etc as every other phone.
Here in Xperia, i cant understand where the recovery is. Is it inside kernel.elf?
Is it placed on a dedicated partition?
I want to know what i am messing with, before continuing.
What i plan to do is.
Build a clean TWRP from source (for myself, usage and learning.)
Build a stock based kernel from source. Add few govs/scheds and maybe Doubletap2wake etc. (but thats a little way ahead.)
Can you help me with this?
neXus PRIME said:
Hi Doomlord.
Being a fresh Xperia User, never heard about u on HTC forums. But glad to know you are helping a lot of people around here. I was wondering whether you could help me in understanding a bit about xperia phones before i dive into kernel kanging n stuff.
What i know from HTC devices
Partitions are like this:
Boot (separate partition on NAND)
Recovery (separate partition on NAND)
System like above
Data, same
Cache, same
etc
There, we used to flash boot.img to boot. boot.img contained kernel zImage+ramdisk
For recovery, we have recovery.img which contained zImage+recoveryramdisk
Then system and data etc as every other phone.
Here in Xperia, i cant understand where the recovery is. Is it inside kernel.elf?
Is it placed on a dedicated partition?
I want to know what i am messing with, before continuing.
What i plan to do is.
Build a clean TWRP from source (for myself, usage and learning.)
Build a stock based kernel from source. Add few govs/scheds and maybe Doubletap2wake etc. (but thats a little way ahead.)
Can you help me with this?
Click to expand...
Click to collapse
The recovery is inside the kernel but that's all I know
Sent from my C5303 using xda app-developers app
Yep. I found all I needed to know.... Fotakernel partition, elf ramdisk kernel and other stuff.
Sent from my C5303 using Tapatalk
No NAND is used
EMMC is there in all new xperia devices
Sent from my C6902 using xda app-developers app
DooMLoRD said:
No NAND is used
EMMC is there in all new xperia devices
Sent from my C6902 using xda app-developers app
Click to expand...
Click to collapse
ok thanks...
one more thing, if i build a custom kernel (lets say, stock-based), without any major changes..... can i flash that kernel file without unlocking bootloader???
as i understand, only kernel ftf files can be flashed via flashtool in locked bootlaoder.... correct me if im wrong.
neXus PRIME said:
ok thanks...
one more thing, if i build a custom kernel (lets say, stock-based), without any major changes..... can i flash that kernel file without unlocking bootloader???
as i understand, only kernel ftf files can be flashed via flashtool in locked bootlaoder.... correct me if im wrong.
Click to expand...
Click to collapse
No u can't
Sent from my C5302 using Tapatalk
Siddhesh said:
No u can't
Sent from my C5302 using Tapatalk
Click to expand...
Click to collapse
I compiled my kernel with a different splash screen and it flashed but I got a flashing black screen and it doesn't boot (i have UBL)
hi @DooMLoRD,
when i am making the elf of the zImage i am getting this error
[email protected]:~/android/huashan files/build tools/jk_output$ sudo bash '/home/jk-cha0s/android/huashan files/build tools/jk_output/build_it.sh'
[sudo] password for jk-cha0s:
Traceback (most recent call last):
File "mkelf.py", line 182, in <module>
main(sys.argv[1:])
File "mkelf.py", line 159, in main
size = os.path.getsize(seg.file)
File "/usr/lib/python2.7/genericpath.py", line 49, in getsize
return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: 'ramdisk.cpio.gz'
where to get the ramdisk.cpio.gz ?
edit:its inside a working kernel extract from there
neXus PRIME said:
Yep. I found all I needed to know.... Fotakernel partition, elf ramdisk kernel and other stuff.
Sent from my C5303 using Tapatalk
Click to expand...
Click to collapse
hey hi,
i need to know how to integrate recovery into a kernel i made. please help me to do it. :silly:
About Xperia SP(m35t)
Hello DooMLoRD
I want to ask you about how to build a kernel of m35t. I had tried to use the build_tools-master to unzip the kernel of m35t, and then repacked it without any modification. I flash the new kernel.elf but the phone doesn't work, how should I do ?
I want let the m35t run on Android 4.3 cause Sony hasn't update it, hope you can help me. Thanks a lot!
NewBay_STanLey said:
Hello DooMLoRD
I want to ask you about how to build a kernel of m35t. I had tried to use the build_tools-master to unzip the kernel of m35t, and then repacked it without any modification. I flash the new kernel.elf but the phone doesn't work, how should I do ?
I want let the m35t run on Android 4.3 cause Sony hasn't update it, hope you can help me. Thanks a lot!
Click to expand...
Click to collapse
Hi,
For android 4.3 the command to pack has changed from
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
To
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
pec0ra said:
Hi,
For android 4.3 the command to pack has changed from
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
To
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
Click to expand...
Click to collapse
Thanks, Pec0ra.
Yes, I know the command is changed, I repacked original kernel with build_it_JB-4.1.sh, the system is 12.0.C.2.58, everything is original, but the phone doesn't work.
I guess there is a little difference between c5303 and m35t, that I need to make a little modification to this tool.
I found the difference between m35t and other SPs
Finally, I found a difference between m35t and other SPs. The build_tools-master shouldn't be wrong, there is only one explanation is the RPM.bin not working for m35t. So,the rebuilt kernel can't boot up the m35t. @DooMLoRD, could you give me the right RPM.bin for m35t? Thanks a lot!
NewBay_STanLey said:
Finally, I found a difference between m35t and other SPs. The build_tools-master shouldn't be wrong, there is only one explanation is the RPM.bin not working for m35t. So,the rebuilt kernel can't boot up the m35t. @DooMLoRD, could you give me the right RPM.bin for m35t? Thanks a lot!
Click to expand...
Click to collapse
I think you can simply unpack it from stock kernel with the build tools. You will just have to find out which one of the extracted file it is since it might have another name.
Good news!
Good news! I found the way to extract rpm.bin witch use the flashtool. I use the version 207 C5303's zimage and ramdisk.cpio.gz and m35t's rpm.bin to repack the kernel. When I flash the kernel and version 207's rom in my m35t, it works! But only press the power button can let the back light gets on and off, the screen still can't display anything, and it can't play any sound, but it still take a big step!
DISCLAIMER:
Rooting your phone and using custom Recoveries and ROMS have risks and may result in bricking your device, and has nothing to do with Google or the device manufacturers. In case of any mishap I am not responsible if you brick/ruin your phone in any way.
Basic computer skills are required and minimal knowledges about phones and phones utilities too.
Make sure that whatever you do, you are doing it at your own responsibility.
Carliv Touch Recovery
- version 5.7.2 is for Lollipop (cm 12.1, aicp lp or resurrection remix lp) and version 6.6 is for Marshmallow (cm 13, aicp-mm or resurrection remix mm).
The version starting number is related to android version.
This is a CWM based recovery and I did put up some work to update it to lollipop (cm 12.1) and marshmallow (cm-13) after official cwm development stopped at kitkat. It works with LOLLIPOP and MARSHMALLOW kernels and it builds with cm 12.1, aicp lp or resurrection remix lp (version 5.7) and with cm 13, aicp-mm or resurrection remix mm (version 6.5).
This is for those who want a lighter and simpler recovery or they just liked CWM before. It's not as good or complex as twrp, but it will do the job just fine.
For gui I ported PhilZ Recovery full touch module.
Because the vold in cm 12.1 and 13 doesn't support cwm anymore I had to use the old fstab1 type for functionality, although for building reason a valid recovery.fstab should be provided in device tree. In the third post there are some building hints to make it clear for those who want to try building it.
Features:
- EXT4 and F2FS support (for f2fs use the BoardConfig flag).
- full touch menu ported by me from PhilZ touch Recovery. The old Napstar-xda touch module was good but it's quite old and to update that was too much work. Actually There is a version 4 with that touch module, all working, but the touch doesn't work with some input drivers and I had to give up on it for the new and improved version from PhilZ.
- all cwm functionalities are up and working (adb, sideload, backup, restore, install, mass storage...). There is no mtp and if your phone doesn't have an external sdcard you can't connect it to PC while is in recovery mode. But there is usb-otg support, of course if your phone was shipped with that.
- added new menu for backup and restore advanced, to use it for backing or restoring only a specific partition and I also ported from PhilZ the multizip flashing function.
- in Carliv menu there is now a new section for flashing boot and recovery images. It is a feature that I needed during many recovery builds testing. I wanted an easier way to flash other image without booting to android and using an app like RashR. You can browse your storage locations for any image and after choose you will have to select on wich partition should that be flashed. I added multiple confirmations check to avoid flashing on wrong partition. This feature works only with boot and recovery images. I won't add other partitions to this because for other things there are multiple backup restore functions.
- for MTK phones (if the flag is used in Boardconfig) there is a new menu to backup and restore some important partitions like uboot, nvram an secro because they are involved in restoring a lost IMEI, and also the logo partition which may often get broken by bad ported ROMs.
- besides these all my old specific menus (aroma, rainbow...) are still in place.
- added support for dencrypting and mounting data partition using the builtin minivold from cyanogenmod with vdc commands (the ideea came from this post of Lekensteyn). Tested and working well with text ar hex passwords, and maybe will work with pin too but I don't think it will work with pattern .
- added support for dencrypting and mounting adopted storage in marshmallow. The solution is based on this article of nelenkov.
- there is no included root solution. I choose to do it this way because there is no universal root solution now and someone may end up messing things with a non-working root option. You can flash a zip installer from Chainfire's SuperSu or other solution that may work for your phone.
All screenshots are made with my old tool from here (still working well).
CREDITS:
The biggest thanks go to AP756 and DerTeufel1980, two friends from Germany, who sent me a new phone each, with lollipop OS and that helped me a lot to do this.
- Phil3759 for the touch code and many other things from his recovery;
- TWRP developers. I learned a lot from their work;
- Clockworkmod Team starting with Koushik Dutta and ending with all developers that made the CWM recovery what it was;
- Cyanogenmod Developers;
- Nikolay Elenkov;
In next post there are some links for built recoveries. I'll add more soon as I get a valid link (on a reliable webhost) from people who build it for other phones.
I worked alone on this, there is no team here, not because I don't want to , but probably because there was no one interested in this, and so there may be some unspotted bugs. If you find any please do tell me to help on fixing it.
XDA:DevDB Information
Carliv Touch Recovery, Tool/Utility for all devices (see above for details)
Contributors
carliv
Version Information
Status: Stable
Current Stable Version: 5.7.3 & 6.6.1
Stable Release Date: 2016-07-19
Created 2016-05-30
Last Updated 2016-07-19
Changelog and working builds
CHANGELOG 19-07-2016:
- fix backup for old mtk phones.
Lollipop
1. Jiayu S3+
2. Zopo Speed 7+
3. Zopo Speed 7
4. Mlais Mx Base
5. Alcatel Pop C2/C3
6. ZTE Blade L3 / Digicel DL910
7. Nous NS5511
Marshmallow
1. Zopo Speed 7+
2. Zopo Speed 7+ with adopted storage
3. Zopo Speed 7
4. Zopo Speed 7 with adopted storage
* NOTE: sadly the kernel source for zopo marshmallow isn't published so these two don't have touch in recovery, but you can use them as in CWM with phone buttons.
[*] QCOMM devices:
1. Huawei Honor 5x (kiwi)
2. Samsung Galaxy A5 (SM-A500FU)
Building Guide
To build you need a local repo of cm-12.1 or cm-13 and a proper device tree. To see how a buildable device tree looks check this one from my github.
It builds out of the box with aicp lp-5.1 and aicp mm-6.0 too, but like in cm you need a proper device tree.
Some things to be considered:
For BoardConfig:
- the most common thing in all BoardConfig I saw (you need this to use power button to select if you use physical buttons in some situations)
Code:
- BOARD_HAS_NO_SELECT_BUTTON
- for the graphical interface
Code:
- TARGET_RECOVERY_PIXEL_FORMAT
- for mass storage if your phone has an external sdcard, to connect it to PC (this one can be specified in fstab too) - and it has to be without any quotes or slashes
Code:
- TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/mt_usb/musb-hdrc.0.auto/gadget/lun%d/file
- for LCD backlight lights - and it has to be without any quotes or slashes
Code:
- TARGET_RECOVERY_LCD_BACKLIGHT_PATH := /sys/class/leds/lcd-backlight/brightness
- for vibrator feature - and it has to be without any quotes or slashes
Code:
- VIBRATOR_TIMEOUT_FILE := /sys/devices/virtual/timed_output/vibrator/enable
- with link to a valid recovery.fstab version 2 (it may work without it but it is better to be here)
Code:
- TARGET_RECOVERY_FSTAB
- for a better readability adapted to your screen (check the minui folder for more fonts)
Code:
- BOARD_USE_CUSTOM_RECOVERY_FONT
Carliv Touch Recovery specific flags:
- if you have the recovery on recovery-carliv folder under bootable directory in cm-12.1 source use this next flag.
Code:
- RECOVERY_VARIANT := carliv
NOTE: in cm 13, and other android 6 sources too, you can't build with this flag out of the box and so you have some things to do - the easy one is to rename recovery folder in [recovery-stock] and to place my recovery next to that with the name [recovery]. Other option is to open Android.mk from /sytem/core/healthd and find line 58 where you need to replace [LOCAL_C_INCLUDES := bootable/recovery] with [LOCAL_C_INCLUDES := $(call project-path-for,recovery)].
- with your phone resolution like this width x height
Code:
- DEVICE_RESOLUTION := 720x1280
- if you want to use it with encrypted phone (it work with a non encrypted phone too but it will be smaller if you don't need decrypting function)
Code:
- BOARD_INCLUDE_CRYPTO := true
- if your phone is MTK powered you need this for the MTK menu (it is not mandatory though with the mtk phones shipped with lollipop or marshmallow)
Code:
- BOARD_HAS_MTK_CPU := true
- for touch menu, if your phone has an input driver with PROTOCOL_TYPE_B (synaptic is an example, or many samsung devices); if you have access to, check your kernel input driver for something like this [#define PROTOCOL_TYPE_B] - google it if you want to know more about this
Code:
- BOARD_USE_PROTOCOL_TYPE_B := true
- to block an input device use
Code:
- TOUCH_INPUT_BLACKLIST := "devicename"
- if you use Adopted Storage
Code:
- BOARD_USE_ADOPTED_STORAGE := true
For system.prop from device tree:
Code:
#
# system.prop for mx
#
ro.ctr.crypto.passwd="64656661756c745f70617373776f7264"
ro.ctr.forbid_format=/frp,/persistent,/lk,/uboot,/logo,/metadata,/nvdata,/nvram,/secro
ro.ctr.forbid_mount=/frp,/persistent,/lk,/uboot,/logo,/metadata,/nvdata,/nvram,/secro
ro.ctr.touch_accuracy=7
- to use decrypt data specify here your password (ro.ctr.crypto.passwd); I forgot to mention that if the phone uses encryption, the recovery will start with few seconds delay, because of the decrypting and mounting data process. If the message will tell you that couldn't be decrypted it is possible that your password was wrong or it uses an unsuported type of password. To be sure just restart the recovery from Power menu and if you still get the same message then you need to check your provided password from system.prop or to find a different solution (other recovery like twrp). If you want to decrypt your phone for good you need to format data and data media from Mount/Storage menu but you will loose your data (settings, preferences).
- ro.ctr.forbid_format and ro.ctr.forbid_mount are for partitions from fstab that you don't want to be shown in Mount/ Storage menu with mount and format option (coma separated, no spaces and with leading slash), like in my example above.
- ro.ctr.touch_accuracy to improve the touch handling (bigger lcd_density = bigger accuracy); the initial value is 7, just like in PhilZ Recovery, and I reccomend you to try different numbers to see what is right for you, but don't go over 19.
All these system.prop lines are not mandatory.
Carliv Touch Recovery uses a fstab version 1 named [ctr.fstab] and you have to create a folder recovery in your device tree, in that recovery folder create a new folder named root, in root folder another folder named etc and in that one place the ctr.fstab. Like this:
Code:
recovery/root/etc/ctr.fstab
That will be enough since the compiler will add it in recovery ramdisk and the recovery module will find it in etc folder.
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# mount point fstype device [device2] fs_options [fs_options2] lun
/boot emmc /dev/block/platform/mtk-msdc.0/by-name/boot
/cache ext4 /dev/block/platform/mtk-msdc.0/by-name/cache
/recovery emmc /dev/block/platform/mtk-msdc.0/by-name/recovery
/system ext4 /dev/block/platform/mtk-msdc.0/by-name/system fs_options=rw
/data ext4 /dev/block/platform/mtk-msdc.0/by-name/userdata fs_options=rw
/internal_sd datamedia /dev/null
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 lun=sys/class/android_usb/android0/f_mass_storage/lun/file
Important here is how you define internal storage which is data media
Code:
/internal_sd [COLOR="Red"]datamedia[/COLOR] [COLOR="Magenta"]/dev/null[/COLOR]
You can see It's used the old way with "datamedia" fstype and /dev/null device.
Important thing: if you have only internal storage define it as
Code:
/sdcard datamedia /dev/null
If you have also an external sdcard, use either way:
Code:
/internal_sd datamedia /dev/null
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
or
Code:
/sdcard datamedia /dev/null
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
If you are using the adopted storage feature for external sd card, define this
Code:
/data_sd ext4 /dev/block/mmcblk1p2 fs_options=adopted
and remove or comment out the line for external sd card.
You can see the internal storage can be sdcard or internal_sd and external sdcard can be sdcard or external_sd, but internal storage can't be external_sd or external sdcard internal_sd.
If your phone has OTG support you can use that too defining it like this
Code:
/usb-otg vfat /dev/block/sda1 /dev/block/sda
or this
Code:
/usbdisk vfat /dev/block/sda1 /dev/block/sda
-check with your phone booted up in Android and a OTG USB mounted to see in [/sys/class/block] or [dev/block] how to set device for this (the dev/block/sdx part).
The recovery has fat32, exfat and ntfs support builtin (also f2fs for file system). You can define your usb-otg and/or external sdcard as "auto" instead of "vfat" and it will work with any of these formats. I tested a portable HDD self powered and it works (120 GB) as usb-otg. Anyway that is available only for zip and image flashing. Maybe I'll make it to work for backup and restore too.
@carliv is back!!! Thanks a lot for this.
Should I port or should I build?
kirito9 said:
@carliv is back!!! Thanks a lot for this.
Should I port or should I build?
Click to expand...
Click to collapse
You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.
carliv said:
You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.
Click to expand...
Click to collapse
I will wait for cm13 support
Anyway this recovery support arm64?
Sure. Look at the phones already supported
Gesendet von meinem HERO1 mit Tapatalk
carliv said:
You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.
Click to expand...
Click to collapse
Goood xD. No more complaints from users who "brick" their devices and blame you :laugh:
All things are mostly done.
Just a little heads up: Added usb-otg support for install zip menu - should work with ntfs, fat, exfat and fat32 usb flash drives (I tested only with fat32). Other improvements too for both versions (lollipop and marshmallow).
I'll push the source tomorrow.
Attached a screenshot of the recovery for marshmallow (cm13).
Thanks to Master [emoji322]
Sent from my Lenovo A7010a48 using XDA-Developers mobile app
Thread updated with instruction and links for the new version for cm-13 and the version for lollipop is upgraded to 5.2.
If some of you build a working recovery and want to share here the link, just post a replay and I'll add it in post #2.
If you have a buildable device tree public on github and want a recovery built for it ask here and maybe I or someone else will do it in some free time.
@carliv do you interested to build this recovery for kenzo (redmi note 3 pro) ?
here's kernel source for it: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/kenzo-l-oss
exodius48 said:
@carliv do you interested to build this recovery for kenzo (redmi note 3 pro) ?
here's kernel source for it: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/kenzo-l-oss
Click to expand...
Click to collapse
The kernel alone is useful only if builds out of the box, but you still need a proper device tree to build, even with a prebuilt kernel. For building a recovery or a ROM that is what you need. I can't build a recovery only with that. Maybe someone else have the phone and manage to create the device tree and it will build the recovery.
Cheers
Look forward to Flash system Image In Carliv Menu
Thank You
Finally CTR for LP & MM! Amazing @carliv, I love this recovery.
Update to version 5.3 for lollipop and 6.2 for marshmallow
CHANGELOG 12-06-2016:
- activated working support for ntfs, exfat and f2fs;
- rewritten the flash image menu for better functionality and more protection to avoid mistakes;
- change the local busybox libs and modules names to avoid conflicting with existing external folder;
- some other small fixes and improvements (you can check the github commits).
@carliv
Hi, I have a device tree that I used for TWRP https://github.com/kirito96/device_Alcatel_4032 recovery and I would like to know if this is enough for building CTR or do I need a "complete" device tree? Thanks.
kirito9 said:
@carliv
Hi, I have a device tree that I used for TWRP https://github.com/kirito96/device_Alcatel_4032 recovery and I would like to know if this is enough for building CTR or do I need a "complete" device tree? Thanks.
Click to expand...
Click to collapse
Not really complete like in building ROMs, but you have to do some changes:
- convert it to cm building or, better and easier for you since it's for omni, to aicp.
- then you need to add in boardconfig partitions sizes (twrp doesn't need that because it checks the size from dumchar_info or partinfo).
- add that recovery/root/etc folder with ctr.fstab in it.
- add specific flags in boardconfig, but if your device has a small recovery partition let the crypto flag out (don't use it at all) and you will gain almost 2 Mb.
- add resolution and desired font if you want to not use the default which is for 540x960 dpi.
and that's it ...
Take a look at my mlais device tree (link in OP)-sorry, in post #3 to see these things - I have a branch for aicp too.
And I see your device use mtk header. You can check in my github for the lenovo p780 device tree where I implemented the mkbootimg part from my kitchen.
Cheers!
PS: if you can send me your phone dumchar_info file and a stock boot image I'll try to convert your device folder to use it as an example for other people about how to do it.
@carliv
Thanks for informing me, but for now I think I'll opt for a device tree that you made and I'll use that as a base for other devices that I'll work on in the future.
I've attached the dumchar_info.txt file below along with the stock boot.img. Funny thing is, I have 2 stock boot.img. I have for which my phone came with (4.2.2) and an AOSP upgrade with 3.10.xx kernel (5.1.1). I uploaded both because this recovery is for LP right? Which should be 3.10.xx kernel. In any case, I'll use what you made as a base. Thanks again.
carliv said:
CHANGELOG 12-06-2016:
- activated working support for ntfs, exfat and f2fs;
- rewritten the flash image menu for better functionality and more protection to avoid mistakes;
- change the local busybox libs and modules names to avoid conflicting with existing external folder;
- some other small fixes and improvements (you can check the github commits).
[/B]
Click to expand...
Click to collapse
You did it!!! :victory:
Good thing I was checking up on you or I might of missed it.
Thanks carliv I realize this project must of been a huge effort on your part and I for one am very grateful :highfive:
Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
keezay said:
Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
Click to expand...
Click to collapse
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
jcadduono said:
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
Click to expand...
Click to collapse
Thank you very much!
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
keezay said:
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
Click to expand...
Click to collapse
Can you help me set up an environment to build a kernel, arm64, for s7? I'm on Ubuntu having a heel of a time..
Galaxy S7 Edge Kernel Flashing Issues
I am currently trying to flash a different kernel into a galaxy s7 edge (SM-G935S).
I have gone as far as building a kernel and extracting a Image file from it, but every time I try flashing a boot.img with a replaced kernel image file, it seems to never work.
A mkbootimg tool that I am currently using requires a dtb file, but I cannot find where to get it from.
I have tried using @jcadduono's git code, but the dtb file created from it doesn't seem to work as well.
Can anyone tell me what I should do to flash a kernel successfully?
kernel panic after flashing
Hi @ll,
with this guide I was able to compile my own kernel and also flashing it to my phone. Unfortunatelly I'm getting kernel panic after rebooting the phone. is there any possibility to get the reason for this? Or do you have any hint, what I may have done wrong?
Thanks for your help.
Kind regards
v0ti