maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview (https://talk.maemo.org/showthread.php?t=96932)

mautz 2019-11-13 01:37

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
No, do not abort. You need the complete Cyanogenmod source not only the Nexus specific device bits.

edp17 2019-11-13 02:01

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
My 100GB /home ran out of space again. :mad:
I deleted everything from $ANDROID_ROOT, updated my local manifest to point to John's repos and re-run the repo init and the sync. The sync is running but I am going to get some sleep. Hopefully by the morning I will have everything is downloaded again and at the night I can try to compile the kernel again. (Unless I fall asleep. :o)

edp17 2019-11-13 02:09

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561917)
No, do not abort. You need the complete Cyanogenmod source not only the Nexus specific device bits.

I wanted to let it run but finally I had no other choice. Very sorry about wasting your time, I really do! But a fresh start will be better.
(I am not sure why the disk has filled up though. Maybe when I changed the local manifest and re-run the sync it kept all the previous stuff.) I am just watching the console where the syn is running and seemingly it is downloading stuff for cm-11.0 and sony and other devices. Hmm. I think this happened when I used the cm-12.1 branch from the CM too. I will check in the morning.

I use this in my local manifest now:
Code:

<project path="device/lge/hammerhead" name="RealJohnGalt/android_device_lge_hammerhead" revision="cm-12.1" />
<project path="kernel/lge/hammerhead" name="RealJohnGalt/android_kernel_lge_hammerhead" revision="cm-12.1" />

Edit: Everything is nicely downloaded:
Code:

Checking out files: 100% (195/195), done.
Syncing work tree: 100% (172/172), done.

And only 29GB used. So far so good. :)

Edit2: The kernel compilation also is nicely done:
Code:

#### make completed successfully (03:10 (mm:ss)) ####
:D
Now, I can step forward to try building the HAL! :cool:

mautz 2019-11-13 08:21

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
That's what i call good news :)

But with this hammerhead.xml file, you downloaded the normal cm12.1 base and not the modified version from John ;)

edp17 2019-11-13 08:46

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561921)
That's what i call good news :)

But with this hammerhead.xml file, you downloaded the normal cm12.1 base and not the modified version from John ;)

Oops! Which one was his version? The hybris-12.1 or staging/cm-12.1 or one of the stable ones?
I have a feeling that I have to iterate this step a few times. :o

Before I started the compilation double checked the CONFIG_SECURITY_SELINUX_BOOTPARAM was unset and commented out and the CONFIG_AUDIT was not in there at all in the 'cyanogenmod_hammerhead_defconfig'.
I also added the selinux=0 at the end of BOARD_KERNEL_CMDLINE in 'BoardConfig.mk'.

edp17 2019-11-13 08:49

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561921)
That's what i call good news :)

But with this hammerhead.xml file, you downloaded the normal cm12.1 base and not the modified version from John ;)

Without you it probably would take much looooooooonger and harder. ;) Thank you!

Although I think dealing with the HAL also will be a bumpy ride. :rolleyes:

mautz 2019-11-13 08:55

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Did your kernel pass the mer-kernel-check?

Since cm12.1 is a relatively old base, i'll cross my fingers that ou'll don't run into heavy problems with the droid hal part!

edp17 2019-11-13 09:12

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561926)
Did your kernel pass the mer-kernel-check?

Since cm12.1 is a relatively old base, i'll cross my fingers that ou'll don't run into heavy problems with the droid hal part!

Unfortunately don't know whether it passes. I couldn't run that command because in the morning I had to stolen that time from my family to be able to compile the kernel and write the post here. :)
Hopefully I can continue this night.

Yes, this is an old base so in theory the one I downloaded should also work. I am also not at all sure about the differences between the original cm-12.1 and John's version. Plus I don't know the benefits/disadvantages of using this or that.

My current SFOS 2.0.4.13 installation is using cm-12.1-20160704-UNOFFICIAL-hammerhead-nocheck.zip base but honestly I don't have a clue whose fork is this. Plus what differences are (if there are any) between this base and the one I am about to build.

By the way, I am also not sure whether I can use the cm-12.1-20160704-UNOFFICIAL-hammerhead-nocheck.zip base with my Sailfish.zip once that is done.

So, I am totally :confused::confused: about these.

edp17 2019-11-13 23:33

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561926)
Did your kernel pass the mer-kernel-check?

Since cm12.1 is a relatively old base, i'll cross my fingers that ou'll don't run into heavy problems with the droid hal part!

