All of lore.kernel.org
 help / color / mirror / Atom feed
* How to select defconfig for kernel build with yocto/bitbake
@ 2014-07-09  9:38 Dr. Markus Eich
  2014-07-09 11:33 ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
  2014-07-09 12:44 ` Bruce Ashfield
  0 siblings, 2 replies; 11+ messages in thread
From: Dr. Markus Eich @ 2014-07-09  9:38 UTC (permalink / raw)
  To: yocto

Dear all,

I work on the process to compile odroid xu kernel with yocto/bitbake

In the kernel sources (from hardkernel) I have the corresponding 
defconfig file, i.e. in the git folder 
/arch/arm/configs/odroidxu_ubuntu_defconfig.

How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?

My recipe looks as follow:

===
require recipes-kernel/linux/linux-yocto.inc

KERNEL_IMAGETYPE = "uImage"

COMPATIBLE_MACHINE = "odroid-xu"

LINUX_VERSION = "3.4.91"
LINUX_VERSION_EXTENSION = "-custom"

FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"

S = "${WORKDIR}/git"

# from where to fetch the kernel
KERNEL_REPO_OWNER ??= "hardkernel"
KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
KBRANCH = "odroidxu-3.4.y"

SRCREV = "${AUTOREV}"

KV = "3.4.91"
PV = "${KV}+gitr${SRCPV}"
LOCALVERSION ?= ""


SRC_URI = " \
   ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
"

PACKAGES =+ "kernel-headers"
FILES_kernel-headers = "${exec_prefix}/src/linux*"
===

Cheers,

Markus




-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
  
  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-09  9:38 How to select defconfig for kernel build with yocto/bitbake Dr. Markus Eich
@ 2014-07-09 11:33 ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
  2014-07-09 12:09   ` Dr. Markus Eich
  2014-07-09 12:44 ` Bruce Ashfield
  1 sibling, 1 reply; 11+ messages in thread
From: Sathish Kumar Balasubramaniam -ERS, HCL Tech @ 2014-07-09 11:33 UTC (permalink / raw)
  To: Dr. Markus Eich, yocto@yoctoproject.org

Hi Markus,

Try adding the following to your recipe file

KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"

do_configure_prepend() {
        install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
}


Regards,
B.Sathish Kumar

-----Original Message-----
From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Dr. Markus Eich
Sent: Wednesday, July 09, 2014 3:09 PM
To: yocto@yoctoproject.org
Subject: [yocto] How to select defconfig for kernel build with yocto/bitbake

Dear all,

I work on the process to compile odroid xu kernel with yocto/bitbake

In the kernel sources (from hardkernel) I have the corresponding 
defconfig file, i.e. in the git folder 
/arch/arm/configs/odroidxu_ubuntu_defconfig.

How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?

My recipe looks as follow:

===
require recipes-kernel/linux/linux-yocto.inc

KERNEL_IMAGETYPE = "uImage"

COMPATIBLE_MACHINE = "odroid-xu"

LINUX_VERSION = "3.4.91"
LINUX_VERSION_EXTENSION = "-custom"

FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"

S = "${WORKDIR}/git"

# from where to fetch the kernel
KERNEL_REPO_OWNER ??= "hardkernel"
KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
KBRANCH = "odroidxu-3.4.y"

SRCREV = "${AUTOREV}"

KV = "3.4.91"
PV = "${KV}+gitr${SRCPV}"
LOCALVERSION ?= ""


SRC_URI = " \
   ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
"

PACKAGES =+ "kernel-headers"
FILES_kernel-headers = "${exec_prefix}/src/linux*"
===

Cheers,

Markus




-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
  
  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-09 11:33 ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
@ 2014-07-09 12:09   ` Dr. Markus Eich
  2014-07-09 12:23     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
  2014-07-09 12:29     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
  0 siblings, 2 replies; 11+ messages in thread
From: Dr. Markus Eich @ 2014-07-09 12:09 UTC (permalink / raw)
  To: Sathish Kumar Balasubramaniam -ERS, HCL Tech,
	yocto@yoctoproject.org

Thank you Sathish for the quick answer.

The recipes now copies odroidxu_ubuntu_defconfig to defconfig in the 
workdir, but it still seems to be ignored.
Maybe I am missing some includes to make the .config from defconfig?

Using "make odroidxu_ubuntu_defconfig" using cross compiling (followed 
by "make zImage") works fine, while bitbake virtual/kernel produces some 
errors which are probably due to the wrong .config.


Cheers,

Markus





On 09.07.2014 13:33, Sathish Kumar Balasubramaniam -ERS, HCL Tech wrote:
> Hi Markus,
>
> Try adding the following to your recipe file
>
> KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"
>
> do_configure_prepend() {
>          install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
> }
>
>
> Regards,
> B.Sathish Kumar
>
> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Dr. Markus Eich
> Sent: Wednesday, July 09, 2014 3:09 PM
> To: yocto@yoctoproject.org
> Subject: [yocto] How to select defconfig for kernel build with yocto/bitbake
>
> Dear all,
>
> I work on the process to compile odroid xu kernel with yocto/bitbake
>
> In the kernel sources (from hardkernel) I have the corresponding
> defconfig file, i.e. in the git folder
> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>
> How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?
>
> My recipe looks as follow:
>
> ===
> require recipes-kernel/linux/linux-yocto.inc
>
> KERNEL_IMAGETYPE = "uImage"
>
> COMPATIBLE_MACHINE = "odroid-xu"
>
> LINUX_VERSION = "3.4.91"
> LINUX_VERSION_EXTENSION = "-custom"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>
> S = "${WORKDIR}/git"
>
> # from where to fetch the kernel
> KERNEL_REPO_OWNER ??= "hardkernel"
> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
> KBRANCH = "odroidxu-3.4.y"
>
> SRCREV = "${AUTOREV}"
>
> KV = "3.4.91"
> PV = "${KV}+gitr${SRCPV}"
> LOCALVERSION ?= ""
>
>
> SRC_URI = " \
>     ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
> "
>
> PACKAGES =+ "kernel-headers"
> FILES_kernel-headers = "${exec_prefix}/src/linux*"
> ===
>
> Cheers,
>
> Markus
>
>
>
>

