All of lore.kernel.org
 help / color / mirror / Atom feed
* problem of install kernel module(*.ko) to rootfs folder
@ 2014-12-25  3:08 Neil.Wu
  2014-12-25  3:25 ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Neil.Wu @ 2014-12-25  3:08 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

Hi all,

First of all , merry Christmas.

I run menuconfig and save the .config as following:

CONFIG_SPI_DEV_INTERFACE=m
CONFIG_PACKAGE_kmod-usb-core=m

Then I build the linux-yocto and core-image-minimal :
Bitbake linux-yocto
Bitbake core-image-minimal

I expected all the kernel module will install in core-image-minimal rootfs, but , in the ./lib/modules/3.4.44-G4 , I just find

modules.alias,  modules.alias.bin , modules.builtin.bin,  modules.dep ...

It have nothing kernel modules (*.ko) file in ./lib/modules/. How to install the *.ko to rootfs  automatically ?

Someone tell me to change the .config file as these :
CONFIG_SPI_DEV_INTERFACE=y
CONFIG_PACKAGE_kmod-usb-core=y
I have test it what will build the kernel modules (*.ko ) to kernel image,  that's not what I need.


so ,   I just want to know . how to install the kernel modules (*.ko) to core-image-minimal rootfs ?  If you know it , please help me .
Thank you very much.

Neil








[-- Attachment #2: Type: text/html, Size: 4170 bytes --]

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

* Re: problem of install kernel module(*.ko) to rootfs folder
  2014-12-25  3:08 problem of install kernel module(*.ko) to rootfs folder Neil.Wu
@ 2014-12-25  3:25 ` Khem Raj
  2014-12-25  7:01   ` Neil.Wu
  2015-01-22  8:13   ` The problem of do_rootfs_append Neil.Wu
  0 siblings, 2 replies; 8+ messages in thread
From: Khem Raj @ 2014-12-25  3:25 UTC (permalink / raw)
  To: Neil.Wu; +Cc: yocto

On Wed, Dec 24, 2014 at 7:08 PM,  <Neil.Wu@emerson.com> wrote:
> Hi all,
>
>
>
> First of all , merry Christmas.
>
>
>
> I run menuconfig and save the .config as following:
>
>
>
> CONFIG_SPI_DEV_INTERFACE=m
>
> CONFIG_PACKAGE_kmod-usb-core=m
>
>
>
> Then I build the linux-yocto and core-image-minimal :
>
> Bitbake linux-yocto
>
> Bitbake core-image-minimal
>
>
>
> I expected all the kernel module will install in core-image-minimal rootfs,
> but , in the ./lib/modules/3.4.44-G4 , I just find
>
>
>
> modules.alias,  modules.alias.bin , modules.builtin.bin,  modules.dep …
>
>
>
> It have nothing kernel modules (*.ko) file in ./lib/modules/. How to install
> the *.ko to rootfs  automatically ?
>
>
>
> Someone tell me to change the .config file as these :
>
> CONFIG_SPI_DEV_INTERFACE=y
>
> CONFIG_PACKAGE_kmod-usb-core=y
>
> I have test it what will build the kernel modules (*.ko ) to kernel image,
> that’s not what I need.
>
>
>
>
>
> so ,   I just want to know . how to install the kernel modules (*.ko) to
> core-image-minimal rootfs ?  If you know it , please help me .

well its a minimal-image so all modules are excluded. You can build
core-image-basic and it should have it
or you can do something like

MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"

in your machine.conf


>
> Thank you very much.
>
>
>
> Neil
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


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

* Re: problem of install kernel module(*.ko) to rootfs folder
  2014-12-25  3:25 ` Khem Raj
@ 2014-12-25  7:01   ` Neil.Wu
  2015-01-22  8:13   ` The problem of do_rootfs_append Neil.Wu
  1 sibling, 0 replies; 8+ messages in thread
From: Neil.Wu @ 2014-12-25  7:01 UTC (permalink / raw)
  To: raj.khem; +Cc: yocto

Hi Raj,

Thank you for your reply. I have resolved the problem. Thank you!!

Neil

-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com] 
Sent: Thursday, December 25, 2014 11:26 AM
To: Wu, Neil [CLIMATE/RS/CN]
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] problem of install kernel module(*.ko) to rootfs folder

