maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   N9 kernel Update Project (https://talk.maemo.org/showthread.php?t=95431)

mfiskindal 2015-04-29 04:05

N9 kernel Update Project
 
Hello sailors,
I complete the process in GitHub.
https://github.com/nemomobile/kernel-adaptation-n950-n9
I'm compiling to kernel with sb2 arm compliler.

I get stuck at some point.

https://wiki.merproject.org/wiki/N9_...update_project

"Build instructions from git" I proceed from the point.

user@SDK:~$ sudo su
[sudo] password for user:
root@SDK:/home/user# /srv/mer/
sdks/ targets/
root@SDK:/home/user# /srv/mer/
sdks/ targets/
root@SDK:/home/user# /srv/mer/sdks/sdk/mer-sdk-chroot
Mounting system directories...
Mounting / as /parentroot
Mounting home directory: /home/user
Entering chroot as user
sailor@SDK:~$ su
Password:
[root@SDK user]# /srv/mer/targets/n950rootfs/
bash: /srv/mer/targets/n950rootfs/: is a directory
[root@SDK user]# cd /srv/mer/targets/n950rootfs/
[root@SDK n950rootfs]# sb2-init -L "--sysroot=/" -C "--sysroot=/" -c /usr/bin/qemu-arm-dynamic -m sdk-build -n -N -t / nemo-n950 /opt/cross/bin/armv7hl-meego-linux-gnueabi-gcc
Using /opt/cross/bin/armv7hl-meego-linux-gnueabi-gcc to detect target architecture:
collect2: cannot find 'ld'
Finished writing sb2.gcc.config
gcc configured.
sb2-init: Target architecture is 'armv7hl'
sb2-init: Host architecture is 'i[3456]86'
Finished writing sb2.config
sb2-init: Creating Debian build system settings for this target:
[root@SDK n950rootfs]# cd usr/src/
debug/ kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1/
kernel-adaptation-n950-n9-master/ kernels/
[root@SDK n950rootfs]# cd usr/src/
debug/ kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1/
kernel-adaptation-n950-n9-master/ kernels/
[root@SDK n950rootfs]# cd usr/src/kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1/
[root@SDK kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1]# sb2 make n9_mer_defconfig
sb2: Error: Invalid target specified, aborting.
[root@SDK kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1]# sb2 make -j4 zImage
sb2: Error: Invalid target specified, aborting.
[root@SDK kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1]# sb2 make -j4 modules
sb2: Error: Invalid target specified, aborting.
[root@SDK kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1]# sb2 make modules_install INSTALL_MOD_PATH=./mods
sb2: Error: Invalid target specified, aborting.
[root@SDK kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1]#

juiceme 2015-04-29 05:51

Re: N9 kernel Update Project
 
I have not used scratchbox2 for compiling to N9 but it looks to me you have some misconfiguration in scratchbox itself.

mfiskindal 2015-04-29 06:38

Re: N9 kernel Update Project
 
It took 5 hours.

mfiskindal 2015-04-29 07:28

Re: N9 kernel Update Project
 
Is there a shortcut?

juiceme 2015-04-29 08:33

Re: N9 kernel Update Project
 
Quote:

Originally Posted by mfiskindal (Post 1468815)
It took 5 hours.

So you did manage to compile it after all?
What was the fix, reconfiguring scratchbox? Missing dependency?


Quote:

Originally Posted by mfiskindal (Post 1468821)
Is there a shortcut?

Do you mean is there an alternate way to compile the N9 kernel?
Yes, there are lots of ways you can do it. Using scratchbox is one, using just the crosscompiler without chrooting is another, and using native compiler on the device itself is third.

However compiling on any crosscompile-method on any decent PC hardware should not take 5 hours! Less than 30 minutes is something you'd expect.
(except if you are compiling on cygwin env under windoze or something silly like that... then it might as well take a week or so :eek:)

mfiskindal 2015-04-29 10:07

Re: N9 kernel Update Project
 
BusyBox v1.20.0.git (MeeGo 3:1.20-0.2+0m8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # cd kernel-adaptation-n950-n9-maste
r/
sh: cd: can't cd to kernel-adaptation-n950-n9-master/
/home/user # cd MyDocs/kernel-adaptation-n950-n
9-master/
/home/user/MyDocs/kernel-adaptation-n950-n9-mas/home/user/MyDocs/kernel-adaptation-n950-n9-master # make clean; make mrproper; ARCH=arm make
rm696_nemo_defconfig
CLEAN scripts/basic
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:106: fatal error: sys/types.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
/home/user/MyDocs/kernel-adaptation-n950-n9-master #

mfiskindal 2015-04-29 15:08

Re: N9 kernel Update Project
 
Only one problem has.
sudo ./copy_kernel.sh /<path-to>/<mounted>/<N9 filesystem>

mfiskindal 2015-04-29 15:09

Re: N9 kernel Update Project
 
I solved other problems.
It's about the n9_mer_defconfig file.

mfiskindal 2015-04-30 04:40

Re: N9 kernel Update Project
 
/boot dictionary in bzImage and ubiboot.conf file editing but not work 3.5.3 kernel

mfiskindal 2015-04-30 07:43

Re: N9 kernel Update Project
 
/rootfs/boot # ls -l
total 19304
lrwxrwxrwx 1 root root 6 Apr 30 07:18 bzImage -> zImage
-rwxr-xr-x 1 root root 3437368 Apr 30 07:18 zImage
-rw-r--r-- 1 29999 root 2777948 Mar 11 2014 zImage-2.6.32.54-dfl61-20121301
-rw-r--r-- 1 29999 root 2860652 Mar 11 2014 zImage.pr13
-rw-r--r-- 1 29999 root 2777924 Mar 11 2014 zImage_2.6.32.54-openmode_l2fix
-rw-r--r-- 1 29999 root 7899680 Mar 7 2014 zImage_2.6.32.54-ubiboot-02_040613
/rootfs/boot #

juiceme 2015-04-30 08:43

Re: N9 kernel Update Project
 
Did you also upload modules & do depmod on them?

mfiskindal 2015-04-30 11:55

Re: N9 kernel Update Project
 
How to upload modules ?

//Sorry my bad English :)
My pc in cd KernelDictionary and using depmod -a command.

Is it a wrong action?

juiceme 2015-04-30 19:22

Re: N9 kernel Update Project
 
Quote:

Originally Posted by mfiskindal (Post 1468972)
How to upload modules ?

First you need to compile modules of course. After compiling the kernel. do "make modules" and then "INSTALL_MOD_PATH=. make modules_install"

When you're done, you will find the modules under the lib/modules/<version_number> directory on your build directory.
Take a tar of the modules directory, untar it to /lib/modules/ of your device, and say "depmod -a <version_number>" in the <version_number> directory.

mfiskindal 2015-05-01 06:33

Re: N9 kernel Update Project
 
sb2 -t nemo-n950 make n9_mer_defconfig
sb2 -t nemo-n950 make -j4 zImage
sb2 -t nemo-n950 make -j4 modules
sb2 -t nemo-n950 make modules_install INSTALL_MOD_PATH=./mods

./prepare_modules.sh /media/user/rootfs
adding kernel header ...

using telnet
mv kernel archives rootfs
./copy_kernel.sh /<path-to>/<mounted>/<N9 filesystem

# The second OS is usually Harmattan.
# This section lists the Harmattan specific switches and kernels
G_OS2_NUM=5
G_OS2_AUTOBOOT=0
G_OS2_PARTITION=2
G_OS2_NAME="Harmattan"
G_OS2_1_LABEL="2.6.32.54 + fbconsole"
G_OS2_1_FILE="/boot/Harmattan/boot/Image-2.6.32.54-fbconsole"
G_OS2_2_LABEL="2.6.32.54 Nemo backport"
G_OS2_2_FILE="/boot/Harmattan/boot/zImage-2.6.32.54-juice_backport"
G_OS2_3_LABEL="Nitdroid pr13 kernel"
G_OS2_3_FILE="/boot/Harmattan/boot/zImage.pr13"
G_OS2_4_LABEL="Openmode + L2fix"
G_OS2_4_FILE="/boot/Harmattan/boot/zImage_2.6.32.54-openmode_l2fix"
G_OS2_5_LABEL="Linux Kernel 3.5.3"
G_OS2_5_FILE="/boot/Harmattan/boot/bzImage"
G_OS2_6_LABEL=""
G_OS2_6_FILE=""

mfiskindal 2015-05-01 06:36

Re: N9 kernel Update Project
 
I open bootloader then opens and MeeGo.
Flash red lights and turns off.

mfiskindal 2015-05-01 06:41

Re: N9 kernel Update Project
 
root@SDK:/home/user/Masaüstü/kernel-adaptation-n950-n9-nemo-n9-3.5.3.20130912.1#
sudo ./copy_kernel.sh /media/user/rootfs/
Copying modules
Copying zImage to /boot
linking /boot/bzImage to point to zImage instead of vmlinuz*
Copy done.

If you want to revert back to old kernel
change the bzImage symlink to point back to
original vmlinuz-2.6* file in /media/user/rootfs//boot dir

juiceme 2015-05-01 11:56

Re: N9 kernel Update Project
 
What does your ubiboot.log say, you can find some information from there why the loading fails.

mfiskindal 2015-05-01 12:17

Re: N9 kernel Update Project
 
https://www.dropbox.com/s/wvzah71bsd...iboot.log?dl=0

mfiskindal 2015-05-01 12:33

Re: N9 kernel Update Project
 
Device boot on Openmode l2fix kernel.

mfiskindal 2015-05-01 12:35

Re: N9 kernel Update Project
 
Do I need to delete the old modules? We will delete Or later?

juiceme 2015-05-01 16:08

Re: N9 kernel Update Project
 
Quote:

Originally Posted by mfiskindal (Post 1469107)

Thanks. According to the log, ubiboot found the kernel each time OK (both Harmattan boot and Nemo boot go correctly up to loading phase)
As it is, unfortunately ubiboot cannot detect problems that happen after loading the kernel, for example if there are problems loading the modules or running init.


Quote:

Originally Posted by mfiskindal (Post 1469109)
Do I need to delete the old modules? We will delete Or later?

No, if the kernel ID string (release, like what you see with "uname -r" command) is different in your new and old kernel, then you do not need to delete old modules.
When the kernel boots, it will try to load the modules from the directory named like release number, so the original N9 kernel will try to load from /lib/modules/2.6.32.54-dfl61-20121301, and the kernel-plus from /lib/modules/2.6.32.61-plus.
This way you can have multiple kernels to boot, each one will know to load its modules from its own module directory.

mfiskindal 2015-05-01 17:03

Re: N9 kernel Update Project
 
I'm selected kernel 3.5.3 on ubiboot menu .
nokia red lettering came out and closed.

juiceme 2015-05-01 21:02

Re: N9 kernel Update Project
 
Quote:

Originally Posted by mfiskindal (Post 1469132)
I'm selected kernel 3.5.3 on ubiboot menu .
nokia red lettering came out and closed.

If you have managed to upstream all the Nokia-specific changes done on N9-variant 2.6.32-54 to 3.5.3 series then I am really amazed!
After all it took real hard effort of a talented person (@Hurrian) to make the port from 2.6.32-54 to 2.6.32-61 !

What's your diff linecount? Can you publish your port, please?

hedayat 2015-05-02 16:32

Re: N9 kernel Update Project
 
juiceme: you can already get a working 3.5.3 kernel for N9 from filippz github repository, which is the kernel used in latest SFOS and Nemo images for N9. It's already available, and works!

mfiskindal 2015-05-02 19:22

Re: N9 kernel Update Project
 
I using 3.5.3 kernel with sfos and nemo working on N9.

juiceme 2015-05-02 19:26

Re: N9 kernel Update Project
 
Quote:

Originally Posted by hedayat (Post 1469200)
juiceme: you can already get a working 3.5.3 kernel for N9 from filippz github repository, which is the kernel used in latest SFOS and Nemo images for N9. It's already available, and works!

Ah OK, all the time I was thinking of kernel upgrade for Harmattan.
I assume that branch is not directly compatible with it?

lfc22 2015-05-03 18:22

Quote:

Originally Posted by juiceme (Post 1469214)
Ah OK, all the time I was thinking of kernel upgrade for Harmattan.
I assume that branch is not directly compatible with it?

In theory, if there was a Harmattan compatible 3.5.3 kernel, what sort of improvments would be possible for the OS/device?

juiceme 2015-05-03 19:19

Re: N9 kernel Update Project
 
Quote:

Originally Posted by lfc22 (Post 1469272)
In theory, if there was a Harmattan compatible 3.5.3 kernel, what sort of improvments would be possible for the OS/device?

Prominent Features in 3.0
Prominent Features in 3.1
Prominent Features in 3.2
Prominent Features in 3.3
Prominent Features in 3.4
Prominent Features in 3.5

mfiskindal 2015-05-04 14:06

Re: N9 kernel Update Project
 
How to install Wayland on SailfishOS ?

Is it possible to SailfishOS SDK? or Mer SDK ?

juiceme 2015-05-04 15:00

Re: N9 kernel Update Project
 
SFOS comes with Wayland already :)
In fact you cannot use it without :p

mfiskindal 2015-05-04 16:58

Re: N9 kernel Update Project
 
Applications crashes, this normal?

juiceme 2015-05-04 17:49

Re: N9 kernel Update Project
 
Quote:

Originally Posted by mfiskindal (Post 1469353)
Applications crashes, this normal?

Which applications?
Do they crash in startup or later?
Do you invoke start from launcher or from terminal?
What do you get in journal when an application crashes?
If started from terminal, what gets written to stdout/stderr?
etc... etc...?


All times are GMT. The time now is 23:34.

vBulletin® Version 3.8.8