OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Compile kernel inside gemini : Is it possible ?
galodoido
post Jun 6 2018, 07:57 AM
Post #1





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



Hi.
I've tried to compile the kernel as described in another post .

For the community modified kernel:
https://github.com/gemian/gemini-linux-kernel-3.18

How to build:
https://github.com/gemian/gemini-keyboard-a...rnelCompilation

How to flash (from device):
https://github.com/gemian/gemini-keyboard-a...date-the-kernel


But I've tried inside gemini.
Unfortunately, it is not possible inside gemini.
Only outside,from an external pc with linux ( with success )

I think it was because aarch64-linux-gnu gcc will not run on arm64 plattaform.
Is there a way to compile inside gemini ?
I need linux headers to compile video4linux.
Maybe the camera will work with video4linux.
Maybe there is kernel with files to compile directly inside the gemini ( Makefile and a full tree of files ).

Thank you all

Go to the top of the page
 
+Quote Post
Murple2
post Jun 6 2018, 08:38 AM
Post #2





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



QUOTE(galodoido @ Jun 6 2018, 04:57 PM) *
Hi.
I've tried to compile the kernel as described in another post .

For the community modified kernel:
https://github.com/gemian/gemini-linux-kernel-3.18

How to build:
https://github.com/gemian/gemini-keyboard-a...rnelCompilation

How to flash (from device):
https://github.com/gemian/gemini-keyboard-a...date-the-kernel


But I've tried inside gemini.
Unfortunately, it is not possible inside gemini.
Only outside,from an external pc with linux ( with success )

I think it was because aarch64-linux-gnu gcc will not run on arm64 plattaform.
Is there a way to compile inside gemini ?
I need linux headers to compile video4linux.
Maybe the camera will work with video4linux.
Maybe there is kernel with files to compile directly inside the gemini ( Makefile and a full tree of files ).

Thank you all

you just need gcc installed and the full kernel source. you only need aarch64-linux-gnu gcc if compiling on a different platform e.g. x64
Go to the top of the page
 
+Quote Post
galodoido
post Jun 6 2018, 08:39 AM
Post #3





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(Murple2 @ Jun 6 2018, 01:38 PM) *
QUOTE(galodoido @ Jun 6 2018, 04:57 PM) *
Hi.
I've tried to compile the kernel as described in another post .

For the community modified kernel:
https://github.com/gemian/gemini-linux-kernel-3.18

How to build:
https://github.com/gemian/gemini-keyboard-a...rnelCompilation

How to flash (from device):
https://github.com/gemian/gemini-keyboard-a...date-the-kernel


But I've tried inside gemini.
Unfortunately, it is not possible inside gemini.
Only outside,from an external pc with linux ( with success )

I think it was because aarch64-linux-gnu gcc will not run on arm64 plattaform.
Is there a way to compile inside gemini ?
I need linux headers to compile video4linux.
Maybe the camera will work with video4linux.
Maybe there is kernel with files to compile directly inside the gemini ( Makefile and a full tree of files ).

Thank you all

you just need gcc installed and the full kernel source. you only need aarch64-linux-gnu gcc if compiling on a different platform e.g. x64

Go to the top of the page
 
+Quote Post
galodoido
post Jun 6 2018, 08:43 AM
Post #4





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(galodoido @ Jun 6 2018, 01:39 PM) *
QUOTE(Murple2 @ Jun 6 2018, 01:38 PM) *
QUOTE(galodoido @ Jun 6 2018, 04:57 PM) *
Hi.
I've tried to compile the kernel as described in another post .

For the community modified kernel:
https://github.com/gemian/gemini-linux-kernel-3.18

How to build:
https://github.com/gemian/gemini-keyboard-a...rnelCompilation

How to flash (from device):
https://github.com/gemian/gemini-keyboard-a...date-the-kernel


But I've tried inside gemini.
Unfortunately, it is not possible inside gemini.
Only outside,from an external pc with linux ( with success )

I think it was because aarch64-linux-gnu gcc will not run on arm64 plattaform.
Is there a way to compile inside gemini ?
I need linux headers to compile video4linux.
Maybe the camera will work with video4linux.
Maybe there is kernel with files to compile directly inside the gemini ( Makefile and a full tree of files ).

Thank you all

you just need gcc installed and the full kernel source. you only need aarch64-linux-gnu gcc if compiling on a different platform e.g. x64



I have all the needed files to compile including gcc.
But the kernel source provided ( as described above ) when compiling, asks for aarch64-linux-gnu gcc.
This is the problem.
Thank you again.

