yashsingh1/xdaforums huggingface dataset:
[Ubuntu Touch Ports to Android] MikeCriggs:
Re: [DISCUSSION] Porting to Your Device

It should be there after you sync it's kernel sources and whatnot.
[Ubuntu Touch Ports to Android] moocow1452:
Re: [DISCUSSION] Porting to Your Device

Brunch works for at least part of the sync, then throws up this error.

make: *** No rule to make target `/home/user/Nook/out/host/linux-x86/bin/mkimage', needed by `/home/user/Nook/out/target/product/encore/ramdisk.ub'. Stop.

make: *** Waiting for unfinished jobs....

I figure I need to fix something in one of those files, question is what?
[Ubuntu Touch Ports to Android] zero+:
Can any say wen unbuntu will be ther for gt-i9082 galaxy grand dous ..
[Ubuntu Touch Ports to Android] moocow1452:
So, I'm working on the Nook Color, and I can brunch and flash to the nook okay, but when I turn it on, it immediately turns the device back off after turning the backlight on for a couple seconds. Now what can I do now that I have a proper build?

http://paste.ubuntu.com/5719982/
[Ubuntu Touch Ports to Android] Grandmasterhack:
I wish I could...
[Ubuntu Touch Ports to Android] f69m:
Probably the Ubuntu Touch init is crashing.

Ubuntu init is started in a Linux container as an Android service.

When it exits, the device is turned off.

So I am afraid you are down to the ancient art of debugging.

Well, as ancient as programming history permits. ;)

Read the source, check the logs, add more logging, etc. to narrow down, where the Ubuntu startup goes wrong and crashes or exits. This should give you an idea, how to fix it.

Sorry I am not more specific, but Ubuntu init crashing is already an "educated guess" based on your information, no guarantees. ;)
[Ubuntu Touch Ports to Android] moocow1452:
Turns out it immediately crashing was because I didn't have a preinstalled flash after the bootstrap. Whoops. :silly:

After flashing both on an otherwise clean system, I get... a blank screen until I cut power. Woo!
[Ubuntu Touch Ports to Android] f69m:
lol, that's a good reason!

Well, here the ancient art still applies. Probably Ubuntu starts just fine, you can even get in via adb, but the qml-phone-shell does not start for some reason.

Check out the logs in /home/phablet/.ubuntu-session/logs/

That is under the Ubuntu root /data/ubuntu/ of course.

Had the same issue and tracked it down using gdb.

Good that you can install all the power of Linux easily! :)

Also check out the Ubuntu Touch mailing list. A lot of devices have that black screen for different reasons and different solutions have been suggested.
[Ubuntu Touch Ports to Android] MikeCriggs:
This isn't a speculation or request thread. Unless you plan on porting it or assisting in doing so, please don't post in this thread.

Sent from my AOSPA Maguro.
[Ubuntu Touch Ports to Android] moocow1452:
According to the logs

Shell starts fine. Any ideas or links for where I might want to go?
[Ubuntu Touch Ports to Android] EtherealRemnant:
I am trying to port this to d2tmo and its almost finished but I keep getting this error... Any ideas here?

hardware/qcom/display-caf/libgralloc/framebuffer.cpp: In function 'int fb_post(framebuffer_device_t*, buffer_handle_t)':

hardware/qcom/display-caf/libgralloc/framebuffer.cpp:93:25: error: 'MDP_DISPLAY_COMMIT_OVERLAY' was not declared in this scope

make: *** [/home/magickal/phab/out/target/product/d2tmo/obj/SHARED_LIBRARIES/gralloc.msm8960_intermediates/framebuffer.o] Error 1

make: *** Waiting for unfinished jobs....

hardware/qcom/display-caf/libexternal/external.cpp: In member function 'bool qhwc::ExternalDisplay::post()':

hardware/qcom/display-caf/libexternal/external.cpp:693:24: error: 'MDP_DISPLAY_COMMIT_OVERLAY' was not declared in this scope

