• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.
Sign in to follow this  
Followers 0

building and packing a custom kernel

8 posts in this topic

Posted (edited) · Report post

Hi!

I've been trying to build my own kernel (using su660 sources) but have failed booting it so far, I'll describe my steps here and would appreciate if anyone with more knowledge could help me find what I'm doing wrong.

I've downloaded the kernel source code from LGe and build it using the readme provided with the .config found here in Pauls thread:

make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-

make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi- zImage

This gives me the zImage file which is the kernel.

Now comes the packing of the boot.img. For this I have some android sources and done

make mkbootimg

This gives me the executable mkbootimg.

Now I extracted the ramdisk from the stock rom manually (using this guide: http://android-dls.com/wiki/index.php?titl...ack_Boot_Images )

And then packed the kernel together with the ramdisk:

mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel zImage --ramdisk ramdisk.gz -o boot.img

This provides me with a boot image that doesn't boot. I've also tried

mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel zImage --ramdisk ramdisk.gz --base 0x10000000 -o boot.img

(taking the base value from Pauls thread http://android.modaco.com/content/lg-optim...ings-braindump/ )

Is there something obvious I'm doing wrong?

Edited by theguv
0

Share this post


Link to post
Share on other sites

Posted · Report post

I'm using 'mkbootimg --kernel zImage] --ramdisk ramdisk.cpio.gz -o boot.new.img --base 0x10000000' so not passing a command line, but that aside, basically the same as yours?

P

0

Share this post


Link to post
Share on other sites

Posted · Report post

I'm using 'mkbootimg --kernel zImage] --ramdisk ramdisk.cpio.gz -o boot.new.img --base 0x10000000' so not passing a command line, but that aside, basically the same as yours?

P

Hm, thanks, that worked! (Note to self: should not follow random guides on the internet with weird extra flags without knowing what they do).

Although I seem to have broken the wifi, dmesg has lots of lines like:

<4>[ 56.494858] wireless: Unknown symbol register_netdev

<4>[ 56.495131] wireless: disagrees about version of symbol free_netdev

I will work more with this during the weekend, thanks again.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Excellent. Have you pushed the generated wifi ko to /system/lib/modules?

P

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Excellent. Have you pushed the generated wifi ko to /system/lib/modules?

P

Nope, didn't have time for that in the morning, will do when I get back home. I thought that since the kernel version was the same, the old wifi modules should have worked, but I guess I have to read up a bit on how drivers work on linux..

Edit: Works with generated wireless.ko! Nice, I'll read up on cifs and the likes now.

Edited by theguv
0

Share this post


Link to post
Share on other sites

Posted · Report post

I'm using 'mkbootimg --kernel zImage] --ramdisk ramdisk.cpio.gz -o boot.new.img --base 0x10000000' so not passing a command line, but that aside, basically the same as yours?

P

