Skip to contentSkip to conversation

cmem: Adding New recipe for cmem

PATCH Superseded Sam Nelson 5 participants 17 messages Nov 7, 2013 – Nov 28, 2013

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Sam Nelson

author
#0 lore raw

PATCH v2 1/1 cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
 recipes-bsp/cmem/cmem-mod_git.bb |   26 ++++++++++++++++++++++++++
 recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
 recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb
 create mode 100644 recipes-bsp/cmem/cmem.inc
 create mode 100644 recipes-bsp/cmem/cmem_git.bb
recipes-bsp/cmem/cmem-mod_git.bb new file +26 -0
new file mode 100644
index 0000000..c402b72
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for contiguous memory allocation from userspace "
+
+include cmem.inc
+
+NAME="cmem"
+
+# This package builds a kernel module, use kernel PR as base and append a local
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} TOOLCHAIN_PREFIX=${CROSS_COMPILE} 
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"
+}
recipes-bsp/cmem/cmem.inc new file +12 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb8310b3b983024edc620"
+
+COMPATIBLE_MACHINE = "keystone-evm"
+
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI = "git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"
recipes-bsp/cmem/cmem_git.bb new file +16 -0
new file mode 100644
index 0000000..f415630
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory allocation from userspace "
+
+include cmem.inc
+
+RDEPENDS_${PN} = "cmem-mod" 
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"
+
+inherit autotools
+
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Thursday, November 07, 2013 10:34 AM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

Quoted 6 lines
recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

This patch should be submitted to [email protected] which is the meta-ti mailing list.

Quoted 10 lines
recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb line 5

Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+
+include cmem.inc
+
+NAME="cmem"

Not sure what the NAME variable is for

recipes-bsp/cmem/cmem-mod_git.bb line 11

Quoted 7 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +2 -0
+
+# This package builds a kernel module, use kernel PR as base and

append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"

I think what you are trying to do here is already handled by the package.bbclass. I assume you are trying to set the package name to kernel-module-cmem-mod?

This raises the question of whether you want this to be cmem-mod for the recipe and PN or if you want cmem for the module and cmem-xyz for the libraries.

Quoted 11 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +9 -0
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think. You should be able to pass this with MAKE_TARGETS variable.

Quoted 8 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the lu.mak file updated that would be ideal. If not then you should at least copy the base function which unsets some variables.

Quoted 13 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +4 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc

Quoted 2 lines
recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other devices like omap-a15 as compatible machines?

recipes-bsp/cmem/cmem.inc line 9

Quoted 3 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"

Remove this comment but add one that the commit id below corresponds to release 4.00.00.06.

Is there perhaps a value to having the version in the package name instead of using _git versions? Will all SDKs be in step with using the same version?

Quoted 15 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +2 -0
+
+include cmem.inc

recipes-bsp/cmem/cmem_git.bb line 13

Quoted 10 lines
recipes-bsp/cmem/cmem_git.bb new file +10 -0
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"

As Denys pointed out last time, if everything goes into cmem-test then why not just call this whole recipe cmem-test since the base cmem package is empty.

Quoted 10 lines
recipes-bsp/cmem/cmem_git.bb new file +3 -1
+
+inherit autotools
+
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#2 lore raw
Quoted 28 lines

-----Original Message-----
From: Maupin, Chase
Sent: Thursday, November 07, 2013 2:35 AM
To: Nelson, Sam; [email protected]
Subject: RE: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Thursday, November 07, 2013 10:34 AM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

Quoted 6 lines
recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

Quoted 2 lines

This patch should be submitted to [email protected] which is the meta-ti mailing list.

[Sam] Ok. I will do that.

Quoted 17 lines
Quoted 11 lines
recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb line 5

Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+
+include cmem.inc
+
+NAME="cmem"

Not sure what the NAME variable is for

[Sam] I am not sure either. This is probably because of initial template used for creation of the recipe. I can remove it if this really not needed.

Quoted 13 lines

recipes-bsp/cmem/cmem-mod_git.bb line 11

Quoted 8 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +2 -0
+
+# This package builds a kernel module, use kernel PR as base and

append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"

I think what you are trying to do here is already handled by the package.bbclass. I assume you are trying to set the package name to kernel- module-cmem-mod?

Quoted 4 lines

This raises the question of whether you want this to be cmem-mod for the recipe and PN or if you want cmem for the module and cmem-xyz for the libraries.

[Sam] I guess the alternative you are suggesting is cmem for the module and cmem-lib for the libraries. I am not seeing a compelling reason to change.

Quoted 6 lines
Quoted 6 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +6 -0
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
Quoted 8 lines
Quoted 5 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +3 -0
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think. You should be able to pass this with MAKE_TARGETS variable.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Quoted 15 lines
Quoted 9 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the lu.mak file updated that would be ideal. If not then you should at least copy the base function which unsets some variables.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Quoted 10 lines
Quoted 10 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +3 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
+LICENSE = "GPLv2"
Quoted 8 lines

recipes-bsp/cmem/cmem.inc

Quoted 5 lines
recipes-bsp/cmem/cmem.inc new file +1 -0
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other devices like omap-a15 as compatible machines?

[Sam] I am fine with remove the compatible machine. Although this is not tested with other machines.

Quoted 7 lines

recipes-bsp/cmem/cmem.inc line 9

Quoted 3 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"

Remove this comment but add one that the commit id below corresponds to release 4.00.00.06.

[Sam] I will fix this.

Quoted 3 lines

Is there perhaps a value to having the version in the package name instead of using _git versions? Will all SDKs be in step with using the same version?

[Sam] Chris or Rob, can you comment on this. I am not sure of when the other verticals pick up CMEM.

Quoted 21 lines
Quoted 21 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +8 -0
+
+include cmem.inc
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
Quoted 8 lines

recipes-bsp/cmem/cmem_git.bb line 13

Quoted 4 lines
recipes-bsp/cmem/cmem_git.bb new file +4 -0
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"

As Denys pointed out last time, if everything goes into cmem-test then why not just call this whole recipe cmem-test since the base cmem package is empty.

[Sam] The cmem package has the library that goes into cmem-dev. And hence the name cmem. cmem-test will have the example/unit test code binaries. Only thing is there is no binary files associated with the cmem package itself.

Quoted 11 lines
Quoted 11 lines
recipes-bsp/cmem/cmem_git.bb new file +3 -1
+
+inherit autotools
+
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#3 lore raw

Please see my comments inline below...

Regards,

- Rob

Quoted 7 lines

-----Original Message-----
From: Nelson, Sam
Sent: Thursday, November 07, 2013 3:50 AM
To: Maupin, Chase; [email protected]
Cc: Ring, Chris; Tivy, Robert
Subject: RE: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

...