make: *** [/home/magickal/phab/out/target/product/d2tmo/obj/SHARED_LIBRARIES/libexternal_intermediates/external.o] Error 1

I can't seem to get past this...

EDIT: I'm getting other errors too... I wonder if its a problem with CM code or if I skipped some part of the set up process? This is very frustrating :/ Its all related to the display of course so I *have* to fix it...
[Ubuntu Touch Ports to Android] MikeCriggs:
It's definitely an issue with the Android layer not compiling properly. You may have to purge your repos and sync them again in order for them to build properly. I've had that issue before and this fixed it.

Can you post a pastebin of your local manifest and manifest XML files?

Also, did you pull the proprietary files (drivers and whatnot) from the phone via ADB or did you add a source to your local manifest?
[Ubuntu Touch Ports to Android] moocow1452:
Hit a bit of a problem with my boot loader, harvesting from the rom zip gave me a black boot and adb from the word go, but using adb and the script gets me a 10MB larger boot loader, black screen and no adb. Do I need to purge my vendor files before I run the script, or was using the old room zip more beneficial?
[Ubuntu Touch Ports to Android] EtherealRemnant:
Fresh sync... Still won't build. Any other ideas? :/

target thumb C++: gralloc.msm8960 <= hardware/qcom/display-caf/libgralloc/mapper.cpp

hardware/qcom/display-caf/libexternal/external.cpp: In member function 'bool qhwc::ExternalDisplay::post()':

hardware/qcom/display-caf/libexternal/external.cpp:693:24: error: 'MDP_DISPLAY_COMMIT_OVERLAY' was not declared in this scope

make: *** [/home/magickal/phab2/out/target/product/d2tmo/obj/SHARED_LIBRARIES/libexternal_intermediates/external.o] Error 1

make: *** Waiting for unfinished jobs....

make: *** wait: No child processes. Stop.

It doesn't like the qualcomm source... It fails on external video, then it will fail on audio, its just a mess. :/
[Ubuntu Touch Ports to Android] f69m:
Possibly you need some additional packages that are not listed in the UT manifest?

Compare the manifest against the one from your CM build.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Besides missing the app references, everything checks out okay.

The only thing that's different with the CM10.1 and UT manifests is that there is no revision in CM10.1 (so its building CM10.1-MR3) and its straight CM10.1 in UT. I suppose that source could be broken?

I'm not terribly familiar with building Android kernels - I have a lot of Linux experience though. I can't figure this out for the life of me. I've even tried replacing the UT hardware/qcom tree with the CM tree and it still throws errors.

---------- Post added at 07:04 PM ---------- Previous post was at 06:23 PM ----------

I modded the manifests to point to the cm-10.1 instead of phablet for the failing qcom builds... now I get here...

INSTALL drivers/scsi/scsi_wait_scan.ko

INSTALL drivers/spi/spidev.ko

DEPMOD 3.4.41-cyanogenmod-g0cf436c-dirty

make[1]: Leaving directory `/home/magickal/phab/kernel/samsung/d2'

mdpath=`find /home/magickal/phab/out/target/product/d2tmo/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do mv $i /home/magickal/phab/out/target/product/d2tmo/system/lib/modules/; done; fi