-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
  
  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-09 12:09   ` Dr. Markus Eich
@ 2014-07-09 12:23     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
  2014-07-09 12:29     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
  1 sibling, 0 replies; 11+ messages in thread
From: Sathish Kumar Balasubramaniam -ERS, HCL Tech @ 2014-07-09 12:23 UTC (permalink / raw)
  To: Dr. Markus Eich, yocto@yoctoproject.org

Ok. Can you try the following instead of the content I gave before

KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"

kernel_do_configure_append() {
	install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
	install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${S}/.config
}


Regards,
B.Sathish Kumar

-----Original Message-----
From: Dr. Markus Eich [mailto:markus.eich@dfki.de] 
Sent: Wednesday, July 09, 2014 5:39 PM
To: Sathish Kumar Balasubramaniam -ERS, HCL Tech; yocto@yoctoproject.org
Subject: Re: [yocto] How to select defconfig for kernel build with yocto/bitbake

Thank you Sathish for the quick answer.

The recipes now copies odroidxu_ubuntu_defconfig to defconfig in the 
workdir, but it still seems to be ignored.
Maybe I am missing some includes to make the .config from defconfig?

Using "make odroidxu_ubuntu_defconfig" using cross compiling (followed 
by "make zImage") works fine, while bitbake virtual/kernel produces some 
errors which are probably due to the wrong .config.


Cheers,

Markus





On 09.07.2014 13:33, Sathish Kumar Balasubramaniam -ERS, HCL Tech wrote:
> Hi Markus,
>
> Try adding the following to your recipe file
>
> KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"
>
> do_configure_prepend() {
>          install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
> }
>
>
> Regards,
> B.Sathish Kumar
>
> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Dr. Markus Eich
> Sent: Wednesday, July 09, 2014 3:09 PM
> To: yocto@yoctoproject.org
> Subject: [yocto] How to select defconfig for kernel build with yocto/bitbake
>
> Dear all,
>
> I work on the process to compile odroid xu kernel with yocto/bitbake
>
> In the kernel sources (from hardkernel) I have the corresponding
> defconfig file, i.e. in the git folder
> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>
> How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?
>
> My recipe looks as follow:
>
> ===
> require recipes-kernel/linux/linux-yocto.inc
>
> KERNEL_IMAGETYPE = "uImage"
>
> COMPATIBLE_MACHINE = "odroid-xu"
>
> LINUX_VERSION = "3.4.91"
> LINUX_VERSION_EXTENSION = "-custom"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>
> S = "${WORKDIR}/git"
>
> # from where to fetch the kernel
> KERNEL_REPO_OWNER ??= "hardkernel"
> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
> KBRANCH = "odroidxu-3.4.y"
>
> SRCREV = "${AUTOREV}"
>
> KV = "3.4.91"
> PV = "${KV}+gitr${SRCPV}"
> LOCALVERSION ?= ""
>
>
> SRC_URI = " \
>     ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
> "
>
> PACKAGES =+ "kernel-headers"
> FILES_kernel-headers = "${exec_prefix}/src/linux*"
> ===
>
> Cheers,
>
> Markus
>
>
>
>

-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
  
  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-09 12:09   ` Dr. Markus Eich
  2014-07-09 12:23     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