Quoted 14 lines
Quoted 14 lines
Quoted 10 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +9 -0
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module
Quoted 2 lines

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think.

Quoted 4 lines

You

Quoted 1 line

should be able to pass this with MAKE_TARGETS variable.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Can you please explain the change needed? I'm not familiar with do_compile().

Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the

Quoted 7 lines

lu.mak file

Quoted 1 line

updated that would be ideal. If not then you should at least copy

the base

Quoted 2 lines

function which unsets some variables.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

This should be fine, I will make a change to lu.mak and commit to ludev.git.

How about module_clean? Should that be changed to modules_clean?

Quoted 7 lines
Quoted 1 line

Is there perhaps a value to having the version in the package name

instead of

Quoted 1 line

using _git versions? Will all SDKs be in step with using the same

version?

Quoted 1 line

[Sam] Chris or Rob, can you comment on this. I am not sure of when the other verticals pick up CMEM.

I need to let Chris comment on this.

#4 lore raw
Quoted 1 line · Robert

Please see my comments inline below...

Thanks, Rob!
inline...

Quoted 24 lines
Quoted 7 lines

-----Original Message-----
From: Nelson, Sam
Sent: Thursday, November 07, 2013 3:50 AM
To: Maupin, Chase; [email protected]
Cc: Ring, Chris; Tivy, Robert
Subject: RE: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

...

Quoted 14 lines
Quoted 14 lines
Quoted 10 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +9 -0
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module
Quoted 2 lines

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think.

Quoted 6 lines
Quoted 4 lines

You

Quoted 1 line

should be able to pass this with MAKE_TARGETS variable.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Can you please explain the change needed? I'm not familiar with do_compile().

Please see my other reply in this thread - I have both do_compile() and do_install() shown there. But the change would be more than just the make targets - there are slightly different variables used by default...

Anyway, I won't be insisting on this change, unless it is trivial for you to change.

Quoted 14 lines
Quoted 14 lines
Quoted 11 lines
Quoted 8 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the

lu.mak file

Quoted 1 line

updated that would be ideal. If not then you should at least copy

the base

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

function which unsets some variables.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

This should be fine, I will make a change to lu.mak and commit to ludev.git.

How about module_clean? Should that be changed to modules_clean?

Well, modules_install comes from the kernel, as one of the standard make targets. There is no module(s)_clean there though, so it's up to you:

$ make help
Cleaning targets:
  clean           - Remove most generated files but keep the config and
                    enough build support to build external modules
  mrproper        - Remove all generated files + config + various backup files
  distclean       - mrproper + remove editor backup and patch files

Configuration targets:

  config          - Update current config utilising a line-oriented program
  nconfig         - Update current config utilising a ncurses menu based program
  menuconfig      - Update current config utilising a menu based program
  xconfig         - Update current config utilising a QT based front-end
  gconfig         - Update current config utilising a GTK based front-end
  oldconfig       - Update current config utilising a provided .config as base
  localmodconfig  - Update current config disabling modules not loaded
  localyesconfig  - Update current config converting local mods to core
  silentoldconfig - Same as oldconfig, but quietly, additionally update deps
  defconfig       - New config with default from ARCH supplied defconfig
  savedefconfig   - Save current config as ./defconfig (minimal config)
  allnoconfig     - New config where all options are answered with no
  allyesconfig    - New config where all options are accepted with yes
  allmodconfig    - New config selecting modules when possible
  alldefconfig    - New config with all symbols set to default
  randconfig      - New config with random answer to all options
  listnewconfig   - List new options
  olddefconfig    - Same as silentoldconfig but sets new symbols to their default value

Other generic targets:

  all             - Build all targets marked with [*]
* vmlinux         - Build the bare kernel
* modules         - Build all modules
  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)
  firmware_install- Install all firmware to INSTALL_FW_PATH
                    (default: $(INSTALL_MOD_PATH)/lib/firmware)
  dir/            - Build all files in dir and below
  dir/file.[oisS] - Build specified target only
  dir/file.lst    - Build specified mixed source/assembly target only
                    (requires a recent binutils and recent build (System.map))
  dir/file.ko     - Build module including final link
  modules_prepare - Set up for building external modules
  tags/TAGS       - Generate tags file for editors
  cscope          - Generate cscope index
  gtags           - Generate GNU GLOBAL index
  kernelrelease   - Output the release version string
  kernelversion   - Output the version stored in Makefile
  image_name      - Output the image name
  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH
                    (default: /usr/src/linux-3.11.4/usr)

Static analysers

  checkstack      - Generate a list of stack hogs
  namespacecheck  - Name space analysis on compiled kernel
  versioncheck    - Sanity check on version.h usage
  includecheck    - Check for duplicate included header files
  export_report   - List the usages of all exported symbols
  headers_check   - Sanity check on exported headers
  headerdep       - Detect inclusion cycles in headers
  coccicheck      - Check with Coccinelle.

Kernel packaging:

  rpm-pkg             - Build both source and binary RPM kernel packages
  binrpm-pkg          - Build only the binary kernel package
  deb-pkg             - Build the kernel as a deb package
  tar-pkg             - Build the kernel as an uncompressed tarball
  targz-pkg           - Build the kernel as a gzip compressed tarball
  tarbz2-pkg          - Build the kernel as a bzip2 compressed tarball
  tarxz-pkg           - Build the kernel as a xz compressed tarball
  perf-tar-src-pkg    - Build perf-3.11.4.tar source tarball
  perf-targz-src-pkg  - Build perf-3.11.4.tar.gz source tarball

perf-tarbz2-src-pkg - Build perf-3.11.4.tar.bz2 source tarball perf-tarxz-src-pkg - Build perf-3.11.4.tar.xz source tarball

Documentation targets:
Linux kernel internal documentation in different formats:

  htmldocs        - HTML
  pdfdocs         - PDF
  psdocs          - Postscript
  xmldocs         - XML DocBook
  mandocs         - man pages
  installmandocs  - install man pages generated by mandocs
  cleandocs       - clean all generated DocBook files

Architecture specific targets (x86):
* bzImage - Compressed kernel image (arch/x86/boot/bzImage)
install - Install kernel using
(your) ~/bin/installkernel or (distribution) /sbin/installkernel or install to $(INSTALL_PATH) and run lilo

  fdimage      - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)
  fdimage144   - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)
  fdimage288   - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)
  isoimage     - Create a boot CD-ROM image (arch/x86/boot/image.iso)

bzdisk/fdimage*/isoimage also accept:
FDARGS="..." arguments for the booted kernel FDINITRD=file initrd for the booted kernel
kvmconfig - Enable additional options for guest kernel support

x86_64_defconfig - Build for x86_64
i386_defconfig - Build for i386