mdpath=`find /home/magickal/phab/out/target/product/d2tmo/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi

Busted script??? Its almost done >_<

This is how close I am:

root@kinetik:~/phab/out/target/product/d2tmo# ls -l

total 158192

-rw-r--r-- 1 root root 14 Apr 25 05:53 android-info.txt

-rw-r--r-- 1 root root 4392960 Apr 25 06:37 boot.img

-rw-r--r-- 1 root root 17938 Apr 25 18:59 clean_steps.mk

drwxr-xr-x 2 root root 4096 Apr 25 06:43 data

drwxr-xr-x 3 root root 4096 Apr 25 05:53 external

drwxr-xr-x 2 root root 4096 Apr 25 05:54 fake_packages

-rwxr-xr-x 1 root root 3972368 Apr 25 06:37 kernel

drwxr-xr-x 16 root root 4096 Apr 25 06:07 obj

-rw-r--r-- 1 root root 592 Apr 25 18:59 previous_build_config.mk

-rw-r--r-- 1 root root 415829 Apr 25 18:59 ramdisk.img

-rw-r--r-- 1 root root 2925568 Apr 25 06:37 ramdisk-recovery.cpio

-rw-r--r-- 1 root root 1907266 Apr 25 06:37 ramdisk-recovery.img

drwxr-xr-x 4 root root 4096 Apr 25 06:14 recovery

-rw-r--r-- 1 root root 5883904 Apr 25 06:37 recovery.img

drwxr-xr-x 9 root root 4096 Apr 25 06:13 root

drwxr-xr-x 5 root root 4096 Apr 25 06:13 symbols

drwxr-xr-x 10 root root 4096 Apr 25 06:15 system

-rw-r--r-- 1 root root 142411264 Apr 25 06:43 userdata.img
[Ubuntu Touch Ports to Android] MikeCriggs:
Hey guys. Others and I are glad to help, but please do use www.pastebin.com for large amounts of code in your posts.

Just copy and paste directly from your terminal to a new file on their site, save it, and include it's URL in your posts.

Thank you :).
[Ubuntu Touch Ports to Android] MikeCriggs:
Use the vendor files from Cyanogen Mod. Either pull them manually from the ROM using ADB or add the GIT to your local manifest.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Sorry about that. I didn't even think about it... I have a one-track mind when I'm working on something, especially if it isn't working when it should lol. I have put it on the back burner for now until the code gets more stabilized. It takes forever to build on a mobile core i5.
[Ubuntu Touch Ports to Android] MikeCriggs:
Takes 4 hours for me to even sync CM repos on my 20Mb connection and i3 (even with "-j4"). Building only takes about 20 minutes.
[Ubuntu Touch Ports to Android] moocow1452:
I think I did both, and that messed up my build even more. I started with adding them to the repo, then taking them out of the zipped rom from get.cm, then pulling from ADB. Anyway, just complex right now. Last good Logcat I came up with before I decided to pull from ADB.

Any ideas? http://paste.ubuntu.com/5594502/
[Ubuntu Touch Ports to Android] JunDavis:
Problem:

"A fault address of deadbaad is a signal that your problem is a corrupt memory heap. The error's going to come from libc, but that's just because libc's memory management routines are what ultimately triggered the fault, not because libc itself is buggy. "
[Ubuntu Touch Ports to Android] moocow1452:
So, can I fix that?
[Ubuntu Touch Ports to Android] EtherealRemnant:
Takes me about an hour to sync the repo on my 50Mb connection but my i5 with j6 or j7 takes a good hour to build... *shrug*
[Ubuntu Touch Ports to Android] MikeCriggs:
I've seen this error in the mailing list. Look through the archive for different solutions.

Here's a link to the archive: https://lists.launchpad.net/ubuntu-phone/

Good luck, mate. If you need any more assistance in porting, just let me know.
[Ubuntu Touch Ports to Android] MikeCriggs:
Not bad at all!!
[Ubuntu Touch Ports to Android] moocow1452:
Gonna take a bit of a sabbatical from trying to debug touch for encore, since I was using chrubuntu to build, and unity decided it wasn't going to work right anymore, and I am back to stock Chrome.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Yeah but since the build never successfully completes, its a moot point.

I'll try it again in a month or so. I tried getting some help from the guy who posted a d2tmo port back in March to no avail so I'm going to leave it alone for now.

I can build a Gentoo system but can't build this... *smh*
[Ubuntu Touch Ports to Android] blmvxer:
Ive looked around and just can't find anything.

Has anyone heard of touch being ported to the Optimus G?
[Ubuntu Touch Ports to Android] MikeCriggs:
I haven't heard of anything, but take a loot at the porting guide. If you have CM10.1 nightlies, it should be pretty easy to port.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Not necessarily. Some of the Qualcomm sources are broken on the Ubuntu side and the kernel won't build using CM's repo because of other changes Ubuntu made.

I started over yesterday and still had a failed build even with a fresh repo.

Sent from my SGH-T999
[Ubuntu Touch Ports to Android] MikeCriggs:
What device are you building for?

You could try modifying and replacing some of the dependencies and etc in the Root FS ZIP to make it compatible. (Just like porting an Android ROM to your device via ZIPs).
[Ubuntu Touch Ports to Android] EtherealRemnant:
Its a d2tmo build. If it wasn't the crucial components (like qcom/display-caf) this would be feasible but I'm not going to build a kernel that won't have display output lol.

Sent from my SGH-T999
[Ubuntu Touch Ports to Android] MikeCriggs:
Lolocaust.
[Ubuntu Touch Ports to Android] EtherealRemnant:
I got my sources all mixed up... I started completely over. But I'm running into this problem now...

http://pastebin.com/fgiQFi8P

I can't figure it out. I could try replacing that file but I'll probably end up with a broken display kernel...
[Ubuntu Touch Ports to Android] f69m:
Well, it is just a warning treated as an error.

We had this in other source files too, as UT is using GCC 4.7.

As a quick fix, you can just add a cast "(int)" in those places, or you can add "-Wno-narrowing" to the CFLAGS.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Would disabling -Werror be a solution too? I didn't realize it was treating all warnings as errors...
[Ubuntu Touch Ports to Android] f69m:
Sure, that would still show the warnings, but continue with the compilation.

The literal meaning of "-Werror" is indeed "treat any warning as an error". :)

Usually a good idea for developers, a bad idea for people that just want to build.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Thanks. I am going to actually end up learning GCC by the time I get this built... lol

---------- Post added at 07:24 AM ---------- Previous post was at 06:38 AM ----------

Now I'm here...

http://goo.gl/EhjWX
[Ubuntu Touch Ports to Android] f69m:
MDP_DISPLAY_COMMIT_OVERLAY should be defined in your device package.

Or possibly in a common package used by several devices?

Maybe you need to add that to your manifest.

Did you ever try to build plain CyanogenMod?

I strongly suggest to do that first, before trying to port Ubuntu Touch.

Then use that manifest as a reference and possibly add some more packages to the UT manifest.

Sorry, this is a very specific issue for your device. I am afraid I can't give you more help than that.
[Ubuntu Touch Ports to Android] EtherealRemnant:
That's what I was afraid of. And because of this problem I've built CM twice and just did a PACMAN build for fun. I didnt have issues with either, didn't have to make any changes - just breakfast d2tmo and brunch d2tmo for CM and PACMAN had its own script that made it even easier.

I will compare the manifests. I seem to remember that last time, Ubuntu had forked a lot of the qcom sources (they were under phablet, not cm on GitHub) but replacing those with the cm files broke it.

Someone in the at&t forum has built it, I will ask them what modifications they made.

I get this error even if I do a manual pull instead of using breakfast. :/

And everyone said Qualcomm sources were easy to work with. Ha!

Thanks for trying to help.

Sent from my SGH-T999
[Ubuntu Touch Ports to Android] f69m:
Problem is that the phablet repos where forked at about CM 10.1 M1 and never updated from CM.

If you add additional packages from the CM repos, you might want to use the M1 milestone (is M for monthly or for milestone? Let's say M&M, monthly milestone ;) )

Mixing phablet repos with current CM repos might indeed cause trouble.

There is a separate manifest for each CM 10.1 M* release.

Also each (well most) repo has the respective tags.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Hmm... I will have to do some more research into how this all works. UT is automatically pulling all the way through to M3 source and I was wondering if that was causing a problem too as I know M3 is 4.2.2 and the UT kernel is 4.2.1.

I'm not one to throw in the towel easily. I didn't when I was trying to make the x86 Intel OS X DVD bootable on vanilla PCs and I won't give up on this either. I just wish it didn't take so long to build lol.

Thanks for all the tips. Its a lot more complicated than people think - I've built Gentoo from Stage1 and this is giving me more of a headache!

Oh well, I like a good challenge.

Sent from my SGH-T999
[Ubuntu Touch Ports to Android] f69m:
For each package in the manifest, you can give a revision="..." attribute.

Usually the one from the <default .... /> tag is applied, but can be overridden per package.

The revision can be a branch, a git hash, or a tag like:

revision="refs/tags/cm-10.1-M1"

Oh, so true! :)

Well, there is a big difference this time: with Gentoo and with CM or PAC as mentioned above, you are re-building, what others have already successfully done. This is enough of a challenge, I know.

But now you are exploring new grounds, trying to port to a new device no one else has tried before, right?

This means this time you are not a user/builder/modder, but a developer.

And every developer learns: if no one else has tried it before, it is broken. ;)

As for it being easy: sorry to say, it is indeed easy compared to porting other software to new devices, if your device is supported by CM.

Of course it is still painful, especially if you are a new developer.

But you'll get there! :good:
[Ubuntu Touch Ports to Android] EtherealRemnant:
Its funny, I started digging through the manifests for PAC... I think I know what mods I need to do now - and now that I am using gedit instead of nano it makes it a hell of a lot easier to edit this stuff.

I have a 50 meg connection so I think I'm going to purge the whole repo and start over again. It only takes about a half hour or so to get the whole thing and I'd rather have a fresh start even though I'll have to redo my edits... I'll try specifying the M1 ref.

Project time... initiate... lol :good:

---------- Post added at 01:26 AM ---------- Previous post was at 01:17 AM ----------

the -j16 command comes in handy ;)
[Ubuntu Touch Ports to Android] EtherealRemnant:
HOLY CRAP YOU ROCK!

Thank you SO MUCH! It built, it booted, but its not usable as expected right now. Still what does work is actually pretty smooth unlike some other kernels I've seen so its obviously got working 3D acceleration from the Adreno chip :)
[Ubuntu Touch Ports to Android] MikeCriggs:
Congratulations!! Upload it to Dev-Host and make a thread in the Ubuntu Touch Development section :).
[Ubuntu Touch Ports to Android] MikeCriggs:
You're also welcome to include my mods with your builds :).

Ubuntu Touch Auto-debloater & Ubuntu Logo Welcome Screen

http://xdaforums.com/showthread.php?t=2243920
[Ubuntu Touch Ports to Android] EtherealRemnant:
Thank you!

I uploaded it to Dev-Host and made a thread in the T-Mobile GS3 section, I'll cross post it here since it goes in both places. I posted a link to my T-Mobile developer thread in the ports thread here as well.

I guess I just got my developer status... now I need to find some older CM nightlies somewhere to see if I can't get the WiFi to work :)

---------- Post added at 06:20 AM ---------- Previous post was at 06:02 AM ----------

Looks awesome, I'll work on implementing more things later - I'm dead set on figuring out what is causing the apps to crash and getting networking working before I do anything else.

Excuse me, I'm in excited sleep-deprived mode right now lol
[Ubuntu Touch Ports to Android] f69m:
Glad I could help, though I only pointed your nose into the right direction.

You walked yourself! :)
[Ubuntu Touch Ports to Android] EtherealRemnant:
^ this is totally true. Still, thank you. :)

Now I was wondering if anyone has gotten Broadcom WiFi to work? For some reason, Samsung chose to use a BCM chip for WiFi instead of Qualcomm's WiFi solution. The kernel module builds but Ubuntu doesn't load it.

I also can't figure out why the apps crash after a few seconds of being open. Is this a general problem with the preinstalled nightlies or is it the device itself?

I am going to build it for my Captivate today and I guess I'll find out. It helps having multiple devices lol.
[Ubuntu Touch Ports to Android] xrhstospro:
Will be easy to port ubuntu if we have cm10? (unofficial)
[Ubuntu Touch Ports to Android] moocow1452:
Yeah, should be able to do the old school method of adding the git to the manifest if it's CM 10.1.

EDIT: Ladies and Gentlemen, Children of All Ages. I give you Ubuntu Touch for the Nook Color!!

Conditionals:

1. I had to flash my homemade bootloader first (https://www.dropbox.com/s/q5g7mnadvkdmy8k/cm-10.1-20130511-UNOFFICIAL-encore.zip), then the Mobile World Congress Build of Ubuntu Touch. http://cdimage.ubuntu.com/ubuntu-touch-preview/quantal/mwc-demo/ (quantal-preinstalled-phablet-armhf.zip)

2. Rotation is mismatched, so that it cannot recognize that it's trying to use the portrait setup in landscape, should be an easy enough fix. Jossed, as this is the MWC build, it's not really built for tablets, and the Nook gets confused on how to display thing

3. The big one. TOUCH SCREEN IS BROKEN. Granted, it makes it more of a clock than anything useful, but Ubuntu has been built and runs on the Nook Color. Built a new bootstrap based on CM 10.1 RC2, works like a glove. Still not all that much more useful compared to a clock, but that's by design.

Super duper special thanks for the guys in the Ubuntu-Touch mailing list and irc.freenode.net #ubuntu-touch and #nookcolor, who I could not have done this without.
[Ubuntu Touch Ports to Android] moocow1452:
Bump and victory lap.
[Ubuntu Touch Ports to Android] alroger:
Samsung Galaxy Tab 7" - P1000 (p1) boots!

Thanks for the MWC build tip.. I was trying with regular quantal and raring without any success. With the MWC version I got a boot! Samsung Galaxy Tab 7" original here.

Now before creating a thread and all, I want to fix the screen rotation. It's like getting a landscape desktop and rotating it -90 degrees, which makes it fall off the screen. Any ideas where to address that?

But touch does work, and I was able to use the camera! :D

EDIT: easy enough.. just changed ro.sf.hwrotation=90 to ro.sf.hwrotation=180 and it displays correctly.. but touch is rotated.. not aligned with the actual screen.
[Ubuntu Touch Ports to Android] EtherealRemnant:
Just curious... Have you done the tags at 10.1-mr1? That's what UT uses as a base. I got sound and camera by telling room service to just grab mr1

Sent from my SGH-T999
[Ubuntu Touch Ports to Android] alroger:
No, I don't think we have that for the p1. I used what I use to build CM10.1 regularly.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="humberos/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />
<project name="humberos/android_kernel_samsung_aries" path="kernel/samsung/aries" remote="github" revision="cm-10.1" />
<project name="humberos/android_device_samsung_p1" path="device/samsung/p1" remote="github" revision="cm-10.1" />
<project name="humberos/android_device_samsung_p1-common" path="device/samsung/p1-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
</manifest>
[Ubuntu Touch Ports to Android] MikeCriggs:
10.1 and mr1 are synonymous, though. Why separate trees and etc?
[Ubuntu Touch Ports to Android] alroger:
Actually, it's the sgt7 repo with humberos' kernel, no the official one... but you can change humberos for CyanogenMod and all works the same.
[Ubuntu Touch Ports to Android] EtherealRemnant:
UT forked the source at M1. The updated code beyond that for most devices won't build. It is necessary to define refs/tags/cm-10.1-m1 in roomservice if you want an error free build. Now I am speaking strictly on d2tmo and spyder.

I have gotten d2tmo to build up to m3 but syncing the generic 10.1 results in a failed build.

Either way for troubleshooting purposes, defining the revision as m1 is the best way to make a compatible kernel.

Another thing to note is that even if you build a kernel beyond m1, you have a chance of the newest drivers not working. Ie, I lost camera and sound on my m2 and m3 builds.