[DEV] - Dual-boot Linux on the Asus Infinity TF700t - JB-4.2[Thread closed]

Search This thread

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
This was the development thread for the "Dual-boot Linux on the Asus Infinity TF700t - JB-4.2" (now called "Kexecboot Linux on the TF700t").

Any and all developments are in Kexecboot Linux on the TF700t here

JoinTheRealms source is up here https://github.com/JoinTheRealms/TF7...oot-stockbased.


Recovery flashable Kexecboot and Kernels Installer

I have made a flashable zip to do the work for me(and you). This zip is a modified version of _that's kernel installer. It will install the kexec blob, boot.cfg, and the Andriod kernel of your choice - CROMi-X, that10 or CROMBi-KK, that-cm112. The that10 installer also includes the needed modules (I will see what is needed for CROMBi-KK at a later date).

Flash the proper zip file below using the newest TWRP:

Please make sure you have a BACKUP (also dd backup your mmcblk0p5 partition for safety) and have either the stand alone that10 kernel installer or CROMi-X/CROMBi-KK ROM's on your tablet as a safety net.

I am including the md5's on these files until I figure out how to sign them... :silly:Done, thanks _that!

CROMi-X 5.4 - kexecboot_installer_for_CROMBi-X5.4_v1.0_Signed.zip -

CROMBi-X - kexecboot_installer_for_CROMBi-KK_v1.0_Signed.zip -

Change log:
5/23/2014
v.1.0 Installs kexec blob, boot.cfg, Android kernels (that10 and that-cm112) and modules(that10 only)


Manual kexec blob, Android and Linux kernel install info
1. Android Kernel

You must have a fully stable CROMi-X 4+(TWRP 2.5+) or CROMBi-KK (trwrp_that-2.6.3 or TWRP 2.7) install to use any of the following (See this forum, here, for ROM details)
(If you are on stock rooted only, see rabits old thread as this is your only option, here).


The example boot.cfg is usable as is (if you read the file and have use of any of the common choices it describes.)

---CROMi-X (Remember this is only for _that stock. No f2fs,rom2sd or data2sd)

1)
From Android "Terminal Emulator" mount /system r/w and make dir /system/boot and extract that9oc-kexecboot-android-05082014.zip or that10-kexecboot-android.zip to /system/boot/

The following assumes you copied or downloaded that9oc-kexecboot-android-5082014.zip to the Download folder
Code:
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
mkdir /system/boot
cd /system/boot
unzip /data/media/0/Download/that9oc-kexecboot-android-5082014.zip
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system


2)
Reboot into TWRP

3)
From TWRP, flash kernel-10.6.1.14.10-that9-oc.zip or kernel-that10.zip and reboot to Android (See _thats thread for kernel details)

4) Back in Android, mount mmcblk0p5 as root and copy your this example boot.cfg into /mmcblk0p5/multiboot -
BIG RED WARNING - Do not mess with any other files on this partition or you will most likely have yourself a paperweight...


The following assumes you downloaded or copied boot.cfg the the Download folder
Example Code:
Code:
su
cd /data/media/0/Download
mkdir kexectemp
mount -t vfat /dev/block/mmcblk0p5 kexectemp/
mkdir kexectemp/multiboot/
cp boot.cfg kexectemp/multiboot/
umount kexectemp/
---CROMBi-KK (Remember this is only for _that stock. No f2fs,rom2sd or data2sd)

1) From Android "Terminal Emulator" mount /system r/w and make dir /system/boot and extract that-cm112-kexecboot-android-4272014.zip to it


The following assumes you copied or downloaded that-cm112-kexecboot-android-4272014.zip to the Download folder
Code:
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
mkdir /system/boot
cd /system/boot
unzip /data/media/0/Download/that-cm112-kexecboot-android-4272014.zip
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
2) Mount mmcblk0p5 as root (ex. mkdir somewhere/temp, mount -t vfat /dev/block/mmcblk0p5 temp/) and copy your this example boot.cfg into /mmcblk0p5/multiboot -
BIG RED WARNING - Do not mess with any other files on this partition or you will most likely have yourself a paperweight...


The following assumes you downloaded or copied boot.cfg the the Download folder
Example Code:
Code:
su
cd /data/media/0/Download
mkdir kexectemp
mount -t vfat /dev/block/mmcblk0p5 kexectemp/
mkdir kexectemp/multiboot/
cp boot.cfg kexectemp/multiboot/
umount kexectemp/
2. Linux Kernel - This step is only needed if you aren't using one of the example rootfs below.

Be sure to read the readme files included in the zip file by conago.

1) Mount your Linux .img file or extract your rootfs as root on your Linux PC to a temp directory

2)
Extract linux-kernel-tf700-kexec-that10-cogano3.zip ,by conago,to a temp directory

3) Copy the /boot and /lib folders to the root of your rootfs

4) Unmount the image or zip up your rootfs files.

Hint: Running the following commands will result in a new rootfs.tar.lzma that can be installed with the rootfs only installer above.

1) cd into partition mount
2)arch - sudo tar cp --exclude=lost+found --exclude='proc/*' --exclude='proc/.*' --exclude='sys/*' --exclude='sys/.*' --exclude='dev/*' --exclude='dev/.*' --exclude='tmp/*' --exclude='tmp/.*' --exclude='var/cache/pacman/pkg/*' $excludes . | lzma -9 > ../imgagename.tar.lzma
or
ubuntu - sudo tar cp --exclude=lost+found --exclude='proc/*' --exclude='proc/.*' --exclude='sys/*' --exclude='sys/.*' --exclude='dev/*' --exclude='dev/.*' --exclude='tmp/*' --exclude='tmp/.*' --exclude='var/cache/apt/archives/*.deb' $excludes . | lzma -9 > ../imgagename.tar.lzma
3. Flashing the kexecboot kernel blob - (done from Android using "Terminal Emulator") with 10 second time out by conago