make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build
make V=2 [targets] 2 => give reason for rebuild of target
make O=dir [targets] Locate all output files in "dir", including .config
make C=1 [targets] Check all c source with $CHECK (sparse by default)
make C=2 [targets] Force check of all c source with $CHECK
make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections
make W=n [targets] Enable extra gcc checks, n=1,2,3 where
1: warnings which may be relevant and do not occur too often 2: warnings which occur quite often but may still be relevant 3: more obscure warnings, can most likely be ignored Multiple levels can be combined with W=12 or W=123

Execute "make" or "make all" to build all targets marked with [*] For further info see the ./README file

Quoted 15 lines
Quoted 7 lines
Quoted 1 line

Is there perhaps a value to having the version in the package name

instead of

Quoted 1 line

using _git versions? Will all SDKs be in step with using the same

version?

Quoted 1 line

[Sam] Chris or Rob, can you comment on this. I am not sure of when the other verticals pick up CMEM.

I need to let Chris comment on this.

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#5 lore raw
In reply to Nelson, Sam
Quoted 48 lines · Sam
Quoted 28 lines

-----Original Message-----
From: Maupin, Chase
Sent: Thursday, November 07, 2013 2:35 AM
To: Nelson, Sam; [email protected]
Subject: RE: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Thursday, November 07, 2013 10:34 AM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

Quoted 6 lines
recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

Quoted 2 lines

This patch should be submitted to [email protected] which is the meta-ti mailing list.

[Sam] Ok. I will do that.

Quoted 17 lines
Quoted 11 lines
recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb line 5

Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+
+include cmem.inc
+
+NAME="cmem"

Not sure what the NAME variable is for

Quoted 2 lines

[Sam] I am not sure either. This is probably because of initial template used for creation of the recipe. I can remove it if this really not needed.

This is not a variable used by bitbake, so assigning it and not using later is rather redundant.

Quoted 11 lines
Quoted 11 lines

recipes-bsp/cmem/cmem-mod_git.bb line 11

Quoted 6 lines

+# This package builds a kernel module, use kernel PR as base and append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"

I think what you are trying to do here is already handled by the package.bbclass. I assume you are trying to set the package name to kernel- module-cmem-mod?

Quoted 6 lines
Quoted 4 lines

This raises the question of whether you want this to be cmem-mod for the recipe and PN or if you want cmem for the module and cmem-xyz for the libraries.

[Sam] I guess the alternative you are suggesting is cmem for the module and cmem-lib for the libraries. I am not seeing a compelling reason to change.

You can keep cmem-mod as the name of the recipe. And even if you keep it as the name of the package (i.e. not set PKG_${PN} above), it will still work just fine.

So, if your recipe is called cmem-mod, but PKG_${PN} = "kernel-module-${PN}" then the resulting package will be called kernel-module-cmem-mod.ipk

If you don't set PKG_${PN}, then the package will be called cmem-mod.ipk, but there will be an empty package kernel-module-cmem-mod.ipk that automatically depend on cmem-mod.ipk :) At the end of the day, it will work just fine, as long as you don't mess the FILES_${PN} variable...

Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
Quoted 8 lines
Quoted 5 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +3 -0
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think. You should be able to pass this with MAKE_TARGETS variable.

Quoted 2 lines

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Well, it is rather "nice to have" - I won't require this as a mandatory change. After all, components may come from different environments and it's unrealistic to demand them to come with a comformant Makefile...

But, in case it would be possible and easy to change the Makefile, here's how default do_compile and do_install functions look like for a module:

module_do_compile() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
                   KERNEL_SRC=${STAGING_KERNEL_DIR}    \
                   KERNEL_VERSION=${KERNEL_VERSION}    \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   AR="${KERNEL_AR}" \
                   ${MAKE_TARGETS}
}
module_do_install() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
                   KERNEL_SRC=${STAGING_KERNEL_DIR} \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   modules_install
}

You are only supposed to set MAKE_TARGETS variable, which in your case would be "module_clean module"...

Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install
Quoted 9 lines
Quoted 3 lines

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the lu.mak file updated that would be ideal. If not then you should at least copy the base function which unsets some variables.

Quoted 2 lines

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Again, if changing the component is not really possible at this time, just unset all those *FLAGS variables above.

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +3 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
+LICENSE = "GPLv2"
Quoted 8 lines

recipes-bsp/cmem/cmem.inc

Quoted 5 lines
recipes-bsp/cmem/cmem.inc new file +1 -0
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other devices like omap-a15 as compatible machines?

Quoted 2 lines

[Sam] I am fine with remove the compatible machine. Although this is not tested with other machines.

So, Chris and Rob should comment on which platforms this version of cmem is supposed to be compatible with, even if it's not tested yet.

Quoted 43 lines
Quoted 6 lines

recipes-bsp/cmem/cmem.inc line 9

Quoted 2 lines
recipes-bsp/cmem/cmem.inc new file +2 -0
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"

Remove this comment but add one that the commit id below corresponds to release 4.00.00.06.

[Sam] I will fix this.

Quoted 3 lines

Is there perhaps a value to having the version in the package name instead of using _git versions? Will all SDKs be in step with using the same version?

[Sam] Chris or Rob, can you comment on this. I am not sure of when the other verticals pick up CMEM.

Quoted 21 lines
Quoted 21 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +8 -0
+
+include cmem.inc
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
Quoted 8 lines

recipes-bsp/cmem/cmem_git.bb line 13

Quoted 4 lines
recipes-bsp/cmem/cmem_git.bb new file +4 -0
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"

As Denys pointed out last time, if everything goes into cmem-test then why not just call this whole recipe cmem-test since the base cmem package is empty.

Quoted 4 lines

[Sam] The cmem package has the library that goes into cmem-dev. And hence the name cmem. cmem-test will have the example/unit test code binaries. Only thing is there is no binary files associated with the cmem package itself.

Right, we discussed some of this before and yesterday as well. It is not obvious, but a correct use case nevertheless. So, let's keep the name.

But, now I have one question - you do mention a library that goes to cmem-dev. Is is a dynamic library? If so, it should rather go into the main package. I suspect it lacks the correect extension and hence ends up in the -dev package.

Quoted 13 lines
Quoted 9 lines
Quoted 9 lines
recipes-bsp/cmem/cmem_git.bb new file +2 -1
+inherit autotools
+
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#6 lore raw

Please see one response below...

Regards,

- Rob

Quoted 29 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, November 07, 2013 5:53 PM
To: Nelson, Sam
Cc: Maupin, Chase; [email protected]; Ring, Chris; Tivy, Robert
Subject: Re: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
(quoted diff) +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +2 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
Quoted 8 lines
Quoted 8 lines

recipes-bsp/cmem/cmem.inc

Quoted 6 lines
recipes-bsp/cmem/cmem.inc new file +2 -0
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other