@ 2014-07-09 12:29     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
  2014-07-09 12:41       ` Dr. Markus Eich
  1 sibling, 1 reply; 11+ messages in thread
From: Sathish Kumar Balasubramaniam -ERS, HCL Tech @ 2014-07-09 12:29 UTC (permalink / raw)
  To: Dr. Markus Eich, yocto@yoctoproject.org

Sorry, Markus.
Ignore my previous post. It has error.

I think you need to check the output of "bitbake -e <recipe name>" and see how the .config file is created for your recipe.
Based on that only we need to update the recipe.

Regards,
B.Sathish Kumar

-----Original Message-----
From: Sathish Kumar Balasubramaniam -ERS, HCL Tech 
Sent: Wednesday, July 09, 2014 5:54 PM
To: Dr. Markus Eich; yocto@yoctoproject.org
Subject: RE: [yocto] How to select defconfig for kernel build with yocto/bitbake

Ok. Can you try the following instead of the content I gave before

KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"

kernel_do_configure_append() {
	install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
	install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${S}/.config
}


Regards,
B.Sathish Kumar

-----Original Message-----
From: Dr. Markus Eich [mailto:markus.eich@dfki.de] 
Sent: Wednesday, July 09, 2014 5:39 PM
To: Sathish Kumar Balasubramaniam -ERS, HCL Tech; yocto@yoctoproject.org
Subject: Re: [yocto] How to select defconfig for kernel build with yocto/bitbake

Thank you Sathish for the quick answer.

The recipes now copies odroidxu_ubuntu_defconfig to defconfig in the 
workdir, but it still seems to be ignored.
Maybe I am missing some includes to make the .config from defconfig?

Using "make odroidxu_ubuntu_defconfig" using cross compiling (followed 
by "make zImage") works fine, while bitbake virtual/kernel produces some 
errors which are probably due to the wrong .config.


Cheers,

Markus





On 09.07.2014 13:33, Sathish Kumar Balasubramaniam -ERS, HCL Tech wrote:
> Hi Markus,
>
> Try adding the following to your recipe file
>
> KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"
>
> do_configure_prepend() {
>          install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
> }
>
>
> Regards,
> B.Sathish Kumar
>
> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Dr. Markus Eich
> Sent: Wednesday, July 09, 2014 3:09 PM
> To: yocto@yoctoproject.org
> Subject: [yocto] How to select defconfig for kernel build with yocto/bitbake
>
> Dear all,
>
> I work on the process to compile odroid xu kernel with yocto/bitbake
>
> In the kernel sources (from hardkernel) I have the corresponding
> defconfig file, i.e. in the git folder
> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>
> How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?
>
> My recipe looks as follow:
>
> ===
> require recipes-kernel/linux/linux-yocto.inc
>
> KERNEL_IMAGETYPE = "uImage"
>
> COMPATIBLE_MACHINE = "odroid-xu"
>
> LINUX_VERSION = "3.4.91"
> LINUX_VERSION_EXTENSION = "-custom"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>
> S = "${WORKDIR}/git"
>
> # from where to fetch the kernel
> KERNEL_REPO_OWNER ??= "hardkernel"
> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
> KBRANCH = "odroidxu-3.4.y"
>
> SRCREV = "${AUTOREV}"
>
> KV = "3.4.91"
> PV = "${KV}+gitr${SRCPV}"
> LOCALVERSION ?= ""
>
>
> SRC_URI = " \
>     ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
> "
>
> PACKAGES =+ "kernel-headers"
> FILES_kernel-headers = "${exec_prefix}/src/linux*"
> ===
>
> Cheers,
>
> Markus
>
>
>
>

-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
  
  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-09 12:29     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
@ 2014-07-09 12:41       ` Dr. Markus Eich
  0 siblings, 0 replies; 11+ messages in thread
From: Dr. Markus Eich @ 2014-07-09 12:41 UTC (permalink / raw)
  To: Sathish Kumar Balasubramaniam -ERS, HCL Tech,
	yocto@yoctoproject.org

bitbake -e produces the following output. I have listed the methods 
dealing with .config.



do_kernel_configme() {
     echo "[INFO] doing kernel configme"
     export KMETA=${KMETA}

     if [ -n ${KCONFIG_MODE} ]; then
         configmeflags=${KCONFIG_MODE}
     else
         # If a defconfig was passed, use =n as the baseline, which is 
achieved
         # via --allnoconfig
         if [ -f 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/defconfig 
]; then
             configmeflags="--allnoconfig"
         fi
     fi

     cd 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git
PATH=/home/eich/yocto/poky/scripts:/home/eich/odroid/build/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi:/home/eich/odroid/build/tmp/sysroots/odroid-xu/usr/bin/crossscripts:/home/eich/odroid/build/tmp/sysroots/x86_64-linux/usr/sbin:/home/eich/odroid/build/tmp/sysroots/x86_64-linux/usr/bin:/home/eich/odroid/build/tmp/sysroots/x86_64-linux/sbin:/home/eich/odroid/build/tmp/sysroots/x86_64-linux/bin:/home/eich/yocto/poky/scripts:/home/eich/yocto/poky/bitbake/bin:/home/eich/ros_catkin_ws/install_isolated/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/eich/bin:/usr/local/java/jre1.7.0_55/bin:/home/eich/install/bin:/opt/toolchains/arm-eabi-4.6/bin:/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git/scripts/util
     configme ${configmeflags} --reconfig --output 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/linux-odroid_xu-standard-build 
standard odroid-xu
     if [ $? -ne 0 ]; then
         echo "ERROR. Could not configure odroid-xu-standard"
         exit 1
     fi

     echo "# Global settings from linux recipe" >> 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/linux-odroid_xu-standard-build/.config
     echo "CONFIG_LOCALVERSION="\"-custom\" >> 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/linux-odroid_xu-standard-build/.config

}


do_compile_kernelmodules() {
     unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
     if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
         oe_runmake -j 4 modules CC="arm-poky-linux-gnueabi-gcc 
-mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd  "
     else
         bbnote "no modules to compile"
     fi

}

kernel_do_configure() {
     # fixes extra + in /lib/modules/2.6.37+
     # $ scripts/setlocalversion . => +
     # $ make kernelversion => 2.6.37
     # $ make kernelrelease => 2.6.37+
     touch 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/linux-odroid_xu-standard-build/.scmversion 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git/.scmversion

     # Copy defconfig to .config if .config does not exist. This allows
     # recipes to manage the .config themselves in do_configure_prepend().
     if [ -f 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/defconfig" 
] && [ ! -f 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/linux-odroid_xu-standard-build/.config" 
]; then
         cp 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/defconfig" 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/linux-odroid_xu-standard-build/.config"
     fi
     eval oe_runmake_call oldnoconfig || yes '' | oe_runmake oldconfig
     install -m 0644 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git/arch/arm/configs/odroidxu_ubuntu_defconfig 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/defconfig
     install -m 0644 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git/arch/arm/configs/odroidxu_ubuntu_defconfig 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git/.config

}