I am using the same procedure. Got the ramdisk using split_bootimg.pl, compiled my kernel from the sources ahh btw, here are the LGP990 v10c sources (http://www.lg.com/global/support/opensource/opensource-detail.jsp?detailCustomerModelCode=LGP990) and used mkbootimg to rejoin my new kernel with the stock ramdisk:

./mkbootimg --kernel mydroid/kernel/arch/arm/boot/zImage --ramdisk boot.img-ramdisk.gz -o boot.img --base 0x10000000

I flashed the PARTITION 10 via nvflash using:

nvflash --bl fastboot.bin --download 10 boot.img

I have done it with a couple of different attempt before finding the lg source and it was obviously getting an invisible panic at the first LG logo.

I believe that this last kernel works fine because I can get over the LG to the second LG screen with the progress bar but the system stuck there.

I tried to adb and I see the phone but adb sheel gets a message saying the sh is not found on the whatever/bin/ so I think that the ramdisk is not working...

do you have guys any tip for me?

0

Share this post


Link to post
Share on other sites

Posted · Report post

I am using the same procedure. Got the ramdisk using split_bootimg.pl, compiled my kernel from the sources ahh btw, here are the LGP990 v10c sources (http://www.lg.com/global/support/opensource/opensource-detail.jsp?detailCustomerModelCode=LGP990) and used mkbootimg to rejoin my new kernel with the stock ramdisk:

./mkbootimg --kernel mydroid/kernel/arch/arm/boot/zImage --ramdisk boot.img-ramdisk.gz -o boot.img --base 0x10000000

I flashed the PARTITION 10 via nvflash using:

nvflash --bl fastboot.bin --download 10 boot.img

I have done it with a couple of different attempt before finding the lg source and it was obviously getting an invisible panic at the first LG logo.

I believe that this last kernel works fine because I can get over the LG to the second LG screen with the progress bar but the system stuck there.

I tried to adb and I see the phone but adb sheel gets a message saying the sh is not found on the whatever/bin/ so I think that the ramdisk is not working...

do you have guys any tip for me?

Hm, if that script extracted the ramdisk correctly it should work :S.

I didn't really do it that way, I extracted it manually (according to http://android-dls.com/wiki/index.php?titl...ack_Boot_Images ). And then I didn't use nvflash for flashing. I adb push-ed the boot.img to the device, then I used dd if=boot.img of=/dev/block/mmcblk0p5 to flash it to the boot partition. Not sure what the partition 10 is which you speak of, but it should probably have worked :S

0

Share this post


Link to post
Share on other sites

Posted · Report post

Hm, if that script extracted the ramdisk correctly it should work :S.

I didn't really do it that way, I extracted it manually (according to http://android-dls.com/wiki/index.php?titl...ack_Boot_Images ). And then I didn't use nvflash for flashing. I adb push-ed the boot.img to the device, then I used dd if=boot.img of=/dev/block/mmcblk0p5 to flash it to the boot partition. Not sure what the partition 10 is which you speak of, but it should probably have worked :S

yes, thanks for your answering.

the partitioning numbers in nvflash languages are a bit different then the ones seen from the kernel side. this is the schema:

[device]

type=hsmmc

instance=3

[partition]

name=BCT

id=2

type=boot_config_table

allocation_policy=sequential

filesystem_type=basic

size=3145728

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=PT

id=3

type=partition_table

allocation_policy=absolute

filesystem_type=basic

start_location=4194304

size=4096

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=EBT

id=4

type=bootloader

allocation_policy=sequential

filesystem_type=basic

size=1572864

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

filename=fastboot.bin

[partition]

name=MBR

id=5

type=master_boot_record

allocation_policy=sequential

filesystem_type=basic

size=1048576

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=APP

id=6

type=data

allocation_policy=sequential

filesystem_type=basic

size=367001600

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

filename=system.img

[partition]

name=CAC

id=7

type=data

allocation_policy=sequential

filesystem_type=ext3

size=67108864

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=MSC

id=8

type=data

allocation_policy=sequential

filesystem_type=ext3

size=2097152

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

# extended partition

[partition]

name=EB1

id=9

type=extended_boot_record

allocation_policy=sequential

filesystem_type=basic

size=131072

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=LNX

id=10

type=data

allocation_policy=sequential

filesystem_type=basic

size=8388608

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

filename=boot.img

[partition]

name=EB2

id=11

type=extended_boot_record

allocation_policy=sequential

filesystem_type=basic

size=131072

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=DRM

id=12

type=data

allocation_policy=sequential

filesystem_type=ext3

size=2306560

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=EB3

id=13

type=extended_boot_record

allocation_policy=sequential

filesystem_type=basic

size=131072

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=SOS

id=14

type=data

allocation_policy=sequential

filesystem_type=basic

size=20971520

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

filename=recovery.img

[partition]

name=EB4

id=15

type=extended_boot_record

allocation_policy=sequential

filesystem_type=basic

size=131072

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=UDA

id=16

type=data

allocation_policy=sequential

filesystem_type=ext3

size=1610612736

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=EB5

id=17

type=extended_boot_record

allocation_policy=sequential

filesystem_type=basic

size=131072

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

[partition]

name=UDB

id=18

type=data

allocation_policy=sequential

filesystem_type=ext3

size=0xFFFFFFFFFFFFFFFF

file_system_attribute=0

partition_attribute=0

allocation_attribute=8

percent_reserved=0

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.