Yocto Image with custom directory layout


Ayoub Zaki <ayoub.zaki@...>
 

Hi,
I would like to generate an image that contains a custom directories layout for expl:


foo/
├── bar1
│   └── bar2
│       ├── config
│       └── data
└── work
    └── var
        └── lib
            ├── config
            └── data

It should contains only those directories an nothing else, is there anyway to achieve that ? without using ROOTFS_POSTPROCESS_COMMAND.

I would like to use in a seperate partition.

Thank you !


--
Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Tel. : +4971415074546
Mobile : +4917662901545
Email : ayoub.zaki@...
Homepage : https://embexus.com


Josef Holzmayr <holzmayr@...>
 

Hi

On 12.10.2017 19:07, Ayoub Zaki wrote:
Hi,
I would like to generate an image that contains a custom directories layout for expl:
foo/
├── bar1
│   └── bar2
│       ├── config
│       └── data
└── work
    └── var
        └── lib
            ├── config
            └── data
It should contains only those directories an nothing else, is there anyway to achieve that ? without using ROOTFS_POSTPROCESS_COMMAND.
Should be possible if your image installs only your specific recipes that populate those directories. Means: no packagegroup-core-boot, no base-passwd, no.... -> then nothing should bring along other directories.

Greetz
--
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———————————————
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548


Ayoub Zaki <ayoub.zaki@...>
 

Hi,


On 12.10.2017 20:34, Josef Holzmayr wrote:
Hi

On 12.10.2017 19:07, Ayoub Zaki wrote:
Hi,
I would like to generate an image that contains a custom directories layout for expl:


foo/
├── bar1
│   └── bar2
│       ├── config
│       └── data
└── work
     └── var
         └── lib
             ├── config
             └── data

It should contains only those directories an nothing else, is there anyway to achieve that ? without using ROOTFS_POSTPROCESS_COMMAND.
Should be possible if your image installs only your specific recipes that populate those directories. Means: no packagegroup-core-boot, no base-passwd, no.... -> then nothing should bring along other directories.
I tried that but it does pull other packages even if I set in my image:

IMAGE_FEATURES = ""
IMAGE_LINGUAS = ""
PACKAGE_INSTALL = "my-layout-recipe"

Regards

--
Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Tel. : +4971415074546
Mobile : +4917662901545
Email : ayoub.zaki@...
Homepage : https://embexus.com


Josef Holzmayr <holzmayr@...>
 

Hi

On 12.10.2017 20:47, Ayoub Zaki wrote:
Hi,
On 12.10.2017 20:34, Josef Holzmayr wrote:
Hi

On 12.10.2017 19:07, Ayoub Zaki wrote:
Hi,
I would like to generate an image that contains a custom directories layout for expl:


foo/
├── bar1
│   └── bar2
│       ├── config
│       └── data
└── work
     └── var
         └── lib
             ├── config
             └── data

It should contains only those directories an nothing else, is there anyway to achieve that ? without using ROOTFS_POSTPROCESS_COMMAND.
Should be possible if your image installs only your specific recipes that populate those directories. Means: no packagegroup-core-boot, no base-passwd, no.... -> then nothing should bring along other directories.
I tried that but it does pull other packages even if I set in my image:
IMAGE_FEATURES = ""
IMAGE_LINGUAS = ""
PACKAGE_INSTALL = "my-layout-recipe"
Regards
Probably you're inheriting from some more complex image class that pulls in the undesired packages. Have you already checked bitbake -e to see how the variables get expanded?

Greetz

--
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———————————————
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548


Stefano Babic
 

On 12/10/2017 20:47, Ayoub Zaki wrote:
Hi,


On 12.10.2017 20:34, Josef Holzmayr wrote:
Hi

On 12.10.2017 19:07, Ayoub Zaki wrote:
Hi,
I would like to generate an image that contains a custom directories
layout for expl:


foo/
├── bar1
│   └── bar2
│       ├── config
│       └── data
└── work
     └── var
         └── lib
             ├── config
             └── data

It should contains only those directories an nothing else, is there
anyway to achieve that ? without using ROOTFS_POSTPROCESS_COMMAND.
Should be possible if your image installs only your specific recipes
that populate those directories. Means: no packagegroup-core-boot, no
base-passwd, no.... -> then nothing should bring along other directories.
I tried that but it does pull other packages even if I set in my image:

IMAGE_FEATURES = ""
IMAGE_LINGUAS = ""
PACKAGE_INSTALL = "my-layout-recipe"
It looks like you inherit "core-image" instead of just "image". I can
confirm that this work, I have this simple recipe:


# Copyright (C) 2017 Stefano Babic <sbabic@...>
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "Image with user processes"
LICENSE = "CLOSED"
SECTION = "Application"

inherit image

IMAGE_INSTALL = " \
projects-firmware \
"

And project firmware has just the layout I want.

Regards,
Stefano

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@...
=====================================================================


Ayoub Zaki <ayoub.zaki@...>
 

Hi,
On 12.10.2017 19:07, Ayoub Zaki wrote:
Hi,
I would like to generate an image that contains a custom directories
layout for expl:


foo/
├── bar1
│   └── bar2
│       ├── config
│       └── data
└── work
     └── var
         └── lib
             ├── config
             └── data

It should contains only those directories an nothing else, is there
anyway to achieve that ? without using ROOTFS_POSTPROCESS_COMMAND.
Should be possible if your image installs only your specific recipes
that populate those directories. Means: no packagegroup-core-boot, no
base-passwd, no.... -> then nothing should bring along other directories.
I tried that but it does pull other packages even if I set in my image:

IMAGE_FEATURES = ""
IMAGE_LINGUAS = ""
PACKAGE_INSTALL = "my-layout-recipe"
It looks like you inherit "core-image" instead of just "image". I can
confirm that this work, I have this simple recipe:


# Copyright (C) 2017 Stefano Babic <sbabic@...>
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "Image with user processes"
LICENSE = "CLOSED"
SECTION = "Application"

inherit image

IMAGE_INSTALL = " \
projects-firmware \
"

And project firmware has just the layout I want.
Thank you Stefano, it did the trick :-)

Cheers

--
Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Tel. : +4971415074546
Mobile : +4917662901545
Email : ayoub.zaki@...
Homepage : https://embexus.com