* Cross Compile Kernel Modules
@ 2013-10-03 20:08 Parker Mackenzie
2013-10-03 20:29 ` Bruce Ashfield
0 siblings, 1 reply; 9+ messages in thread
From: Parker Mackenzie @ 2013-10-03 20:08 UTC (permalink / raw)
To: yocto@yoctoproject.org
I have been researching a way to build loadable kernel modules outside of Yocto for a while. I was excited to find a presentation from the Yocto Developer's Day 2013 which implied I code do this by adding the following line to my local.conf:
IMAGE_INSTALL_append = " kernel_dev"
However, when I ran bitbake for my beagleboard target I get the following error. Any help in understanding what is wrong and how to achieve my goal would be most helpful.
Kind Regards,
Parker Mackenzie
[parker@jasper build]$ bitbake core-image-minimal
Parsing recipes: 100% |#########################################| Time: 00:03:55
Parsing of 814 .bb files complete (0 cached, 814 parsed). 1121 targets, 43 skipped, 0 masked, 0 errors.
Build Configuration:
BB_VERSION = "1.18.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Fedora-17"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "beagleboard"
DISTRO = "poky"
DISTRO_VERSION = "1.4.2"
TUNE_FEATURES = "armv7a vfp neon"
TARGET_FPU = "vfp-neon"
meta
meta-yocto
meta-yocto-bsp = "<unknown>:<unknown>"
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'kernel_dev' (but /home/parker/Projects/beagleboard/yocto/poky-dylan-9.0.2/meta/recipes-core/images/core-image-minimal.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'kernel_dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['kernel_dev']
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'kernel_dev']
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-03 20:08 Cross Compile Kernel Modules Parker Mackenzie
@ 2013-10-03 20:29 ` Bruce Ashfield
2013-10-04 0:21 ` Parker Mackenzie
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2013-10-03 20:29 UTC (permalink / raw)
To: Parker Mackenzie, yocto@yoctoproject.org
On 13-10-03 04:08 PM, Parker Mackenzie wrote:
> I have been researching a way to build loadable kernel modules outside of Yocto for a while. I was excited to find a presentation from the Yocto Developer's Day 2013 which implied I code do this by adding the following line to my local.conf:
> IMAGE_INSTALL_append = " kernel_dev"
>
> However, when I ran bitbake for my beagleboard target I get the following error. Any help in understanding what is wrong and how to achieve my goal would be most helpful.
Try "kernel-dev"
Bruce
>
> Kind Regards,
> Parker Mackenzie
>
>
>
> [parker@jasper build]$ bitbake core-image-minimal
> Parsing recipes: 100% |#########################################| Time: 00:03:55
> Parsing of 814 .bb files complete (0 cached, 814 parsed). 1121 targets, 43 skipped, 0 masked, 0 errors.
>
> Build Configuration:
> BB_VERSION = "1.18.0"
> BUILD_SYS = "x86_64-linux"
> NATIVELSBSTRING = "Fedora-17"
> TARGET_SYS = "arm-poky-linux-gnueabi"
> MACHINE = "beagleboard"
> DISTRO = "poky"
> DISTRO_VERSION = "1.4.2"
> TUNE_FEATURES = "armv7a vfp neon"
> TARGET_FPU = "vfp-neon"
> meta
> meta-yocto
> meta-yocto-bsp = "<unknown>:<unknown>"
>
> NOTE: Resolving any missing task queue dependencies
> ERROR: Nothing RPROVIDES 'kernel_dev' (but /home/parker/Projects/beagleboard/yocto/poky-dylan-9.0.2/meta/recipes-core/images/core-image-minimal.bb RDEPENDS on or otherwise requires it)
> NOTE: Runtime target 'kernel_dev' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['kernel_dev']
> ERROR: Required build target 'core-image-minimal' has no buildable providers.
> Missing or unbuildable dependency chain was: ['core-image-minimal', 'kernel_dev']
>
> Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-03 20:29 ` Bruce Ashfield
@ 2013-10-04 0:21 ` Parker Mackenzie
2013-10-04 0:53 ` Bruce Ashfield
0 siblings, 1 reply; 9+ messages in thread
From: Parker Mackenzie @ 2013-10-04 0:21 UTC (permalink / raw)
To: yocto@yoctoproject.org
Thanks Bruce,
That got me further. I added a comment to the video on YouTube which might help others which stumble across the presentation.
Now I get the following error
ERROR: Function failed: do_rootfs
Which points me to a log file which indicates the following failed:
Note: adding Smart RPM DB channel
Note: to be installed: packagegroup-core-tools-debug@beagleboard kernel-dev@beagleboard rpm-postinsts@all packagegroup-core-boot@beagleboard libstdc++6@armv7a_vfp_neon
Loading cache...
Updating cache... ######################################## [100%]
Computing transaction...error: Can't install kernel-dev-3.4.43+git0+1bab5bd090948b4cc4c4ed57c834603a3cf9f235_c994390cfa28339cbc1ec3b56eeec83a5fa75bb7-r4.4@beagleboard: no package provides /usr/bin/python
Saving cache...
ERROR: Function failed: do_rootfs (see /home/parker/Projects/beagleboard/yocto/poky-dylan-9.0.2/build/tmp/work/beagleboard-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.61003 for further information)
However :
[parker@jasper build]$ which python
/usr/bin/python
I have gone through the documentation; however, feel free to point me at a resource if this is a silly new-guy question. An internet search did bring up the following nugget; patch 2/3 sounds related, however, I am not sure how to proceed.
http://comments.gmane.org/gmane.comp.handhelds.openembedded.core/34245
Thanks in advance,
Parker
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-04 0:21 ` Parker Mackenzie
@ 2013-10-04 0:53 ` Bruce Ashfield
2013-10-04 11:05 ` Hans Beckérus
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2013-10-04 0:53 UTC (permalink / raw)
To: Parker Mackenzie; +Cc: yocto@yoctoproject.org
On 13-10-03 8:21 PM, Parker Mackenzie wrote:
> Thanks Bruce,
>
> That got me further. I added a comment to the video on YouTube which might help others which stumble across the presentation.
>
> Now I get the following error
> ERROR: Function failed: do_rootfs
>
> Which points me to a log file which indicates the following failed:
>
>
> Note: adding Smart RPM DB channel
>
> Note: to be installed: packagegroup-core-tools-debug@beagleboard kernel-dev@beagleboard rpm-postinsts@all packagegroup-core-boot@beagleboard libstdc++6@armv7a_vfp_neon
> Loading cache...
> Updating cache... ######################################## [100%]
>
> Computing transaction...error: Can't install kernel-dev-3.4.43+git0+1bab5bd090948b4cc4c4ed57c834603a3cf9f235_c994390cfa28339cbc1ec3b56eeec83a5fa75bb7-r4.4@beagleboard: no package provides /usr/bin/python
>
> Saving cache...
>
> ERROR: Function failed: do_rootfs (see /home/parker/Projects/beagleboard/yocto/poky-dylan-9.0.2/build/tmp/work/beagleboard-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.61003 for further information)
>
>
> However :
> [parker@jasper build]$ which python
> /usr/bin/python
That would be your build host's python. The kernel module is pulling it
in as a dependency for the target, so it needs to be part of the rootfs
packages.
Check that your have python in your dependencies/image install lists,
which bitbake -e <your image type> will dump ... among many other
things :)
Which image type are you building ? core-image-minimal ? Try adding this
to your local.conf: IMAGE_INSTALL_append = " python"
Cheers,
Bruce
>
>
> I have gone through the documentation; however, feel free to point me at a resource if this is a silly new-guy question. An internet search did bring up the following nugget; patch 2/3 sounds related, however, I am not sure how to proceed.
> http://comments.gmane.org/gmane.comp.handhelds.openembedded.core/34245
>
> Thanks in advance,
> Parker
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-04 0:53 ` Bruce Ashfield
@ 2013-10-04 11:05 ` Hans Beckérus
2013-10-04 11:22 ` Parker Mackenzie
0 siblings, 1 reply; 9+ messages in thread
From: Hans Beckérus @ 2013-10-04 11:05 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: yocto@yoctoproject.org
On Fri, Oct 4, 2013 at 2:53 AM, Bruce Ashfield
<bruce.ashfield@windriver.com> wrote:
> On 13-10-03 8:21 PM, Parker Mackenzie wrote:
>>
>> Thanks Bruce,
>>
>> That got me further. I added a comment to the video on YouTube which might
>> help others which stumble across the presentation.
>>
>> Now I get the following error
>> ERROR: Function failed: do_rootfs
>>
>> Which points me to a log file which indicates the following failed:
>>
>>
>> Note: adding Smart RPM DB channel
>>
>> Note: to be installed: packagegroup-core-tools-debug@beagleboard
>> kernel-dev@beagleboard rpm-postinsts@all packagegroup-core-boot@beagleboard
>> libstdc++6@armv7a_vfp_neon
>> Loading cache...
>> Updating cache... ######################################## [100%]
>>
>> Computing transaction...error: Can't install
>> kernel-dev-3.4.43+git0+1bab5bd090948b4cc4c4ed57c834603a3cf9f235_c994390cfa28339cbc1ec3b56eeec83a5fa75bb7-r4.4@beagleboard:
>> no package provides /usr/bin/python
>>
>> Saving cache...
>>
>> ERROR: Function failed: do_rootfs (see
>> /home/parker/Projects/beagleboard/yocto/poky-dylan-9.0.2/build/tmp/work/beagleboard-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.61003
>> for further information)
>>
>>
>> However :
>> [parker@jasper build]$ which python
>> /usr/bin/python
>
>
> That would be your build host's python. The kernel module is pulling it
> in as a dependency for the target, so it needs to be part of the rootfs
> packages.
>
> Check that your have python in your dependencies/image install lists,
> which bitbake -e <your image type> will dump ... among many other
> things :)
>
> Which image type are you building ? core-image-minimal ? Try adding this
> to your local.conf: IMAGE_INSTALL_append = " python"
>
Bruce, is not the proper package to add in this case python-core? I do
not think anything simply provides just "python", or is it?
> Cheers,
>
> Bruce
>
>
>>
>>
>> I have gone through the documentation; however, feel free to point me at a
>> resource if this is a silly new-guy question. An internet search did bring
>> up the following nugget; patch 2/3 sounds related, however, I am not sure
>> how to proceed.
>> http://comments.gmane.org/gmane.comp.handhelds.openembedded.core/34245
>>
>> Thanks in advance,
>> Parker
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-04 11:05 ` Hans Beckérus
@ 2013-10-04 11:22 ` Parker Mackenzie
2013-10-04 12:41 ` Bruce Ashfield
0 siblings, 1 reply; 9+ messages in thread
From: Parker Mackenzie @ 2013-10-04 11:22 UTC (permalink / raw)
To: yocto@yoctoproject.org
Hans,
Python did not work but as you point out python-core did. I found this last night looking at the IRC logs from March 8th.
I also needed to add bash. The build now completes, this morning I am going to attempt to extract the SDK with the sysroot and then attempt to build the application and my drivers against them.
Thanks for the help,
Parker
> On Oct 4, 2013, at 7:05 AM, "Hans Beckérus" <hans.beckerus@gmail.com> wrote:
>
> Bruce, is not the proper package to add in this case python-core? I do
> not think anything simply provides just "python", or is it?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-04 11:22 ` Parker Mackenzie
@ 2013-10-04 12:41 ` Bruce Ashfield
2013-10-04 21:06 ` Parker Mackenzie
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2013-10-04 12:41 UTC (permalink / raw)
To: Parker Mackenzie, yocto@yoctoproject.org
On 13-10-04 07:22 AM, Parker Mackenzie wrote:
> Hans,
>
> Python did not work but as you point out python-core did. I found this last night looking at the IRC logs from March 8th.
>
Right! I typed in "python" from memory :) In fact, what I typically have is
a full set of python dependencies, including python-dev, which picks
up what I need.
Cheers,
Bruce
> I also needed to add bash. The build now completes, this morning I am going to attempt to extract the SDK with the sysroot and then attempt to build the application and my drivers against them.
>
> Thanks for the help,
> Parker
>
>> On Oct 4, 2013, at 7:05 AM, "Hans Beckérus" <hans.beckerus@gmail.com> wrote:
>>
>> Bruce, is not the proper package to add in this case python-core? I do
>> not think anything simply provides just "python", or is it?
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-04 12:41 ` Bruce Ashfield
@ 2013-10-04 21:06 ` Parker Mackenzie
2013-10-05 4:45 ` Bruce Ashfield
0 siblings, 1 reply; 9+ messages in thread
From: Parker Mackenzie @ 2013-10-04 21:06 UTC (permalink / raw)
To: yocto@yoctoproject.org
Bruce, No problem... you got me on the right path.
Bitbake now completes successfully after adding python-core and bash to IMAGE_INSTALL_append.
Looking again at the presentation it indicated I also needed to do the following:
make oldconfig ARCH=arm
- This completed successfully
make scripts ARCH=arm
- This fails with the following errors:
[parker@jasper kernel]$ make scripts ARCH=arm
scripts/kconfig/conf --silentoldconfig Kconfig
CC scripts/mod/empty.o
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mapcs’
gcc: error: unrecognized command line option ‘-mno-sched-prolog’
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
The cross compiler seems to be correct...:
[parker@jasper kernel]$ echo $CC
arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/home/parker/Projects/beagleboard/yocto/poky-dylan-9.0.2/sdk/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
Trying to build this on:
Linux jasper 3.9.10-100.fc17.x86_64 #1 SMP Sun Jul 14 01:31:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>
> Right! I typed in "python" from memory :) In fact, what I typically have is
> a full set of python dependencies, including python-dev, which picks
> up what I need.
>
> Cheers,
>
> Bruce
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Compile Kernel Modules
2013-10-04 21:06 ` Parker Mackenzie
@ 2013-10-05 4:45 ` Bruce Ashfield
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2013-10-05 4:45 UTC (permalink / raw)
To: Parker Mackenzie; +Cc: yocto@yoctoproject.org
On 13-10-04 5:06 PM, Parker Mackenzie wrote:
> Bruce, No problem... you got me on the right path.
>
> Bitbake now completes successfully after adding python-core and bash to IMAGE_INSTALL_append.
>
>
>
> Looking again at the presentation it indicated I also needed to do the following:
> make oldconfig ARCH=arm
> - This completed successfully
>
> make scripts ARCH=arm
> - This fails with the following errors:
>
> [parker@jasper kernel]$ make scripts ARCH=arm
> scripts/kconfig/conf --silentoldconfig Kconfig
> CC scripts/mod/empty.o
> gcc: error: unrecognized command line option ‘-mlittle-endian’
> gcc: error: unrecognized command line option ‘-mapcs’
> gcc: error: unrecognized command line option ‘-mno-sched-prolog’
> gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
> gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
> gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
> make[2]: *** [scripts/mod/empty.o] Error 1
> make[1]: *** [scripts/mod] Error 2
> make: *** [scripts] Error 2
>
> The cross compiler seems to be correct...:
> [parker@jasper kernel]$ echo $CC
> arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/home/parker/Projects/beagleboard/yocto/poky-dylan-9.0.2/sdk/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
>
But for the scripts, you won't be using the cross compiler, they are
native to your arch.
Check your environment, are CC and CFLAGS set ? How exactly are you
invoking that command (i.e. from where, just a shell in the kernel
source directory?). If non native flags and compiler is leaking into
the build, you'll get exactly the error that you are seeing.
From the error, looks like the native gcc was used, and it was fed
the ARM flags. Not what it'll like :)
Cheers,
Bruce
>
> Trying to build this on:
> Linux jasper 3.9.10-100.fc17.x86_64 #1 SMP Sun Jul 14 01:31:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>
>
>
>
>
>
>>
>> Right! I typed in "python" from memory :) In fact, what I typically have is
>> a full set of python dependencies, including python-dev, which picks
>> up what I need.
>>
>> Cheers,
>>
>> Bruce
>>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-10-05 4:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 20:08 Cross Compile Kernel Modules Parker Mackenzie
2013-10-03 20:29 ` Bruce Ashfield
2013-10-04 0:21 ` Parker Mackenzie
2013-10-04 0:53 ` Bruce Ashfield
2013-10-04 11:05 ` Hans Beckérus
2013-10-04 11:22 ` Parker Mackenzie
2013-10-04 12:41 ` Bruce Ashfield
2013-10-04 21:06 ` Parker Mackenzie
2013-10-05 4:45 ` Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.