On Wed, Dec 24, 2014 at 7:08 PM,  <Neil.Wu@emerson.com> wrote:
> Hi all,
>
>
>
> First of all , merry Christmas.
>
>
>
> I run menuconfig and save the .config as following:
>
>
>
> CONFIG_SPI_DEV_INTERFACE=m
>
> CONFIG_PACKAGE_kmod-usb-core=m
>
>
>
> Then I build the linux-yocto and core-image-minimal :
>
> Bitbake linux-yocto
>
> Bitbake core-image-minimal
>
>
>
> I expected all the kernel module will install in core-image-minimal rootfs,
> but , in the ./lib/modules/3.4.44-G4 , I just find
>
>
>
> modules.alias,  modules.alias.bin , modules.builtin.bin,  modules.dep …
>
>
>
> It have nothing kernel modules (*.ko) file in ./lib/modules/. How to install
> the *.ko to rootfs  automatically ?
>
>
>
> Someone tell me to change the .config file as these :
>
> CONFIG_SPI_DEV_INTERFACE=y
>
> CONFIG_PACKAGE_kmod-usb-core=y
>
> I have test it what will build the kernel modules (*.ko ) to kernel image,
> that’s not what I need.
>
>
>
>
>
> so ,   I just want to know . how to install the kernel modules (*.ko) to
> core-image-minimal rootfs ?  If you know it , please help me .

well its a minimal-image so all modules are excluded. You can build
core-image-basic and it should have it
or you can do something like

MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"

in your machine.conf


>
> Thank you very much.
>
>
>
> Neil
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

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

* The problem of do_rootfs_append
  2014-12-25  3:25 ` Khem Raj
  2014-12-25  7:01   ` Neil.Wu
@ 2015-01-22  8:13   ` Neil.Wu
  2015-01-22  8:19     ` Nicolas Dechesne
  1 sibling, 1 reply; 8+ messages in thread
From: Neil.Wu @ 2015-01-22  8:13 UTC (permalink / raw)
  To: yocto


Hi, all
I'm building specific rootfs image. Add the do_rootfs_append() task  in core-image-specific.bb,
core-image-specific.bb:

SUMMARY = "creaet the customer rootfs"
require ${TOPDIR}/../meta/recipes-core/images/core-image-minimal.bb
IMAGE_INSTALL = "readline-dev linux-libc-headers-dev json-glib busybox-udhcpc "
do_rootfs_append() {
        cp -rf ${IMAGE_ROOTFS}/data/etc/ ${IMAGE_ROOTFS}/etc/
        rm -rf ${IMAGE_ROOTFS}/data/etc/
}

It always meet the error as follows:
ERROR: ExpansionError during parsing /home/ectrs/poky/meta-emerson-ecosys/recipes-core/images/core-image-ecosys.bb: Failure expanding variable do_rootfs: IndentationError: unexpected indent (<string>, line 14)

I'm pleasant receive your reply. If you know how to solve it , please help me .
Thank you very much.

Neil

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

* Re: The problem of do_rootfs_append
  2015-01-22  8:13   ` The problem of do_rootfs_append Neil.Wu
@ 2015-01-22  8:19     ` Nicolas Dechesne
  2015-01-22  8:31       ` Neil.Wu
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Dechesne @ 2015-01-22  8:19 UTC (permalink / raw)
  To: Neil.Wu; +Cc: Yocto list discussion

On Thu, Jan 22, 2015 at 9:13 AM,  <Neil.Wu@emerson.com> wrote:
> Hi, all
> I'm building specific rootfs image. Add the do_rootfs_append() task  in core-image-specific.bb,
> core-image-specific.bb:
>
> SUMMARY = "creaet the customer rootfs"
> require ${TOPDIR}/../meta/recipes-core/images/core-image-minimal.bb
> IMAGE_INSTALL = "readline-dev linux-libc-headers-dev json-glib busybox-udhcpc "
> do_rootfs_append() {
>         cp -rf ${IMAGE_ROOTFS}/data/etc/ ${IMAGE_ROOTFS}/etc/
>         rm -rf ${IMAGE_ROOTFS}/data/etc/
> }
>
> It always meet the error as follows:
> ERROR: ExpansionError during parsing /home/ectrs/poky/meta-emerson-ecosys/recipes-core/images/core-image-ecosys.bb: Failure expanding variable do_rootfs: IndentationError: unexpected indent (<string>, line 14)
>
> I'm pleasant receive your reply. If you know how to solve it , please help me .
> Thank you very much.

do_rootfs() in a Python function, not Shell in image.bbclass, so while
I have never tried that specifically, i guess you cannot append a
Shell snipped in that case.

cheers
nico


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

* Re: The problem of do_rootfs_append
  2015-01-22  8:19     ` Nicolas Dechesne
@ 2015-01-22  8:31       ` Neil.Wu
  2015-01-22  8:40         ` Nicolas Dechesne
  0 siblings, 1 reply; 8+ messages in thread
