[Q] View kernel messages on Transformer Prime - Asus Eee Pad Transformer Prime

Is it possible to see the messages of my CM kernel while booting, either on the tablet screen, or in some other way (e.g. USB serial terminal)? I am trying to find why a kernel doesn't boot (and I suspect that it is flashed correctly but it panics for some reason), so dmesg-after-the-fact is not useful.
The /proc/cmdline of the current CM running on the tablet contains some properties that sound relevant (like 'console' and 'debug_uartport'):
Code:
$ cat /proc/cmdine
tegraid=... [email protected] vmalloc=256M androidboot.serialno=... video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport usbcore.old_scheme_first=1 [email protected] [email protected] core_edp_mv=1300 audio_codec=wm8903 tegraboot=sdmmc gpt gpt_sector=60415999 androidboot.product=TF201 androidboot.carrier=wifi-only
(I have replaced some stuff with ... in the output above)
What I do:
1. Recompile the kernel from its sources, to build a zImage.
2. Get a boot.img from a nandroid backup.
3. Unpack it using the AndroidRoot BootTools.
4. Use the zImage from step 1 with the ramdisk from step 3 and a cmdline like the one at /proc/cmdline to build a boot.img.
5. Boot tablet into fastboot and fastboot -i 0x0b05 boot boot.img to test the new kernel.
But step 5 fails silently, no output is shown (except from the fastboot message "Booting downloaded image"). According to http://bootloader.wikidot.com/linux:android:kmsg, setting console=tty0 should show the messages on the screen, but it doesn't (and neither do "=tty" or "=/dev/tty0").

For step 5... the command should be fastboot -i 0x0b05 boot boot.img

Perhaps this post might help.
http://forum.xda-developers.com/showpost.php?p=27658214&postcount=157
Basically, run your kernel, then flash the file from attachment in above post, then flash a known working kernel. The /proc/last_kmsg from your kernel should be in the /sdcard.

craigacgomez said:
For step 5... the command should be fastboot -i 0x0b05 boot boot.img
Click to expand...
Click to collapse
That was a typo, fixed it in my post, thank you!

Related

MeeGo for Tegra 2 devices

