yashsingh1/xdaforums huggingface dataset:
[Asus Transformer TF700] seesser:
The hunds blob file is that still from 3.3.6 or is it the new stable 3.3.8 -> 3.4 ?
[Asus Transformer TF700] JoinTheRealms:
Its from 3.4,

Sorry to anyone who flashed the hundsbuah blob, it wasnt working, the kernel partition can only accept files(blobs) 8mb or under that blob was 8.6mb so it wasnt being flashed. Any way ive fixed it and updated the link.

Also i fixed bluetooth on the new hunds blob;)(ill update the stock blob tonight)
[Asus Transformer TF700] JoinTheRealms:
[MENTION=5363490]moreD_cn[/MENTION] would it possible for you to post you kexecboot if you get it to a stable state? I actually misunderstand its function until i saw this http://www.youtube.com/watch?v=sK_4cXHnyss Its exactly what i was trying to achive with modding cwm, but 10x better;)
[Asus Transformer TF700] workdowg:
Yeah!
[Asus Transformer TF700] JoinTheRealms:
[MENTION=4878287]_that[/MENTION] Do you know how to pull a blob from the staging partition? kinda like the opposite to flashing a kernel, My goal is if a user flashes a normal android kernel, like yours or hunds, they can then flash a *multiboot*.zip that pulls the previous blob from the staging partition, extracts the ramdisk and adds the multiboot scripts, repacks it and re-flashes it back to the staging partition.

Ive been trying to get this to work, for example ive tried running dd if=blob of=/mmcblk0p4 and pulling by dd if=mmcblk0p4 of=blob but it results in a big unrelated file :(
[Asus Transformer TF700] LetMeKnow:
I am not _that but you can try this to see if it works.

dd if=/dev/block/mmcblk0p4 of=/ext_sdcard/boot.blob bs=4096

This will pull the boot.blob to your external sd card but you can not repack this blob because it doesn't contain a header. You may want to extract the actual kernel and unpack the boot.img and repack it when you are done. Good luck.. :fingers-crossed:

Edit: Oop, a typo on the ext_sdcard.

dd if=/dev/block/mmcblk0p4 of=/external_sdcard/boot.blob bs=4096
[Asus Transformer TF700] _that:
You can't pull the current kernel from the staging partition, because the staging partition works like this:

* You copy the blob to the staging partition and reboot

* The bootloader flashes the contents of the blob to the target partitions indicated in the blob

* The bootloader deletes the first block of the staging partition so that it doesn't pick up the same blob at the next reboot.

But if you want to modify the ramdisk of my kernel, you don't need all that anyway. Write a script named "preinit" and put it in /system/boot - it will run before everything else after starting the kernel, and you can modify the ramdisk "on the fly". Look at my Data2SD script to see how it's done. Hundsbuah's kernel contains the same hook, so it will work also on his kernel.
[Asus Transformer TF700] JoinTheRealms:
Thanks! that sounds like a much better method.

Just started an upgrade to 13.10 hopefully not to much is broken:)
[Asus Transformer TF700] kennyMC:
I did it and it crashs when lightdm starts....
[Asus Transformer TF700] JoinTheRealms:
Yip it breaks a lot of stuff, I don't recommend doing the upgrade lol, it took all day as well
[Asus Transformer TF700] JoinTheRealms:
It seems the issue with 13.10 is the tegra drivers are trying to use xabi 13, 13.10 is using 14. The tegra drivers dont support normal xabi 14 but nvidia had a modified version on their linux for tegra site, but the link is down. Ive contacted nvidia twice but got no reply:(
[Asus Transformer TF700] JoinTheRealms:
Hey guys, I spent the day modifying the initrd. https://www.dropbox.com/s/ry7tp3qv1c5txun/blob03 (hunds)

- Can now choose the default OS from the main init menu.

- e2fsck on mmcblk0p8 and fixed the e2fsck command that was being ran (i used -p instead of -y)

- Implemented moreD_cn's kexecboot (its not working yet, but close)

Im setting up kexecboot on the initrd, but allow fallback to the normal init menus if theses an issue. For now if someone want to have a shot setting it up the initrd looks in mmcblk0p5 for /multiboot/boot.cfg if that files not found it falls back the normal init menus. You can mount it with.

mkdir temp

mount -t vfat -o loop /dev/mmcblk0p5 /temp

And im stuck at setting a working boot.cfg http://kexecboot.org/documentation/how_to_write_config. Im intending to get the kexec to load from /data/boot. It might be a while before moreD's back to get it working properly.

If you dont know what kexecboot is heres a video: http://www.youtube.com/watch?v=sK_4cXHnyss
[Asus Transformer TF700] JoinTheRealms:
Post #3 updated.

* _that based kernel bluetooth fixed, updated to the 03 initrd.

* 6.8 installer is updated with the above kernel.
[Asus Transformer TF700] workdowg:
v6.8 is not working for me either. Tried just flashing the blob too, same problem... Same permission denied stuff as Bruistur - http://xdaforums.com/showpost.php?p=47012025&postcount=496 . Repair did nothing. Using v6.7 for the moment.
[Asus Transformer TF700] JoinTheRealms:
Hmm thats strange, thanks ill have a look into it. The .blob files should be fine though
[Asus Transformer TF700] JoinTheRealms:
Post #3 updated, all the files should be fixed now, also added the kernels into .zips for those who dont like .blobs;)
[Asus Transformer TF700] workdowg:
Tried to thank you and reply but it keeps saying invalid thread id... Thank you. :)
[Asus Transformer TF700] workdowg:
the row scheduler seems to be missing from the _that-based kernel?