1) Extract kexec-host-2014-05-22.zip to a temp dir, cd into it and then carefully type the following as root:
Again - BIG RED WARNING - Type carefully or you will leave your tablet unbootable or WORSE. And please read the README file in the zip.
Code:
dd if=blob of=/dev/block/mmcblk0p4
Reboot and profit!


Post install

Now included in the menu driven Android kexecboot Installer

Use the following script from Android AFTER you have a working install to modify the
boot.cfg file to your setup. It helps to rename the labels to something you can remember. ;)

Extract to your favorite place and see the readme file.
modify_boot.cfg_v1.0.zip





Old, Old thread content here:

Great kexecboot tutorial by @cogano (here) - This gives some good background for the regular installer as well.

For those running CROMBi-KK w/_that9-oc+(modded for cm112 by @lj50036 ), I have a quick rundown of what you need to do and the necessary files (ie cm112 android kernel) here


Disclaimer! This is very experimental and may damage your device.




Suggested Requirements - TWRP 2.5+ and CROMi-Xenogenisis 4+

If you are on CleanROMv3x see rabits old thread - http://xdaforums.com/showthread.php?t=2014759



Known issues:

1) Try to start or restart lightdm and it says - read-only filesystem. You need to fix this from Android, terminal emulator
Code:
su
Code:
e2fsck /data/media/linux/rootfs.img
This happens when you force restart or shutdown linux sometimes


You will find links below to the latest (still beta!) installer and some rootfs images.

For both Ubuntu and Lubuntu - Username: ubuntu Password:ubuntu

Lubuntu rootfs:

FYI - The Lubuntu rootfs is a work in progress and has been stripped for YOU to customize. Even though the download size is larger (install is 2.6gb), this runs way faster and uses less ram.
To see what has been installed (not much) or removed (a lot):
Code:
cat /var/log/apt/history.log | less
- The Lubuntu rootfs has the apt lists removed to reduce download size. Run this from lxterminal:
Code:
sudo apt-get update
Lubuntu To Do:


1) Remove xfce4-notifyd to get rid of the multiple notification errors... (Sorry about that one. I like Thunar and that was a dependency...)
2) No shutdown or restart in Lubuntu, also fails to start lightdm (tf700 prompt). Work around is to insert "sudo service lightdm start" (no quotes) into the file /etc/rc.local BEFORE exit0.
3) Version number shows as 12.10, it is really 13.04
4) Remove Unity
5) Update Tegra4Linux Drivers
6) Create updater scripts for version updates (Allows using your current install instead of starting with a fresh rootfs each time I update stuff)
7) Find out what is eating up space - rootfs still too large (734mb download - 2.5gb installed)
8)

Lubuntu Change log:
8-19-2013
- Removed xfce4-notify and Thunar
- Fixed lightdm errors and loads on boot now
- Fixed Lubuntu version number
- Removed overlay scrollbar - Most are usable by touch now.
- Removed password for sudo
- Other little things...

8-20-2013
- Removed Unity
- Added new wallpaper and conky (Thanks kennyMC)
- Cleaned up some clutter and sped things up...
On hold...
Turns out that removing Unity did remove something that broke the framebuffer (honestly don't know much about that). I checked the logs and didn't see anything that got removed that should have affected X.
Anyhow, for now I am going to stick with the 8-19-2013 version as a base. I'm going to just spend some time using it and see what I can...

8-22-2013
- Removed Unity (if using v8-19-2013 run this in a terminal window as root - remove-unity.sh)
- Added new wallpaper and conky (Thanks kennyMC)
- Cleaned up some clutter and sped things up... Feels smoother!
- Removed some icon sets (HighContrast, LowContrast, Elementary), saved 100+mb on rootfs
Here is the modified .conkyrc and conky-draw.lua and my new wallpaper (definitely amateur).
conky-wallpaper2.tar (Fixed per JoinTheRealms - added - own_window_argb_visual) Just untar in the root of your home directory. (tar xf conky-wallpaer.tar) And use desktop preferences to change wallpaper.

lubuntu-conky.png



Install

1) In Android Terminal Emulator:
Code:
# su
# mkdir /data/media/linux
2) copy installerV6.7.zip and rootfs-ubuntu-12.10-0.8.0.tar.lzma (12.10) or rootfs-lubuntutf700t-8-22-2013.tar.lzma (13.04)
to Dock SDcard (/Removable/SD), MicroSD (/Removable/MicroSD) or /data/media
3) Boot to recovery
4) NANDROID BACKUP!!!
5) Install installerV6.zip
6) READ and follow the aroma installer instructions (it will stop at 90% for as long as an hour or more while it is decompressing the rootfs)
7) Enjoy dual-boot Linux Again...

Files:

rootfs-ubuntu-12.10-0.8.0.tar.lzma (687 Mb) MD5: 6dbf50fe8623ceef3e5771e01ba52938
NEW! - rootfs-lubuntu-tf700t-8-22-2013.tar.lzma (722 MB) MD5: 92399b0541235a53b94844bacb06d866
NEW! 10/2013 - installerV6.7.zip (13mb) MD5: f2961cd02c6770dea369c3728fa13201
conky-wallpaper2.tar (316k)

Dualboot Linux - rootfs only installers.
tf700arch.png
lubuntu-tf700t.png
ubuntu-tf700t.png