Anyone tried to port this to Toshiba Folio?
I see some work here with Vega and Gtablet
http://wiki.meego.com/ARM/TEGRA2
Some video of MeeGo tablet UI.
http://www.youtube.com/watch?v=GB-nnFhGKbk&feature=player_embedded#!
Looks nice. Seems to run on our oldish 2.3.32.9 kernel. Might be worth a try to get this working.
I copy MeeGo to sdcard with dd command and from fastboot ONLY BOOTED(NOT FLASH) 2.6.32 kernel for booting from sdcard(DerArtem's) with this command(like it said in readme file):
fastboot -c "boardtype=PR root=/dev/mmcblk1p1 init=/sbin/init usb-storage.delay_use=0 rootdelay=10 tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 [email protected] [email protected] vmalloc=192M video=tegrafb usbcore.old_scheme_first=1 debug" boot boot.img
BUT
during boot I saw that sdcard is recognized,(and) first cpu stopped.(and) I'm not sure for init, it said that init isn't fond(that's ok, I unpacked boot.img and there're nothing in ramdisk folder and there're something else under init not found. Some words and numbers that I don't understand. Init is in /sbin folder, I checked. I set init position in fastboot command(init=/sbin/init) and I forgot, it said that it's try to pass "init=" and after that some strange words and numbers.
Is it problem in booting kernel but I think that isn't, I this thread ==> http://forum.xda-developers.com/showthread.php?t=899976 (post 6, wolfx) he only boots kernel.
What's the problem???
Thank's in advice!!!

[DEV] Custom MTD Partitions for the N1

With the advent of Blackrose custom HBOOT which gives us S-OFF, we can now resize the MTD partitions of our N1. This method is the one used by lbcoder in the Desire thread where you patch the recovery and boot in order to pass modified MTD partition information which supersedes the one provided by the SPL. Using this, I've managed to increase my userdata partition by ~50 MB by taking ~50 MB from the cache partition.
These instructions are for advanced users only. This will involve hex calculations and command line instructions that are not for the faint of heart. I don't believe it's dangerous though so anyone could still try since I will try to make these instructions as detailed as I possibly can.
What you need:
N1 with Blackrose HBOOT (I'm not sure this is needed though after I read more in-depth about the patch)
hex calculator (or a pencil & paper if you want to do it manually)
adb
fastboot
unpack-bootimg.pl
mkbootimg
recovery.img <- in my case I used ClockWorkMod 5.0.2 from here
boot.img <- taken from CM zip (in my case my KANG)
Partition Layout:
0x000003ee0000-0x000003fc0000 : "misc"
0x000004240000-0x000004640000 : "recovery"
0x000004640000-0x0000049c0000 : "boot"
0x0000049c0000-0x00000dac0000 : "system"
0x00000dac0000-0x0000139c0000 : "cache"
0x0000139c0000-0x00001fe00000 : "userdata"
Partition Sizes in Hex:
0x0000000e0000 : "misc"
0x000000400000 : "recovery"
0x000000380000 : "boot"
0x000009100000 : "system"
0x000005f00000 : "cache"
0x00000c440000 : "userdata"
Step-by-step Instructions:
A>Backup your current system: (OPTIONAL)
*I'm assuming you're using CWM 5.0.2 for the backup step since I tried using 3.X and the restore didn't work
1.) Boot your N1 into recovery using either adb reboot recovery or through the bootloader
2.) Backup your current system (I'm going to assume you know how to use your recovery for this)
B>Calculate new MTD parameter values:
*For this example I'm going to transfer ~50MB of cache space to my userdata partition:
1.) Since I know the cache partition is ~100MB in size, I'll just divide the hex size in 2:
0x5f00000 / 2 = 0x2f80000 <= this will be our new cache size
**Note that there is a minimum of 0x20000 (128k) for a partition and the size must be divisible by it which is why I'm playing safe and just dividing the original number in order to get an easier value for this example.
2.) Add the new cache partition size to the original cache partition starting address to get the new starting address of the userdata partition:
0xdac0000 + 0x2f80000 = 0x10a40000 <= this will be the new starting address for userdata
3.) Get the new userdata size by subtracting the new starting address of userdata with the ending address:
0x1fe00000 - 0x10a40000 = 0xf3c0000 <= this will be the new userdata size
C>Create a new recovery.img file which uses the new values:
1.) Breakdown the recovery.img file into it's kernel and ramdisk components using unpack-bootimg.pl:
.\unpack-bootimg.pl recovery.img
*This will yield 2 files and 1 directory. You can delete the directory since we only need the files.
2.) Rename the kernel from the recovery.img-kernel.gz made from unpack-bootimg.pl to recovery.img-kernel.
3.) Create the recovery-new.img file using mkbootimg with the new MTD command embedded:
mkbootimg --cmdline 'no_console_suspend=1 console=null mtdparts=msm_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](userdata)' --kernel recovery.img-kernel --ramdisk recovery.img-ramdisk.cpio.gz -o recovery-new.img --base 0x20000000
*Note that the values for cache starting address, userdata starting address and userdata size have been changed to the newly calculated values in the previous step.
**This will yield recovery-new.img which will be used in the next steps.
D>Create a new boot.img file which uses the new values:
1.) Breakdown the boot.img file into it's kernel and ramdisk components using unpack-bootimg.pl:
.\unpack-bootimg.pl boot.img
*This will yield 2 files and 1 directory. You can delete the directory since we only need the files.
2.) Rename the kernel from the boot.img-kernel.gz made from unpack-bootimg.pl to boot.img-kernel.
3.) Create the boot-new.img file using mkbootimg with the new MTD command embedded:
mkbootimg --cmdline 'no_console_suspend=1 wire.search_count=5 mtdparts=msm_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](userdata)' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz -o boot-new.img --base 0x20000000
*Note that the values for cache starting address, userdata starting address and userdata size have been changed to the newly calculated values in the previous step.
**This will yield boot-new.img which will be used in the next steps.
E>Flash the recovery-new.img:
1.) Boot into bootloader and use fastboot command to flash the new recovery:
fastboot flash recovery recovery-new.img
F>Make system operational:
1.) Boot into recovery mode.
2.) Erase everything (factory reset)
3.) Either:
- Flash the ROM you took the original boot.img from OR
- Restore the backup you made previously (this only works (or has been tested) on CWM 5.0.2)
4.) DO NOT REBOOT YET!!!
G>Flash modified boot.img:
1.) Use adb to reboot to bootloader directly from recovery: (this is for safety since if you boot from an unmodified boot.img you'll have to start from F again.
adb reboot bootloader
2.) Use fastboot to flash the new boot image:
fastboot flash boot boot-new.img
3.) You may restart normally.
For those who've read this far, everything above has been rendered obsolete! Here's an editor for the SPL itself for the partition sizes:
http://intersectraven.euroskank.com/tools/SPLHexEditor.exe
*Instructions are in dla5244's thread 2nd post.
Try it at your own risk though!
Credits:
dla5244 - for bringing S-OFF to our N1 even after a looong time since its release
Firerat - for the original patch idea
Lbcoder - for coming up with the idea in the Desire thread
Reserved!
(I'm learning to reserve now... )
2 Questions:
Is the userdata space where downloaded apps go?
why didn't you choose any other partition to transfer empty space from?
drzplaya1121 said:
2 Questions:
Is the userdata space where downloaded apps go?
why didn't you choose any other partition to transfer empty space from?
Click to expand...
Click to collapse
1.) Yes.
2.) This is a sample. If you want to transfer from system or to system from cache, this example will show you how to do so.
thank U. Now I have no need to buy a new phone because of constantly running out of memory
Does it mean that every time I flash a new kernel, the whole effort will go waste?
Also, can I use the same procedure for Amon RA recovery??
rjmohit said:
Does it mean that every time I flash a new rom (which obviously has a different boot.img), the whole effort will go waste?
Also, can I use the same procedure for Amon RA recovery??
Click to expand...
Click to collapse
For that you need to do only steps D, F and G. If you flash only a kernel which uses koush's anykernel updater, you don't need to do anything.
intersectRaven said:
For that you need to do only steps D, F and G. If you flash only a kernel which uses koush's anykernel updater, you don't need to do anything.
Click to expand...
Click to collapse
Thanks.
One more silly question
Will the following procedure work.
1. Flash any ROM.
2. Then flash the modified boot.img (which may not belong to that ROM).
3. Then optionally flash the desired kernel.
rjmohit said:
Thanks.
One more silly question
Will the following procedure work.
1. Flash any ROM.
2. Then flash the modified boot.img (which may not belong to that ROM).
3. Then optionally flash the desired kernel.
Click to expand...
Click to collapse
Yeah. That would work since you're replacing the kernel anyways. What's important is that the kernel is compatible with the ROM.
Well done IR cannot wait to resize my data partition..
Okay, I extracted the recovery.img file, now when I try to extract recovery.img-kernel.gz, it gives the following error: not in gzip format. Exactly same happens for boot.img. I tried extracting it with different extractors on windows and ubuntu, nothing worked. Pls help.
I don't like using MTD because over time you will notice lag. If your already using sd-ext then your data is basically not being used. And I believe that cache never gets past 50% usage. Just putting in my two cents
rjmohit said:
Okay, I extracted the recovery.img file, now when I try to extract recovery.img-kernel.gz, it gives the following error: not in gzip format. Exactly same happens for boot.img. I tried extracting it with different extractors on windows and ubuntu, nothing worked. Pls help.
Click to expand...
Click to collapse
That's odd. In my installation, it worked flawlessly. Were there no errors during the run of unpack?
blahbl4hblah said:
I don't like using MTD because over time you will notice lag. If your already using sd-ext then your data is basically not being used. And I believe that cache never gets past 50% usage. Just putting in my two cents
Click to expand...
Click to collapse
intersectRaven said:
That's odd. In my installation, it worked flawlessly. Were there no errors during the run of unpack?
Click to expand...
Click to collapse
Nope. No errors. :-/
rjmohit said:
Nope. No errors. :-/
Click to expand...
Click to collapse
Found the problem. It seems it was never compressed in the first place. Ark sees this and just copies the file without the .gz extension.
*Instructions edited accordingly.
I may sound a bit noobish, but I'm facing one more hindrance:
How exactly do I run the mkbootimg file in the ubuntu terminal? I mean, can you give me the exact syntax?
I was facing a similar problem with the perl script, but then I found a solution on google, but didnt find anything for the mkbootimg. Can I run it under windows cmd?
rjmohit said:
I may sound a bit noobish, but I'm facing one more hindrance:
How exactly do I run the mkbootimg file in the ubuntu terminal? I mean, can you give me the exact syntax?
I was facing a similar problem with the perl script, but then I found a solution on google, but didnt find anything for the mkbootimg. Can I run it under windows cmd?
Click to expand...
Click to collapse
I already posted the syntax in the instructions. You just need to make sure the mkbootimg file has execute permissions in order for it to run.
Updated OP with SPL editor program.
intersectRaven said:
Updated OP with SPL editor program.
Click to expand...
Click to collapse
I tried your program. Everything worked fine. Just that my /cache now shows 290 MB free, while I had resized it to 20 MB!! Is that a bug? /system & /data show proper sizes though. thanks.
rjmohit said:
I tried your program. Everything worked fine. Just that my /cache now shows 290 MB free, while I had resized it to 20 MB!! Is that a bug? /system & /data show proper sizes though. thanks.
Click to expand...
Click to collapse
Is it the display on the program or display on the Android device when booted?
Wait, I found it. It's a bug. Thanks! I'll edit it when I get home. For now, please double check the values by reopening the made file before flashing. If the values are incorrect, please DON'T FLASH!!!