From my LG-G2.
[Asus Transformer TF700] moreD_cn:
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 :)
[Asus Transformer TF700] _that:
Good idea to use the configuration partition. Just make sure you don't remove or modify the files that already exist there; you could lose your MAC address, serial number, etc. :)
[Asus Transformer TF700] moreD_cn:
I'm experiencing a strange problem: executing `init-android` from kexecboot causes kernel panic at boot animation, but choosing Android from the old way works. I have a look on /proc/last_kmsg and it said...dividing by zero :confused:

btw [MENTION=4878287]_that[/MENTION] if I backup mmcblk0p5 using dd, it will be safe enough to do anything?
[Asus Transformer TF700] _that:
Having a backup never hurts - anyway, it's unlikely that you ever need it as long as you don't mess with the few files that already exist on that partition.
[Asus Transformer TF700] JoinTheRealms:
Hmm thats weird, could i have a look that that kmsg? It might be worth using pure Hunds or _thats kernels since they are both patched for kexec.
[Asus Transformer TF700] moreD_cn:
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 [MENTION=4582979]JoinTheRealms[/MENTION] 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

LABEL=Ubuntu
BOOT=7
DEVICE=/dev/mmcblk0p8
IMAGE=/linux/ubuntu.img
KERNEL=/boot/zImage
INITRD=/boot/initrd.img
PRIORITY=50

another example

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

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:

#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
[Asus Transformer TF700] JoinTheRealms:
Note, the kexecboot binary is in the current kernels. If anyone wants to have a play just create a boot.cfg file in mmcblk0p5 and it will boot into the kexecboot interface:)
[Asus Transformer TF700] JoinTheRealms:
Post #3 updated, updated to moreD_cn's latest kexecboot, couple of init tweaks.

---------- Post added at 11:56 PM ---------- Previous post was at 11:36 PM ----------

