This tool i came across when i was working on the Ubuntu for Eris.
Code:
It copies your bootimage to a temp file so it has a space to work in
It then unpack the boot.img
Replaces the zImage you included ith the original one
Repacks the boot.img
Flashes the new boot.img with your kernel in it.
All you need to do is rename your kernel zimage, and place it in the kernel folder and re-sign it. MUCH easier than fastboot or baking up a custom boot.img each time you have to swap the kernel.
All thanks to Koush, i just found the thing
Hello folks,
where can I get the latest version of fastboot and mkbootimg compiled for mac OSX???
The version of fastboot I have doesn't have the -b option that is needed to flash the zImage and the initrd.gz into the HD2, as also the mkbootimg version I have doesn't have the --base option which is needed to build the boot image.
I would really like if someone could tell me how and where to get those tools ..
Thanks
First off I would like to thank sp3dev for his awesome work in getting u-boot to work on our devices.
WARNING!!! Do not attempt this on a device that you normally can't use i9100 roms on, eg SHW-M250L. This has been confirmed to work on the SHW-M250S/K (by me). Of course it works on the i9100.
WARNING!!!(2) You won't be able to access recovery(looking into it). You can use SBL download mode as usual and ktool or mobile odin to change kernels.
1. Create an 'android' folder under /sdcard/ and copy to it kernel.uimg. It's dorimanx kernel as an example.
2. Flash the attached u-boot.bin, it includes some minor modifications to use a 2nd boot source.
3. Use heimdall to flash the included siyah-uImage to RECOVERY partition.
4. Reboot.
Now you have four options:
a) Do not hold any keys pressed during boot. This will boot Siyah off the RECOVERY partition.
b) Hold VOL_DOWN after you see the boot logo with the yellow triangle. This will boot Siyah CWM recovery off the RECOVERY partition.
c)Hold VOL_UP after you see the boot logo with the yellow triangle. This will boot the kernel located at /sdcard/android/kernel.uimg.
d)Hold BUTTON_OK(HOME) after you see the boot logo with the yellow triangle. This will boot the kernel located at /sdcard/boot/vmlinux.uimg.
Troubleshooting
If you get errors when you try to boot the kernel at /sdcard/android/ then format the internal storage from android and try again. It seems to happen when you have too many files and/or folders.
If you have any questions post them here.
NOTE: Due to an error instead of attaching the files here I have uploaded them to DevHost @ http://d-h.st/users/MemoryController/?fld_id=5685#files
RootFS build guide will come tomorrow.
Brilliant memory controller, just checked in to find your post, nice one.
Looking forward to rootfs guide.
Thanks alot for the guide.
Sent from my GT-I9100 using Tapatalk 2
Also at some point maybe a guide on how to roll the kernel for when siyah is updated or someone wants to use a different kernel.
Is the siyah kernel used the latest one?
Sent from my GT-I9100 using Tapatalk 2
Hello,
great news, i flashed uboot.
couple of issues i have had, i can't access siyah recovery or the kernal in /sdcard/android folder.
it tries to find the kernel at /sdcard/boot/vmlinux.uimg but fails as of course i havnt put it there.
joesnose said:
Hello,
great news, i flashed uboot.
couple of issues i have had, i can't access siyah recovery or the kernal in /sdcard/android folder.
it tries to find the kernel at /sdcard/boot/vmlinux.uimg but fails as of course i havnt put it there.
Click to expand...
Click to collapse
Do you have serial cable for i9100? We need to see if it's u-boot related. If you do please boot to uboot and start pressing space or RETURN to stop autoboot.
Then issue: "fatls mmc 0:b /" and paste or pm me the output. If you don't have serial i will pm you a uboot.bin to test it automatically.
Sent from my GT-I9100 running CM10
joesnose said:
Also at some point maybe a guide on how to roll the kernel for when siyah is updated or someone wants to use a different kernel.
Is the siyah kernel used the latest one?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
It's version 4.1.5+.
Hello MemCo,
i have a usb cable that i plug a keyboard into, is this what you mean by serial cable? unfortunately I only wave a wireless usb keyboard and it seems the drivers dont load until my android rom is booting, if i get a cabled usb keyboard would this be solved.
I am also having another issue, though i have not established if uboot is the culprit yet, but seeing as it was the last change i made on my phone yesterday i am guessing it is the issue.
Today nobody can hear me when i make or receive calls. i have booted both of my installed android roms and they both have this issue. i have yet to reflash siyah kernel to establish if this is the problem.
thanks.
Sent from my GT-I9100 using Tapatalk 2
joesnose said:
Hello MemCo,
i have a usb cable that i plug a keyboard into, is this what you mean by serial cable? unfortunately I only wave a wireless usb keyboard and it seems the drivers dont load until my android rom is booting, if i get a cabled usb keyboard would this be solved.
I am also having another issue, though i have not established if uboot is the culprit yet, but seeing as it was the last change i made on my phone yesterday i am guessing it is the issue.
Today nobody can hear me when i make or receive calls. i have booted both of my installed android roms and they both have this issue. i have yet to reflash siyah kernel to establish if this is the problem.
thanks.
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
No I don't mean that, I will send you a uboot bin via pm. As for the sound issues I don't have them so I don't know about it
Sent from my GT-I9100 running CM10
Would have been much more useful if you had posted the sources and what you did to them to make it work!! Perhaps a Github link or something...
E:V:A said:
Would have been much more useful if you had posted the sources and what you did to them to make it work!! Perhaps a Github link or something...
Click to expand...
Click to collapse
I will send a pull request to sp3dev once I get my git working
Sent from my GT-I9100 running CM10
Can u add faq to first Page on what's the advantage of uboot and can u get back to stock bootloader
Sent from my GT-I9100 using Tapatalk 2
bluefa1con said:
Can u add faq to first Page on what's the advantage of uboot and can u get back to stock bootloader
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
uboot allows for booting two different kernels, which means for instance dual booting ics and gb or dual booting android and native linux. And I have tried it and then reflashed kernel using odin, the uboot bootloader does not overwrite the samsung bootloader it chainloads from it.
Just to confirm bugs that have affected me MemCo.
I was unable to boot to siyah recovery. It went past the post screen but then nothing or rather every 5 seconds or so the screen would flicker but so fast and still black screen, it was hard to tell there was any activity.
My mic didn't work in calls, I can't confirm if it worked in other apps as I failed to try it. It was fixed as soon as I reflashed siyah kernel.
Thanks again for sharing your work.
Sent from my GT-I9100
Hello,
Just wondering how things are coming along. I am still surprised that this project and thread are not receiving more interest!
Sent from my GT-I9100 using Tapatalk 2
Hello I have been reading alot of info but it is a real mish mash of info.
So I think I have got together a rootfs but I don't understand how to use it still. Do I need a boot script or does my kernel need compiling with the path to the rootfs? And can I use a standard linux kernel to build my kernel.uimg or does it have to be an android specific kernel.
Thanks.
Sent from my GT-I9100 using Tapatalk 2
Hello MemoryController,
Could this howto be easily edited to work for s2?
Code:
= Ubuntu Maverick on USB (minimal rootfs) =
== Generating the rootfs ==
At your host (using Maverick) install the rootstock package: $ sudo apt-get install rootstock
Then identify the latest kernel image for OMAP 4 at http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-ti-omap4/. In my case, http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-ti-omap4/linux-image-2.6.35-903-omap4_2.6.35-903.12_armel.deb.
Run rootstock, giving the correct paramters to generate a maverick image: $ sudo rootstock --fqdn panda-maverick --login ubuntu --password ubuntu --serial ttyO2 --components "main universe multiverse" --kernel-image http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-ti-omap4/linux-image-2.6.35-903-omap4_2.6.35-903.12_armel.deb
After running rootstock your rootfs will be at your current directory, called armel-rootfs-<DATE>.tgz
Now just extract the rootfs at your USB disk partition, preferred with an ext3 FS.
== Generating the boot partition ==
To be able to boot your Panda you'll need the X-Loader, U-Boot, Kernel and Initrd and a boot script file.
X-Loader: - Download http://ports.ubuntu.com/ubuntu-ports/pool/main/x/x-loader-omap4/x-loader-omap4_L24.9git20100901-0ubuntu1_armel.deb - Extract it with dpkg (dpkg -X x-loader-omap4.deb .) - Copy the MLO file
U-Boot: - Download http://ports.ubuntu.com/ubuntu-ports/pool/main/u/u-boot-linaro/u-boot-linaro-omap4-panda_2010.09~rc1.1-0ubuntu3_armel.deb - Extract it with dpkg (dpkg -X u-boot.deb .) - Copy the u-boot.bin file
Kernel: - After generating the rootfs with rootstock you'll find a file like vmlinuz-2.6.35-903-omap4 at the same directory you generated the rootfs - Install uboot-mkimage - Generate the uImage: mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux" -d vmlinuz-2.6.35-903-omap4 uImage - Copy the uImage file
Initrd: - After generating the rootfs with rootstock you'll find a file like initrd.img-2.6.35-903-omap4 at the same directory you generated the rootfs - Generate the uInitrd: mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d initrd.img-2.6.35-903-omap4 uInitrd - Copy the uInitrd file
boot.scr: - Set up a file called boot.script with the following content: """ fatload mmc 0:1 0x80000000 uImage fatload mmc 0:1 0x81600000 uInitrd setenv bootargs ro elevator=noop vram=32M root=/dev/sda1 fixrtc console=ttyO2,115200 [email protected] [email protected] bootm 0x80000000 0x81600000 """ - Change the root paramter if needed - Generate the boot.scr file: mkimage -A arm -T script -C none -n "Ubuntu boot script" -d boot.script boot.scr - Copy the boot.scr file
Grab a SD card, create the first partition as a FAT 32 one and copy the files u-boot.bin, MLO, uImage, uInitrd and boot.scr on it.
Sorry to keep bumping this thread but still after masses of reading cannot work this out.
Hello.
Is this project dead?
Sent from my GT-I9100 using Tapatalk 2
After readin both thread over and over im stumped...
Someone somebody help please lol
Id love this on my sgs2.
Tried done bored of chroot
Have tried and half suceeded turning of android ui and hijacking fb0 graphics
This looks like and is what i want on my phone..
Ill donate to whoever can wrap this into a step by step easy to follow tutorial, im sure others would like this but are to finding
The instructions a bit hard, thanks
Greate news! Thank you!
joesnose said:
Hello,
Just wondering how things are coming along. I am still surprised that this project and thread are not receiving more interest!
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
because the phone remain closed source (EFS, SBL1, SBL2, MODEM, UMS etc.)
Hi,
I downloaded the SM-N910F kernel from samsung compiled and burned it with Heimdall. It works fine.
The problem I am facing is when I add some code into the kernel. It won't boot (returns do DOWNLOAD mode screen), error message "could not do normal boot".
Note: I have tried burning my boot.img both with Heimdall (linux) and Odin (windows), and get the same results, i.e. unmodfied kernel works fine, modified -- fails.
It seems to be a zImage size issue.
I tested this by only adding lots of seq_print(m ,"something somthing ....") in print_binder_transaction() (drivers/stagin/android/binder.c). just to make the zImage bigger (unmodified zImage size: 9792000 bytes, bloated zImage 9799072 bytes, only ~7Kb more).
I checked the with busybox fdisk the BOOT partition size, its 17MB.
I pulled the boot.img with dd from the device and used "abootimg -u boot.img -k ../arch/arm/boot/zImage" to update it with my compiled zImage.
any ideas?
missing info?
Thanks,
Daniel.
lightydo said:
Hi,
I downloaded the SM-N910F kernel from samsung compiled and burned it with Heimdall. It works fine.
The problem I am facing is when I add some code into the kernel. It won't boot (returns do DOWNLOAD mode screen), error message "could not do normal boot".
Note: I have tried burning my boot.img both with Heimdall (linux) and Odin (windows), and get the same results, i.e. unmodfied kernel works fine, modified -- fails.
It seems to be a zImage size issue.
I tested this by only adding lots of seq_print(m ,"something somthing ....") in print_binder_transaction() (drivers/stagin/android/binder.c). just to make the zImage bigger (unmodified zImage size: 9792000 bytes, bloated zImage 9799072 bytes, only ~7Kb more).
I checked the with busybox fdisk the BOOT partition size, its 17MB.
I pulled the boot.img with dd from the device and used "abootimg -u boot.img -k ../arch/arm/boot/zImage" to update it with my compiled zImage.
any ideas?
missing info?
Thanks,
Daniel.
Click to expand...
Click to collapse
ok, solved the problem. used unpackbootimg & mkbootimg to create the new boot.img. works fine...
Hey guys.
I need some help... I've downloaded the firmware images and the source files for building the kernel from the Asus.com support section for Zenfone 3 Zoom and I've built a new image going through the steps:
export CROSS_COMPILE=.../kernel/android-ndk-r16b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
export ARCH=arm64
export SUBARCH=arm64
and fixing some include dependencies that couldn't be found (#include <> to include "" etc...). I then build the config with
make ZE553KL-Hades_defconfig then make menuconfig just to tick support to my wifi otg adapter model.
I was able to build Image, Image.gz and Image.gz-dtb from that. Afterwards I used a few of several free tools online to unpack the original boot.img that I downloaded from the support site and repack it with the ramdisk.cpio.gz and my kernel image (already tried using Image, Image.gz and Image.gz-dtb).
The problem is that when I either fastboot boot new.img or fastboot flash boot new.img the phone won't boot at all. It keeps going back to the bootloader selection screen.
If I use the downloaded boot.img instead it works fine so I don't know what I'm missing here.
Any help would be appreciated...