yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] MetaIIica:
So, first test: I can Flash it when i remove the first line (assert(getprop("ro.product.device") == "p990" || getprop("ro.build.product") == "p990");)

But dont boot yet. I dont see the Bootanimation,

I test it with a another combination

EDIT: @ Harsh, the Topogigi SP 2 Kernel are the best Basis i think, i can with this see the Bootanimation. Have a look in Topogigis Kernel and boot.img. With yours i see only the LG Logo
[LG Optimus 2x] Harsh:
His kernel boot.img have ramdisk from ICS stock. This one has modified CM10 ramdisk. Will check if change of ramdisk matters or not.
[LG Optimus 2x] wals46:
Too much slow to download
[LG Optimus 2x] tonyp:
Edit: see my next post
[LG Optimus 2x] spyrosk:
Thank you very much for this detailed info.

I really appreciate it.

I will change it in toolkit in coming version.
[LG Optimus 2x] Wolf80:
I have done all as explained in your guide pengus,but i couldn't get it to build,i keep getting the same error:

Made recovery image: /home/alessandro/cm10/out/target/product/p990/recovery.img
/home/alessandro/cm10/out/target/product/p990/recovery.img maxsize=21356544 blocksize=135168 total=5490688 reserve=270336
Package target files: /home/alessandro/cm10/out/target/product/p990/obj/PACKAGING/target_files_intermediates/cm_p990-target_files-eng.alessandro.zip
Package OTA: /home/alessandro/cm10/out/target/product/p990/cm_p990-ota-eng.alessandro.zip
./build/tools/releasetools/ota_from_target_files -v \
-p /home/alessandro/cm10/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=p990 \
/home/alessandro/cm10/out/target/product/p990/obj/PACKAGING/target_files_intermediates/cm_p990-target_files-eng.alessandro.zip /home/alessandro/cm10/out/target/product/p990/cm_p990-ota-eng.alessandro.zip
File "./build/tools/releasetools/ota_from_target_files", line 396
def AppendAssertions (script, input_zip)
^
SyntaxError: invalid syntax
make: *** [/home/alessandro/cm10/out/target/product/p990/cm_p990-ota-eng.alessandro.zip] Error 1

Any solution? It's days that i'm trying to find out wtf it is :crying: Thank you! :highfive:
[LG Optimus 2x] Wolf80:
Couldn't get it to work properly,when I boot the rom builded,it says External SD is damaged,please format it. And if I enter recovery and try to flash any other ROM,it just won't do it,and it does not recognize internal SD..why? Also,when i go to reboot to system,it just enters recovery instead of booting system so i cannot use the phone
[LG Optimus 2x] bitdomo:
I can confirm this. At the first boot mmcblk0p11 (internal SD) gets corrputed and after the first reboot mmcblk0p12 (system) and mmcblk0p9 (data) get corrupted as well. I tried it with cm10.1, but I've never had any problems before the cm10.1 nightlies got offical.

EDIT: the partition layout after the reboot.

179 0 7809024 mmcblk0
179 1 358400 mmcblk0p1
179 2 65024 mmcblk0p2
179 3 1 mmcblk0p3
179 4 9728 mmcblk0p4
179 16 15793152 mmcblk1
179 17 15792128 mmcblk1p1
[LG Optimus 2x] pengus77:
What cwm are you using ? If you use the stock cwm that comes out of the building process it will corrupt your partition map as shown above. You also have to apply the mods to the cwm (bootable/recovery) that comes with the source and flash it. Mods links are in my signature (always in this thread anyway) ;)
[LG Optimus 2x] bitdomo:
I am using your cwm pengus :)