@moreD_cn i cant get it to boot :( i was assuming /boot for the kexec kernel was on mmcblk0p8? The kexec kernel i want to load is at mmcblk0p8/boot/linux

it says "nothing to load" then kernel panics due to unable to sync, so i guess its not finding the kernel there.
[Asus Transformer TF700] moreD_cn:
sorry my bad... path to kernel and initrd are relative to your system. If your system is in an image file, you should set it to /boot/zImage (assume that you have such a file IN your image), and if your system lies on mmcblk0p8/linux/ and set KERNEL=/boot/zImage, it should be placed at mmcblk0p8/linux/boot/zImage.
[Asus Transformer TF700] JoinTheRealms:
[MENTION=5363490]moreD_cn[/MENTION] Ahhh my main problem was that, it couldn't find the kexec binary. The old way of kexec boot from the initrd, looked for the binary in /sbin but kexecboot looks in /usr/sbin. Got it working now :)

I actually think this will be better without hybrid booting. Im going to write a script to manage the configuration of the boot.cfg, i think for android kernels we could just users to place a .zip or .blob in a certain file and script the unpacking of that kernel. I can see myself making this unnecessarily complex :) Huge thanks for your work moreD_cn !!!

PS since only the kexec functionality is working, i think i could strip the host kernel of majority of its drivers etc, might speed up boot a bit.
[Asus Transformer TF700] JoinTheRealms:
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

#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.
[Asus Transformer TF700] workdowg:
Wow! You don't ever rest do you... Lol

From my LG-G2.
[Asus Transformer TF700] JoinTheRealms:
Ha i was really excited:), i wanted to get a clean method of using kexecboot and i think this is *clean* enough. I keep just rebooting the tablet just too play with kexecboot............ lol
[Asus Transformer TF700] workdowg:
It's 5:15 a.m for me. I will start playing with it while you're sleeping. Great job!!!

From my LG-G2.
[Asus Transformer TF700] workdowg:
Just to clarify... we are flashing the blob to mmcblk0p4 ?
[Asus Transformer TF700] JoinTheRealms:
Sorry, yes. Ill package it into a zip soon
[Asus Transformer TF700] workdowg:
Where are you opening the boot.cfg file? You're using "sudo mount...", is this from your ubuntu install on the tf700?
[Asus Transformer TF700] workdowg:
ok, I'm stumped. Thought I was pretty savvy, but I guess I'm just a noob...

1) Flashed the blob - No problem there "dd if=blob of=/dev/blk/mmcblk0p4"

2) Created dir in Android "/boot" using RootExplorer and extracted _that-android-kexec to it

3) Extracted _that-linux-kexec in Linux to "/boot"

4) Created "/linux1" using RootExplorer (easier to just follow examples first)

While I was trying to figure out how mount and create a directory called /multiboot on mmcblk0p5, I accidentally rebooted the tablet and successfully entered kexecboot without any options... So being stuck I restored a boot from TWRP and got back to Android. Now both /boot and /linux1 directories are gone.

Here are my questions...

1) How do I create Android /boot and /linux1so they stay? (Did I create them in the wrong place? The directions say in the root of Android - "/")

2) How do I mount mmcblk0p5 to create the /multiboot directory? (I will do a dd backup first)
[Asus Transformer TF700] _that:
1. Your directions are wrong, the Android root directory is the initramfs from the kernel.

2. IIRC: mount -t vfat /dev/block/mmcblk0p5 /your/mount/point
[Asus Transformer TF700] workdowg:
Thanks _that for teaching and not just doing my work... kexec boots both Android and Linux now. I got confused because of the use of sudo.
[Asus Transformer TF700] JoinTheRealms:
Sorry workdowg, it was late when i wrote those instructions:o. We really need a way of automating the creation of the boot.cfg, i have a couple of ideas, but ive got lots of exams coming up and i really need to focus on them for a bit...:rolleyes:
[Asus Transformer TF700] workdowg:
kexecboot from directory causes a kernel panic. not too worried about it yet, still playing with my arch rootfs images to find one that touch works.
[Asus Transformer TF700] Ananasnonym:
works like a charm, even with directory-booting lubuntu! :) But there is a problem with your new kernel name ~ test 1 or similiar - Chrome says DNS failure, even though the indicator applet says connected.