Yes, the kernel passes the mer-kernel-check. (hybris/mer-kernel-check/mer_verify_kernel_config ./out/target/product/$DEVICE/obj/KERNEL_OBJ/.config)
Well, there are a lots of warning but no error.

edp17 2019-11-14 00:23

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
I have done steps
  • 6. SETTING UP SCRATCHBOX2 TARGET
  • 7.1 Creating Repositories for a New Device
and now I am at '7.2.1 Building the droid-hal-device packages'.
When I ran 'rpm/dhd/helpers/build_packages.sh' got an error:
Code:

Error building the cache:
[adaptation0|plugin:/ssu?repo=adaptation0] Valid metadata not found at specified URL
Some of the repositories have not been refreshed because of an error.
* Building rpm/droid-hal-hammerhead.spec
WARNING: CONFIG_BLK_CGROUP is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html

WARNING: CONFIG_ECRYPT_FS is invalid
It is unset
Allowed values : y, m, !
Comment says: optional extra filesystem (ecryptfs)

WARNING: CONFIG_SUNRPC is invalid
It is unset
Allowed values : y, m, !
Comment says: optional, for NFS support

error: Bad exit status from /var/tmp/rpm-tmp.McCUtC (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.McCUtC (%build)
* Check /home/edp17/mer/android/droid/droid-hal-hammerhead.log for full log.
!! building of package failed

To fix these, I guess, need to go back and change those values in the cyanogenmod_hammerhead_defconfig.

edp17 2019-11-14 00:28

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Well, I think it is easier to take John's defconfig and overwrite the one in the arch/arm/configs. Then recompile the kernel. and try this step again.

edp17 2019-11-14 00:34

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
I have taken John's defconfig and re-ran these:
Code:

source build/envsetup.sh
export USE_CCACHE=1
breakfast $DEVICE
make -j$(nproc --all) hybris-hal

but got an error:
Code:

:30:26: fatal error: mach/msm_rtb.h: No such file or directory
 #include <mach/msm_rtb.h>
                          ^
compilation terminated.

So, probably I need to download the whole kernel from John's repo and re-do the steps from 5.2. Oh my. :(

mautz 2019-11-14 01:03

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
John added many commits to the normal cm12.1 kernel, that is why his defconfig does not work.

I would stay with stock cm12.1 kernel and see if everything works in Sailfish, because you do not know what and why John added some commits and maybe they are not necessary anymore...

But if you want to try his kernel, kernel download is only around 300MB ;)

Just go through the list of mer kernel check and make the changes to your defconfig.
The necessary options can be found here: https://github.com/mer-hybris/mer-ke...el_config#L196

edp17 2019-11-14 01:08

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Okay. Rather than downloading the whole again, I only wanted to download John's kernel.
So, I changed the local manifest to point to John's kernel (into hybris-12.1 branch) and deleted the kernel folder in the android tree. Then I ran the 'repo sync --fetch-submodules' expecting it to download the kernel into the kernel subfolder. Instead of that, it gave me an error saying the branch 'hybris-12.1' doesn't exist. :mad:

Finally, I manually created the kernel/lge/hammerhead folders and manually cloned (git clone) John's kernel into it.

The kernel compiled fine with less warning. So far so good. :)

edp17 2019-11-14 01:15

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561957)
John added many commits to the normal cm12.1 kernel, that is why his defconfig does not work.

I would stay with stock cm12.1 kernel and see if everything works in Sailfish, because you do not know what and why John added some commits and maybe they are not necessary anymore...

But if you want to try his kernel, kernel download is only around 300MB ;)

Just go through the list of mer kernel check and make the changes to your defconfig.
The necessary options can be found here: https://github.com/mer-hybris/mer-ke...el_config#L196

Thank you. You probably are right. I have just compiled John's kernel and checked his defconfig. However CONFIG_BLK_CGROUP is defined ther, the other two (CONFIG_ECRYPT_FS and CONFIG_SUNRPC) are still not there.
But all of these were only warning, the error was somewhere else.
So, I am going back to use the cm-12.1 kernel. Then trying to fix the error that I got during the rpm packaging.
It looks like the problem is with the adaptation0 repo.

edp17 2019-11-14 01:23

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Now, I am back on kernel cm-12.1 and it compiled, passed the mer-chek. My scratchbox2 still works (compiles and runs the 'Hello World!' test program.) I re-ran the 'rpm/dhd/helpers/build_packages.sh' and got the same error. Now I am trying to fix this.