devices like

Quoted 2 lines
Quoted 1 line

omap-a15 as compatible machines?

Quoted 8 lines
Quoted 1 line

[Sam] I am fine with remove the compatible machine. Although this is

not

Quoted 1 line

tested with other machines.

So, Chris and Rob should comment on which platforms this version of cmem is
supposed to be compatible with, even if it's not tested yet.

CMEM is completely architecture-independent. The only HW it touches is memory, and the memory it touches is specified by the user/system integrator.

#7 lore raw
Quoted 39 lines · Robert

Please see one response below...

Regards,

- Rob

Quoted 33 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, November 07, 2013 5:53 PM
To: Nelson, Sam
Cc: Maupin, Chase; [email protected]; Ring, Chris; Tivy, Robert
Subject: Re: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
(quoted diff) +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +2 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
Quoted 8 lines
Quoted 8 lines

recipes-bsp/cmem/cmem.inc

Quoted 6 lines
recipes-bsp/cmem/cmem.inc new file +2 -0
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other

devices like

Quoted 3 lines
Quoted 1 line

omap-a15 as compatible machines?

[Sam] I am fine with remove the compatible machine. Although this is

not

Quoted 1 line

tested with other machines.

Quoted 8 lines
Quoted 4 lines

So, Chris and Rob should comment on which platforms this version of cmem is
supposed to be compatible with, even if it's not tested yet.

CMEM is completely architecture-independent. The only HW it touches is memory, and the memory it touches is specified by the user/system integrator.

Thanks. Then it doesn't make sense to artificially limit it to Keystone only.

Signature · 1 line
Denys
#8 lore raw
Quoted 57 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, November 07, 2013 9:04 PM
To: Tivy, Robert
Cc: Nelson, Sam; Maupin, Chase; [email protected]; Ring, Chris
Subject: Re: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 15 lines · Robert

Please see one response below...

Regards,

- Rob

Quoted 9 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, November 07, 2013 5:53 PM
To: Nelson, Sam
Cc: Maupin, Chase; [email protected]; Ring, Chris; Tivy, Robert
Subject: Re: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

recipes-

Quoted 2 lines
(quoted diff) +1 -0
+}
recipes- renamed from recipes-bsp/cmem/cmem.inc +0 -0

bsp/cmem/cmem.inc

Quoted 29 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

recipes-bsp/cmem/cmem.inc

Quoted 5 lines

new file mode 100644
index 0000000..5d17d8e

recipes-bsp/cmem/cmem.inc new file +0 -0
@@ -0,0 +1,12 @@

+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

recipes-bsp/cmem/cmem.inc

Quoted 3 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb

Quoted 16 lines
Quoted 5 lines
Quoted 5 lines

recipes-bsp/cmem/cmem.inc

Quoted 3 lines

8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other

devices like

Quoted 3 lines
Quoted 1 line

omap-a15 as compatible machines?

[Sam] I am fine with remove the compatible machine. Although this is

not

Quoted 1 line

tested with other machines.

So, Chris and Rob should comment on which platforms this version of cmem is
supposed to be compatible with, even if it's not tested yet.

Quoted 5 lines
Quoted 3 lines

CMEM is completely architecture-independent. The only HW it touches is memory, and the memory it touches is specified by the user/system integrator.

Thanks. Then it doesn't make sense to artificially limit it to Keystone only.

[Sam] Agreed. I will remove COMPATIBLE_MACHINE = "keystone-evm"

Quoted 3 lines

--
Denys

#9 lore raw
In reply to Denys Dmytriyenko
Quoted 94 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, November 07, 2013 8:53 PM
To: Nelson, Sam
Cc: Maupin, Chase; [email protected]; Ring, Chris; Tivy, Robert
Subject: Re: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 48 lines · Sam
Quoted 28 lines

-----Original Message-----
From: Maupin, Chase
Sent: Thursday, November 07, 2013 2:35 AM
To: Nelson, Sam; [email protected]
Subject: RE: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Thursday, November 07, 2013 10:34 AM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

Quoted 6 lines
recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

Quoted 2 lines

This patch should be submitted to [email protected] which is the meta-ti mailing list.

[Sam] Ok. I will do that.

Quoted 17 lines
Quoted 11 lines
recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb line 5

Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+
+include cmem.inc
+
+NAME="cmem"

Not sure what the NAME variable is for

Quoted 2 lines

[Sam] I am not sure either. This is probably because of initial template used for creation of the recipe. I can remove it if this really not needed.

This is not a variable used by bitbake, so assigning it and not using later is rather redundant.

Quoted 9 lines
Quoted 9 lines

recipes-bsp/cmem/cmem-mod_git.bb line 11

Quoted 6 lines

+# This package builds a kernel module, use kernel PR as base and append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"

I think what you are trying to do here is already handled by the package.bbclass. I assume you are trying to set the package name to

kernel-

Quoted 3 lines
Quoted 3 lines

module-cmem-mod?

This raises the question of whether you want this to be cmem-mod for

the

Quoted 4 lines
Quoted 3 lines

recipe and PN or if you want cmem for the module and cmem-xyz for the libraries.

[Sam] I guess the alternative you are suggesting is cmem for the module

and

Quoted 1 line

cmem-lib for the libraries. I am not seeing a compelling reason to change.

You can keep cmem-mod as the name of the recipe. And even if you keep it as the name of the package (i.e. not set PKG_${PN} above), it will still work just fine.

So, if your recipe is called cmem-mod, but PKG_${PN} = "kernel-module- ${PN}"
then the resulting package will be called kernel-module-cmem-mod.ipk

Quoted 7 lines

If you don't set PKG_${PN}, then the package will be called cmem-mod.ipk, but
there will be an empty package kernel-module-cmem-mod.ipk that automatically
depend on cmem-mod.ipk :) At the end of the day, it will work just fine, as long as you don't mess the FILES_${PN} variable...

[Sam] I will remove the line PKG_${PN} = "kernel-module-${PN}"

Quoted 153 lines
Quoted 13 lines
Quoted 13 lines
Quoted 11 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +8 -0
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think.

You

Quoted 4 lines
Quoted 1 line

should be able to pass this with MAKE_TARGETS variable.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Well, it is rather "nice to have" - I won't require this as a mandatory change. After all, components may come from different environments and it's
unrealistic to demand them to come with a comformant Makefile...

But, in case it would be possible and easy to change the Makefile, here's how default do_compile and do_install functions look like for a module:

module_do_compile() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
                   KERNEL_SRC=${STAGING_KERNEL_DIR}    \
                   KERNEL_VERSION=${KERNEL_VERSION}    \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   AR="${KERNEL_AR}" \
                   ${MAKE_TARGETS}
}
module_do_install() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
                   KERNEL_SRC=${STAGING_KERNEL_DIR} \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   modules_install
}