Go to the top of the page
 
+Quote Post
galodoido
post Jun 6 2018, 08:45 AM
Post #5





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(galodoido @ Jun 6 2018, 01:43 PM) *
QUOTE(galodoido @ Jun 6 2018, 01:39 PM) *
QUOTE(Murple2 @ Jun 6 2018, 01:38 PM) *
QUOTE(galodoido @ Jun 6 2018, 04:57 PM) *
Hi.
I've tried to compile the kernel as described in another post .

For the community modified kernel:
https://github.com/gemian/gemini-linux-kernel-3.18

How to build:
https://github.com/gemian/gemini-keyboard-a...rnelCompilation

How to flash (from device):
https://github.com/gemian/gemini-keyboard-a...date-the-kernel


But I've tried inside gemini.
Unfortunately, it is not possible inside gemini.
Only outside,from an external pc with linux ( with success )

I think it was because aarch64-linux-gnu gcc will not run on arm64 plattaform.
Is there a way to compile inside gemini ?
I need linux headers to compile video4linux.
Maybe the camera will work with video4linux.
Maybe there is kernel with files to compile directly inside the gemini ( Makefile and a full tree of files ).

Thank you all

you just need gcc installed and the full kernel source. you only need aarch64-linux-gnu gcc if compiling on a different platform e.g. x64



I have all the needed files to compile including gcc.
But the kernel source provided ( as described above ) when compiling, asks for aarch64-linux-gnu gcc.
This is the problem.
Thank you again.


And aarch64-linux-gnu gcc doens't work on arm64 plattaform.
I think the tree is not complete and Makefile , Kbuild or other files make reference to aarch64-linux-gnu gcc.
Thank you again.
Go to the top of the page
 
+Quote Post
Murple2
post Jun 6 2018, 10:50 AM
Post #6





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



QUOTE(galodoido @ Jun 6 2018, 05:45 PM) *
And aarch64-linux-gnu gcc doens't work on arm64 plattaform.
I think the tree is not complete and Makefile , Kbuild or other files make reference to aarch64-linux-gnu gcc.
Thank you again.


That is because it is configured to be built on a different platform from the Gemini, for speed as much as anything else. You only need aarch64-linux-gnu toolchain if you are cross compiling (e.g compiling on a different architecture like your desktop PC), seeing as you are compiling on native hardware you need to remove references to that toolchain and just use gcc.
Go to the top of the page
 
+Quote Post
galodoido
post Jun 6 2018, 11:11 AM
Post #7





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(Murple2 @ Jun 6 2018, 03:50 PM) *
QUOTE(galodoido @ Jun 6 2018, 05:45 PM) *
And aarch64-linux-gnu gcc doens't work on arm64 plattaform.
I think the tree is not complete and Makefile , Kbuild or other files make reference to aarch64-linux-gnu gcc.
Thank you again.


That is because it is configured to be built on a different platform from the Gemini, for speed as much as anything else. You only need aarch64-linux-gnu toolchain if you are cross compiling (e.g compiling on a different architecture like your desktop PC), seeing as you are compiling on native hardware you need to remove references to that toolchain and just use gcc.


Ok.
Problem is really to remove these references.
In what files they are and if the kernel tree is also complete ( I am doubt about this ).
When I have a time I will try to investigate those files.
Maybe the kernel administrator already have this kernel tree with correct references for the arm64 platafform
Thank you again.

Go to the top of the page
 
+Quote Post
galodoido
post Jun 6 2018, 06:05 PM
Post #8





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(galodoido @ Jun 6 2018, 04:11 PM) *
QUOTE(Murple2 @ Jun 6 2018, 03:50 PM) *
QUOTE(galodoido @ Jun 6 2018, 05:45 PM) *
And aarch64-linux-gnu gcc doens't work on arm64 plattaform.
I think the tree is not complete and Makefile , Kbuild or other files make reference to aarch64-linux-gnu gcc.
Thank you again.


That is because it is configured to be built on a different platform from the Gemini, for speed as much as anything else. You only need aarch64-linux-gnu toolchain if you are cross compiling (e.g compiling on a different architecture like your desktop PC), seeing as you are compiling on native hardware you need to remove references to that toolchain and just use gcc.


Ok.
Problem is really to remove these references.
In what files they are and if the kernel tree is also complete ( I am doubt about this ).
When I have a time I will try to investigate those files.
Maybe the kernel administrator already have this kernel tree with correct references for the arm64 platafform
Thank you again.


