yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [28

Great, but would you please give me a new one anyways if you have some time? I wanna play with kernel.

That chmod thing gives me Bad mode
[Samsung Galaxy Nexus] dlhxr:
What happened? Doesn't it work? So strange~
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [29

prob cus I'm doing this on my gnex
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [29

https://github.com/NoblesseOblige/StarKissedMod/commit/c34735cbb1187710a416cb4a0c5bd14f42018d18

The two files are in that commit and ill post the commands in a second. They changed as well.
[Samsung Galaxy Nexus] dlhxr:
Oh, the binary was compiled to meet i686, not arm...So you can't use them on your phone...

Maybe you can find the arm binary for mkboot in twistedumbrella's repo
[Samsung Galaxy Nexus] twistedumbrella:
mkdir OUTPUT_DIR
unpackbootimg -i BOOT.IMG -o OUTPUT_DIR
cd OUTPUT_DIR
mkdir boot.img-ramdisk
cd boot.img-ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i

make your changes, then

find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
cd ../
mkbootimg --kernel boot.img-zImage --ramdisk newramdisk.cpio.gz --base 0x$(cat boot.img-base) --output NEW_IMAGE.img

The stuff in all caps refers to whatever it is or you want it to be on your phone.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [29

It gives me no such file or directory for cpio and -dc when I do gzip -dc thing.
[Samsung Galaxy Nexus] twistedumbrella:
Try putting busybox before all of the commands like busybox gzip, busycox cpio
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

When I do

gzip -dc ../boot.img-ramdisk.gz | cpio -i

it gives me

/system/bin/sh: cpio: No such file or directory
-dc: No such file or directory

I already have busybox installed in /system/bin
[Samsung Galaxy Nexus] twistedumbrella:
busybox gzip -dc ../boot.img-ramdisk.gz | busybox cpio -i
[Samsung Galaxy Nexus] Zittoro:
lol got it now I thought you said try to install busybox on my phone before doing commands like those
[Samsung Galaxy Nexus] antonio8297:
R: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03/

Ok with this modded kernel and rom,the installation is this?

-Backup first kernel in data/media/boot/1st.img

-reboot recovery

-flash U-Boot

-wipe cache

-flash second rom

-reboot

Yes????

Thanks

Inviato dal mio Galaxy Nexus con Tapatalk 2
[Samsung Galaxy Nexus] dlhxr:
1.Your second rom zip file must be modified (updater-script)

2.Put have to put your second rom's modified kernel to /data/media/boot/2nd.img
[Samsung Galaxy Nexus] antonio8297:
R: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03/

And in boot partition go U-Boot,right??

Inviato dal mio Galaxy Nexus con Tapatalk 2
[Samsung Galaxy Nexus] dlhxr:
Flash u-boot.aimg to boot partition. Remember to copy your current kernel to /data/media/boot/1st.img.:)
[Samsung Galaxy Nexus] antonio8297:
first rom boot but second no(used your lean kernel and xenonhd) here is a photo:
[Samsung Galaxy Nexus] dlhxr:
Which way of the kernel modification do you use?

You can check the image or the cache partition to figure out whether it is a problem of installation
[Samsung Galaxy Nexus] antonio8297:
i've used your lean kernel already modded,the system is fully installed on cache,but it stop on starting kernel...
[Samsung Galaxy Nexus] dlhxr:
Make sure that you downloaded the folder cache boot kernel. And boot into the first rom and check whether cache has system files.

Then check whether the folder /data/media/2nd/data and /data/media/2nd/cache exists.

Then check whether there is anything is /data/media/2nd/data folder.
[Samsung Galaxy Nexus] antonio8297:
1.yes,are system files

2.this folder exist

3.no file in this
[Samsung Galaxy Nexus] dlhxr:
Try this one and see what's on the screen.

View attachment 2nd.img.cache.zip

Remember rename it to 2nd.img first.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

How do you modify the original u-boot to be tri-boot-able? And is there any way to quad-boot? Using like Volume Up+Volume Down maybe?
[Samsung Galaxy Nexus] dlhxr:
Yes, but why do you want it..........:confused:

You can see my github for uboot-tuna repo branch triboot and you will know how i make it.
[Samsung Galaxy Nexus] antonio8297:
this boot,but there an error on permission(but if i see the permission are correct),it say always permission denied and reboot to recovery
[Samsung Galaxy Nexus] dlhxr:
I encountered this before when testing. But I just can't remember why this happened.........

Try another rom....

I am now thinking what's wrong...
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

I don't see any difference between triboot's omap4_tuna.h and dualboot's omap4_tuna.h

I guess the recovery part should be different because volume up is recovery on dualboot's. Correct me please?
[Samsung Galaxy Nexus] dlhxr:
Now check again.

Something is wrong with my github repo an hour ago.....
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

chmod 777 IMAGE_FILE

Do that for every image, both boot images and any system / data / cache images.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

So, under the recovery part, if I change

BOOT_KERNEL \
"go_usbtty=setenv stdin usbtty; " \
"setenv stdout usbtty; " \
"setenv stderr usbtty; " \
"tuna_set_led 3\0" \

to

BOOT_KERNEL \
"go_usbtty=setenv stdin usbtty; " \
"setenv loadaddr 0x81f00000; " \
"setenv script_img /media/boot/4th.scr.uimg; " \
"setenv kernel_name /media/boot/4th.img; " \
"setenv script_part 0xc; " \
"setenv kernel_part 0xc; " \
"setenv rootpart 0xc; " \
"setenv devnum 0; " \
"setenv devtype mmc; " \
"setenv bootargs " ANDROID_CMDLINE " ; " \
"run load_boot_script; " \
"run custom_boot\0" \
"tuna_set_led 3\0" \

then I can boot into fourth kernel when I press both Volume buttons, right?
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

You will have no way into your bootloader / recovery if uBoot fails. TERRIBLE IDEA!!

Edit: Yes, you could still get to it if your timing is perfect, but is it really worth the risk?
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

"boot_recovery=echo Booting Third Kernel; " \
"tuna_set_led 2; " \
"setenv loadaddr 0x81f00000; " \
"setenv script_img /media/boot/3rd.scr.uimg; " \
"setenv kernel_name /media/boot/3rd.img; " \
"setenv script_part 0xc; " \
"setenv kernel_part 0xc; " \
"setenv rootpart 0xc; " \
"setenv devnum 0; " \
"setenv devtype mmc; " \
"setenv bootargs " ANDROID_CMDLINE " ; " \
"run load_boot_script; " \
"run custom_boot\0" \
\

The above is recovery boot modified to boot into 3rd kernel, so tri-boot mode.

Below is tri-boot mode's usb boot, which is the same with dual-boot's.

BOOT_KERNEL \
"go_usbtty=setenv stdin usbtty; " \
"setenv stdout usbtty; " \
"setenv stderr usbtty; " \
"tuna_set_led 3\0" \
\

And the one I posted before is modified usb boot to boot into 4th kernel(I think it should), so possibly quad-boot.

This u-boot is chainloaded from the original bootloader, so I think the bootloader and recovery should work even if I do quad-boot.

How do you think? Still not worth the risk? If you think it's not, I won't test it.
[Samsung Galaxy Nexus] dlhxr:
The modification would work. You can see my repo quad boot branch. I leave 1 for recovery and other three for kernels. That's a balance.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

You mean we can't boot four different kernels or you just leave recovery for showing standard?
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

Holding both volume up and down together should be left alone. You could do it but it's generally a poor idea and bad judgement for any developer to even demonstrate how to override that without clear warning.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

Have you tried it? I haven't, but I think this u-boot is chainloaded from SBL, so all the keys we are talking about should be pressed after pressing and holding power button. If they are pressed before press-and-holding the power button, it will work just like a normal stock Galaxy Nexus, like power+both Volume: stock(maybe custom) bootloader, power+Volume Up: nothing, and power+Volume down: download mode.

Isn't it?
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

It picks up from the moment the device begins loading the kernel. It will load the second rom holding volume down from cold boot and letting go when the text appears. Like I said before, you could still get to the bootloader with good timing but it's a bad idea. Given the reckless nature of development on this thread, it's only fair to give fair warning for anyone who might need it.
[Samsung Galaxy Nexus] twistedumbrella:
BTW, for anyone doing Ubuntu:

http://cdimage.ubuntu.com/ubuntu-to...nt/quantal-preinstalled-boot-armel+maguro.img

That is a premade system image straight from canonical. For the boot image, data should link to data (you need the rootfs tarball installed), sdcard should be the standard sdcard, and cache can be cache. The only change you need to make is to mount system as the image.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

You can also do that with several different ways.

First: inside dual-boot with 4.2.x ROM (dual-boot kernel required)

For this, you need a 4.2.x rom using a dual-boot modified kernel by Jijonhyuni. You just need to do what you should to do it with phablet-arhmf.zip and quantal-maguro.zip, not the img file. Since it uses .../by-name/cache(you should know what I mean) for system and /data/ubuntu for data, so it's done!

The dual-boot kernel causes a huge battery drain issue to the two ROMs.

Second: just use it as a ROM, but using phablet-arhmf.zip and quantal-maguro.zip just like the first method.

No battery drain, but takes a room for another rom.

I thought of three ways, but I forgot one :)
[Samsung Galaxy Nexus] twistedumbrella:
You should probably look over the first two pages of this thread. You would have found out some wonderful information:

The dual-boot kernel by Jijonhyuni was a one-shot build, but it did include some basic details to allow other developers to create dual-boot kernels. That information was not entirely clear, but from it a concise set of instructions for creating a dual-boot kernel were compiled -

https://github.com/ThePlayground/Tuna_JB_pre1/commit/019d93155f444f6b713ccb449251a4fc510529ec

- leanKernel is fast and efficient, but it requires quite a bit of tweaking to provide extended battery life. The solution was a different base.

There is an app to modify the build for use with the cache type of install. It will take the ROM zip file and performs the changes -

https://play.google.com/store/apps/details?id=com.loungecat.dualbuild

- The live install option is still not fully functional, but it will properly convert the zip file to be installed from the recovery partition.

The purpose of posting the image was to provide one of the EASIEST methods for running Ubuntu Touch, since it was only yesterday / today that Canonical began providing system images. They also provide the boot image as an individual download which makes things a lot easier between versions, since the tarball is roughly the same every day. It had nothing to do with trying to find a way to install it.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

Thx for the info. I already knew all of those except the last one about ubuntu img, but I still don't get the last sentence because using quantal-maguro.zip and phablet.zip is very easy. You just download them and flash maguro, then phablet. So that was very easy, wasn't it?

And for dual-boot kernel, that's not the problem with the base kernel. I already tried Airkernel.Jijonhyuni said that the modification causes the battery drain. Not sure, but I have a memory that he said it was cuz of printing the logs, so if you totally erase that part, maybe you can fix the battery issue.

Lastly, thx for your app :)
[Samsung Galaxy Nexus] dlhxr:
I don't think it is a good idea to continue develop the dual boot kernel, because uboot can do this instead with more efficiency.

My quadboot u-boot leave volume up and down to go into recovery just because I often forget to choose booting into recovery when rebooting... It gives me a chance to go into recovery conviniently, since bootloader way is hard to catch the chance to go into.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

I know but if we use dual boot kernel, we can use another rom, so it's better. Since the battery drain is the only problem, we can probably do it really fast
[Samsung Galaxy Nexus] dlhxr:
But now we can use uboot to boot 3 roms at start. isn't that enough? just like you said, we can even have four choices at start by uboot.

In my opinion, using image boot way can help us multiboot. Just rename.the images and change the path in the kernel modification can help us boot what ever number of roms we want.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

Ohhh, I'm soooo dummb. I couldn't think of that lol

So you basically mean like

If

1st.img -main rom

2nd.img -second rom

3rd.img -third rom

If I wanna use another one, then I just change its boot.img to one above the above, for example 3rd.img, and then move or rename the original 3rd.img to another.

right?
[Samsung Galaxy Nexus] dlhxr:
Yes, that's why I think we don't need dualboot kernel. (But the without the dualboot kernel, there wouldn't be this uboot way.)

Actually 3 roms are enough for me...

I am now using AOKP as main rom, image miui v5 as 2nd rom and image folder ubuntu as 3rd rom......
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

We can do all 2 roms with all images if we modify the kernel that way, right? Like [blah blah]_system_1.img and [blah blah]_system_2.img for another rom, for example. Just wanna make sure.
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

You can use all images. It's what boot manager does. All uBoot really is is a glorified version of that from a kernel image.

The thing about dual-boot that i've attempted explaining before is that it isn't the same thing. It shouldn't stop being developed at all. This method takes up a ton of space and can't handle compressed images yet.

The dual-boot kernels use a single kernel that can power two builds. If you are running 4.1, 4.2, and ubuntu all together that's great as a developer. The average user only wants 4.2 and ubuntu and actually uses their phone for images, video, etc. They aren't going to want to give up 12 gb to swap to a third build every once in a while.

If anything "had" to be dropped, I can promise this would be the one because it's less practical.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

I'm sure I'm weird. I want as many multi-boot as possible while I'm not even a developer but a huge n0000b lol

I don't really care about memory cus I have a CDMA gnex, but it sure will be great if more memory.

Anyways, good luck to you and hope you successfully finish the work.
[Samsung Galaxy Nexus] twistedumbrella:
It's not weird. I wanted the same thing when I first found out it was possible, but you get bored with it. It is one of those lavish features that are fun when you can have them, but when you get stuck with the minimum device (part of my degree program), you have to give up stuff that you won't use every day or for any extended period.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

lol i know. first time i saw the dualboot kernel, I though it was really awesome and flashed ubuntu touch every single day, but like a week later, I became lazy and never updated it till now
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

When I

busybox gzip -dc.. /boot.img-ramdisk.gz |busybox cpio -i

it gives me

gzip: invalid magic

I think it doesn't see the boot.img-ramdisk.gz as a gzip file.

When I unpackbootimg,

no_console_suspend=1 console=null

next to BOARD_KERNEL_CMDLINE.

The boot.img is Airkernel #541 or something. Any solution?
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

Make sure there is a space between | and busybox if that was a copy paste, you could also try just -c

If that doesn't work ill send you my busybox. I have a pretty thorough one that may have more than the one you currently have. I need to compile one to add my custom wget. I should do that lol.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

it was just a typo.

For using -c, you mean like this?

busybox gzip -dc ../boot.img-ramdisk.gz | busybox cpio -c

please give me your busybox anyways just in case. thx

EDIT

I just tried

busybox gzip -c ../boot.img-ramdisk.gz | busybox cpio -i

it gave me something like

cpio: -i: try -newc or -cdc
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

http://loungekatt.com/ScriptFusion/binaryfiles/busybox
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

the link just shows me bunch of letters and characters.
[Samsung Galaxy Nexus] twistedumbrella:
[KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03/29]

It's a binary file. You need to save the page.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

cpio: applet not found

Would you give me a cpio directly downloadable?
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

Mine is a symlink to busybox
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

i know but i don't know how to download with that so I updateded busybox using an app. Then I did the command and it gave me that.
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

I finally got a busybox source to compile free of the android source. Once I test that ill upload it as a zip. It's brand new and very extensive.

Edit: Unzip the attachment, move it to /data and run chmod 777 /data/busybox then you can use /data/busybox "command here"
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

ok thanks very much

Edit:

Works well :)
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

One n00bish question.

In my fstab.tuna of miui v5(for toro) there is

ro,noatime,noauto_da_alloc,barrier=0,data=writebackwait

under the cache part and

noauto_da_alloc,barrier=0

under noatime, nosuid...errors=panic of data thing.

I have to delete these two, right?
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

If you are mounting system as cache delete the ones in cache. Data you can leave mostly alone.

ro is read only, so make it rw

noatime and noauto are read speed optimization

barrier=0 is no caching I believe.

The only one I would remove is the writebackwait. You don't need it for what you're doing.

Btw that is a stock linux busybox compiled for Android, so it has every command linux has. It was made outside the Android source so it isn't trimmed down to what you "should" need. In other words, that's why I recommended running it as a binary instead of installing. I can't promise all the commands will be structured the way Android expects them. I'm testing that now.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

I'm gonna use image-only boot for all the roms I will multiboot. So, I leave all for data, delete all writebackwait(s), and change all ro(s) to rw(s), right? But I'm curious I should change ro to rw because in the op there is no rw but they are ro. What is the point of changing them exactly?

And you don't need to answer it but one out-of-topic question. When using mobile data(I enabled 4g), my gnex(toro) gets heated really hot inside a car(I guess is prob cos of no winds) and I think the battery is used even faster than when using wifi. I'm using airkernel.

Thanks

EDIT

What should I do with

--base 0x$(cat boot.img-base)

on the post #90 when repacking the kernel?

Just exactly like that?
[Samsung Galaxy Nexus] twistedumbrella:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

If you're doing all images, the only thing to change is data. The rw mount is just a precaution, not required.

The heat is probably due to the enclosed area and even more so if it's on a car charger. You may want to lower your speed or set a profile (like in setCPU) for a certain temp. The battery is used faster on data and even faster when it's hot.

That command stays as is. It combines 0x with the contents of that file to get the necessary value. It looks odd. I had to read it twice but then I saw that the file only had an address in it.
[Samsung Galaxy Nexus] Zittoro:
Re: [KERNEL] [U-boot]Dual-boot Powered by U-boot and Custom Kernel[Fully Working] [03

Thank you. I was just curious because my sister's galaxy stellar does not get heated as much as mine does, even if no case on mine but a case on hers.

So only thing I gotta delete is all the

data=writeback wait

in each part, right?

---------- Post added at 07:32 PM ---------- Previous post was at 06:34 PM ----------

For modifying image boot's updater-scipt, the first step includes adding

unmount("");

for data, system, and cache under assert blah blah maguro thing if it has one.

Later, the OP's guide instructs me to replace

unmount("");

for data and system by something.

I didn't replace the unmount things we did on the first step.

Also, for miui, commands for formatting and mounting system are "HSMMC" instead of "EMMC".

I still replaced those as instructed for "EMMC".

Did I do them correctly?
[Samsung Galaxy Nexus] twistedumbrella:
Just in the data line since you will be tinkering with that partition. I would say edit the HSMMC lines the same way, but leave the HSMMC instead of EMMC. As far as the unmount, I will have to look at the OP. Half the time I have no idea what is going on there, :D