[HOWTO][AOSP] Build Nexus 9 volantis target from sources

Building image for Nexus 9 (volantis)
$ lunch aosp_flounder-userdebug
$ make
Building kernel:
Get sources:
$ git clone https://android.googlesource.com/kernel/tegra kernel/tegra
$ git checkout origin/android-tegra-flounder-3.10-lollipop-release
Configuring:
$ make ARCH=arm64 flounder_defconfig
Building:
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android-
Copying to default place:
$ cp kernel/tegra/arch/arm64/boot/Image.gz-dtb device/htc/flounder-kernel/
Then build the whole image with new kernel
$ make
or build only boot.img with:
$ make bootimage
finikorg said:
Hi All,
I want to build Nexus 9 image from sources myself. Is it correct sequence:
$ lunch aosp_flounder-userdebug
$ make
I also read that there is somewhere target aosp_flounder64-userdebug. Which one is better?
Click to expand...
Click to collapse
You'll need to decide that for yourself. If you do the 64-bit version, be sure to have 64-bit gapps ready to flash.
But are those targets multiarch targets? So it shall be fine to run 32bit apps.
Nexus stops on 'Android' start-up screen after reflash my built image
Hi, I tried to build aosp code and it successes.
Now I failed in flashing all my built image into the Nexus 9.
What I did are :
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot reboot
Then my Nexus 9 has reboot and it stops on the screen of 'android' ......
One more question, please... how can I generate the vender.img ?
Regards,
Tonie Huang said:
Hi, I tried to build aosp code and it successes.
Now I failed in flashing all my built image into the Nexus 9.
What I did are :
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot reboot
Then my Nexus 9 has reboot and it stops on the screen of 'android' ......
One more question, please... how can I generate the vender.img ?
Regards,
Click to expand...
Click to collapse
I used
$ fastboot flashall -w
Hi, Thank for your reply.
But my question is if I download all source code from Google.
And build all on my side.
How can I flash all built images into Nexus 9.
Thanks.
Tonie Huang said:
Hi, Thank for your reply.
But my question is if I download all source code from Google.
And build all on my side.
How can I flash all built images into Nexus 9.
Thanks.
Click to expand...
Click to collapse
fastboot flashall should do this. vendor images you shall extract from factory images.
Hi, I did try it.
What I did were :
~$ lunch aosp_flounder-userdebug
Then ~$ make -j4
Then I copy out/target/product/flounder/
1. boot.img
2. cache.img
3. system.img
4. recovery.img
to the folder that Google released factory image : volantis-lrx22c
Then I've tried to:
1. zip those 4 files shown above and also add vender.img into my own image-my.zip
Then follow official steps to flash the system.
It stopped on 'android' logo after rebooting up.
I also tried to use 'fastboot flash boot boot.img' commands to flash each files.
It also halt on 'android' logo after flashing all files and rebooted.
Any other thing I didn't know ? please advise.
Regards,:crying:
Hi, now it works.
What I did are :
Re-created my own Image zip files (within android-info.txt, boot.img, cache.img, recovery.img, system.img and vender.img), and then using fastboot -w update MyImages.zip...
It works...
Thanks.