Only to inform :
I needed linux headers to compile video4linux.
Maybe the camera could work with video4linux.
But after I copied the tree of KERNEL_OUT ( after it was compiled in my macbook air with dual boot mac and linux ) to the gemini, I decided to run :"make modules" to build the modules . I supposed after the compilation, things would be better, but I saw that this kernel was compiled without modules support ( for some reason ).
I hope the new kernel provided is compiled with modules support and with all kernel headers available .
Go to the top of the page
 
+Quote Post
Beiriannydd
post Jun 6 2018, 09:47 PM
Post #9





Group: Members
Posts: 28
Joined: 5-January 18
Member No.: 815,894



QUOTE(galodoido @ Jun 6 2018, 07:05 PM) *
Only to inform :
I needed linux headers to compile video4linux.
Maybe the camera could work with video4linux.
But after I copied the tree of KERNEL_OUT ( after it was compiled in my powerbook with dual boot mac and linux ) to the gemini, I decided to run :"make modules" to build the modules . I supposed after the compilation, things would be better, but I saw that this kernel was compiled without modules support ( for some reason ).
I hope the new kernel provided is compiled with modules support and with all kernel headers available .

If you make menuconfig you will see that the gcc prefix is specified there. You can edit the config file and search for the prefix (without gcc) and you can remove it.
Go to the top of the page
 
+Quote Post
galodoido
post Jun 7 2018, 05:46 AM
Post #10





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(Beiriannydd @ Jun 7 2018, 02:47 AM) *
QUOTE(galodoido @ Jun 6 2018, 07:05 PM) *
Only to inform :
I needed linux headers to compile video4linux.
Maybe the camera could work with video4linux.
But after I copied the tree of KERNEL_OUT ( after it was compiled in my powerbook with dual boot mac and linux ) to the gemini, I decided to run :"make modules" to build the modules . I supposed after the compilation, things would be better, but I saw that this kernel was compiled without modules support ( for some reason ).
I hope the new kernel provided is compiled with modules support and with all kernel headers available .

If you make menuconfig you will see that the gcc prefix is specified there. You can edit the config file and search for the prefix (without gcc) and you can remove it.


Thank you .
Unfortunately inside gemini is not possible to run make menuconfig. The display is too small and an alert says that is not possible to run it.
But I've tried cross-compiling from my macbook with linux and if I change aeon6797_6m_n_halium_defconfig ( that generates a .config file ) the kernel does not compile. A number of errors are displayed. I've changed only to enable module support ( in menuconfig ). I think if .config file is different from aeon6797_6m_n_halium_defconfig ( even a little bit difference ) prevents from compiling the kernel.
Go to the top of the page
 
+Quote Post
Beiriannydd
post Jun 8 2018, 06:20 AM
Post #11





Group: Members
Posts: 28
Joined: 5-January 18
Member No.: 815,894



QUOTE(galodoido @ Jun 7 2018, 06:46 AM) *
QUOTE(Beiriannydd @ Jun 7 2018, 02:47 AM) *
QUOTE(galodoido @ Jun 6 2018, 07:05 PM) *
Only to inform :
I needed linux headers to compile video4linux.
Maybe the camera could work with video4linux.
But after I copied the tree of KERNEL_OUT ( after it was compiled in my powerbook with dual boot mac and linux ) to the gemini, I decided to run :"make modules" to build the modules . I supposed after the compilation, things would be better, but I saw that this kernel was compiled without modules support ( for some reason ).
I hope the new kernel provided is compiled with modules support and with all kernel headers available .

If you make menuconfig you will see that the gcc prefix is specified there. You can edit the config file and search for the prefix (without gcc) and you can remove it.


Thank you .
Unfortunately inside gemini is not possible to run make menuconfig. The display is too small and an alert says that is not possible to run it.
But I've tried cross-compiling from my macbook with linux and if I change aeon6797_6m_n_halium_defconfig ( that generates a .config file ) the kernel does not compile. A number of errors are displayed. I've changed only to enable module support ( in menuconfig ). I think if .config file is different from aeon6797_6m_n_halium_defconfig ( even a little bit difference ) prevents from compiling the kernel.


Enabling module support is quite a big change. I would compare configurations before and after. It is possible that it then builds some of the other parts which were built in before as modules. You must make sure that none of the parts required before mounting disks (and therefore being able to load modules) are built as modules otherwise you would need to update the initial ramdisk with your modules.