You are only supposed to set MAKE_TARGETS variable, which in your case would
be "module_clean module"...

Quoted 11 lines
Quoted 11 lines
Quoted 8 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the lu.mak

file

Quoted 1 line
Quoted 1 line

updated that would be ideal. If not then you should at least copy the

base

Quoted 4 lines
Quoted 2 lines

function which unsets some variables.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Again, if changing the component is not really possible at this time, just unset all those *FLAGS variables above.

Quoted 20 lines
Quoted 8 lines

recipes-bsp/cmem/cmem.inc

Quoted 7 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +0 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@

+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"

Quoted 10 lines

recipes-bsp/cmem/cmem.inc

Quoted 7 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other devices like omap-a15 as compatible machines?

Quoted 2 lines

[Sam] I am fine with remove the compatible machine. Although this is not tested with other machines.

So, Chris and Rob should comment on which platforms this version of cmem is
supposed to be compatible with, even if it's not tested yet.

Quoted 4 lines
Quoted 4 lines

recipes-bsp/cmem/cmem.inc line 9

Quoted 2 lines
recipes-bsp/cmem/cmem.inc new file +2 -0
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"

Remove this comment but add one that the commit id below corresponds

to

Quoted 4 lines
Quoted 2 lines

release 4.00.00.06.

[Sam] I will fix this.

Quoted 1 line

Is there perhaps a value to having the version in the package name

instead of

Quoted 32 lines
Quoted 2 lines

using _git versions? Will all SDKs be in step with using the same version?

[Sam] Chris or Rob, can you comment on this. I am not sure of when the other verticals pick up CMEM.

Quoted 27 lines
Quoted 15 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +2 -0
+
+include cmem.inc

recipes-bsp/cmem/cmem_git.bb line 13

Quoted 10 lines
recipes-bsp/cmem/cmem_git.bb new file +10 -0
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"

As Denys pointed out last time, if everything goes into cmem-test then

why

Quoted 4 lines
Quoted 2 lines

not just call this whole recipe cmem-test since the base cmem package is empty.

[Sam] The cmem package has the library that goes into cmem-dev. And

hence

Quoted 3 lines

the name cmem. cmem-test will have the example/unit test code binaries. Only thing is there is no binary files associated with the cmem package itself.

Quoted 9 lines

Right, we discussed some of this before and yesterday as well. It is not obvious, but a correct use case nevertheless. So, let's keep the name.

But, now I have one question - you do mention a library that goes to cmem- dev.
Is is a dynamic library? If so, it should rather go into the main package. I suspect it lacks the correect extension and hence ends up in the -dev package.

[Sam] There is both static and dynamic library here. Actually the shared library will be part of cmem package. ( The static library will be part of cmem-dev)

Quoted 14 lines
Quoted 14 lines
Quoted 10 lines
Quoted 10 lines
recipes-bsp/cmem/cmem_git.bb new file +2 -1
+inherit autotools
+
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#10 lore raw
In reply to Denys Dmytriyenko
Quoted 146 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, November 07, 2013 8:53 PM
To: Nelson, Sam
Cc: Maupin, Chase; [email protected]; Ring, Chris; Tivy, Robert
Subject: Re: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 48 lines · Sam
Quoted 28 lines

-----Original Message-----
From: Maupin, Chase
Sent: Thursday, November 07, 2013 2:35 AM
To: Nelson, Sam; [email protected]
Subject: RE: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Thursday, November 07, 2013 10:34 AM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

Quoted 6 lines
recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

Quoted 2 lines

This patch should be submitted to [email protected] which is the meta-ti mailing list.

[Sam] Ok. I will do that.

Quoted 17 lines
Quoted 11 lines
recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb line 5

Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+
+include cmem.inc
+
+NAME="cmem"

Not sure what the NAME variable is for

Quoted 2 lines

[Sam] I am not sure either. This is probably because of initial template used for creation of the recipe. I can remove it if this really not needed.

This is not a variable used by bitbake, so assigning it and not using later is rather redundant.

Quoted 9 lines
Quoted 9 lines

recipes-bsp/cmem/cmem-mod_git.bb line 11

Quoted 6 lines

+# This package builds a kernel module, use kernel PR as base and append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"

I think what you are trying to do here is already handled by the package.bbclass. I assume you are trying to set the package name to

kernel-

Quoted 3 lines
Quoted 3 lines

module-cmem-mod?

This raises the question of whether you want this to be cmem-mod for

the

Quoted 4 lines
Quoted 3 lines

recipe and PN or if you want cmem for the module and cmem-xyz for the libraries.

[Sam] I guess the alternative you are suggesting is cmem for the module

and

Quoted 1 line

cmem-lib for the libraries. I am not seeing a compelling reason to change.

You can keep cmem-mod as the name of the recipe. And even if you keep it as the name of the package (i.e. not set PKG_${PN} above), it will still work just fine.

So, if your recipe is called cmem-mod, but PKG_${PN} = "kernel-module- ${PN}"
then the resulting package will be called kernel-module-cmem-mod.ipk

If you don't set PKG_${PN}, then the package will be called cmem-mod.ipk, but
there will be an empty package kernel-module-cmem-mod.ipk that automatically
depend on cmem-mod.ipk :) At the end of the day, it will work just fine, as long as you don't mess the FILES_${PN} variable...

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+S = "${WORKDIR}/git"
+
+inherit module
+
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think.

You

Quoted 4 lines
Quoted 1 line

should be able to pass this with MAKE_TARGETS variable.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Well, it is rather "nice to have" - I won't require this as a mandatory change. After all, components may come from different environments and it's
unrealistic to demand them to come with a comformant Makefile...

But, in case it would be possible and easy to change the Makefile, here's how default do_compile and do_install functions look like for a module:

module_do_compile() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
                   KERNEL_SRC=${STAGING_KERNEL_DIR}    \
                   KERNEL_VERSION=${KERNEL_VERSION}    \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   AR="${KERNEL_AR}" \
                   ${MAKE_TARGETS}
}
module_do_install() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
                   KERNEL_SRC=${STAGING_KERNEL_DIR} \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   modules_install
}
Quoted 3 lines

You are only supposed to set MAKE_TARGETS variable, which in your case would
be "module_clean module"...

[Sam] we will add the unset FLAGS. Am I supposed to also rename do_install to module_do_install, do_compile --> module_do_install. And also will add module_do_clean? Please confirm. Currently we have to still use non-standard makefile.

Quoted 128 lines
Quoted 13 lines
Quoted 13 lines
Quoted 10 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the lu.mak

file

Quoted 1 line
Quoted 1 line

updated that would be ideal. If not then you should at least copy the

base

Quoted 4 lines
Quoted 2 lines