These NO NOT install the kernels needed for hybrid or kexec dualbooting. These are only for unpacking the rootfs files from above. They are custom Aroma based installers and allow your /home directories to be on mccblk0p8 if you choose.

These are Aroma based installed from recovery:

arch-rootfs-installer-v.1.zip


lubuntu-rootfs-installer-v.1.1.zip

ubuntu-rootfs-installer-v.1.1.zip

 
Last edited:

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
KEXECBOOT with CROMBi-KK

These files are for those who want to kexecboot using CROMBi-KK 4/3, 4/27 or CROMi-X 5.4running on internal sd (NO rom2sd, f2fs or data2sd) with the "stock" _that9-oc+ (cm112 is modded by lj20036). You must have a good running CROMBi-KK install because i am not including the modules needed, only the zImage and initrd.img I extracted from the 4/3 zip file. CROMi-X should also be running stable. You will be flashing _thats newest _that9oc+ using his installer.

THIS IS VERY SIMPLISTIC IT ASSUMES YOU KNOW WHAT ALL THE FOLLOWING MEANS AND HAVE EITHER DONE THE KEXECBOOT WITH EARLIER CROMI VERSIONS OR HAVE COMPLETELY READ COGANO'S TUTORIAL

Also remember DO NOT use the regular rootfs installers. The regular installers will install a JellyBean kernel and render your tablet unusable. Only use the one of the following to extract your rootfs to the tablet:

arch-rootfs-installer-v.1.zip

lubuntu-rootfs-installer-v.1.1.zip

ubuntu-rootfs-installer-v.1.1.zip



All of the following is done on your tablet

1) Android
a) Mount /system r/w and make dir /system/boot
b) - Extract that-cm112-kexecboot-android.zip to /system/boot/ for 4/3/2014 CROMBi-KK Release
- Extract that-cm112-kexecboot-android-4272014.zip to /system/boot/ for 4/27/2014 CROMBi-KK Release
**** FOR CROMi-X flash _thats9oc+ kernel in TWRP and reboot into CROMi-X and then extract that9oc-kexecboot-android-05082014.zip to /system/boot/​
c) Mount mmcblk0p5 and modify/copy your boot.cfg in /mmcblk0p5/multiboot to include CROMBi-KK at least to start (at least you will get back into Android ;) ) - Example config - boot.cfg
2) Linux
a) Mount your Linux image and extract _that-linux-kexec.zip to /boot
3) Flashing the kexecboot blob
a) Extract kexec-host.zip to a temp dir, cd into it and then carefully type the following as root:
Code:
dd if=blob of=/dev/block/mmcblk0p4
Reboot and profit!

Credits:
rabits
JoinTheRealms
moreD_cn
_that
lj50036
cogano
and many more
 
Last edited:

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
Installer/ kernel guide

Ill be keeping this post updated as much as possible with the latest stuff to save people crawling through multiple threads :)

-Installer-
The installer is an Aroma package responsible for extracting the linux distros filesystem(compressed into a .lzma file) into a virtual image (.img), you can define the size of this image with the installer. It also prepares and flashes a kernel and initrd based on the preferences you define within the installer.

Downloads:
Version 6.5: https://www.dropbox.com/s/oksatawl4wxo290/installerV6.5.zip (Hunds 3.3.6 based)
Version 6.8: https://www.dropbox.com/s/0q01ijw1vkbokw1/installerV6.8.zip (Stock based, patches from _thatv5)

Note:
Code:
-As of 03/10/2013 the kernel in the installer is up to date, i wont be updating the kernel inside the installer anymore.
-Only Stock based ROMs are supported in the installer (Stock, Cromi 4.x, Cromi 5.x etc).
-Kernels-
We now have a flashable .zip :) (I stole _that's), To flash a .blob file the best method is using dd. From terminal emulator or adb shell, run "dd if=*name of blob* of=/dev/block/mmcblk0p4" (obviously without quotation marks and replace *name of blob* with the file name:silly:)

Downloads:
Stock based(blobs):
--Stock/ _that https://www.dropbox.com/s/86o9vt3b10digqr/blob04 0.4
--Hundsbuah https://www.dropbox.com/s/h2waysfz3bzaqy4/blob04 0.4
Stock based(zip)
--Stock/ _that https://www.dropbox.com/s/ndasx56839hsoud/kernel-Linux-that_based2.zip 0.4
--Hundsbuah https://www.dropbox.com/s/nh6s3yvmk1uszng/kernel-Linux-hunds_based2.zip 0.4

Changelog:
Code:
Version 0.1
-enabled cleancache
-testing cm10.2 dualboot
Version 0.2
-Added a repair (e2fsck)to main init menu
Version 0.3
-Another initrd update, better repair, streamlined the kernel selection, added a option to choose
 the default OS, started adding support for kexecboot.
Version 0.4
-Some more init tweaks and updated kexecboot binary
Source:
https://github.com/JoinTheRealms
https://github.com/moreD

-MISC-
Some fixes and improvements
Suspend Workaround
http://xdaforums.com/showpost.php?p=44764722&postcount=6

Backlight Control
Code:
sudo add-apt-repository ppa:indicator-brightness/ppa
sudo apt-get update && sudo apt-get install indicator-brightness

Overclock Management(only for Hundsbuah kernels)
https://www.dropbox.com/s/hkqhog4gjqw0lef/overclock.tar.gz(extarct to /home)

Install XBMC
https://www.dropbox.com/s/e21vys5a0c11u0e/installxbmc.sh



Credits
rabits (For his original init scrits and installer)
Hundsbuah (For his kernel and help)
_that (For his kernel and help)
moreD_cn (For fixing everything)
workdowg (for his rootfs's)
And lots more+
 
Last edited:

moreD_cn

Member
Jul 24, 2013
38
72
Zhongshan
Hey guys you're doing great jobs! :good:

since there's a dev thread and i've got enough posts to reply here I think I'll reply here from now on :)

As i won't have much time for at least a month, I'll focus on building a kexec kernel for linux.
@JoinTheRealms mentioned that after removing wakelocks screen left blank while waking up. I looked into it yesterday but didn't find any solution :( it seems to relate to something about tegradc and earlysuspend I tried disabling and then re-enabling tegradc.0 (the one for LVDS) the issue appeared with wakelock support. but i cannot figure out how to resolve it.
another thing is bcmsdh_sdmmc keeps waking up my device regularily even without wakelock. however if I use rfkill to block wifi and bluetooth before suspending it works fine. it suspended for over 30k seconds without waking up last night :)

since we're having problem disabling wakelock, I have an idea that should we just leave it enabled and write a pm daemon for linux to control power state? actually i've implemented a basic one and it works as expected.
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
Hey guys you're doing great jobs! :good:

since there's a dev thread and i've got enough posts to reply here I think I'll reply here from now on :)

As i won't have much time for at least a month, I'll focus on building a kexec kernel for linux.

@JoinTheRealms mentioned that after removing wakelocks screen left blank while waking up. I looked into it yesterday but didn't find any solution :( it seems to relate to something about tegradc and earlysuspend I tried disabling and then re-enabling tegradc.0 (the one for LVDS) the issue appeared with wakelock support. but i cannot figure out how to resolve it.
another thing is bcmsdh_sdmmc keeps waking up my device regularily even without wakelock. however if I use rfkill to block wifi and bluetooth before suspending it works fine. it suspended for over 30k seconds without waking up last night :)