kernel_do_install() {
     #
     # First install the modules
     #    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
     if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
         oe_runmake DEPMOD=echo 
INSTALL_MOD_PATH="/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image" 
modules_install
         rm 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/lib/modules/None/build"
         rm 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/lib/modules/None/source"
         # If the kernel/ directory is empty remove it to prevent QA issues
         rmdir --ignore-fail-on-non-empty 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/lib/modules/None/kernel"
     else
         bbnote "no modules to install"
     fi

     #
     # Install various kernel output (zImage, map file, config, module 
support files)
     #
     install -d 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/boot
     install -d 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/boot
     install -m 0644 arch/arm/boot/uImage 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/boot/uImage-None
     install -m 0644 System.map 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/boot/System.map-None
     install -m 0644 .config 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/boot/config-None
     install -m 0644 vmlinux 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/boot/vmlinux-None
     [ -e Module.symvers ] && install -m 0644 Module.symvers 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/boot/Module.symvers-None
     install -d 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/etc/modules-load.d
     install -d 
/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/etc/modprobe.d

     #
     # Support for external module building - create a minimal copy of the
     # kernel source tree.
     #
kerneldir=/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/image/usr/src/kernel
     install -d $kerneldir

     #
     # Store the kernel version in sysroots for module-base.bbclass
     #

     echo "None" > $kerneldir/kernel-abiversion

     #
     # Store kernel image name to allow use during image generation
     #

     echo 
"uImage--3.4.91+gitrAUTOINC+a26607bfa2-r0-odroid-xu-20140709123549" 
 >$kerneldir/kernel-image-name

     #
     # Copy the entire source tree. In case an external build directory is
     # used, copy the build directory over first, then copy over the source
     # dir. This ensures the original Makefiles are used and not the
     # redirecting Makefiles in the build directory.
     #
     find . -depth -not -name "*.cmd" -not -name "*.o" -not -path 
"./Documentation*" -not -path "./source*" -not -path "./.*" -print0 | 
cpio --null -pdlu $kerneldir
     cp .config $kerneldir
     if [ 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git" 
!= 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/linux-odroid_xu-standard-build" 
]; then
         pwd="$PWD"
         cd 
"/home/eich/odroid/build/tmp/work/odroid_xu-poky-linux-gnueabi/linux-hardkernel/3.4.91+gitrAUTOINC+a26607bfa2-r0/git"
         find . -depth -not -path "./Documentation*" -not -path "./.*" 
-print0 | cpio --null -pdlu $kerneldir
         cd "$pwd"
     fi

     # Test to ensure that the output file and image type are not actually
     # the same file. If hardlinking is used, they will be the same, and 
there's
     # no need to install.
     ! [ arch/arm/boot/uImage -ef $kerneldir/uImage ] && install -m 0644 
arch/arm/boot/uImage $kerneldir/uImage
     install -m 0644 System.map $kerneldir/System.map-None

     # Dummy Makefile so the clean below works
         mkdir $kerneldir/Documentation
         touch $kerneldir/Documentation/Makefile

     #
     # Clean and remove files not needed for building modules.
     # Some distributions go through a lot more trouble to strip out
     # unecessary headers, for now, we just prune the obvious bits.
     #
     # We don't want to leave host-arch binaries in /sysroots, so
     # we clean the scripts dir while leaving the generated config
     # and include files.
     #
     oe_runmake -C $kerneldir CC="arm-poky-linux-gnueabi-gcc 
-mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd  " clean 
_mrproper_scripts

     # hide directories that shouldn't have their .c, s and S files deleted
     for d in tools scripts lib; do
         mv $kerneldir/$d $kerneldir/.$d
     done

     # delete .c, .s and .S files, unless we hid a directory as .<dir>. 
This technique is
     # much faster than find -prune and -exec
     find $kerneldir -not -path '*/\.*' -type f -name "*.[csS]" -delete

     # put the hidden dirs back
     for d in tools scripts lib; do
         mv $kerneldir/.$d $kerneldir/$d
     done

     # As of Linux kernel version 3.0.1, the clean target removes
     # arch/powerpc/lib/crtsavres.o which is present in
     # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
     if [ arm = "powerpc" ]; then
         cp -l arch/powerpc/lib/crtsavres.o 
$kerneldir/arch/powerpc/lib/crtsavres.o
     fi

     # Necessary for building modules like compat-wireless.
     if [ -f include/generated/bounds.h ]; then
         cp -l include/generated/bounds.h 