mautz 2019-11-14 01:36

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
You need to refresh the repositories in sb2.

Code:

sb2 -t $VENDOR-$DEVICE-$PORT_ARCH -m sdk-install -R zypper ref --force

edp17 2019-11-14 01:44

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561961)
You need to refresh the repositories in sb2.

Code:

sb2 -t $VENDOR-$DEVICE-$PORT_ARCH -m sdk-install -R zypper ref --force

I will do it. I found and (hopefully fixed the kernel errors) now am compiling it again. Then I refresh the scratchbox2 and continue.

Thank you for the link to the defconfig mer-kernel-check! It helped a lot! :D

Edit: It warned me when I re-compiled/ran the 'Hello world!' but it worked. But that time the kernel was the same. Now I changed some configs and recompiled so definitely need to refresh. ;)

mautz 2019-11-14 01:49

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Good work.

Sorry, i've misread the eror message, the packages do not need to be updated, there seems to be another problem. Try to ignore it and see if the build_packages script does its job.

edp17 2019-11-14 01:52

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561963)
Good work.

Sorry, i've misread the eror message, the packages do not need to be updated, there seems to be another problem. Try to ignore it and see if the build_packages script does its job.

No worries! :) I appreciate your help. Especially considering what the time currently is. Slowly but surely I'll get there. I hope it will work on the phone too. :rolleyes:

edp17 2019-11-14 02:00

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Interesting. The 'rpm/dhd/helpers/build_packages.sh' has errorred again with CONFIG_IKCONFIG_PROC is invalid (unset) however it's value is y in the defconfig. Hmm. :eek:

mautz 2019-11-14 02:05

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Take a look at the .config file in the kernel folder. Is it still set to y in this file?

It is always a good idea to look at LinuxKernelDriverDatabase when you get such errors.

https://cateee.net/lkddb/web-lkddb/IKCONFIG_PROC.html

There you can see this options dependencies. Check if these are set to y too.

edp17 2019-11-14 02:11

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561966)
Take a look at the .config file in the kernel folder. Is it still set to y in this file?

It is always a good idea to look at LinuxKernelDriverDatabase when you get such errors.

https://cateee.net/lkddb/web-lkddb/IKCONFIG_PROC.html

There you can see this options dependencies. Check if these are set to y too.

Good point!
But both (CONFIG_IKCONFIG_PROC and CONFIG_PROC_FS) are set to y in the defconfig.

Yeah, I missed the doc says CONFIG_IKCONFIG && CONFIG_PROC_FS not CONFIG_IKCONFIG_PROC. :o

I should have been doing this during the day when I am fresher. :D

edp17 2019-11-14 02:25

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
I have found it. However the error says:
Code:

ERROR: CONFIG_IKCONFIG_PROC is invalid
It is unset
Allowed values : y
Comment says: Required by hybris-boot init-script

it was not referring to CONFIG_IKCONFIG_PROC (which was set to y in the config) but to CONFIG_IKCONFIG which was unset indeed.

Now, kernel config fixed, kernel recompiled and the 'rpm/dhd/helpers/build_packages.sh' is running. :D

edp17 2019-11-14 02:49

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
It takes for ages. :( It currently is building the ngf-plugin-native-vibrator.spec.
I need some sleep. Will report tomorrow.
Again big THANK YOU for @mautz!!! :D

edp17 2019-11-14 06:37

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
It looks like the process stuck at building the ngfd-plugin-native-vibrator.spec. I has been doing that step for 4.5 hours.

mautz 2019-11-14 07:40

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Then you need to restart it, i think libhybris takes the most time to build.

edp17 2019-11-14 08:04

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561973)
Then you need to restart it, i think libhybris takes the most time to build.

I thought so, but didn't expect the script hanging at one step for over 3 hours. :rolleyes:

I have double checked the relevant section in hadk-faq.
It suggests to change some values in 'patterns/templates/jolla-hw-adaptation-@DEVICE@.yaml'
I have checked both and they are already set as
Code:

ngfd-plugin-native-vibrator
qt5-feedback-haptics-native-vibrator

(I have found a commit here which is about the same change.)
So, I did the 'sb2 -t $VENDOR-$DEVICE-$PORT_ARCH -m sdk-install -R zypper rm ngfd-plugin-droid-vibrator' what the hadk-faq suggested and restarted the 'rpm/dhd/helpers/build_packages.sh'.

It will have about 8 hours to run while I get home, so I am very curious about the result. :)