since we're having problem disabling wakelock, I have an idea that should we just leave it enabled and write a pm daemon for linux to control power state? actually i've implemented a basic one and it works as expected.

Are able to post your pm daemon? Id love to give it a try, any attempts of me writing c code usually end in disaster ;).

Im still trying to fully understand this wakelock stuff ( when im daring enough im gonna start reading this), im guessing something in the linux userspace is holding wakelocks, explaining why it immdatly wakes up again?

I actually successfully got the system to suspend then wakeup with a script with wakelocks enabled, it simply put the device to sleep and 30 seconds later echo'ed on > /sys/power/state like 20 times with a 2 second delay lol no idea how this worked.
 

moreD_cn

Member
Jul 24, 2013
38
72
Zhongshan
Are able to post your pm daemon? Id love to give it a try, any attempts of me writing c code usually end in disaster ;).

Im still trying to fully understand this wakelock stuff ( when im daring enough im gonna start reading this), im guessing something in the linux userspace is holding wakelocks, explaining why it immdatly wakes up again?

I actually successfully got the system to suspend then wakeup with a script with wakelocks enabled, it simply put the device to sleep and 30 seconds later echo'ed on > /sys/power/state like 20 times with a 2 second delay lol no idea how this worked.

My daemon depends on a patch which providing "current power state" so i've modify it a bit. I think it's easy to understand.. but with very limited functions. note that press power button over a sec for force wake up.

looks like that sometimes it was kept from suspending by userspace wakelocks but it also occured that a wifi interrupt wake suspended device up. still don't know why but disable wifi before suspend seems to resolve it.

EDIT: seems i've made a mistake:silly: please redownload source file...
EDIT2: I've re-uploaded one that supports lid open/close event
 

Attachments

  • pm.c
    3.4 KB · Views: 163
Last edited:

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
@JoinTheRealms - CROMi-X 5 is right around the corner... Are we going to be ok with the kernel. I have to check but I think sbdags stock and Hunds are using a new base... I may just try CROMi-X beta3 to see what's up (if it boots with yours). I'm kind of looking forward to checking out the fixed dock power drain issue and trying the cache2sd though, so I may stick to his stock for a couple days...
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
@JoinTheRealms - CROMi-X 5 is right around the corner... Are we going to be ok with the kernel. I have to check but I think sbdags stock and Hunds are using a new base... I may just try CROMi-X beta3 to see what's up (if it boots with yours). I'm kind of looking forward to checking out the fixed dock power drain issue and trying the cache2sd though, so I may stick to his stock for a couple days...

Kernel should be fine, I cant find any new kernel source from Asus. I doubt they changed much that would affect us, but we will see:)
 

yoda-sama

Member
Mar 28, 2013
31
6
@JoinTheRealms - CROMi-X 5 is right around the corner... Are we going to be ok with the kernel. I have to check but I think sbdags stock and Hunds are using a new base... I may just try CROMi-X beta3 to see what's up (if it boots with yours). I'm kind of looking forward to checking out the fixed dock power drain issue and trying the cache2sd though, so I may stick to his stock for a couple days...

Can you elaborate on this dock power drain issue? I'm curious if it describes a problem I've been having since upgrading to 4.2.
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
Can you elaborate on this dock power drain issue? I'm curious if it describes a problem I've been having since upgrading to 4.2.

Anytime you plug or unplug the tablet from the dock while in android (maybe linux), the dock discharges quickly to keep the tab charged. This is supposedly fixed in the new Asus jb base.