[Q] Using fastboot -c

Hello everybody. I need help figuring out what command line configuration to put inside of the parentheses of
Code:
fastboot -c " "
How can I find out what command line to put in so that I can use
Code:
fastboot boot
Apparently since Android 4.4 you can no longer simply do the command
Code:
fastboot boot img.mg
and you have to do it something like
Code:
fastboot -c "console=ttyHSL0,115200,n8 androidboot.hardware=mako lge.kcal=0|0|0|x" img.img
or
Code:
fastboot -c "lge.kcal=0|0|0|x" boot img.img
or else it won't boot. The above commands work for the nexus 4. I do not have the source for my device but I do have the boot.img and zimage. I need this info to help me root the HD6!
can you put the boot and zimage somewhere so i can download them.
HT123 said:
can you put the boot and zimage somewhere so i can download them.
Click to expand...
Click to collapse
Yes I will do that later today
[quote name="AdamOutler" post=57883049]So that is your CMDLINE. You can get the default CMDLINE from the stock boot.img. If you are on Ubuntu, you can
apt-get install abootimg
Click to expand...
Click to collapse
, then
abootimg -x path/to/boot.img
Click to expand...
Click to collapse
The file named something.cfg will contain the stock CMDLINE. Hope that helps.[/QUOTE]
I appreciate your reply. Neat tool. Before I was using unpackbootimg and it would create a blank boot.img-cmdline file. I just tried out your method and got similar results:
bootsize = 0x51f100
pagesize = 0x800
kerneladdr = 0x10008000
ramdiskaddr = 0x11000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
name =
cmdline =
Click to expand...
Click to collapse
I am guessing that the image should not require an additional command line param. But I am unable to boot even the stock boot img with fastboot boot. Is this a result of a locked bootloader?
kernel
Any progress? may be you can give us the kernel binary, so we can also test together
senzhk said:
Any progress? may be you can give us the kernel binary, so we can also test together
Click to expand...
Click to collapse
HT123 said:
can you put the boot and zimage somewhere so i can download them.
Click to expand...
Click to collapse
https://drive.google.com/open?id=0Bx_94ujbh0qoTm5rd0R5a041Ymc&authuser=0
Tried fastboot boot boot.img. It said Downloaded, and booting, but nothing happened.
I remember you have UART output, do you get any output whille 'booting'?
senzhk said:
Tried fastboot boot boot.img. It said Downloaded, and booting, but nothing happened.
I remember you have UART output, do you get any output whille 'booting'?
Click to expand...
Click to collapse
It shows some log about kernel size and ram size and then stops loging

Question How to compile and run custom kernel for Pixel 6