$kerneldir/include/generated/bounds.h
     fi
     if [ -d arch/arm/include/generated ]; then
         mkdir -p $kerneldir/arch/arm/include/generated/
         cp -flR arch/arm/include/generated/* 
$kerneldir/arch/arm/include/generated/
     fi

     # Remove the following binaries which cause strip or arch QA errors
     # during do_package for cross-compiled platforms
     bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
                arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \
            scripts/kconfig/conf.o scripts/kconfig/kxgettext.o"
     for entry in $bin_files; do
         rm -f $kerneldir/$entry
     done

     # kernels <2.6.30 don't have $kerneldir/tools directory so we check 
if it exists before calling sed
     if [ -f $kerneldir/tools/perf/Makefile ]; then
         # Fix SLANG_INC for slang.h
         sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' 
$kerneldir/tools/perf/Makefile
     fi

}





On 09.07.2014 14:29, Sathish Kumar Balasubramaniam -ERS, HCL Tech wrote:
> Sorry, Markus.
> Ignore my previous post. It has error.
>
> I think you need to check the output of "bitbake -e <recipe name>" and see how the .config file is created for your recipe.
> Based on that only we need to update the recipe.
>
> Regards,
> B.Sathish Kumar
>
> -----Original Message-----
> From: Sathish Kumar Balasubramaniam -ERS, HCL Tech
> Sent: Wednesday, July 09, 2014 5:54 PM
> To: Dr. Markus Eich; yocto@yoctoproject.org
> Subject: RE: [yocto] How to select defconfig for kernel build with yocto/bitbake
>
> Ok. Can you try the following instead of the content I gave before
>
> KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"
>
> kernel_do_configure_append() {
> 	install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
> 	install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${S}/.config
> }
>
>
> Regards,
> B.Sathish Kumar
>
> -----Original Message-----
> From: Dr. Markus Eich [mailto:markus.eich@dfki.de]
> Sent: Wednesday, July 09, 2014 5:39 PM
> To: Sathish Kumar Balasubramaniam -ERS, HCL Tech; yocto@yoctoproject.org
> Subject: Re: [yocto] How to select defconfig for kernel build with yocto/bitbake
>
> Thank you Sathish for the quick answer.
>
> The recipes now copies odroidxu_ubuntu_defconfig to defconfig in the
> workdir, but it still seems to be ignored.
> Maybe I am missing some includes to make the .config from defconfig?
>
> Using "make odroidxu_ubuntu_defconfig" using cross compiling (followed
> by "make zImage") works fine, while bitbake virtual/kernel produces some
> errors which are probably due to the wrong .config.
>
>
> Cheers,
>
> Markus
>
>
>
>
>
> On 09.07.2014 13:33, Sathish Kumar Balasubramaniam -ERS, HCL Tech wrote:
>> Hi Markus,
>>
>> Try adding the following to your recipe file
>>
>> KERNEL_DEFCONFIG = "odroidxu_ubuntu_defconfig"
>>
>> do_configure_prepend() {
>>           install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
>> }
>>
>>
>> Regards,
>> B.Sathish Kumar
>>
>> -----Original Message-----
>> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Dr. Markus Eich
>> Sent: Wednesday, July 09, 2014 3:09 PM
>> To: yocto@yoctoproject.org
>> Subject: [yocto] How to select defconfig for kernel build with yocto/bitbake
>>
>> Dear all,
>>
>> I work on the process to compile odroid xu kernel with yocto/bitbake
>>
>> In the kernel sources (from hardkernel) I have the corresponding
>> defconfig file, i.e. in the git folder
>> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>>
>> How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?
>>
>> My recipe looks as follow:
>>
>> ===
>> require recipes-kernel/linux/linux-yocto.inc
>>
>> KERNEL_IMAGETYPE = "uImage"
>>
>> COMPATIBLE_MACHINE = "odroid-xu"
>>
>> LINUX_VERSION = "3.4.91"
>> LINUX_VERSION_EXTENSION = "-custom"
>>
>> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>>
>> S = "${WORKDIR}/git"
>>
>> # from where to fetch the kernel
>> KERNEL_REPO_OWNER ??= "hardkernel"
>> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
>> KBRANCH = "odroidxu-3.4.y"
>>
>> SRCREV = "${AUTOREV}"
>>
>> KV = "3.4.91"
>> PV = "${KV}+gitr${SRCPV}"
>> LOCALVERSION ?= ""
>>
>>
>> SRC_URI = " \
>>      ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
>> "
>>
>> PACKAGES =+ "kernel-headers"
>> FILES_kernel-headers = "${exec_prefix}/src/linux*"
>> ===
>>
>> Cheers,
>>
>> Markus
>>
>>
>>
>>

-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
  
  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-09  9:38 How to select defconfig for kernel build with yocto/bitbake Dr. Markus Eich
  2014-07-09 11:33 ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
@ 2014-07-09 12:44 ` Bruce Ashfield
  2014-07-10 11:11   ` Dr. Markus Eich
  1 sibling, 1 reply; 11+ messages in thread
From: Bruce Ashfield @ 2014-07-09 12:44 UTC (permalink / raw)
  To: Dr. Markus Eich, yocto

On 14-07-09 05:38 AM, Dr. Markus Eich wrote:
> Dear all,
>
> I work on the process to compile odroid xu kernel with yocto/bitbake
>
> In the kernel sources (from hardkernel) I have the corresponding
> defconfig file, i.e. in the git folder
> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>
> How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?

To trigger the oe-core kernel processing to use the defconfig, you need
to put that defconfig in your SRC_URI.

Which means you should grab a copy of that from the kernel tree, and
in the same directory structure as your kernel recipe.

See meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb for an
example.

Cheers,

Bruce


>
> My recipe looks as follow:
>
> ===
> require recipes-kernel/linux/linux-yocto.inc
>
> KERNEL_IMAGETYPE = "uImage"
>
> COMPATIBLE_MACHINE = "odroid-xu"
>
> LINUX_VERSION = "3.4.91"
> LINUX_VERSION_EXTENSION = "-custom"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>
> S = "${WORKDIR}/git"
>
> # from where to fetch the kernel
> KERNEL_REPO_OWNER ??= "hardkernel"
> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
> KBRANCH = "odroidxu-3.4.y"
>
> SRCREV = "${AUTOREV}"
>
> KV = "3.4.91"
> PV = "${KV}+gitr${SRCPV}"
> LOCALVERSION ?= ""
>
>
> SRC_URI = " \
>    ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
> "
>
> PACKAGES =+ "kernel-headers"
> FILES_kernel-headers = "${exec_prefix}/src/linux*"
> ===
>
> Cheers,
>
> Markus
>
>
>
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-09 12:44 ` Bruce Ashfield
@ 2014-07-10 11:11   ` Dr. Markus Eich
  2014-07-10 15:46     ` Bruce Ashfield
  0 siblings, 1 reply; 11+ messages in thread
From: Dr. Markus Eich @ 2014-07-10 11:11 UTC (permalink / raw)
  To: Bruce Ashfield, yocto

Thank you Bruce, that did the trick. But I am facing a new problem while 
using bitbake for the build process.

I have checked to build the odroid kernel with a standard crosscompiler 
tool chain and it works without any problems.

When I do the same with the bitbake toolchain (bitbake virtual/kernel), 
it somehow creates a recursive link in the folder

package/usr/src/kernel/drivers/gpu/arm/mali400/ump/arch/arch-release -> 
arch-release

This causes a crash in the build system.

Compilation runs fine though. This error seems to be within do_package. 
I have removed the link, but somehow it is created automatically.

Any ideas?

/Markus



On 09.07.2014 14:44, Bruce Ashfield wrote:
> On 14-07-09 05:38 AM, Dr. Markus Eich wrote:
>> Dear all,
>>
>> I work on the process to compile odroid xu kernel with yocto/bitbake
>>
>> In the kernel sources (from hardkernel) I have the corresponding
>> defconfig file, i.e. in the git folder
>> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>>
>> How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?
>
> To trigger the oe-core kernel processing to use the defconfig, you need
> to put that defconfig in your SRC_URI.
>
> Which means you should grab a copy of that from the kernel tree, and
> in the same directory structure as your kernel recipe.
>
> See meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb for an
> example.
>
> Cheers,
>
> Bruce
>
>
>>
>> My recipe looks as follow:
>>
>> ===
>> require recipes-kernel/linux/linux-yocto.inc
>>
>> KERNEL_IMAGETYPE = "uImage"
>>
>> COMPATIBLE_MACHINE = "odroid-xu"
>>
>> LINUX_VERSION = "3.4.91"
>> LINUX_VERSION_EXTENSION = "-custom"
>>
>> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>>
>> S = "${WORKDIR}/git"
>>
>> # from where to fetch the kernel
>> KERNEL_REPO_OWNER ??= "hardkernel"
>> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
>> KBRANCH = "odroidxu-3.4.y"
>>
>> SRCREV = "${AUTOREV}"
>>
>> KV = "3.4.91"
>> PV = "${KV}+gitr${SRCPV}"
>> LOCALVERSION ?= ""
>>
>>
>> SRC_URI = " \
>>    ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
>> "
>>
>> PACKAGES =+ "kernel-headers"
>> FILES_kernel-headers = "${exec_prefix}/src/linux*"
>> ===
>>
>> Cheers,
>>
>> Markus
>>
>>
>>
>>
>

-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
   Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
   Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-10 11:11   ` Dr. Markus Eich
@ 2014-07-10 15:46     ` Bruce Ashfield
  2014-07-11  8:55       ` Dr. Markus Eich
  0 siblings, 1 reply; 11+ messages in thread
From: Bruce Ashfield @ 2014-07-10 15:46 UTC (permalink / raw)
  To: Dr. Markus Eich, yocto

On 14-07-10 07:11 AM, Dr. Markus Eich wrote:
> Thank you Bruce, that did the trick. But I am facing a new problem while
> using bitbake for the build process.
>
> I have checked to build the odroid kernel with a standard crosscompiler
> tool chain and it works without any problems.
>
> When I do the same with the bitbake toolchain (bitbake virtual/kernel),
> it somehow creates a recursive link in the folder
>
> package/usr/src/kernel/drivers/gpu/arm/mali400/ump/arch/arch-release ->
> arch-release
>
> This causes a crash in the build system.
>
> Compilation runs fine though. This error seems to be within do_package.
> I have removed the link, but somehow it is created automatically.
>
> Any ideas?

Nothing off the top of my head. That link would be created by the kernel
build, and not by bitbake or the oe-core kernel build classes.

I'd start by looking at the kernel's makefiles and seeing where the
link is being created.

Do specific tasks work ? i.e. is that happening during unpack/patch, or
during compilation.

Bruce

>
> /Markus
>
>
>
> On 09.07.2014 14:44, Bruce Ashfield wrote:
>> On 14-07-09 05:38 AM, Dr. Markus Eich wrote:
>>> Dear all,
>>>
>>> I work on the process to compile odroid xu kernel with yocto/bitbake
>>>
>>> In the kernel sources (from hardkernel) I have the corresponding
>>> defconfig file, i.e. in the git folder
>>> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>>>
>>> How can I tell bitbake in my recipe to use "odroidxu_ubuntu_defconfig"?
>>
>> To trigger the oe-core kernel processing to use the defconfig, you need
>> to put that defconfig in your SRC_URI.
>>
>> Which means you should grab a copy of that from the kernel tree, and
>> in the same directory structure as your kernel recipe.
>>
>> See meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb for an
>> example.
>>
>> Cheers,
>>
>> Bruce
>>
>>
>>>
>>> My recipe looks as follow:
>>>
>>> ===
>>> require recipes-kernel/linux/linux-yocto.inc
>>>
>>> KERNEL_IMAGETYPE = "uImage"
>>>
>>> COMPATIBLE_MACHINE = "odroid-xu"
>>>
>>> LINUX_VERSION = "3.4.91"
>>> LINUX_VERSION_EXTENSION = "-custom"
>>>
>>> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>>>
>>> S = "${WORKDIR}/git"
>>>
>>> # from where to fetch the kernel
>>> KERNEL_REPO_OWNER ??= "hardkernel"
>>> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
>>> KBRANCH = "odroidxu-3.4.y"
>>>
>>> SRCREV = "${AUTOREV}"
>>>
>>> KV = "3.4.91"
>>> PV = "${KV}+gitr${SRCPV}"
>>> LOCALVERSION ?= ""
>>>
>>>
>>> SRC_URI = " \
>>>    ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
>>> "
>>>
>>> PACKAGES =+ "kernel-headers"
>>> FILES_kernel-headers = "${exec_prefix}/src/linux*"
>>> ===
>>>
>>> Cheers,
>>>
>>> Markus
>>>
>>>
>>>
>>>
>>
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-10 15:46     ` Bruce Ashfield
@ 2014-07-11  8:55       ` Dr. Markus Eich
  2014-07-11 14:29         ` Bruce Ashfield
  0 siblings, 1 reply; 11+ messages in thread
From: Dr. Markus Eich @ 2014-07-11  8:55 UTC (permalink / raw)
  To: Bruce Ashfield, yocto

I have tried the different task separately.

do_fetch works, no recursive link created
do_kernel_checkout works, no recursive link created
do_kernel_configme works, no recursive link created
do_compile works, no recursive link created
do_compile_kernelmodules works, no recursive link created
do_install works, no recursive link created

do_package : Here it crashes. Th package subfolder is created and here 
it creates the recursive link within the subfolder.

What does do_package do in detail? How can I further analyze the error.

/Markus




On 10.07.2014 17:46, Bruce Ashfield wrote:
> On 14-07-10 07:11 AM, Dr. Markus Eich wrote:
>> Thank you Bruce, that did the trick. But I am facing a new problem while
>> using bitbake for the build process.
>>
>> I have checked to build the odroid kernel with a standard crosscompiler
>> tool chain and it works without any problems.
>>
>> When I do the same with the bitbake toolchain (bitbake virtual/kernel),
>> it somehow creates a recursive link in the folder
>>
>> package/usr/src/kernel/drivers/gpu/arm/mali400/ump/arch/arch-release ->
>> arch-release
>>
>> This causes a crash in the build system.
>>
>> Compilation runs fine though. This error seems to be within do_package.
>> I have removed the link, but somehow it is created automatically.
>>
>> Any ideas?
>
> Nothing off the top of my head. That link would be created by the kernel
> build, and not by bitbake or the oe-core kernel build classes.
>
> I'd start by looking at the kernel's makefiles and seeing where the
> link is being created.
>
> Do specific tasks work ? i.e. is that happening during unpack/patch, or
> during compilation.
>
> Bruce
>
>>
>> /Markus
>>
>>
>>
>> On 09.07.2014 14:44, Bruce Ashfield wrote:
>>> On 14-07-09 05:38 AM, Dr. Markus Eich wrote:
>>>> Dear all,
>>>>
>>>> I work on the process to compile odroid xu kernel with yocto/bitbake
>>>>
>>>> In the kernel sources (from hardkernel) I have the corresponding
>>>> defconfig file, i.e. in the git folder
>>>> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>>>>
>>>> How can I tell bitbake in my recipe to use 
>>>> "odroidxu_ubuntu_defconfig"?
>>>
>>> To trigger the oe-core kernel processing to use the defconfig, you need
>>> to put that defconfig in your SRC_URI.
>>>
>>> Which means you should grab a copy of that from the kernel tree, and
>>> in the same directory structure as your kernel recipe.
>>>
>>> See meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb for an
>>> example.
>>>
>>> Cheers,
>>>
>>> Bruce
>>>
>>>
>>>>
>>>> My recipe looks as follow:
>>>>
>>>> ===
>>>> require recipes-kernel/linux/linux-yocto.inc
>>>>
>>>> KERNEL_IMAGETYPE = "uImage"
>>>>
>>>> COMPATIBLE_MACHINE = "odroid-xu"
>>>>
>>>> LINUX_VERSION = "3.4.91"
>>>> LINUX_VERSION_EXTENSION = "-custom"
>>>>
>>>> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>>>>
>>>> S = "${WORKDIR}/git"
>>>>
>>>> # from where to fetch the kernel
>>>> KERNEL_REPO_OWNER ??= "hardkernel"
>>>> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
>>>> KBRANCH = "odroidxu-3.4.y"
>>>>
>>>> SRCREV = "${AUTOREV}"
>>>>
>>>> KV = "3.4.91"
>>>> PV = "${KV}+gitr${SRCPV}"
>>>> LOCALVERSION ?= ""
>>>>
>>>>
>>>> SRC_URI = " \
>>>>    ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
>>>> "
>>>>
>>>> PACKAGES =+ "kernel-headers"
>>>> FILES_kernel-headers = "${exec_prefix}/src/linux*"
>>>> ===
>>>>
>>>> Cheers,
>>>>
>>>> Markus
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

-- 
Dr.-Ing. Markus Eich

  Senior Researcher
  Marine Inspection Robotics
  Space Robotics
  
  Besuchsadresse der Nebengeschäftstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4105
  Zentrale: +49 421 178 45-0
  Fax:      +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
  E-Mail:   markus.eich@dfki.de

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/673/0060/3
  -----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to select defconfig for kernel build with yocto/bitbake
  2014-07-11  8:55       ` Dr. Markus Eich
@ 2014-07-11 14:29         ` Bruce Ashfield
  0 siblings, 0 replies; 11+ messages in thread
From: Bruce Ashfield @ 2014-07-11 14:29 UTC (permalink / raw)
  To: Dr. Markus Eich, yocto

On 14-07-11 04:55 AM, Dr. Markus Eich wrote:
> I have tried the different task separately.
>
> do_fetch works, no recursive link created
> do_kernel_checkout works, no recursive link created
> do_kernel_configme works, no recursive link created
> do_compile works, no recursive link created
> do_compile_kernelmodules works, no recursive link created
> do_install works, no recursive link created

There's no recursive link, but is the arch-release link
created, but pointing somewhere else ?

>
> do_package : Here it crashes. Th package subfolder is created and here
> it creates the recursive link within the subfolder.
>
> What does do_package do in detail? How can I further analyze the error.

Interesting. There's nothing custom in the kernel for packaging, and
nothing that I can think would be creating that symlink.

No good ideas at the moment, outside of pinpointing exactly where the
link is created, and when it transitions to a recursive one .. and
I'd do that by instrumentation.

Bruce

>
> /Markus
>
>
>
>
> On 10.07.2014 17:46, Bruce Ashfield wrote:
>> On 14-07-10 07:11 AM, Dr. Markus Eich wrote:
>>> Thank you Bruce, that did the trick. But I am facing a new problem while
>>> using bitbake for the build process.
>>>
>>> I have checked to build the odroid kernel with a standard crosscompiler
>>> tool chain and it works without any problems.
>>>
>>> When I do the same with the bitbake toolchain (bitbake virtual/kernel),
>>> it somehow creates a recursive link in the folder
>>>
>>> package/usr/src/kernel/drivers/gpu/arm/mali400/ump/arch/arch-release ->
>>> arch-release
>>>
>>> This causes a crash in the build system.
>>>
>>> Compilation runs fine though. This error seems to be within do_package.
>>> I have removed the link, but somehow it is created automatically.
>>>
>>> Any ideas?
>>
>> Nothing off the top of my head. That link would be created by the kernel
>> build, and not by bitbake or the oe-core kernel build classes.
>>
>> I'd start by looking at the kernel's makefiles and seeing where the
>> link is being created.
>>
>> Do specific tasks work ? i.e. is that happening during unpack/patch, or
>> during compilation.
>>
>> Bruce
>>
>>>
>>> /Markus
>>>
>>>
>>>
>>> On 09.07.2014 14:44, Bruce Ashfield wrote:
>>>> On 14-07-09 05:38 AM, Dr. Markus Eich wrote:
>>>>> Dear all,
>>>>>
>>>>> I work on the process to compile odroid xu kernel with yocto/bitbake
>>>>>
>>>>> In the kernel sources (from hardkernel) I have the corresponding
>>>>> defconfig file, i.e. in the git folder
>>>>> /arch/arm/configs/odroidxu_ubuntu_defconfig.
>>>>>
>>>>> How can I tell bitbake in my recipe to use
>>>>> "odroidxu_ubuntu_defconfig"?
>>>>
>>>> To trigger the oe-core kernel processing to use the defconfig, you need
>>>> to put that defconfig in your SRC_URI.
>>>>
>>>> Which means you should grab a copy of that from the kernel tree, and
>>>> in the same directory structure as your kernel recipe.
>>>>
>>>> See meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb for an
>>>> example.
>>>>
>>>> Cheers,
>>>>
>>>> Bruce
>>>>
>>>>
>>>>>
>>>>> My recipe looks as follow:
>>>>>
>>>>> ===
>>>>> require recipes-kernel/linux/linux-yocto.inc
>>>>>
>>>>> KERNEL_IMAGETYPE = "uImage"
>>>>>
>>>>> COMPATIBLE_MACHINE = "odroid-xu"
>>>>>
>>>>> LINUX_VERSION = "3.4.91"
>>>>> LINUX_VERSION_EXTENSION = "-custom"
>>>>>
>>>>> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-hardkernel-3.4:"
>>>>>
>>>>> S = "${WORKDIR}/git"
>>>>>
>>>>> # from where to fetch the kernel
>>>>> KERNEL_REPO_OWNER ??= "hardkernel"
>>>>> KERNEL_REPO_URI ??= "git://github.com/${KERNEL_REPO_OWNER}/linux.git"
>>>>> KBRANCH = "odroidxu-3.4.y"
>>>>>
>>>>> SRCREV = "${AUTOREV}"
>>>>>
>>>>> KV = "3.4.91"
>>>>> PV = "${KV}+gitr${SRCPV}"
>>>>> LOCALVERSION ?= ""
>>>>>
>>>>>
>>>>> SRC_URI = " \
>>>>>    ${KERNEL_REPO_URI};nocheckout=1;branch=${KBRANCH} \
>>>>> "
>>>>>
>>>>> PACKAGES =+ "kernel-headers"
>>>>> FILES_kernel-headers = "${exec_prefix}/src/linux*"
>>>>> ===
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Markus
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-07-11 14:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09  9:38 How to select defconfig for kernel build with yocto/bitbake Dr. Markus Eich
2014-07-09 11:33 ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
2014-07-09 12:09   ` Dr. Markus Eich
2014-07-09 12:23     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
2014-07-09 12:29     ` Sathish Kumar Balasubramaniam -ERS, HCL Tech
2014-07-09 12:41       ` Dr. Markus Eich
2014-07-09 12:44 ` Bruce Ashfield
2014-07-10 11:11   ` Dr. Markus Eich
2014-07-10 15:46     ` Bruce Ashfield
2014-07-11  8:55       ` Dr. Markus Eich
2014-07-11 14:29         ` 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.