Sent from my ASUS Transformer Pad TF700t - CROMi-X 4.7.0 ODEX
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
strange, didnt you report good scores on cromi 4.7? i wonder whats changed. Hope nothings broken on the linux side:(

Yeah, I got 6000. Might need to let the rom "settle" a bit before trying this testing. I also enabled the cache2sd which may have muddled with the results. Like I said I'll put it though some real world tests. I seems way snappier now.

Sent from my HTCEVOV4G using Tapatalk 4
 
  • Like
Reactions: JoinTheRealms

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
@JoinTheRealms - Is there an easy way to compile the kernel for VT support (tty0). Xorg in Android is complaining about no tty0, which of course there isn't. Don't bang your head on this because it is for my pet project, using Linux Deploy to run my rootfs chrooted in the framebuffer under Android. This would help a lot when I don't have a pc in front of me to search out things while developing the rootfs....

Edit - or @_that your stock Android kernel?
 
Last edited:

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
@moreD_cn In the previous kexec kernel is posted with wakelocks disabled, we had an issue with the screen remaining blank after a suspend (although the backlight functions normally)

This might not having as be as an issue as i thought and hoping you can help me :) If i suspend the tablet and wake it up again (the screen is blank at this point) i can ssh into it and if i run "sudo service lightdm restart" and the display returns! so we have a semi-functioning native suspend :) it seems xserver(or something) isn't re-initialising LVDS1 properly, but im at a loss on how to fix (my linux knowledge still isn't great) but i feel our options expanded.
 

moreD_cn

Member
Jul 24, 2013
38
72
Zhongshan
@moreD_cn In the previous kexec kernel is posted with wakelocks disabled, we had an issue with the screen remaining blank after a suspend (although the backlight functions normally)

This might not having as be as an issue as i thought and hoping you can help me :) If i suspend the tablet and wake it up again (the screen is blank at this point) i can ssh into it and if i run "sudo service lightdm restart" and the display returns! so we have a semi-functioning native suspend :) it seems xserver(or something) isn't re-initialising LVDS1 properly, but im at a loss on how to fix (my linux knowledge still isn't great) but i feel our options expanded.

I have looked into it and don't know how to fix neither. But if we can get display back by restarting X, it's great progress. I'll try again!

btw how is multiboot going? I spent some time last days to port something called kexecboot and it has replaced rabits' one on my pad. Still have some problems but it works, mainly..:)
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
I have looked into it and don't know how to fix neither. But if we can get display back by restarting X, it's great progress. I'll try again!

btw how is multiboot going? I spent some time last days to port something called kexecboot and it has replaced rabits' one on my pad. Still have some problems but it works, mainly..:)

Yeah its strange,after i restart x, input devices stop working, also when i run lightdm from ssh it wont start, just falls back to terminal. I havnt had much time too play with it, but atleast its seemingly not a display driver issue.

Multiboot should be very easy to port over(Im all talk, since i have zero experience doing that kinda thing :)) The developer has recently put alot of work into making it easy to port to other devices. Now that we have nvflash, i feel a bit safer experimenting.

kexecboot looks awesome! in fact ive been planning a grub-like multiboot, using twrp or cwm, im trying to figure out how to strip all the recovery stuff off it and just use it as a multiboot interface, and have boot from kexec. I need linux booting from a directory first though..... lol
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
Hmm just updated my source with the latest Asus kernel source, and im not getting framebuffer console..... I know they patched the motochopper root exploit hopefully it didn't affect the fb patch.

---------- Post added at 01:56 AM ---------- Previous post was at 01:24 AM ----------

Either im doing something really dumb or Asus broke fb console.... its V10.6.1.14.10 with _thats pmc and ril patches and the fb patch. After splash screen it stays blank for about 5 seconds before booting straight into android
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
Hey guys, i originally missed this post, but it seems to have completely fixed the issue with the tablet locking up due to heavy I.O:

I was able to solve the random-freeze-during-heavy-I/O issue. The culprit is that large amount of memory is used as buffer cache to hold dirty pages. When the dirty page threshold is hit, all buffer cache is written out at once, without allowing other processes to do much I/O.

The solution is to add the following to /etc/sysctl.conf

Code:
vm.dirty_bytes=2048000
vm.dirty_background_bytes=1024000

The configuration can be reloaded without a reboot by running "sysctl -p" as root