function which unsets some variables.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Again, if changing the component is not really possible at this time, just unset all those *FLAGS variables above.

Quoted 20 lines
Quoted 8 lines

recipes-bsp/cmem/cmem.inc

Quoted 7 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +0 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@

+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"

Quoted 10 lines

recipes-bsp/cmem/cmem.inc

Quoted 7 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other devices like omap-a15 as compatible machines?

Quoted 2 lines

[Sam] I am fine with remove the compatible machine. Although this is not tested with other machines.

So, Chris and Rob should comment on which platforms this version of cmem is
supposed to be compatible with, even if it's not tested yet.

Quoted 4 lines
Quoted 4 lines

recipes-bsp/cmem/cmem.inc line 9

Quoted 2 lines
recipes-bsp/cmem/cmem.inc new file +2 -0
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"

Remove this comment but add one that the commit id below corresponds

to

Quoted 4 lines
Quoted 2 lines

release 4.00.00.06.

[Sam] I will fix this.

Quoted 1 line

Is there perhaps a value to having the version in the package name

instead of

Quoted 32 lines
Quoted 2 lines

using _git versions? Will all SDKs be in step with using the same version?

[Sam] Chris or Rob, can you comment on this. I am not sure of when the other verticals pick up CMEM.

Quoted 27 lines
Quoted 15 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +2 -0
+
+include cmem.inc

recipes-bsp/cmem/cmem_git.bb line 13

Quoted 10 lines
recipes-bsp/cmem/cmem_git.bb new file +10 -0
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"

As Denys pointed out last time, if everything goes into cmem-test then

why

Quoted 4 lines
Quoted 2 lines

not just call this whole recipe cmem-test since the base cmem package is empty.

[Sam] The cmem package has the library that goes into cmem-dev. And

hence

Quoted 3 lines

the name cmem. cmem-test will have the example/unit test code binaries. Only thing is there is no binary files associated with the cmem package itself.

Right, we discussed some of this before and yesterday as well. It is not obvious, but a correct use case nevertheless. So, let's keep the name.

But, now I have one question - you do mention a library that goes to cmem- dev.
Is is a dynamic library? If so, it should rather go into the main package. I suspect it lacks the correect extension and hence ends up in the -dev package.

Quoted 13 lines
Quoted 9 lines
Quoted 9 lines
recipes-bsp/cmem/cmem_git.bb new file +2 -1
+inherit autotools
+
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#11 lore raw
Quoted 146 lines · Sam
Quoted 146 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, November 07, 2013 8:53 PM
To: Nelson, Sam
Cc: Maupin, Chase; [email protected]; Ring, Chris; Tivy, Robert
Subject: Re: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 48 lines · Sam
Quoted 28 lines

-----Original Message-----
From: Maupin, Chase
Sent: Thursday, November 07, 2013 2:35 AM
To: Nelson, Sam; [email protected]
Subject: RE: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Thursday, November 07, 2013 10:34 AM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

Quoted 6 lines
recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

Quoted 2 lines

This patch should be submitted to [email protected] which is the meta-ti mailing list.

[Sam] Ok. I will do that.

Quoted 17 lines
Quoted 11 lines
recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb line 5

Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+
+include cmem.inc
+
+NAME="cmem"

Not sure what the NAME variable is for

Quoted 2 lines

[Sam] I am not sure either. This is probably because of initial template used for creation of the recipe. I can remove it if this really not needed.

This is not a variable used by bitbake, so assigning it and not using later is rather redundant.

Quoted 9 lines
Quoted 9 lines

recipes-bsp/cmem/cmem-mod_git.bb line 11

Quoted 6 lines

+# This package builds a kernel module, use kernel PR as base and append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"

I think what you are trying to do here is already handled by the package.bbclass. I assume you are trying to set the package name to

kernel-

Quoted 3 lines
Quoted 3 lines

module-cmem-mod?

This raises the question of whether you want this to be cmem-mod for

the

Quoted 4 lines
Quoted 3 lines

recipe and PN or if you want cmem for the module and cmem-xyz for the libraries.

[Sam] I guess the alternative you are suggesting is cmem for the module

and

Quoted 1 line

cmem-lib for the libraries. I am not seeing a compelling reason to change.

You can keep cmem-mod as the name of the recipe. And even if you keep it as the name of the package (i.e. not set PKG_${PN} above), it will still work just fine.

So, if your recipe is called cmem-mod, but PKG_${PN} = "kernel-module- ${PN}"
then the resulting package will be called kernel-module-cmem-mod.ipk

If you don't set PKG_${PN}, then the package will be called cmem-mod.ipk, but
there will be an empty package kernel-module-cmem-mod.ipk that automatically
depend on cmem-mod.ipk :) At the end of the day, it will work just fine, as long as you don't mess the FILES_${PN} variable...

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+S = "${WORKDIR}/git"
+
+inherit module
+
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +4 -0
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

You should use the default do_compile in the module.bbclass I think.

You

Quoted 4 lines
Quoted 1 line

should be able to pass this with MAKE_TARGETS variable.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Well, it is rather "nice to have" - I won't require this as a mandatory change. After all, components may come from different environments and it's
unrealistic to demand them to come with a comformant Makefile...

But, in case it would be possible and easy to change the Makefile, here's how default do_compile and do_install functions look like for a module:

module_do_compile() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
                   KERNEL_SRC=${STAGING_KERNEL_DIR}    \
                   KERNEL_VERSION=${KERNEL_VERSION}    \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   AR="${KERNEL_AR}" \
                   ${MAKE_TARGETS}
}
module_do_install() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
                   KERNEL_SRC=${STAGING_KERNEL_DIR} \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   modules_install
}
Quoted 8 lines
Quoted 3 lines

You are only supposed to set MAKE_TARGETS variable, which in your case would
be "module_clean module"...

[Sam] we will add the unset FLAGS. Am I supposed to also rename do_install to module_do_install, do_compile --> module_do_install. And also will add module_do_clean? Please confirm. Currently we have to still use non-standard makefile.

No, providing own do_install and do_compile should be fine for now, if you can't change module's Makefile.

Quoted 126 lines
Quoted 126 lines
Quoted 11 lines
Quoted 11 lines
Quoted 8 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

Hmmm. The default do_install for the module.bbclass uses "modules_install" instead of "module_install". If you can get the lu.mak

file

Quoted 1 line
Quoted 1 line

updated that would be ideal. If not then you should at least copy the

base

Quoted 4 lines
Quoted 2 lines

function which unsets some variables.

[Sam] Probably Chris and Rob on the CC list can comment on this. This will need change of the module.

Again, if changing the component is not really possible at this time, just unset all those *FLAGS variables above.

Quoted 20 lines
Quoted 8 lines

recipes-bsp/cmem/cmem.inc