Conky says "No Adress" for IP though. Could you post your old Kernel as zImage and initrd.img? Is your old kernel (kexec-realms v2 or something like that) kexec enabled?

Nevertheless - GREAT work!!!
[Asus Transformer TF700] workdowg:
the other kernel is hybrid - android/linux. these new ones are more specific.

the no internet sounds like a permissions problem again... try this:

boot to linux

in lxterminal type:

sudo echo "inet:x:3003:root,lubuntu" >> /etc/group
sudo echo "net_raw:x:3004:root,lubuntu" >> /etc/group

that should fix the problem
[Asus Transformer TF700] workdowg:
that is : x : after inet and raw, without spaces (curse you emoticons....)
[Asus Transformer TF700] JoinTheRealms:
Sorry guys ill post a fixed zImage asap
[Asus Transformer TF700] Ananasnonym:
sudo didn`t work, so I did sudo su and as root user the two groups could be created. usermod -a -G for root and the standard user -> Internet works! Thank you!

Awesome work!!

Finally a multiboot for every kexec Kernel out there! (Even though I will only use it for dualboot :P)
[Asus Transformer TF700] JoinTheRealms:
We should also be able too dualboot android roms with this method :) i will investigate this more later this week!
[Asus Transformer TF700] workdowg:
Two things:

1) How did you copy the rootfs files to /data/linux1

2) All I need to do is use blob - tools on _that6 to extract the zimage and inird?

From my LG-G2.
[Asus Transformer TF700] JoinTheRealms:
I still haven't got booted from directory.. But i suspect we just need some modifications to the initrd [MENTION=5363490]moreD_cn[/MENTION] do you have an initrd for directory booting? the one i posted is yours from back when you first posted the kexec kernel. I copied it simply by mounting the rootfs.img under linux and copying all the files to /data/linux etc does take some time though.

To unpack a kernel you need blobtools, also abootimg (i think _that uses scripts from the android kitchen, im not sure what the difference is . abootimg is available in the ubuntu repository)

For example the command i run is

~/Blobtools/blobunpack ~/blob && abootimg -x ~/blob.LNX which resualts in a zImage and initrd.img

If you want to unpack the initrd.img

mkdir init && cd init

lzma -dcS .img ../initrd.img | cpio -i

Im working on a script to automate the unpacking.
[Asus Transformer TF700] _that:
I wrote one for my dual-boot ROM2SD hack that runs on the tablet itself - currently it only extracts the ramdisk but it would be easy to add a command line parameter to extract the zImage instead. The source is on my github.
[Asus Transformer TF700] workdowg:
Yea, I had thought you had directory booting. I thought I did something wrong.

From my LG-G2.
[Asus Transformer TF700] JoinTheRealms:
It should atleast now be possible, we used to have an issue with "overmounting" in the previous kernels, atleast now we dont get that error, because its was the most obscure issue ive ever came across lol. I believe it just needs some tweaking of the initrd to get it to boot from a dir, i only gave the kexec initrd a quick scan and appears to have options for partitions and images (it was put together by moreD) He said he had it working so i assume he will have a modified initrd for it already.
[Asus Transformer TF700] aracy:
could someone explain how do you get the internet to work?

managed to connect to the wireless network, but no internet.

the commands from the other posts here didn't help..
[Asus Transformer TF700] workdowg:
Extracted the zimage and initrd.img from the blob in that6 and got a bootloop... :(
[Asus Transformer TF700] moreD_cn:
oh sure you need to modify ramdisk to support it. kexecboot passes additional `directory=` parameter to the kexeced kernel so you should regconize it.

here's the one I'm using. It basically bind mount the directory to /root and start booting from there as usual (because run-init does not support directory not locating in root!) I just copy most of them from rabits' script and modified..
[Asus Transformer TF700] JoinTheRealms:
Awesome! thanks will try it asap
[Asus Transformer TF700] JoinTheRealms:
This zImage has root DNS resolving issue fixed, and the initrd has directory booting working (much nicer IO:)) Thanks to moreD

https://www.dropbox.com/s/rliuwsdccymo7c8/kernel.tar.gz?m

The only thing is if you want to use your current user you will need to run

sudo mount -t ext4 -o loop /dev/mmcblk0p8 /mnt/android/data

sudo mount --bind /mnt/android/data /home

Ideally place these in rc.local.

Enjoy
[Asus Transformer TF700] JoinTheRealms:
Heres a link to the cardhu linux for tegra abi 14 driver https://www.dropbox.com/s/8q7km8j8m4wcjdt/cardhu_Tegra-Linux-tegra_drv_abi14-R16.3.0_armhf.tbz2

Its quite hard to find since the link on their site isnt valid.
[Asus Transformer TF700] JoinTheRealms:
Ive got a fully working 13.04 xubuntu rootfs with touchscreen, touchpad, 3d acceleration etc working and also auto wifi. i was gonna do normal Ubuntu but decided against it since id be removing majority of it anyway. just need to clean it up and ill upload it.
[Asus Transformer TF700] JoinTheRealms:
[MENTION=3971563]workdowg[/MENTION] Just wondering how do you compress you rootfs?
[Asus Transformer TF700] workdowg:
Using the tools from rabits github. If you clone it then You just need to follow his instructions in the readme.
[Asus Transformer TF700] workdowg:
[MENTION=4582979]JoinTheRealms[/MENTION] - Have had time to modify that6 ramdisk for linux? I unpacked _that6 for the kexecboot to android (Android works fine and it goes to the kexecboot menu) but the _that5 linux kexecboot files don't work now to boot linux....
[Asus Transformer TF700] JoinTheRealms:
Hmm thats strange, when attempting to boot linux using my _thatv5 based kernel does it bootloop etc? if so can you pull the last_kmsg for me so i can have a look?

Just for clarification, you didnt repack the kexecboot host kernel did you? rather you unpacked _thatv6 and placed it in /system/boot/ (mmcblk0p1) and your linux kernel is the same as the one i posted with the initrd's tutorial?

On another note, im working on a script which automatically sets up the boot.cfg, It scans for linux dirs and images,

for directories it looks for:

/linux(1..9) on mmcblk0p8

Linux Images:

/media/linux/rootfs(1..9).img on mmcblk0p8

It also sets up a kexec kernel if one isnt found then adds an entry to the boot.cfg. Once ive got it all finished and working ill create a new thread to seperate it from the old method, to make it less confusing.
[Asus Transformer TF700] workdowg:
Yes, I just unpacked _that6 and placed it in /system/boot and Android works fine. The Linux kernel is the one from you(_that5). Funny thing is I used an old rootfs that had the old kexecboot we tried before and it went to the old menu (hybrid) and actually got to login to the rootfs. So I went back to Android, fired up a chroot, copied the _that5 Linux kernel files to my rootfs, rebooted, selected my rootfs in kexecboot and it rebooted and froze.

From my LG-G2.
[Asus Transformer TF700] JoinTheRealms:
Hmm it could be the initrd from here http://xdaforums.com/showpost.php?p=47402889&postcount=112 has broken loop-mount?

If your using the above initrd, might be worth trying the older initrd from the tutorial and see if it works?

Oh btw i figured out why flash player wasn't working with youtube, its because flash player cant use the video decoder on tegra/ mali gpu's so it fails. If you lower the permissions of /dev/nv* it will start working using the software decoder, but its slow and laggy. HTML5 works far better anyway.
[Asus Transformer TF700] workdowg:
It was the one from the tutorial... I unzipped a fresh copy and copied them and it works. Got to remember to use the terminal to copy and move files in Android. Rootexplorer and esfilemanager always seem to mess something up...

From my LG-G2.