edp17 2019-11-14 08:06

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
My other concern is the message
Code:

Repository 'adaptation0' is invalid.
[adaptation0|plugin:/ssu?repo=adaptation0] Valid metadata not found at specified URL

But it might be a red herring and not at all relevant to that hanging script.

edp17 2019-11-14 08:12

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
It is much much better! Now it already has passed the step 'ngfd-plugin-native-vibrator.spec' where it previously hang. How that wonderful would be if it completes in an hour and I can start building the image. In that case in this evening I might can flash it on the phone to try. :eek:

edp17 2019-11-14 08:22

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
It has completed!
I guess this is not an error
Code:

Pool started (with 5 workers)
Pool finished
DBus unavailable, falling back to libssu
* Check /home/edp17/mer/android/droid/hybris/droid-hal-version-hammerhead.log for full log.
!! Please set the desired RELEASE variable in ~/.hadk.env to build an image for


edp17 2019-11-14 08:28

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
...and the step '8.5 Building the Image with MIC' has also started. :cool:

Edit1: "Info[11/14 08:50:07] : Finished." :cool: :D :D :D

Edit2: Installed on the phone. :)

Edit3: ... but it doesn't boot. :( and cannot be ssh to the phone either. :confused:
Anyway, ...to be continued. :)

mautz 2019-11-14 09:07

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
And does it work?

edp17 2019-11-14 09:43

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561981)
And does it work?

No, it stuck at Google logo. Plus cannot be access via ssh from the PC. I have rebooted twice and waited over 20 minutes each time. The little led at the bottom either not light up.
I have flashed with the cm-12.1-20160704-UNOFFICIAL-hammerhead-nocheck.zip base (mentioned here). That might can cause this behaviour?

mautz 2019-11-14 10:02

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
I don't think so, looks like there are some things missing in the kernel. Can you telnet into the device via USB(192.168.2.25:23)?

edp17 2019-11-14 10:29

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561984)
I don't think so, looks like there are some things missing in the kernel. Can you telnet into the device via USB(192.168.2.25:23)?

I will try to telnet into it once I am at home.

The hadk says all errors can be ignored if the zip file is generated. Maybe it is not entirely true :). I have went through the kernel log file but there is no error just warnings. Plus I didn't get any error messages on the screen during the build or maybe they written out into files that I didn't check. :rolleyes:

Now I am downloading an older cm-12.1 image (a snapshot from 2015) and trying that.
I will report once downloaded, installed and tested.

Edit: The cm-12.1 image (snapshot 2015) that I had didn't install. (The TWRP rebooted itself when tried to flash with the sailfish image.)
Therefore I re-installed the cm-12.1 (20160704-UNOFFICIAL) with the new Sailfish image. Later I will try to telnet into it.

edp17 2019-11-14 20:05

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561984)
I don't think so, looks like there are some things missing in the kernel. Can you telnet into the device via USB(192.168.2.25:23)?

Telnet doesn't work either. I tried with name, with IP address, with and without the port number: 'Unable to connect to remote host: No route to host'
However I can ping the device, so it somehow is connected to the PC.

(I tried IP 192.168.2.15 not 192.168.2.25.)

The 'lsusb' sees the device:
Code:

Bus 002 Device 010: ID 18d1:d001 Google Inc.
and the 'usb-devices' too:
Code:

T:  Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=18d1 ProdID=d001 Rev=02.32
S:  Manufacturer=Mer Boat Loader
S:  Product=init-debug in real rootfs
S:  SerialNumber=Mer Debug telnet on port 2323 on rndis0 192.168.2.15 - also running udhcpd
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=ff Driver=rndis_host
I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host


mautz 2019-11-14 20:30

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Code:

Mer Debug telnet on port 2323 on rndis0 192.168.2.15 - also running udhcpd
Have you tried telnet 192.168.2.15:2323 ?

edp17 2019-11-14 21:09

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1561997)
Code:

Mer Debug telnet on port 2323 on rndis0 192.168.2.15 - also running udhcpd
Have you tried telnet 192.168.2.15:2323 ?

Yes, I tried. As the same as with port 23. :(

Edit: Well, almost the same:
Code:

could not resolve 192.168.2.15:2323/telnet: Name or service not known

edp17 2019-11-14 21:16

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
adb devices shows nothing:
Code:

edp17@edp17-ubuntu:~$ adb devices
List of devices attached

edp17@edp17-ubuntu:~$



All times are GMT. The time now is 13:52.

vBulletin® Version 3.8.8