EDIT: I was able to build working cm10.1 for new bl before cm10.1 become offical
[LG Optimus 2x] pengus77:
Well, from the partition map i see, the one that got corrupted is mmcblk0p3 (MSC partition on the old bl). If you don't modify the kernel too as stated in the howto, it will write to that partition when booting/rebooting/charging. The only problem is that mmcblk0p3 on the new layout is the extended partition map and MSC is actually mmcblk0p5...
[LG Optimus 2x] bitdomo:
I figured out why this happening. For the first time I made a build for the old layout then I modified the source to work on the new layout, but I didn't make a clean build therefore the half of the changes did not applied for the next build. That's why my partition layout got corrupted
[LG Optimus 2x] MetaIIica:
i have done all Files was must change in one 7zip so you must only download, decompress and copy to your root from your Build. You must overwrite all files...

This is for CM10 based Builds: http://d-h.st/Nfe

This is for CM10.1 based Builds: http://d-h.st/5VO
[LG Optimus 2x] strugalovic88:
Одг: [High experimental] CM10 for new ICS Bootloader and Layout

a success boot to start wizard works only when any can make a Kernel. In the Moment, all available Kernel is not enough

What about starting development for 3.x kernel? There are many excellent devs here so it would not be such problem for you guys..

:p
[LG Optimus 2x] pengus77:
Spoiler: already started :p
[LG Optimus 2x] strugalovic88:
Одг: [High experimental] CM10 for new ICS Bootloader and Layout

Just wow! :D :thumbup:
[LG Optimus 2x] MetaIIica:
i have upload a Test of CM10 with Topogigis SP2 Kernel...

To see it do following:

- Flash NV-Flash from Topogigis ICS

- dont boot

- boot to CWM

- wipe factory Reset, also data/cache

- go mount and storage and format and format manually system, data and cache again.

- go to advanced ald wipe dalvik

- flash CM10_Test.zip

- reboot

This is not a working Version, this is only a Version to see the Bootanimation and for finish it to have a working Version

I tested it with the updater-script from the version from Harsh... i woundered i dont see the bootanimation. With my updater.script from my first thread i see the Bootanimation lol

Link to CM10_Test

I think its the best way is for success in the future to use my update-script and a changed Version from Topogigis Kernel. Hope Topogigi make a look in this thread and help us

And hell yeah MetaIIica say so :P :P
[LG Optimus 2x] komunistvb:
I see bootanimation trying to boot for abouth 5 minuts and no boot i will try removing battery

---------- Post added at 11:10 PM ---------- Previous post was at 11:05 PM ----------

Still no boot no vibro on boot but i think you gona make it

from beginig i was sore that partition is reason for call bug beacose on 28g no bug in call thanks for trying hope you gona make it working
[LG Optimus 2x] winstonxl2:
This is a part metallica wrote

As.you read it you wil know its only to see the bootanimation its not a working version
[LG Optimus 2x] komunistvb:
I know that but wont to try who knows it is all about trying
[LG Optimus 2x] tonyp:
As I was testing some stuff on my buildbox and had to build a ROM to verify everything worked - I just did a quick build of cm10 with wkpark's new bootloader patch.

Additionally I changed the updater-script to match the new partitions. Apart from that it's a clean CM build.

The ramdisk is not yet changed - and I think that's needed. Just if someone wants to start working on it.

(You have to unpack the boot.img and adapt the partitions in the init..rc files).

Download:

http://goo.im/devs/tonyp/P990-stuff/JB/cm-10-newBL-20121202-UNOFFICIAL-p990.zip
[LG Optimus 2x] MetaIIica:
my test: Flash does only work when i remove assert(getprop("ro.product.device") == "p990" || getprop("ro.build.product") == "p990"); in updater-script.

When removed, flash work

But its not boot. See only the LG Logo. Next i replaced with the META-INF from my Test.. boot not too -.- My Base was Topogigis NV-Flash Methode

TonyP does it booting by your device?
[LG Optimus 2x] tonyp:
I already wrote it still needs some work in the ramdisk.

It was just a test build for my build box, and I thought I upload it as a clean build as I don't know what you guys did in the zip files uploaded here. (things like swapping the boot.img won't work obviously).