From: Neil.Wu @ 2015-01-22  8:31 UTC (permalink / raw)
  To: nicolas.dechesne; +Cc: yocto

Hi, nico
Thank you for your reply.
But I found that there are others use do_rootfs_append() when searching on the Internet.
If I want to remove the directory in do_rootfs() task, how can I to do it ?

Tanks 
Neil

-----Original Message-----
From: Nicolas Dechesne [mailto:nicolas.dechesne@linaro.org] 
Sent: Thursday, January 22, 2015 4:20 PM
To: Wu, Neil [CLIMATE/RS/CN]
Cc: Yocto list discussion
Subject: Re: [yocto] The problem of do_rootfs_append

On Thu, Jan 22, 2015 at 9:13 AM,  <Neil.Wu@emerson.com> wrote:
> Hi, all
> I'm building specific rootfs image. Add the do_rootfs_append() task  in core-image-specific.bb,
> core-image-specific.bb:
>
> SUMMARY = "creaet the customer rootfs"
> require ${TOPDIR}/../meta/recipes-core/images/core-image-minimal.bb
> IMAGE_INSTALL = "readline-dev linux-libc-headers-dev json-glib busybox-udhcpc "
> do_rootfs_append() {
>         cp -rf ${IMAGE_ROOTFS}/data/etc/ ${IMAGE_ROOTFS}/etc/
>         rm -rf ${IMAGE_ROOTFS}/data/etc/
> }
>
> It always meet the error as follows:
> ERROR: ExpansionError during parsing /home/ectrs/poky/meta-emerson-ecosys/recipes-core/images/core-image-ecosys.bb: Failure expanding variable do_rootfs: IndentationError: unexpected indent (<string>, line 14)
>
> I'm pleasant receive your reply. If you know how to solve it , please help me .
> Thank you very much.

do_rootfs() in a Python function, not Shell in image.bbclass, so while
I have never tried that specifically, i guess you cannot append a
Shell snipped in that case.

cheers
nico

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

* Re: The problem of do_rootfs_append
  2015-01-22  8:31       ` Neil.Wu
@ 2015-01-22  8:40         ` Nicolas Dechesne
  2015-01-23  6:30           ` Neil.Wu
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Dechesne @ 2015-01-22  8:40 UTC (permalink / raw)
  To: Neil.Wu; +Cc: Yocto list discussion

On Thu, Jan 22, 2015 at 9:31 AM,  <Neil.Wu@emerson.com> wrote:
> Thank you for your reply.
> But I found that there are others use do_rootfs_append() when searching on the Internet.
> If I want to remove the directory in do_rootfs() task, how can I to do it ?

do_rootfs was a Shell function in the past, it was changed to Python
last year or so.

if you want to post process an image, you can use
IMAGE_POSTPROCESS_COMMAND variable and add your own functions there.

cheers


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

* Re: The problem of do_rootfs_append
  2015-01-22  8:40         ` Nicolas Dechesne
@ 2015-01-23  6:30           ` Neil.Wu
  0 siblings, 0 replies; 8+ messages in thread
From: Neil.Wu @ 2015-01-23  6:30 UTC (permalink / raw)
  To: nicolas.dechesne; +Cc: yocto

Hi, nico
Thank you for your help.
I have resolved the problem using IMAGE_POSTPROCESS_COMMAND in core-image-specific.bb.

Neil

-----Original Message-----
From: Nicolas Dechesne [mailto:nicolas.dechesne@linaro.org] 
Sent: Thursday, January 22, 2015 4:41 PM
To: Wu, Neil [CLIMATE/RS/CN]
Cc: Yocto list discussion
Subject: Re: [yocto] The problem of do_rootfs_append

On Thu, Jan 22, 2015 at 9:31 AM,  <Neil.Wu@emerson.com> wrote:
> Thank you for your reply.
> But I found that there are others use do_rootfs_append() when searching on the Internet.
> If I want to remove the directory in do_rootfs() task, how can I to do it ?

do_rootfs was a Shell function in the past, it was changed to Python
last year or so.

if you want to post process an image, you can use
IMAGE_POSTPROCESS_COMMAND variable and add your own functions there.

cheers

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

end of thread, other threads:[~2015-01-23  6:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-25  3:08 problem of install kernel module(*.ko) to rootfs folder Neil.Wu
2014-12-25  3:25 ` Khem Raj
2014-12-25  7:01   ` Neil.Wu
2015-01-22  8:13   ` The problem of do_rootfs_append Neil.Wu
2015-01-22  8:19     ` Nicolas Dechesne
2015-01-22  8:31       ` Neil.Wu
2015-01-22  8:40         ` Nicolas Dechesne
2015-01-23  6:30           ` Neil.Wu

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.