Hello!
I'm trying to compile and run a custom Android kernel on my Pixel 6. I did this multiple times in the past but with Android 12 it seems things have changed.
I'm following the usual "Building Kernels" page https://source.android.com/setup/build/building-kernels?hl=en
In more details these are the commands that I run:
mkdir android-kernel && cd android-kernel
repo init -u https://android.googlesource.com/kernel/manifest -b android-gs-raviole-5.10-android12-d1
./build/build.sh
Click to expand...
Click to collapse
However when I try to boot the boot.img using the "fastboot boot boot.img" command, I get immediately redirected back to the bootloader. I suspect this is due to a bad image file format.
I also tried to compile as follow
BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image \
GKI_RAMDISK_PREBUILT_BINARY=gki-ramdisk.lz4 \
BUILD_CONFIG=private/gs-google/build.config.gki.aarch64 \
./build/build.sh
Click to expand...
Click to collapse
where gki-ramdisk.lz4 is the ramdisk extracted from the prebuilt images found here https://developers.google.com/android/images#oriole
With this last setup I get a boot-loop, so at least the boot.img file format seems to be ok.
I think that these issues are related to the new GKI format, however I cannot find any information online on how to compile a custom GKI kernel.
Does any of you know how to build and run custom kernels for the Pixel 6?
Thanks!
barbito said:
Hello!
I'm trying to compile and run a custom Android kernel on my Pixel 6. I did this multiple times in the past but with Android 12 it seems things have changed.
I'm following the usual "Building Kernels" page https://source.android.com/setup/build/building-kernels?hl=en
In more details these are the commands that I run:
However when I try to boot the boot.img using the "fastboot boot boot.img" command, I get immediately redirected back to the bootloader. I suspect this is due to a bad image file format.
I also tried to compile as follow
where gki-ramdisk.lz4 is the ramdisk extracted from the prebuilt images found here https://developers.google.com/android/images#oriole
With this last setup I get a boot-loop, so at least the boot.img file format seems to be ok.
I think that these issues are related to the new GKI format, however I cannot find any information online on how to compile a custom GKI kernel.
Does any of you know how to build and run custom kernels for the Pixel 6?
Thanks!
Click to expand...
Click to collapse
You just need to run build_slider.sh script on the root of the repo you cloned for compile stock source
Ah thanks! build_slider works but you need to specify to compile the kernel otherwise it uses the prebuilt kernel
BUILD_KERNEL=1 ./build_slider.sh
barbito said:
Ah thanks! build_slider works but you need to specify to compile the kernel otherwise it uses the prebuilt kernel
BUILD_KERNEL=1 ./build_slider.sh
Click to expand...
Click to collapse
Hi I am trying to do the same thing, looks like there is no aosp folder anymore.
I had the same issue. I can no more compile it correctly.
They constantly change everything. I even tried to checkout to older branches where I was sure I managed to compile it but still no success. Maybe the sub cloned repository were not in sync
barbito said:
I had the same issue. I can no more compile it correctly.
They constantly change everything. I even tried to checkout to older branches where I was sure I managed to compile it but still no success. Maybe the sub cloned repository were not in sync
Click to expand...
Click to collapse
[email protected]:/mnt/code/shaoyang/aosp_kernel$ ls
build build_slider.sh prebuilts tools
build.config common-modules prebuilts-master update_symbol_list.sh
build_mixed.sh kernel private
[email protected]:/mnt/code/shaoyang/aosp_kernel$ BUILD_KERNEL=1 ./build_slider.sh
Building GKI kernel using aosp/build.config.gki.aarch64...
realpath: /mnt/code/shaoyang/aosp_kernel/aosp/build.config.gki.aarch64: No such file or directory
ERROR: Failed to compile GKI kernel: retval=1
ERROR: Failed to create mixed build: retval=1
there is no aosp folder any more, the older branches you mentioned is ?
hey,
try doing this.
Return to the ClockworkMod Recovery main menu. Choose "install zip from sdcard" and press "N." Choose "choose zip from sdcard" and press "N." Scroll through the list of ROMs, updates and kernels located on your SD card. Select the custom kernel you want to flash to the Nook.
I am trying to build AOSP 12 and kernel and unable to get it working on the Pixel 6.
my AOSP branch is android-12.1.0_r2 and my kernel branch is android-gs-raviole-5.10-android12L.
Pixel 6 works well if only flash the AOSP images I build, however, it won't boot up if I flash the boot.img build with kernel.
Here is my step:
1. mkdir android-kernel && cd android-kernel
2. repo init -u https://android.googlesource.com/kernel/manifest -b android-gs-raviole-5.10-android12L
3. repo sync
4. build/build.sh
I could see the logs below after I build successfully.
--------------------------------------------------------------------------------------------------------------------------
Files copied to /mnt/code/shaoyang/kernel/out/android-gs-pixel-5.10/dist
vendor_ramdisk-oriole.img is LZ4 compressed boot image created at boot.img
Signing the boot.img...
vendor boot image created at /mnt/code/shaoyang/kernel/out/android-gs-pixel-5.10/dist/vendor_boot.img
--------------------------------------------------------------------------------------------------------------------------
Note that the boot.img and vendor_boot.img had already been generated, then I use “fastboot flash boot boot.img” and “fastboot flash vendor_boot vendor_boot.img”to flash the boot.img and vendor_boot.img.
Unfortunately, the Pixel6 couldn’t boot up, it always stay in the fastboot mode.
I am also tried that copy all the files from out/android-gs-pixel-5.10/dist to the folder AOSP/device/google/raviole-kernel/
export TARGET_PREBUILT_KERNEL=out/android-gs-pixel-5.10/dist/Image.lz4
make bootimage
after that I flash the boot.img , Pixel 6 couldn't boot up.
I have compared the good boot.img and the bad boot.img, looks like there is no ramdisk in the bad boot.img .
I have also tried to do the below steps:
Building a Boot Image​It's possible to build a boot image using the kernel build environment. To do this you need a ramdisk binary, which you can obtain by downloading a GKI boot image and unpacking it. Any GKI boot image from the associated Android release will work.
tools/mkbootimg/unpack_bootimg.py --boot_img=boot-5.4-gz.img
mv tools/mkbootimg/out/ramdisk gki-ramdisk.lz4
The target folder is the top-level directory of the kernel tree (the current working directory).
If you're developing with AOSP master, you can instead download the ramdisk-recovery.img build artifact from an aosp_arm64 build on ci.android.com and use that as your ramdisk binary.
When you have a ramdisk binary and have copied it to gki-ramdisk.lz4 in the root directory of the kernel build, you can generate a boot image by executing:
BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image GKI_RAMDISK_PREBUILT_BINARY=gki-ramdisk.lz4 BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
That file is located in the artifact directory $KERNEL_ROOT/out/$KERNEL_VERSION/dist.
The boot image is located at out/<kernel branch>/dist/boot.img.
looks like the boot.img still don't have the ramdisk.
the pixel 6 couldn't boot up after flashed the boot.img
barbito said:
I had the same issue. I can no more compile it correctly.
They constantly change everything. I even tried to checkout to older branches where I was sure I managed to compile it but still no success. Maybe the sub cloned repository were not in sync
Click to expand...
Click to collapse
Hi , we don't need to build the whole kernel, just replace the KO file and build your vendor_boot.img and flash it. that will works for your mofiy in kernel source.
shaoyang said:
I am trying to build AOSP 12 and kernel and unable to get it working on the Pixel 6.
my AOSP branch is android-12.1.0_r2 and my kernel branch is android-gs-raviole-5.10-android12L.
Pixel 6 works well if only flash the AOSP images I build, however, it won't boot up if I flash the boot.img build with kernel.
Here is my step:
1. mkdir android-kernel && cd android-kernel
2. repo init -u https://android.googlesource.com/kernel/manifest -b android-gs-raviole-5.10-android12L
3. repo sync
4. build/build.sh
I could see the logs below after I build successfully.
--------------------------------------------------------------------------------------------------------------------------
Files copied to /mnt/code/shaoyang/kernel/out/android-gs-pixel-5.10/dist
vendor_ramdisk-oriole.img is LZ4 compressed boot image created at boot.img
Signing the boot.img...
vendor boot image created at /mnt/code/shaoyang/kernel/out/android-gs-pixel-5.10/dist/vendor_boot.img
--------------------------------------------------------------------------------------------------------------------------
Note that the boot.img and vendor_boot.img had already been generated, then I use “fastboot flash boot boot.img” and “fastboot flash vendor_boot vendor_boot.img”to flash the boot.img and vendor_boot.img.
Unfortunately, the Pixel6 couldn’t boot up, it always stay in the fastboot mode.
I am also tried that copy all the files from out/android-gs-pixel-5.10/dist to the folder AOSP/device/google/raviole-kernel/
export TARGET_PREBUILT_KERNEL=out/android-gs-pixel-5.10/dist/Image.lz4
make bootimage
after that I flash the boot.img , Pixel 6 couldn't boot up.
I have compared the good boot.img and the bad boot.img, looks like there is no ramdisk in the bad boot.img .
I have also tried to do the below steps:
Building a Boot Image​It's possible to build a boot image using the kernel build environment. To do this you need a ramdisk binary, which you can obtain by downloading a GKI boot image and unpacking it. Any GKI boot image from the associated Android release will work.
tools/mkbootimg/unpack_bootimg.py --boot_img=boot-5.4-gz.img
mv tools/mkbootimg/out/ramdisk gki-ramdisk.lz4
The target folder is the top-level directory of the kernel tree (the current working directory).
If you're developing with AOSP master, you can instead download the ramdisk-recovery.img build artifact from an aosp_arm64 build on ci.android.com and use that as your ramdisk binary.
When you have a ramdisk binary and have copied it to gki-ramdisk.lz4 in the root directory of the kernel build, you can generate a boot image by executing:
BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image GKI_RAMDISK_PREBUILT_BINARY=gki-ramdisk.lz4 BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
That file is located in the artifact directory $KERNEL_ROOT/out/$KERNEL_VERSION/dist.
The boot image is located at out/<kernel branch>/dist/boot.img.
looks like the boot.img still don't have the ramdisk.
the pixel 6 couldn't boot up after flashed the boot.img
Click to expand...
Click to collapse
Hi,I went through the same steps as you,“the Pixel6 couldn’t boot up, it always stay in the fastboot mode.” How to solve and finally successful?
environment:Unbutu 20.04
barbito said:
Hello!
I'm trying to compile and run a custom Android kernel on my Pixel 6. I did this multiple times in the past but with Android 12 it seems things have changed.
I'm following the usual "Building Kernels" page https://source.android.com/setup/build/building-kernels?hl=en
In more details these are the commands that I run:
However when I try to boot the boot.img using the "fastboot boot boot.img" command, I get immediately redirected back to the bootloader. I suspect this is due to a bad image file format.
I also tried to compile as follow
where gki-ramdisk.lz4 is the ramdisk extracted from the prebuilt images found here https://developers.google.com/android/images#oriole
With this last setup I get a boot-loop, so at least the boot.img file format seems to be ok.
I think that these issues are related to the new GKI format, however I cannot find any information online on how to compile a custom GKI kernel.
Does any of you know how to build and run custom kernels for the Pixel 6?
Thanks!
Click to expand...
Click to collapse
Hi,I went through the same steps as you ,I had the same problem as you; How to solve and finally successful? am looking forward to your early reply
any solution for this problem? can't find any with google.... need help badly
I know it's definitely possible, but getting boot loops/crashes. There are certainly working kernels out there. So I am sure that this is possible. But can't figure it out.
acuicultor said:
You just need to run build_slider.sh script on the root of the repo you cloned for compile stock source
Click to expand...
Click to collapse
acuicultor after this, do you just copy the files under out/mixed/dist to device/google/raviole-kernel? And then run the aosp build?​
haunted2bwanted said:
I know it's definitely possible, but getting boot loops/crashes. There are certainly working kernels out there. So I am sure that this is possible. But can't figure it out.
acuicultor after this, do you just copy the files under out/mixed/dist to device/google/raviole-kernel? And then run the aosp build?​
Click to expand...
Click to collapse
I run standalone builds, no need to build aosp just for the kernel.
Hello
Is it possible to compile only the kernel from source without downloading all that AOSP bloatware simply by using the Android NDK to build it? Just like you would build any other aarch64 binary using the ndk-build command? Thank you!
acuicultor said:
I run standalone builds, no need to build aosp just for the kernel.
Click to expand...
Click to collapse
Yep. That is exactly what I am curious about. I tried the same, I can't get my device to boot unfortunately. Couple of things:
I am on a userdebug build (not sure if that matters)
I started with branch android-gs-raviole-5.10-android12L
Detailed procedure as follows:
Bash:
# download the manifest and get the repo kernel
$ repo init --depth=1 -u https://android.googlesource.com/kernel/manifest -b android-gs-raviole-5.10-android12L
$ repo sync --force-sync -c --no-clone-bundle -j$(nproc --all) --verbose
# build the kernel
$ BUILD_KERNEL=1 ./build_slider.sh
# once the build finishes, you would find the following image files
# in ./out/dist/dist/
$ ls ./out/mixed/dist/*.img -ls
19188 -rw-rw-r-- 1 user user 67108864 Jul 23 11:39 ./out/mixed/dist/boot.img
484 -rw-rw-r-- 1 user user 495134 Jul 23 11:39 ./out/mixed/dist/dtb.img
2136 -rw-rw-r-- 1 user user 2183590 Jul 23 11:29 ./out/mixed/dist/dtbo.img
12116 -rw-rw-r-- 1 user user 12405857 Jul 23 11:39 ./out/mixed/dist/initramfs.img
4 -rw-rw-r-- 1 user user 38 Jul 23 11:39 ./out/mixed/dist/vendor-bootconfig.img
31656 -rw-rw-r-- 1 user user 32415744 Jul 23 11:39 ./out/mixed/dist/vendor_boot.img
43528 -rw-rw-r-- 1 user user 44605440 Jul 23 11:39 ./out/mixed/dist/vendor_dlkm.img
# I flash the following way:
$ adb reboot bootloader
$ fastboot flash boot boot.img
$ fastboot flash dtbo dtbo.img
$ fastboot flash vendor_boot vendor_boot.img
# boot to fastbootd
$ fastboot reboot fastboot
# flash the dlkm vendor image
$ fastboot flash vendor_dlkm vendor_dlkm.img
# reboot the device
$ fastboot reboot
haunted2bwanted said:
Yep. That is exactly what I am curious about. I tried the same, I can't get my device to boot unfortunately. Couple of things:
I am on a userdebug build (not sure if that matters)
I started with branch android-gs-raviole-5.10-android12L
Detailed procedure as follows:
Bash:
# download the manifest and get the repo kernel
$ repo init --depth=1 -u https://android.googlesource.com/kernel/manifest -b android-gs-raviole-5.10-android12L
$ repo sync --force-sync -c --no-clone-bundle -j$(nproc --all) --verbose
# build the kernel
$ BUILD_KERNEL=1 ./build_slider.sh
# once the build finishes, you would find the following image files
# in ./out/dist/dist/
$ ls ./out/mixed/dist/*.img -ls
19188 -rw-rw-r-- 1 user user 67108864 Jul 23 11:39 ./out/mixed/dist/boot.img
484 -rw-rw-r-- 1 user user 495134 Jul 23 11:39 ./out/mixed/dist/dtb.img
2136 -rw-rw-r-- 1 user user 2183590 Jul 23 11:29 ./out/mixed/dist/dtbo.img
12116 -rw-rw-r-- 1 user user 12405857 Jul 23 11:39 ./out/mixed/dist/initramfs.img
4 -rw-rw-r-- 1 user user 38 Jul 23 11:39 ./out/mixed/dist/vendor-bootconfig.img
31656 -rw-rw-r-- 1 user user 32415744 Jul 23 11:39 ./out/mixed/dist/vendor_boot.img
43528 -rw-rw-r-- 1 user user 44605440 Jul 23 11:39 ./out/mixed/dist/vendor_dlkm.img
# I flash the following way:
$ adb reboot bootloader
$ fastboot flash boot boot.img
$ fastboot flash dtbo dtbo.img
$ fastboot flash vendor_boot vendor_boot.img
# boot to fastbootd
$ fastboot reboot fastboot
# flash the dlkm vendor image
$ fastboot flash vendor_dlkm vendor_dlkm.img
# reboot the device
$ fastboot reboot
Click to expand...
Click to collapse
My guess is that the vendor modules inside the vendor_boot.img may not be updated. When the kernel is built the vendor modules might need to be rebuilt along with the GKI itself. Thoughts? acuicultor
haunted2bwanted said:
Yep. That is exactly what I am curious about. I tried the same, I can't get my device to boot unfortunately. Couple of things:
I am on a userdebug build (not sure if that matters)
I started with branch android-gs-raviole-5.10-android12L
Detailed procedure as follows:
Bash:
# download the manifest and get the repo kernel
$ repo init --depth=1 -u https://android.googlesource.com/kernel/manifest -b android-gs-raviole-5.10-android12L
$ repo sync --force-sync -c --no-clone-bundle -j$(nproc --all) --verbose
# build the kernel
$ BUILD_KERNEL=1 ./build_slider.sh
# once the build finishes, you would find the following image files
# in ./out/dist/dist/
$ ls ./out/mixed/dist/*.img -ls
19188 -rw-rw-r-- 1 user user 67108864 Jul 23 11:39 ./out/mixed/dist/boot.img
484 -rw-rw-r-- 1 user user 495134 Jul 23 11:39 ./out/mixed/dist/dtb.img
2136 -rw-rw-r-- 1 user user 2183590 Jul 23 11:29 ./out/mixed/dist/dtbo.img
12116 -rw-rw-r-- 1 user user 12405857 Jul 23 11:39 ./out/mixed/dist/initramfs.img
4 -rw-rw-r-- 1 user user 38 Jul 23 11:39 ./out/mixed/dist/vendor-bootconfig.img
31656 -rw-rw-r-- 1 user user 32415744 Jul 23 11:39 ./out/mixed/dist/vendor_boot.img
43528 -rw-rw-r-- 1 user user 44605440 Jul 23 11:39 ./out/mixed/dist/vendor_dlkm.img
# I flash the following way:
$ adb reboot bootloader
$ fastboot flash boot boot.img
$ fastboot flash dtbo dtbo.img
$ fastboot flash vendor_boot vendor_boot.img
# boot to fastbootd
$ fastboot reboot fastboot
# flash the dlkm vendor image
$ fastboot flash vendor_dlkm vendor_dlkm.img
# reboot the device
$ fastboot reboot
Click to expand...
Click to collapse
This procedure seems fine to me, just for july rom build you should use android-gs-raviole-5.10-android12-qpr3 branch
haunted2bwanted said:
My guess is that the vendor modules inside the vendor_boot.img may not be updated. When the kernel is built the vendor modules might need to be rebuilt along with the GKI itself. Thoughts? acuicultor
Click to expand...
Click to collapse
Running /build_slider.sh all the necessary stuff is being built, no need to do anything more than just running the script.
acuicultor said:
This procedure seems fine to me, just for july rom build you should use android-gs-raviole-5.10-android12-qpr3 branch
Running /build_slider.sh all the necessary stuff is being built, no need to do anything more than just running the script.
Click to expand...
Click to collapse
Very strange. This does not work for me. I tried android-gs-raviole-5.10-android12-qpr3 . I see the google logo and it restarts from bootloader mode. I have no idea what I am doing wrong. I updated my aosp version to oriole-sq3a.220605.009.b1. (Link to zip)
The only change I made what changing the version string of the kernel by modifying gki_defconfig.
Bash:
$ head -n2 aosp/arch/arm64/configs/gki_defconfig
CONFIG_LOCALVERSION="-haunted2bwanted-"
CONFIG_AUDIT=y
I see the version being reflected correctly:
Bash:
$ grep -a 'Linux version' out/mixed/dist/Image
(%u)%s: Unknown advertising packet type: 0x%02xhciLinux version %s (%s)Wrong link type (%d)
�l��� ����� ������������ �����
initcallinitcall_debugLinux version 5.10.81-haunted2bwanted--android12-9-geba40aecb3b7-dirty ([email protected]) (Android (7284624, based on r416183b) clang version 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee), LLD 12.0.5 (/buildbot/src/android/llvm-toolchain/out/llvm-project/lld c935d99d7cf2016289302412d708641d52d2f7ee)) #1 SMP PREEMPT Tue May 3 02:46:17 UTC 2022
Could it be that I am on the wrong ROM? Which one do you recommend? @acuicultor
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
acuicultor I tried fastboot version your kernel provided here: RadioactiveKernel_RAVIOLE_v1.2.2_FASTBOOT.zip
I got identical results on my device. Reboot to bootloader.Any ideas?
I can record a video of how the device behaves if you like? In the past, the anykernel kiri kernel worked like charm. I tried it calyxos. I'll try the anykernel3 version dist of your kernel as well.

Categories

Resources