Someone needs to adapt the ramdisk, but I don't want to change the bootloader at the moment to debug.
[LG Optimus 2x] Topogigi:
It seems that updating the ramdisk with the new partition layout is not enough. I built a quick and dirty boot.img starting from my SP2 kernel zImage with the cm10 ramdisk, changing all the partition numbers when needed, but it simply revert during boot phase to the old partition layout (yes, whn you do cat /proc/partitions you find the old scheme instead of the new). Something in the bootloader (or elsewhere in CM10 code, I don't know) switches the partitions to the old layout....

EDIT: It could be the init executable, let's seee.....
[LG Optimus 2x] x_justin:
I'm so curious. Doubt a little bit between trying this (because MolecularConnector didn't have any soundbug after many calls and if there's someone who has soundbugs withing 1 or 2 calls, it's me) or your future build:

http://xdaforums.com/showpost.php?p=34958627&postcount=282

Still believe it has to do with the bootloader, hope you will get it running. Im om 28g stock now with the new bootloader. Runs fine but still like CM10 the most.
[LG Optimus 2x] iosonogerva:
Could be this?
[LG Optimus 2x] Topogigi:
Already done in first attempt. Not enough to boot.
[LG Optimus 2x] wfd:
if you building kernel from CM source, maybe you should change in arch/arm/mach-tegra/lge/star/include/lge/board-star-nv.h #define LGE_NVDATA_PARTITION	"/dev/block/mmcblk0p5" to something else?
[LG Optimus 2x] wkpark:
I think it is not enough

I made a additional fix like as following

this fix is not tested at all

diff -ur r.orig/init.cm-star.rc r/init.cm-star.rc
--- r.orig/init.cm-star.rc 2012-12-04 16:37:38.226067250 +0900
+++ r/init.cm-star.rc 2012-12-04 16:43:37.285058220 +0900
@@ -116,9 +116,9 @@
chown system system /data/fota
chmod 0777 /data/fota

- chmod 777 /dev/block/mmcblk0p3
+ chmod 777 /dev/block/mmcblk0p5
# kernel read permission
- chmod 644 /dev/block/mmcblk0p5
+ chmod 644 /dev/block/mmcblk0p6
# 20101107, sglee76@lge.com, FOTA [END]

## LGE's bluetooth stuff
diff -ur r.orig/init.star.rc r/init.star.rc
--- r.orig/init.star.rc 2012-12-04 16:37:38.226067250 +0900
+++ r/init.star.rc 2012-12-04 16:44:14.827623742 +0900
@@ -2,17 +2,17 @@

on fs
# mount partitions
- mount ext4 /dev/block/mmcblk0p1 /system wait
- mount ext4 /dev/block/mmcblk0p1 /system ro noatime remount barrier=1 wait
+ mount ext4 /dev/block/mmcblk0p12 /system wait
+ mount ext4 /dev/block/mmcblk0p12 /system ro noatime remount barrier=1 wait
# We chown/chmod /data again so because mount is run as root + defaults
- mount ext4 /dev/block/mmcblk0p8 /data nosuid nodev noatime barrier=1 wait
+ mount ext4 /dev/block/mmcblk0p9 /data nosuid nodev noatime barrier=1 wait
chown system system /data
chmod 0771 /data
mount ext4 /dev/block/mmcblk0p2 /cache nosuid nodev noatime barrier=1 wait
chown system cache /cache
chmod 0770 /cache

- mount ext3 /dev/block/mmcblk0p6 /lgdrm nosuid nodev noatime
+ mount ext3 /dev/block/mmcblk0p7 /lgdrm nosuid nodev noatime