Quoted 7 lines
recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +0 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@

+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"

Quoted 10 lines

recipes-bsp/cmem/cmem.inc

Quoted 7 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +2 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"

As Sidd pointed out is there any reason not to add the other devices like omap-a15 as compatible machines?

Quoted 2 lines

[Sam] I am fine with remove the compatible machine. Although this is not tested with other machines.

So, Chris and Rob should comment on which platforms this version of cmem is
supposed to be compatible with, even if it's not tested yet.

Quoted 4 lines
Quoted 4 lines

recipes-bsp/cmem/cmem.inc line 9

Quoted 2 lines
recipes-bsp/cmem/cmem.inc new file +2 -0
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"

Remove this comment but add one that the commit id below corresponds

to

Quoted 4 lines
Quoted 2 lines

release 4.00.00.06.

[Sam] I will fix this.

Quoted 1 line

Is there perhaps a value to having the version in the package name

instead of

Quoted 32 lines
Quoted 2 lines

using _git versions? Will all SDKs be in step with using the same version?

[Sam] Chris or Rob, can you comment on this. I am not sure of when the other verticals pick up CMEM.

Quoted 27 lines
Quoted 15 lines
recipes-bsp/cmem/cmem.inc new file +3 -0
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +2 -0
+
+include cmem.inc

recipes-bsp/cmem/cmem_git.bb line 13

Quoted 10 lines
recipes-bsp/cmem/cmem_git.bb new file +10 -0
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"

As Denys pointed out last time, if everything goes into cmem-test then

why

Quoted 4 lines
Quoted 2 lines

not just call this whole recipe cmem-test since the base cmem package is empty.

[Sam] The cmem package has the library that goes into cmem-dev. And

hence

Quoted 3 lines

the name cmem. cmem-test will have the example/unit test code binaries. Only thing is there is no binary files associated with the cmem package itself.

Right, we discussed some of this before and yesterday as well. It is not obvious, but a correct use case nevertheless. So, let's keep the name.

But, now I have one question - you do mention a library that goes to cmem- dev.
Is is a dynamic library? If so, it should rather go into the main package. I suspect it lacks the correect extension and hence ends up in the -dev package.

Quoted 13 lines
Quoted 9 lines
Quoted 9 lines
recipes-bsp/cmem/cmem_git.bb new file +2 -1
+inherit autotools
+
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#12 lore raw
In reply to Sam Nelson

Sam,

Were you going to post an updated set of these patches to meta-ti so you can align with Mrinmayee? I think your approach of splitting out the packages in linux-utils is a good one and will be cleaner going forward. Since both of your groups share these packages aligning between the two would be helpful.

As a side note I assume you have other recipes that depend on the cmem libraries that your cmem recipe provides. Can you post one of those or share it with Mrinmayee as an example of how you are able to point to the right staging location for the libraries and headers for cmem in other recipes. I'm hoping we can start getting rid of ti-paths.inc but I'd like to see how you were working around this.

Denys,

Since ti-linuxutils has other modules in it for edma, sdma, and irq but those are only for legacy devices can we just replace the whole ti-linuxutils with the cmem package which seems to be the main package needed? Or do you want to see additional recipes for the sdma, edma, and irq moduled?

Quoted 112 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Wednesday, November 06, 2013 11:04 PM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb new file +6 -0
+
+include cmem.inc
+
+NAME="cmem"
+
+# This package builds a kernel module, use kernel PR as base and

append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +13 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +4 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +8 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"
+
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +15 -1
+
+include cmem.inc
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"
+
+inherit autotools
+
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#13 lore raw
Quoted 14 lines · Chase

Sam,

Were you going to post an updated set of these patches to meta-ti so you can align with Mrinmayee? I think your approach of splitting out the packages in linux-utils is a good one and will be cleaner going forward. Since both of your groups share these packages aligning between the two would be helpful.

As a side note I assume you have other recipes that depend on the cmem libraries that your cmem recipe provides. Can you post one of those or share it with Mrinmayee as an example of how you are able to point to the right staging location for the libraries and headers for cmem in other recipes. I'm hoping we can start getting rid of ti-paths.inc but I'd like to see how you were working around this.

Quoted 7 lines

Denys,

Since ti-linuxutils has other modules in it for edma, sdma, and irq but those are only for legacy devices can we just replace the whole ti-linuxutils with the cmem package which seems to be the main package needed? Or do you want to see additional recipes for the sdma, edma, and irq moduled?

I'd like to see other parts of linuxutils modularized, but that can be done on as needed basis for any of the new platforms when they require those. We can keep the old linuxutils around for a little longer, but it can only be used on the old 35x and 37x plaftorms only and there are many other components (like SGX) removing support for those old platforms already...

Signature · 1 line
Denys
Quoted 116 lines
Quoted 108 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Nelson, Sam
Sent: Wednesday, November 06, 2013 11:04 PM
To: [email protected]; Nelson, Sam
Subject: [meta-arago] [PATCH v2] cmem: Adding New recipe for cmem

- Cmem module is used for user space contiguous memory alloation

---
recipes-bsp/cmem/cmem-mod_git.bb | 26
++++++++++++++++++++++++++

recipes-bsp/cmem/cmem.inc        |   12 ++++++++++++
recipes-bsp/cmem/cmem_git.bb     |   16 ++++++++++++++++
3 files changed, 54 insertions(+)

create mode 100644 recipes-bsp/cmem/cmem-mod_git.bb create mode 100644 recipes-bsp/cmem/cmem.inc create mode 100644 recipes-bsp/cmem/cmem_git.bb

recipes- renamed from recipes-bsp/cmem/cmem-mod_git.bb +0 -0

bsp/cmem/cmem-mod_git.bb
new file mode 100644
index 0000000..c402b72

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION="Contiguous memory allocation kernel module for

contiguous memory allocation from userspace "

recipes-bsp/cmem/cmem-mod_git.bb new file +6 -0
+
+include cmem.inc
+
+NAME="cmem"
+
+# This package builds a kernel module, use kernel PR as base and

append a local

recipes-bsp/cmem/cmem-mod_git.bb new file +13 -0
+PR = "${MACHINE_KERNEL_PR}"
+PR_append = "a"
+
+PKG_${PN} = "kernel-module-${PN}"
+
+S = "${WORKDIR}/git"
+
+inherit module
+
+do_compile () {
+    cd ${S}
+    make -f lu.mak module_clean
+    make -f lu.mak module

KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
TOOLCHAIN_PREFIX=${CROSS_COMPILE}

recipes-bsp/cmem/cmem-mod_git.bb new file +5 -0
+}
+
+do_install () {
+    cd ${S}
+    make -f lu.mak module_install

KERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" EXEC_DIR="${D}/lib/modules/${KERNEL_VERSION}/extra" INSTALL_MOD_PATH="${D}"

recipes-bsp/cmem/cmem-mod_git.bb new file +1 -0
+}
recipes-bsp/cmem/cmem.inc new file +4 -0
new file mode 100644
index 0000000..5d17d8e
@@ -0,0 +1,12 @@
+HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:CMEM"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM =

"file://include/ti/cmem.h;beginline=1;endline=30;md5=b86138d4028fb 8310b3b983024edc620"

recipes-bsp/cmem/cmem.inc new file +8 -0
+
+COMPATIBLE_MACHINE = "keystone-evm"
+
+BRANCH ?= "master"
+#SRCREV = "4.00.00.06"
+SRCREV = "c2cf2406702bcb889c10d0e6e7d298ba7b84ae7d"
+
+SRC_URI =

"git://git.ti.com/ipc/ludev.git;protocol=git;branch=${BRANCH}"

recipes- renamed from recipes-bsp/cmem/cmem_git.bb +0 -0

bsp/cmem/cmem_git.bb
new file mode 100644
index 0000000..f415630

recipes-bsp/cmem/cmem_git.bb new file +1 -0
@@ -0,0 +1,16 @@
+DESCRIPTION="The cmem component supports contiguous memory

allocation from userspace "

recipes-bsp/cmem/cmem_git.bb new file +15 -1
+
+include cmem.inc
+
+RDEPENDS_${PN} = "cmem-mod"
+
+S = "${WORKDIR}/git"
+
+PR = "r0"
+
+PACKAGES =+ "${PN}-test"
+
+FILES_${PN}-test = "${bindir}/*"
+
+inherit autotools
+
--

1.7.9.5

Quoted 4 lines

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#14 lore raw
Quoted 23 lines · Denys Dmytriyenko
Quoted 14 lines · Chase

Sam,

Were you going to post an updated set of these patches to meta-ti so you can align with Mrinmayee? I think your approach of splitting out the packages in linux-utils is a good one and will be cleaner going forward. Since both of your groups share these packages aligning between the two would be helpful.

As a side note I assume you have other recipes that depend on the cmem libraries that your cmem recipe provides. Can you post one of those or share it with Mrinmayee as an example of how you are able to point to the right staging location for the libraries and headers for cmem in other recipes. I'm hoping we can start getting rid of ti-paths.inc but I'd like to see how you were working around this.

Quoted 7 lines

Denys,

Since ti-linuxutils has other modules in it for edma, sdma, and irq but those are only for legacy devices can we just replace the whole ti-linuxutils with the cmem package which seems to be the main package needed? Or do you want to see additional recipes for the sdma, edma, and irq moduled?

Quoted 5 lines

I'd like to see other parts of linuxutils modularized, but that can be done on as needed basis for any of the new platforms when they require those. We can keep the old linuxutils around for a little longer, but it can only be used on the old 35x and 37x plaftorms only and there are many other components (like SGX) removing support for those old platforms already...

Please keep the linuxutils recipe until it can be replaced with the modularized ones, it's useful for 35x and 37x dsp (gstreamer_ti).

Enrico

#15 lore raw
Quoted 24 lines · Enrico
Quoted 23 lines · Denys Dmytriyenko
Quoted 21 lines · Chase

Sam,

Were you going to post an updated set of these patches to meta-ti so you can align with Mrinmayee? I think your approach of splitting out the packages in linux-utils is a good one and will be cleaner going forward. Since both of your groups share these packages aligning between the two would be helpful.

As a side note I assume you have other recipes that depend on the cmem libraries that your cmem recipe provides. Can you post one of those or share it with Mrinmayee as an example of how you are able to point to the right staging location for the libraries and headers for cmem in other recipes. I'm hoping we can start getting rid of ti-paths.inc but I'd like to see how you were working around this.

Denys,

Since ti-linuxutils has other modules in it for edma, sdma, and irq but those are only for legacy devices can we just replace the whole ti-linuxutils with the cmem package which seems to be the main package needed? Or do you want to see additional recipes for the sdma, edma, and irq moduled?

Quoted 8 lines
Quoted 5 lines

I'd like to see other parts of linuxutils modularized, but that can be done on as needed basis for any of the new platforms when they require those. We can keep the old linuxutils around for a little longer, but it can only be used on the old 35x and 37x plaftorms only and there are many other components (like SGX) removing support for those old platforms already...

Please keep the linuxutils recipe until it can be replaced with the modularized ones, it's useful for 35x and 37x dsp (gstreamer_ti).

Enrico,

Thanks, I'll keep it around for now.

Can you please clarify which kernel you use for 35x and 37x platforms? And whether you use the latest versions of other components?

The problem with keeping old components around is that they quickly lose compatibility with kernel, toolchain, udev etc. that we use these days and it doesn't make much sense to carry them indefinitely w/o updating or replacing.

Signature · 1 line
Denys
#16 lore raw
Quoted 11 lines · Denys Dmytriyenko
Quoted 9 lines · Enrico
Quoted 5 lines · Denys Dmytriyenko

I'd like to see other parts of linuxutils modularized, but that can be done on as needed basis for any of the new platforms when they require those. We can keep the old linuxutils around for a little longer, but it can only be used on the old 35x and 37x plaftorms only and there are many other components (like SGX) removing support for those old platforms already...

Please keep the linuxutils recipe until it can be replaced with the modularized ones, it's useful for 35x and 37x dsp (gstreamer_ti).

Quoted 6 lines

Enrico,

Thanks, I'll keep it around for now.

Can you please clarify which kernel you use for 35x and 37x platforms? And whether you use the latest versions of other components?

In production i'm using mainline kernel 3.2 with some custom patches (not related to dsp components, see my github at [1]), with unmodified components from meta-ti (i'm not using meta-arago).

I'm testing now with kernel 3.12, unmodified components from meta-ti, gcc 4.8.something (angstrom 2013.12), the components need some patching but it was really easy to fix them. I don't remember right now what were the components i needed to fix but i'm sure about cmem and dsplink.

Right now the most important feature i'm missing is devicetree bindings for omap3isp.

Quoted 3 lines

The problem with keeping old components around is that they quickly lose compatibility with kernel, toolchain, udev etc. that we use these days and it doesn't make much sense to carry them indefinitely w/o updating or replacing.

I think there are still many users of the omap dsp stuff. I understand that TI doesn't want to put resources on "old" platforms (even if they are still in production and not declared obsolete) but do you think it could be possible to have some help when those kind of problems happen?
For example if i have a problem with dsplink and i'm not able to fix it, asking for help in meta-ti will be useful? (i'm speaking about someone in a TI dev team that already knows the code).

Enrico

[1]: https://github.com/ebutera/meta-igep/blob/master/recipes-kernel/linux/linux_3.2.bb