I have a relatively giant screen on my Gemini in Termux under android if I want using screen pinch gestures to change the font size. On this reply box in Chrome I have 18 lines of text with plenty of room above and below. There are enough pixels to clearly display this because it is a 1080p display. I am not using Gemini to compile kernels because the machine is precious to me and without adequate cooling, I worry about prolonged heat from full cpu use and battery cycles or constant charging. I have an ODroid C2 I could try this on for you at the weekend however. As an Armv8 machine, it is similar enough to test a kernel compile.
Go to the top of the page
 
+Quote Post
galodoido
post Jun 8 2018, 07:37 AM
Post #12





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(Beiriannydd @ Jun 8 2018, 11:20 AM) *
QUOTE(galodoido @ Jun 7 2018, 06:46 AM) *
QUOTE(Beiriannydd @ Jun 7 2018, 02:47 AM) *
QUOTE(galodoido @ Jun 6 2018, 07:05 PM) *
Only to inform :
I needed linux headers to compile video4linux.
Maybe the camera could work with video4linux.
But after I copied the tree of KERNEL_OUT ( after it was compiled in my powerbook with dual boot mac and linux ) to the gemini, I decided to run :"make modules" to build the modules . I supposed after the compilation, things would be better, but I saw that this kernel was compiled without modules support ( for some reason ).
I hope the new kernel provided is compiled with modules support and with all kernel headers available .

If you make menuconfig you will see that the gcc prefix is specified there. You can edit the config file and search for the prefix (without gcc) and you can remove it.


Thank you .
Unfortunately inside gemini is not possible to run make menuconfig. The display is too small and an alert says that is not possible to run it.
But I've tried cross-compiling from my macbook with linux and if I change aeon6797_6m_n_halium_defconfig ( that generates a .config file ) the kernel does not compile. A number of errors are displayed. I've changed only to enable module support ( in menuconfig ). I think if .config file is different from aeon6797_6m_n_halium_defconfig ( even a little bit difference ) prevents from compiling the kernel.


Enabling module support is quite a big change. I would compare configurations before and after. It is possible that it then builds some of the other parts which were built in before as modules. You must make sure that none of the parts required before mounting disks (and therefore being able to load modules) are built as modules otherwise you would need to update the initial ramdisk with your modules.

I have a relatively giant screen on my Gemini in Termux under android if I want using screen pinch gestures to change the font size. On this reply box in Chrome I have 18 lines of text with plenty of room above and below. There are enough pixels to clearly display this because it is a 1080p display. I am not using Gemini to compile kernels because the machine is precious to me and without adequate cooling, I worry about prolonged heat from full cpu use and battery cycles or constant charging. I have an ODroid C2 I could try this on for you at the weekend however. As an Armv8 machine, it is similar enough to test a kernel compile.


Ok . Thank you.
I reduced the size of terminal ( fonts ) and I was able to do make menuconfig. But using the same (.config ) and compiling with internal gcc ( as suggested by Beiriannydd ) and enabling only kernel module support , I can't compile the kernel. Some errors at the end.
Go to the top of the page
 
+Quote Post
Beiriannydd
post Jun 8 2018, 10:37 PM
Post #13





Group: Members
Posts: 28
Joined: 5-January 18
Member No.: 815,894



QUOTE(galodoido @ Jun 8 2018, 08:37 AM) *
Ok . Thank you.
I reduced the size of terminal ( fonts ) and I was able to do make menuconfig. But using the same (.config ) and compiling with internal gcc ( as suggested by Beiriannydd ) and enabling only kernel module support , I can't compile the kernel. Some errors at the end.

You will have to paste the errors or we can't help you. There could be any number of issues.
Go to the top of the page
 
+Quote Post
galodoido
post Jun 9 2018, 04:08 AM
Post #14





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(Beiriannydd @ Jun 9 2018, 03:37 AM) *
QUOTE(galodoido @ Jun 8 2018, 08:37 AM) *
Ok . Thank you.
I reduced the size of terminal ( fonts ) and I was able to do make menuconfig. But using the same (.config ) and compiling with internal gcc ( as suggested by Beiriannydd ) and enabling only kernel module support , I can't compile the kernel. Some errors at the end.

You will have to paste the errors or we can't help you. There could be any number of issues.

I decided to compile in my macbook. It is fast. But the error is the same.