on post-fs
## LGE
[LG Optimus 2x] wkpark:
Please see also http://xdaforums.com/showpost.php?p=34842886&postcount=245
[LG Optimus 2x] amardeepsingh77:
Really appreciate efforts you guys are putting in here. Sooner or later everyone will move either to official ics rom or cm10, and with the old boot loader it's always going to be painful nvflash jumping from one to another. One thing is clear that we anyways need more space in the system partition to accommodate cm10.1 properly, though people can still live with older partition but that means removing something or the other all the time. So, I personally am in favour of new ics partition layout for official cm10 as well. What say you guys?
[LG Optimus 2x] Imperticus:
Still not enough, not booting. Stuck at the LG logo.
[LG Optimus 2x] anjo88:
I give u a thanks just for trying man!
[LG Optimus 2x] pengus77:
Uhm probably also the boot parameters of the kernel need to be changed ? As in, "root=" or similar ?
[LG Optimus 2x] x_justin:
Isn't it possible to use Topogigi's kernel with CM10? He uses it for his V28G rom, but the kernel is the same as aremcee uses for CM10 and works with the new bootloader. (see second post).

http://xdaforums.com/showthread.php?t=2007968
[LG Optimus 2x] Topogigi:
Nope, the kernel is basically the same, but I removed all the patches RC made to make it boot with the old bootloader. So, it is not really the same. But the problem lies somewhere in the ramdisk IMHO. I made some attempts a few days ago: you can find the result of these attempts in this thread. The modified boot.img reverts to the old partition scheme at first attempt and it does not finish the boot phase. Then you can only revert to the new partition scheme with nvflash. It seems that something somewhere breaks the partition scheme.
[LG Optimus 2x] owain94:
How about trying topogigi his kernel with a second init to to make sure ramdisk works much less hassle to change ramdisk every time

Should save a lot of time
[LG Optimus 2x] anjo88:
seems good so let´s try it!
[LG Optimus 2x] owain94:
I can only share my thoughts sadly :(

I don't own a p99x anymore would love to work on the phone again though
[LG Optimus 2x] Harsh:
Good to see you mate. It does not boot with new ramdisk either. Need to compile cm with all fix built in.

And what phone are you rocking right now? Any plans to get nexus 4?

Sent from my Nexus 4
[LG Optimus 2x] hei1125:
hi owain:)

My thought is as same as yours:(

I really miss this community
[LG Optimus 2x] Imperticus:
Got mine yesterday ;) I will be continuing testing on p990 until I sell it.

Sent from my Nexus 4
[LG Optimus 2x] CarloIT:
We hope you'll never sell it :D

Inviato dal mio LG-P990 con Tapatalk 2
[LG Optimus 2x] anjo88:
what about donation to u buy a new one and develo to p990 again are u in?
[LG Optimus 2x] x_justin:
+1
[LG Optimus 2x] ermacwins:
Good luck selling it lol. How much do you think you can get for it?

Also when did you order your N4?
[LG Optimus 2x] Harsh:
Well you should look at my github. We got mako rocking. -100 mV uv completely awesome. Maybe I revert it back to apply some msm changes.. :)

Sent from my Nexus 4
[LG Optimus 2x] MetaIIica:
Hope now we can use this in the future while the source out now

I think it is better to use the ICS-Layout as the old GB.. When CM10 or other good work, i think GB related Stuff die
[LG Optimus 2x] tonyp:
The new layout is wasting space for an ota partition. If RC is able to fix the bugs on the old bootloader I don't see a reason to use the new one.
[LG Optimus 2x] Harsh:
+1 to this.

It is allocating 350mb for ota which is huge amount of waste space when we at xda never use official LG Rom.

Sent from my Nexus 4
[LG Optimus 2x] Luk_Optimus:
As if LG would release any kind of new Roms...

Well but MAYBE they'll release Android 4.2 at Christmas :silly: :laugh:
[LG Optimus 2x] atone9:
If the old boatloader make the call bug,I think RC will change it near day.
[LG Optimus 2x] wapz:
Using Stefan's v28g for weeks now and haven't had a single call issue. Stock kernel. New bootloader.
[LG Optimus 2x] Netuser:
+1 Same here
[LG Optimus 2x] grimmyrippy:
all rom with the new bootloader had no call-bug i think that bug is because cm10 and other rom is using old bootloader but for now if we want to flash the rom easily if i'm not wrong we need the old bootloader to make a flashable zip? :confused:

we need someone to make a rom with new bootloader as a flashable zip without using smartflash/nvflash or other flashing tools that needed the use of computer

Sent from my nokia 5110 quad core
[LG Optimus 2x] FatherJony:
I've had the no audio bug with Topo's 28g. It's very infrequent in Ics compared to CM10 but it's there. It may not even be LG specific, a user reported that the Galaxy Tab Ics also has it, so it seems it' s introduced by Nvidia code in the Ics kernel. Let's hope that the culprit isn't inside a binary blob...
[LG Optimus 2x] zerocoolriddler:
Wow! So many false Information on one Page...

The Callbug is KERNEL-RELATED!!

We just got the P990 Sourcecode, so let RC work on it. He just changed some Things and everyone cries "Buh, Callbug appeared! It is the old Bootloader..."

Maybe he started working on it, not finishing it??

To everyone who thinks the Callbug has something to do with Bootloader:

If you rearrange the Harddrives in your PC, repartion them, and install a fresh OS ->your Soundchip will stop working now and then caused by your Harddrives...

Get it??
[LG Optimus 2x] frantic777:
Mate, have you noticed that some posts tells that some of binary libraries references to exact partitions, which makes idea about relation between layout and call bug reasonable enough?
[LG Optimus 2x] Andy HOT:
Also..your is example is invalid..the new partition layout has nothing to do with the new bootloader...and for your information it is very probably that the bug is there because the old bootloader just doesn't work with ics/jb
[LG Optimus 2x] pengus77:
I really don't think it's only kernel related... well it may be, but not in the sense on kernel code at this point.

We know that this exact kernel works on official ics as-is (aside for adaptation to old bl and cm specific hooks). The only differences between official ics and cm10 are the partition layout, the bootloader and the binaries (init, ril, etc).

Some of the official ics binaries refer to partitions using the new ics layout. This is, imho, the main possible cause of the call bug. And here i'm speculating, but what if the binaries slap some stuff in one or more partitions ? A reboot should clean them up, but not necessarily. Maybe the new bootloader cleans the partitions from leftovers/state-caches when it's reset (a reboot doesn't do that) ? Could this be why removing the battery usually fixes the call bug ? Or maybe it's something left in nvram ? Again, it's pure speculation, but imho it's worth investigating more possibilities instead of staying stuck with "it's the kernel" or "it's the bootloader".
[LG Optimus 2x] MetaIIica:
why it is not easy trying times? I mean if it works it would be something and if not, we have at least tried
[LG Optimus 2x] x_justin:
Yes for sure! There are many confusions now. I think these two are important not to forget:

1) bootloader is something different than partition layout, allthough conversion goes together in case of our rom's

2) SU660 also has the call bug with it's own sources, we should not forget that.
[LG Optimus 2x] Andy HOT:
That being the reason our own sources can't fix the bug.
[LG Optimus 2x] pengus77:
kernel/lge/star/arch/arm/configs/cyanogenmod_p990_defconfig defines CONFIG_CM_BOOTLOADER_COMPAT=y

Seems like setting it to "n" reverts the kernel to the original ics format (lg). In particular in kernel/lge/star/drivers/staging/android/ram_console.c this code appears

#ifndef CONFIG_CM_BOOTLOADER_COMPAT
reserved_buffer = buffer + buffer_size;
#else
/* Force the reserved_buffer to be at its old (Froyo/GB) location
for reboot to work with the older bootloader */
reserved_buffer = ioremap(0x17f80000, RAM_RESERVED_SIZE);
#endif

This, imho, could be the key to boot on the new bl... what do you devs think ?
[LG Optimus 2x] HUELK:
Hi,

did anyone succeeded in booting cm10 with the new bootloader yet. I try it myself but my device stays on the LG logo. I reverted some patches and set LGE_NVDATA_PARTITON inside "./mach-tegra/lge/bssq/include/lge/board-bssq-nv.h" and "./mach-tegra/lge/star/include/lge/board-star-nv.h" to /dev/block/mmcblk0p5 and disabled CONFIG_CM_BOOTLOADER_COMPAT in the Kernel config.