With it i was about to extract a 200mb file while installing 100mb of packages while browsing xda :) many thanks to pvka13
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Ok guys ive been working on it all day...

    Here it is: https://www.dropbox.com/s/f8bcm3qgz86njj1/blob (needs to be flashed with dd)
    Ive modified the ramdisk to fully support kexecboot, all the hybrid boot functionality has been removed, since kexec booting works fantastically!

    -Booting android works great and ROMs other than Stock/CROMI should work fine (with bryce09s kernel)
    -Booting Linux from an image works fine
    -Booting Linux from a directory works !

    Booting from a kexec requires the kernel to be unpacked, .zip --> .blob --> boot.img --> zImage/ initrd (this is what we need)

    -ANDROID-

    This is _thatv5 straight from _thats thread just unpacked (not compiled by me) https://www.dropbox.com/s/may1fk9jt3bj0og/_that-android-kexec.zip
    It needs to extracted to mmcblk0p1/boot/ , If your running android this will be mounted at "/" so create a file /boot and extract the zImage and initrd.img to it

    -LINUX-

    This is the normal stock/_thatv5 based kernel with the kexecboot modified ramdisk https://www.dropbox.com/s/np37zduxyo9jwsy/_that-linux-kexec.zip

    Again this needs to be extracted to *your-rootfs-image*/boot
    or if you want to boot from a directory *path-to-dir*/boot

    The hard part for now, is configureing the boot.cfg please read moreD_cn's post for a detailed explanation http://xdaforums.com/showpost.php?p=47209660&postcount=79

    You can open this file with the commands:

    mkdir mount
    sudo mount -t vfat -o loop /dev/mmcblk0p5 mount
    (Its recommended that you should make a backup of this files, right click and hit "compress")
    sudo gedit mount/multiboot/boot.cfg

    heres my boot.cfg for example

    Code:
    #Linux image#
    LABEL=Ubuntu
    BOOT=7
    DEVICE=/dev/mmcblk0p8
    IMAGE=/media/linux/rootfs-old.img
    KERNEL=/boot/zImage
    INITRD=/boot/initrd.img
    PRIORITY=50
    
    #Linux Directory#
    LABEL=Ubuntu (dir)
    BOOT=3
    DEVICE=/dev/mmcblk0p8
    DIR=/linux1
    KERNEL=/boot/zImage
    INITRD=/boot/initrd.img
    PRIORITY=51
    
    #Android#
    LABEL=CROMi-Xenogenesis
    BOOT=3
    DEVICE=/dev/mmcblk0p1
    DIR=/
    KERNEL=/boot/zImage
    INITRD=/boot/initrd.img
    PRIORITY=100

    Im currently working on a method of automating the boot.cfg creation, but its not finished and hasnt been tested yet. This, shell and the repair menu can be found by Setitngs --> Exit. Kexecboot will also fall back to this menu if theres an issue with you boot.cfg rather than kernel panic.

    Thats it for now, hope it helps

    Oh and please give moreD your thanks this would not have been anywhere near possible without him porting kexec and kexecboot.
    7
    The issues seem to be too hard for me to solve :( I'm just posting my work here hoping someday they can be fixed..

    SOURCE
    https://github.com/moreD/kexecboot

    WHATS WORKING
    All kexec kernel functions (including boot from image / partition / directory)

    WHATS NOT WORKING
    Booting linux using hybrid kernel. (stuck on run-init and says 'init: missing runlevel')
    Booting Android. (It's weird that using @JoinTheRealms latest kernel it panic, but with my old kernel it works fine :confused:)

    HOW TO USE IT
    just execute it :) (Sure, writing configuration is more important)
    Remember it needs console framebuffer support.

    All configuration files should be placed in mmcblk0p5/multiboot/

    Here's an example for linux, filename does not matters
    Code:
    LABEL=Ubuntu
    BOOT=7
    DEVICE=/dev/mmcblk0p8
    IMAGE=/linux/ubuntu.img
    KERNEL=/boot/zImage
    INITRD=/boot/initrd.img
    PRIORITY=50

    another example
    Code:
    LABEL=Ubuntu (dir)
    BOOT=3
    DEVICE=/dev/mmcblk0p8
    DIR=/linux/ubuntu
    KERNEL=/boot/zImage
    INITRD=/boot/initrd.img
    PRIORITY=51

    And here's an example for Android
    Code:
    LABEL=CROMi-Xenogenesis
    BOOT=0
    DEVICE=/dev/mmcblk0p1
    DIR=/
    PRIORITY=100

    Some explanations:
    LABEL: string after LABEL tag will be display in kexecboot's menu

    BOOT: is a bit pattern standing for type of the current system, defined as follow:
    Code:
    #define BOOT_TYPE_LINUX                0x1
    #define BOOT_TYPE_KEXEC                0x2
    #define BOOT_TYPE_IMAGE                0x4
    setting '0' in a bit means ANDROID, HYBRID, DIRECTORY, respectively. note that booting ANDROID uses HYBRID and DIRECTORY, and booting from a partition also uses DIRECTORY.

    DEVICE: the device (partition) you want to boot from

    DIR: the path you want to boot from (ONLY valid using DIRECTORY), remember to set `DIR=/` when you want to boot from a partition (like sdcard)

    IMAGE: the image file you want to loop-mount and boot from

    KERNEL: kernel for kexec
    INITRD: initrd for kexec
    The path is RELATIVE to your system

    PRIORITY: decides the order when kexecboot menu shows
    6
    This was the development thread for the "Dual-boot Linux on the Asus Infinity TF700t - JB-4.2" (now called "Kexecboot Linux on the TF700t").

    Any and all developments are in Kexecboot Linux on the TF700t here

    JoinTheRealms source is up here https://github.com/JoinTheRealms/TF7...oot-stockbased.


    Recovery flashable Kexecboot and Kernels Installer

    I have made a flashable zip to do the work for me(and you). This zip is a modified version of _that's kernel installer. It will install the kexec blob, boot.cfg, and the Andriod kernel of your choice - CROMi-X, that10 or CROMBi-KK, that-cm112. The that10 installer also includes the needed modules (I will see what is needed for CROMBi-KK at a later date).

    Flash the proper zip file below using the newest TWRP:

    Please make sure you have a BACKUP (also dd backup your mmcblk0p5 partition for safety) and have either the stand alone that10 kernel installer or CROMi-X/CROMBi-KK ROM's on your tablet as a safety net.

    I am including the md5's on these files until I figure out how to sign them... :silly:Done, thanks _that!

    CROMi-X 5.4 - kexecboot_installer_for_CROMBi-X5.4_v1.0_Signed.zip -

    CROMBi-X - kexecboot_installer_for_CROMBi-KK_v1.0_Signed.zip -

    Change log:
    5/23/2014
    v.1.0 Installs kexec blob, boot.cfg, Android kernels (that10 and that-cm112) and modules(that10 only)


    Manual kexec blob, Android and Linux kernel install info
    1. Android Kernel

    You must have a fully stable CROMi-X 4+(TWRP 2.5+) or CROMBi-KK (trwrp_that-2.6.3 or TWRP 2.7) install to use any of the following (See this forum, here, for ROM details)
    (If you are on stock rooted only, see rabits old thread as this is your only option, here).


    The example boot.cfg is usable as is (if you read the file and have use of any of the common choices it describes.)

    ---CROMi-X (Remember this is only for _that stock. No f2fs,rom2sd or data2sd)

    1)
    From Android "Terminal Emulator" mount /system r/w and make dir /system/boot and extract that9oc-kexecboot-android-05082014.zip or that10-kexecboot-android.zip to /system/boot/

    The following assumes you copied or downloaded that9oc-kexecboot-android-5082014.zip to the Download folder
    Code:
    su
    mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
    mkdir /system/boot
    cd /system/boot
    unzip /data/media/0/Download/that9oc-kexecboot-android-5082014.zip
    mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system


    2)
    Reboot into TWRP

    3)
    From TWRP, flash kernel-10.6.1.14.10-that9-oc.zip or kernel-that10.zip and reboot to Android (See _thats thread for kernel details)

    4) Back in Android, mount mmcblk0p5 as root and copy your this example boot.cfg into /mmcblk0p5/multiboot -
    BIG RED WARNING - Do not mess with any other files on this partition or you will most likely have yourself a paperweight...


    The following assumes you downloaded or copied boot.cfg the the Download folder
    Example Code:
    Code:
    su
    cd /data/media/0/Download
    mkdir kexectemp
    mount -t vfat /dev/block/mmcblk0p5 kexectemp/
    mkdir kexectemp/multiboot/
    cp boot.cfg kexectemp/multiboot/
    umount kexectemp/
    ---CROMBi-KK (Remember this is only for _that stock. No f2fs,rom2sd or data2sd)

    1) From Android "Terminal Emulator" mount /system r/w and make dir /system/boot and extract that-cm112-kexecboot-android-4272014.zip to it


    The following assumes you copied or downloaded that-cm112-kexecboot-android-4272014.zip to the Download folder
    Code:
    su
    mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
    mkdir /system/boot
    cd /system/boot
    unzip /data/media/0/Download/that-cm112-kexecboot-android-4272014.zip
    mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
    2) Mount mmcblk0p5 as root (ex. mkdir somewhere/temp, mount -t vfat /dev/block/mmcblk0p5 temp/) and copy your this example boot.cfg into /mmcblk0p5/multiboot -
    BIG RED WARNING - Do not mess with any other files on this partition or you will most likely have yourself a paperweight...


    The following assumes you downloaded or copied boot.cfg the the Download folder
    Example Code:
    Code:
    su
    cd /data/media/0/Download
    mkdir kexectemp
    mount -t vfat /dev/block/mmcblk0p5 kexectemp/
    mkdir kexectemp/multiboot/
    cp boot.cfg kexectemp/multiboot/
    umount kexectemp/
    2. Linux Kernel - This step is only needed if you aren't using one of the example rootfs below.

    Be sure to read the readme files included in the zip file by conago.

    1) Mount your Linux .img file or extract your rootfs as root on your Linux PC to a temp directory

    2)
    Extract linux-kernel-tf700-kexec-that10-cogano3.zip ,by conago,to a temp directory

    3) Copy the /boot and /lib folders to the root of your rootfs

    4) Unmount the image or zip up your rootfs files.

    Hint: Running the following commands will result in a new rootfs.tar.lzma that can be installed with the rootfs only installer above.

    1) cd into partition mount
    2)arch - sudo tar cp --exclude=lost+found --exclude='proc/*' --exclude='proc/.*' --exclude='sys/*' --exclude='sys/.*' --exclude='dev/*' --exclude='dev/.*' --exclude='tmp/*' --exclude='tmp/.*' --exclude='var/cache/pacman/pkg/*' $excludes . | lzma -9 > ../imgagename.tar.lzma
    or
    ubuntu - sudo tar cp --exclude=lost+found --exclude='proc/*' --exclude='proc/.*' --exclude='sys/*' --exclude='sys/.*' --exclude='dev/*' --exclude='dev/.*' --exclude='tmp/*' --exclude='tmp/.*' --exclude='var/cache/apt/archives/*.deb' $excludes . | lzma -9 > ../imgagename.tar.lzma
    3. Flashing the kexecboot kernel blob - (done from Android using "Terminal Emulator") with 10 second time out by conago

    1) Extract kexec-host-2014-05-22.zip to a temp dir, cd into it and then carefully type the following as root:
    Again - BIG RED WARNING - Type carefully or you will leave your tablet unbootable or WORSE. And please read the README file in the zip.
    Code:
    dd if=blob of=/dev/block/mmcblk0p4
    Reboot and profit!


    Post install

    Now included in the menu driven Android kexecboot Installer

    Use the following script from Android AFTER you have a working install to modify the
    boot.cfg file to your setup. It helps to rename the labels to something you can remember. ;)

    Extract to your favorite place and see the readme file.
    modify_boot.cfg_v1.0.zip





    Old, Old thread content here:

    Great kexecboot tutorial by @cogano (here) - This gives some good background for the regular installer as well.

    For those running CROMBi-KK w/_that9-oc+(modded for cm112 by @lj50036 ), I have a quick rundown of what you need to do and the necessary files (ie cm112 android kernel) here


    Disclaimer! This is very experimental and may damage your device.




    Suggested Requirements - TWRP 2.5+ and CROMi-Xenogenisis 4+

    If you are on CleanROMv3x see rabits old thread - http://xdaforums.com/showthread.php?t=2014759



    Known issues:

    1) Try to start or restart lightdm and it says - read-only filesystem. You need to fix this from Android, terminal emulator
    Code:
    su
    Code:
    e2fsck /data/media/linux/rootfs.img
    This happens when you force restart or shutdown linux sometimes


    You will find links below to the latest (still beta!) installer and some rootfs images.

    For both Ubuntu and Lubuntu - Username: ubuntu Password:ubuntu

    Lubuntu rootfs:

    FYI - The Lubuntu rootfs is a work in progress and has been stripped for YOU to customize. Even though the download size is larger (install is 2.6gb), this runs way faster and uses less ram.
    To see what has been installed (not much) or removed (a lot):
    Code:
    cat /var/log/apt/history.log | less
    - The Lubuntu rootfs has the apt lists removed to reduce download size. Run this from lxterminal:
    Code:
    sudo apt-get update
    Lubuntu To Do:


    1) Remove xfce4-notifyd to get rid of the multiple notification errors... (Sorry about that one. I like Thunar and that was a dependency...)
    2) No shutdown or restart in Lubuntu, also fails to start lightdm (tf700 prompt). Work around is to insert "sudo service lightdm start" (no quotes) into the file /etc/rc.local BEFORE exit0.
    3) Version number shows as 12.10, it is really 13.04
    4) Remove Unity
    5) Update Tegra4Linux Drivers
    6) Create updater scripts for version updates (Allows using your current install instead of starting with a fresh rootfs each time I update stuff)
    7) Find out what is eating up space - rootfs still too large (734mb download - 2.5gb installed)
    8)

    Lubuntu Change log:
    8-19-2013
    - Removed xfce4-notify and Thunar
    - Fixed lightdm errors and loads on boot now
    - Fixed Lubuntu version number
    - Removed overlay scrollbar - Most are usable by touch now.
    - Removed password for sudo
    - Other little things...

    8-20-2013
    - Removed Unity
    - Added new wallpaper and conky (Thanks kennyMC)
    - Cleaned up some clutter and sped things up...
    On hold...
    Turns out that removing Unity did remove something that broke the framebuffer (honestly don't know much about that). I checked the logs and didn't see anything that got removed that should have affected X.
    Anyhow, for now I am going to stick with the 8-19-2013 version as a base. I'm going to just spend some time using it and see what I can...

    8-22-2013
    - Removed Unity (if using v8-19-2013 run this in a terminal window as root - remove-unity.sh)
    - Added new wallpaper and conky (Thanks kennyMC)
    - Cleaned up some clutter and sped things up... Feels smoother!
    - Removed some icon sets (HighContrast, LowContrast, Elementary), saved 100+mb on rootfs
    Here is the modified .conkyrc and conky-draw.lua and my new wallpaper (definitely amateur).
    conky-wallpaper2.tar (Fixed per JoinTheRealms - added - own_window_argb_visual) Just untar in the root of your home directory. (tar xf conky-wallpaer.tar) And use desktop preferences to change wallpaper.

    lubuntu-conky.png



    Install

    1) In Android Terminal Emulator:
    Code:
    # su
    # mkdir /data/media/linux
    2) copy installerV6.7.zip and rootfs-ubuntu-12.10-0.8.0.tar.lzma (12.10) or rootfs-lubuntutf700t-8-22-2013.tar.lzma (13.04)
    to Dock SDcard (/Removable/SD), MicroSD (/Removable/MicroSD) or /data/media
    3) Boot to recovery
    4) NANDROID BACKUP!!!
    5) Install installerV6.zip
    6) READ and follow the aroma installer instructions (it will stop at 90% for as long as an hour or more while it is decompressing the rootfs)
    7) Enjoy dual-boot Linux Again...

    Files:

    rootfs-ubuntu-12.10-0.8.0.tar.lzma (687 Mb) MD5: 6dbf50fe8623ceef3e5771e01ba52938
    NEW! - rootfs-lubuntu-tf700t-8-22-2013.tar.lzma (722 MB) MD5: 92399b0541235a53b94844bacb06d866
    NEW! 10/2013 - installerV6.7.zip (13mb) MD5: f2961cd02c6770dea369c3728fa13201
    conky-wallpaper2.tar (316k)

    Dualboot Linux - rootfs only installers.
    tf700arch.png
    lubuntu-tf700t.png
    ubuntu-tf700t.png

    These NO NOT install the kernels needed for hybrid or kexec dualbooting. These are only for unpacking the rootfs files from above. They are custom Aroma based installers and allow your /home directories to be on mccblk0p8 if you choose.

    These are Aroma based installed from recovery:

    arch-rootfs-installer-v.1.zip


    lubuntu-rootfs-installer-v.1.1.zip

    ubuntu-rootfs-installer-v.1.1.zip

    6
    Post #3 updated, all the files should be fixed now, also added the kernels into .zips for those who dont like .blobs;)
    6
    Hey guys happy to see you all again! :)

    I'm trying to get kexecboot working and I'm almost there. Now all functions about kexec kernel are confirmed working on my pad: from an image, from sdcard or usbdisk, and of course from a directory somewhere! however booting linux from a hybrid kernel is not implemented yet and I still need some time to clean the whole thing up.

    I've modified quite a lot from the original one, especially the part of configuration file. Now we will have separated files, one for each system, placed on mmcblk0p5 (I dont know if it causes problem but it works well at present. If there's any harm please let me know!).

    I'll post my work in another reply later including an tutorial about setting kexecboot up. It won't be too long :)