First I have to create a dir named tools in /kernel-3.18/tools
An error saying that dir tools does not exist. So the dir after the creation is /kernel-3.18/tools/tools.
Then the compilation starts and finished without notice of errors.
But scrolling the compilation I saw this error :
CC sound/usb/proc.o
In file included from drivers/misc/mediatek/base/power/mt6797/mt_eem.c:1036:0:
drivers/misc/mediatek/base/power/mt6797/../../../include/mt-plat/mt6797/include/mach/mt_thermal.h:27:24: fatal error: mt_gpufreq.h: No such file or directory
#include "mt_gpufreq.h"
^
compilation terminated.
scripts/Makefile.build:257: recipe for target 'drivers/misc/mediatek/base/power/mt6797/mt_eem.o' failed
make[6]: *** [drivers/misc/mediatek/base/power/mt6797/mt_eem.o] Error 1
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek/base/power/mt6797' failed
make[5]: *** [drivers/misc/mediatek/base/power/mt6797] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek/base/power' failed
make[4]: *** [drivers/misc/mediatek/base/power] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek/base' failed
make[3]: *** [drivers/misc/mediatek/base] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek' failed
make[2]: *** [drivers/misc/mediatek] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc' failed
make[1]: *** [drivers/misc] Error 2
Makefile:939: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC sound/usb/quirks.o
CC net/ipv6/af_inet6.o
Interesting is the .config file is the same I use when compiling following this instructions below; The difference is that I am compiling inside the tree kernel-3.18 and not to a KERNEL_OUT dir.

https://www.oesf.org/forum/index.php?act=Po...amp;qpid=286798

$ make O=../KERNEL_OUT -C kernel-3.18 ARCH=arm64 aeon6797_6m_n_halium_defconfig
$ make O=../KERNEL_OUT -C kernel-3.18 ARCH=arm64 CROSS_COMPILE=../aarch64-linux-android-4.9/bin/aarch64-linux-android- -j8

Thank you again
Go to the top of the page
 
+Quote Post
galodoido
post Jun 9 2018, 05:50 AM
Post #15





Group: Members
Posts: 156
Joined: 13-May 18
Member No.: 822,555



QUOTE(galodoido @ Jun 9 2018, 09:08 AM) *
QUOTE(Beiriannydd @ Jun 9 2018, 03:37 AM) *
QUOTE(galodoido @ Jun 8 2018, 08:37 AM) *
Ok . Thank you.
I reduced the size of terminal ( fonts ) and I was able to do make menuconfig. But using the same (.config ) and compiling with internal gcc ( as suggested by Beiriannydd ) and enabling only kernel module support , I can't compile the kernel. Some errors at the end.

You will have to paste the errors or we can't help you. There could be any number of issues.

I decided to compile in my macbook. It is fast. But the error is the same.

First I have to create a dir named tools in /kernel-3.18/tools
An error saying that dir tools does not exist. So the dir after the creation is /kernel-3.18/tools/tools.
Then the compilation starts and finished without notice of errors.
But scrolling the compilation I saw this error :
CC sound/usb/proc.o
In file included from drivers/misc/mediatek/base/power/mt6797/mt_eem.c:1036:0:
drivers/misc/mediatek/base/power/mt6797/../../../include/mt-plat/mt6797/include/mach/mt_thermal.h:27:24: fatal error: mt_gpufreq.h: No such file or directory
#include "mt_gpufreq.h"
^
compilation terminated.
scripts/Makefile.build:257: recipe for target 'drivers/misc/mediatek/base/power/mt6797/mt_eem.o' failed
make[6]: *** [drivers/misc/mediatek/base/power/mt6797/mt_eem.o] Error 1
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek/base/power/mt6797' failed
make[5]: *** [drivers/misc/mediatek/base/power/mt6797] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek/base/power' failed
make[4]: *** [drivers/misc/mediatek/base/power] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek/base' failed
make[3]: *** [drivers/misc/mediatek/base] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc/mediatek' failed
make[2]: *** [drivers/misc/mediatek] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/misc' failed
make[1]: *** [drivers/misc] Error 2
Makefile:939: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC sound/usb/quirks.o
CC net/ipv6/af_inet6.o
Interesting is the .config file is the same I use when compiling following this instructions below; The difference is that I am compiling inside the tree kernel-3.18 and not to a KERNEL_OUT dir.

https://www.oesf.org/forum/index.php?act=Po...amp;qpid=286798

$ make O=../KERNEL_OUT -C kernel-3.18 ARCH=arm64 aeon6797_6m_n_halium_defconfig
$ make O=../KERNEL_OUT -C kernel-3.18 ARCH=arm64 CROSS_COMPILE=../aarch64-linux-android-4.9/bin/aarch64-linux-android- -j8

Thank you again


compiled only the modules with success ( make modules ).
but when sudo modprobe " some module " an error : could not insert "some module " . Exec format error.
thank you.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2019 - 10:28 PM