After that i changed all init* files to match the new layout and let it build but no success so far. Does anyone has another suggestion in whats wrong.

Is a way to see some kernel/bootloader debug messages on console?
[LG Optimus 2x] pengus77:
Aye, same steps i took and still no boot. Make sure system and data are mountable in cwm... sometimes it just goes terribly wrong. cwm expects system to be in ext4, nvflash formats it in ext3, cwm can't mount it and boom. manually formatting it via adb before flashing helped a bit, but still no boot. i'm studying a bit around to see where to map the fbconsole so we can have some sort of logging...
[LG Optimus 2x] HUELK:
Hi,

Maybe this will help, i will try that later and see if it will work:

tosh-ac100.wetpaint(dot)com/page/Framebuffer+console (cant post links)

In the meantime i changed some of the BOARD_xxxxx_SIZE options in the BoardConfig.mk, can someone please check these:

BOARD_BOOTIMAGE_PARTITION_SIZE := 0x02000000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x05000000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648
BOARD_USERDATAIMAGE_PARTITION_SIZE := 6442450944
[LG Optimus 2x] Topogigi:
There's no difference between ext3 and ext4 when you nvflash a partition, since when you provide a system.img image, the partition is formatted accordingly to the .img format and the ext3 label in nvflash is simply ignored.
[LG Optimus 2x] pengus77:
Sure, but i nvflashed stefan's ics which afaik has system.img in ext3... then went on flashing the cm10 modded zip from cwm and it wasn't really happy to do so until i reformatted the partition manually... go figure :D

Anyway went on flashing directly the cm10 boot, system and userdata imgs from nvflash with the new bl for testing... much faster and no more manual reformat :D
[LG Optimus 2x] HUELK:
Hi,

still no luck, is there a way of testing the kernel before flashing it on the device? I tried with the emulator in out/host/linux-x86 with the -kernel parameter but it does not boot up there too. my zImage is very small too, 3.8 MB to e.g. ~ 5-6 MB in the Django Manouche build, wich dont has to be the problem.

I changed the Values in star_bootloader_parse.c and on the #CONFIG_CM_BOOTLOADER_COMPAT to be compatible with the old setting so i can use the values to manipulate the cmdline.
[LG Optimus 2x] pengus77:
Uhm facing the same issues. About the size of the boot.img and system.img that don't match the size of the partitions in nvflash, it's like that because i think the cm10 builder creates ext4 sparse images. So basically the max size is the partition size, but the img size doesn't exceed the contents. Say the boot image should be 8mb to fit in the partition, it's just 3.8mb because that's the size of its contents. I don't know if this could create problems to nvflash, but i'm trying to avoid the sparse images and creating them using the max size. A faster way could be to manually generate the images, mount them via loop and copy the data inside... what do you think ?

Edit: found a flag to disable the building of sparse images :) Add TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true in BoardConfig.mk and you'll get full-sized system image... boot is still at 3.8mb... looking into it now ;)

Edit2: nvflashed the full system.img and now it shows correctly as ext4 in cwm... and i can mount it, so it should be ok. Moving on to boot.img :)
[LG Optimus 2x] pengus77:
Yay !!!! Got it to boot on new bootloader using the system.img as described in the previous message !

Anyway, still a few bugs to kill:

1) reboot to recovery kills the partition map o.O

2) internal sdcard is not mounted, easy fix imho, will look into it

All the rest seems to work fine so far !
[LG Optimus 2x] Andy HOT:
Congratz man that is a big victory!
[LG Optimus 2x] pengus77:
Hell yeah ! Took me a week to get to this point, but i'm kinda jumping around the room now haha

Anyway, if anyone knows where in the code is the powermenu actions please tell ... too tired to grep -r blindly :D

As soon as i have a few minutes spare i'll post a full howto ;)
[LG Optimus 2x] HUELK:
Nice Job!!! Just got back from work and will try too.