All of lore.kernel.org
 help / color / mirror / Atom feed
* How to create a directory for an SD-Card mount?
@ 2016-07-06 14:44 S.Jaritz
  2016-07-06 18:09 ` Daniel.
  0 siblings, 1 reply; 5+ messages in thread
From: S.Jaritz @ 2016-07-06 14:44 UTC (permalink / raw)
  To: yocto

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

Hej

I managed to create and install a rule that should mount a sd card to 
"/media/sd1".  To finish it, I need to create the directory "sd1" in 
media.
My recipe for the rule looks like:
###################
SUMMARY = "the udev rules for the board"
SECTION = "rules"
LICENSE = "CLOSED"

SRC_URI = "file://50-mmc.rules \
        "
S = "${WORKDIR}"

do_install () {
        install -d ${D}${sysconfdir}/udev/rules.d
        install -m 0644 ${WORKDIR}/50-mmc.rules 
${D}${sysconfdir}/udev/rules.d/
}
###################
How to create a dir in do_install which goes to the package?

By the way:
I was also appending fstab after this article

https://communities.intel.com/thread/49251

Is there an better way to uncomment/modify that one line in fstab?

Regards!

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.

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

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

* Re: How to create a directory for an SD-Card mount?
  2016-07-06 14:44 How to create a directory for an SD-Card mount? S.Jaritz
@ 2016-07-06 18:09 ` Daniel.
  2016-07-06 19:45   ` Khem Raj
  2016-07-07  6:02   ` Mike Looijmans
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel. @ 2016-07-06 18:09 UTC (permalink / raw)
  To: S.Jaritz; +Cc: yocto

install -d ${D}/media/sd1
???

2016-07-06 11:44 GMT-03:00  <S.Jaritz@esa-grimma.de>:
> Hej
>
> I managed to create and install a rule that should mount a sd card to
> "/media/sd1".  To finish it, I need to create the directory "sd1" in media.
> My recipe for the rule looks like:
> ###################
> SUMMARY = "the udev rules for the board"
> SECTION = "rules"
> LICENSE = "CLOSED"
>
> SRC_URI = "file://50-mmc.rules \
>         "
> S = "${WORKDIR}"
>
> do_install () {
>         install -d ${D}${sysconfdir}/udev/rules.d
>         install -m 0644 ${WORKDIR}/50-mmc.rules
> ${D}${sysconfdir}/udev/rules.d/
> }
> ###################
> How to create a dir in do_install which goes to the package?
>
> By the way:
> I was also appending fstab after this article
>
> https://communities.intel.com/thread/49251
>
> Is there an better way to uncomment/modify that one line in fstab?
>
> Regards!
>
> Stefan Jaritz
>
> ------------------------------------------------------------
> ESA Elektroschaltanlagen Grimma GmbH
> Broner Ring 30
> 04668 Grimma
> Telefon: +49 3437 9211 176
> Telefax: +49 3437 9211 26
> E-Mail: s.jaritz@esa-grimma.de
> Internet: www.esa-grimma.de
>
>
> Geschäftsführer:
> Dipl.-Ing. Jörg Gaitzsch
> Jörg Reinker
>
> Sitz der Gesellschaft: Grimma
> Ust.-ID: DE 141784437
> Amtsgericht: Leipzig, HRB 5159
> Steuernummer: 238/108/00755
>
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen.
> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
> erhalten
> haben, informieren Sie bitte sofort den Absender und löschen Sie diese
> Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
> Mail
> ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If you
> are
> not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is
> strictly
> forbidden.
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



-- 
"Do or do not. There is no try"
  Yoda Master


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

* Re: How to create a directory for an SD-Card mount?
  2016-07-06 18:09 ` Daniel.
@ 2016-07-06 19:45   ` Khem Raj
  2016-07-07  6:02   ` Mike Looijmans
  1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-07-06 19:45 UTC (permalink / raw)
  To: Daniel.; +Cc: yocto

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

You also need to package it with FILES

On Jul 6, 2016 11:09 AM, "Daniel." <danielhilst@gmail.com> wrote:
>
> install -d ${D}/media/sd1
> ???
>
> 2016-07-06 11:44 GMT-03:00  <S.Jaritz@esa-grimma.de>:
> > Hej
> >
> > I managed to create and install a rule that should mount a sd card to
> > "/media/sd1".  To finish it, I need to create the directory "sd1" in
media.
> > My recipe for the rule looks like:
> > ###################
> > SUMMARY = "the udev rules for the board"
> > SECTION = "rules"
> > LICENSE = "CLOSED"
> >
> > SRC_URI = "file://50-mmc.rules \
> >         "
> > S = "${WORKDIR}"
> >
> > do_install () {
> >         install -d ${D}${sysconfdir}/udev/rules.d
> >         install -m 0644 ${WORKDIR}/50-mmc.rules
> > ${D}${sysconfdir}/udev/rules.d/
> > }
> > ###################
> > How to create a dir in do_install which goes to the package?
> >
> > By the way:
> > I was also appending fstab after this article
> >
> > https://communities.intel.com/thread/49251
> >
> > Is there an better way to uncomment/modify that one line in fstab?
> >
> > Regards!
> >
> > Stefan Jaritz
> >
> > ------------------------------------------------------------
> > ESA Elektroschaltanlagen Grimma GmbH
> > Broner Ring 30
> > 04668 Grimma
> > Telefon: +49 3437 9211 176
> > Telefax: +49 3437 9211 26
> > E-Mail: s.jaritz@esa-grimma.de
> > Internet: www.esa-grimma.de
> >
> >
> > Geschäftsführer:
> > Dipl.-Ing. Jörg Gaitzsch
> > Jörg Reinker
> >
> > Sitz der Gesellschaft: Grimma
> > Ust.-ID: DE 141784437
> > Amtsgericht: Leipzig, HRB 5159
> > Steuernummer: 238/108/00755
> >
> >
> > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> > Informationen.
> > Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
> > erhalten
> > haben, informieren Sie bitte sofort den Absender und löschen Sie diese
> > Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
> > Mail
> > ist nicht gestattet.
> >
> > This e-mail may contain confidential and/or privileged information. If
you
> > are
> > not the intended recipient (or have received this e-mail in error)
please
> > notify the sender immediately and destroy this e-mail. Any unauthorized
> > copying, disclosure or distribution of the material in this e-mail is
> > strictly
> > forbidden.
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>
>
>
> --
> "Do or do not. There is no try"
>   Yoda Master
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

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

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

* Re: How to create a directory for an SD-Card mount?
  2016-07-06 18:09 ` Daniel.
  2016-07-06 19:45   ` Khem Raj
@ 2016-07-07  6:02   ` Mike Looijmans
  2016-07-07  6:13     ` Antwort: " S.Jaritz
  1 sibling, 1 reply; 5+ messages in thread
From: Mike Looijmans @ 2016-07-07  6:02 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/html, Size: 8070 bytes --]

[-- Attachment #2: imageb57089.PNG --]
[-- Type: image/png, Size: 9075 bytes --]

[-- Attachment #3: imagef129c8.JPG --]
[-- Type: image/jpeg, Size: 1088 bytes --]

[-- Attachment #4: image90c200.JPG --]
[-- Type: image/jpeg, Size: 1087 bytes --]

[-- Attachment #5: imagef61004.JPG --]
[-- Type: image/jpeg, Size: 1060 bytes --]

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

* Antwort: Re: How to create a directory for an SD-Card mount?
  2016-07-07  6:02   ` Mike Looijmans
@ 2016-07-07  6:13     ` S.Jaritz
  0 siblings, 0 replies; 5+ messages in thread
From: S.Jaritz @ 2016-07-07  6:13 UTC (permalink / raw)
  To: Mike Looijmans; +Cc: yocto


[-- Attachment #1.1: Type: text/plain, Size: 5166 bytes --]

Problem solved! Thank you for the help.

It was solved by:

do_install () {
...
install -d ${D}/media/sd1
...
}

FILES_${PN} += "media/sd1"

@Mike:
I am using the meta-atmel. The mount dir is created. In my case I have a 
rule which mounts the sd card to mount/sd1, That's why I need to create 
sd1. But good idea, maybee I will change the rule, so it creates (if 
needed) the dir to mount.

Regards!

Stefan Jaritz

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.



Von:    Mike Looijmans <mike.looijmans@topic.nl>
An:     <yocto@yoctoproject.org>
Datum:  07.07.2016 08:04
Betreff:        Re: [yocto] How to create a directory for an SD-Card 
mount?
Gesendet von:   yocto-bounces@yoctoproject.org



On many embedded systems, /media/ is volatile. So you probably need to 
create 
an entry for a volatile dir.

Better is to create/delete the directory in the mount script. That also 
avoids 
races, since creating a directory is an atomic operation. And it allos you 
to 
mount multiple devices.

I'm actually surprised that this isn't already in place. Maybe you're 
missing 
some obscure udev package in your image?

On 06-07-16 20:09, Daniel. wrote:
> install -d ${D}/media/sd1
> ???
>
> 2016-07-06 11:44 GMT-03:00  <S.Jaritz@esa-grimma.de>:
>> Hej
>>
>> I managed to create and install a rule that should mount a sd card to
>> "/media/sd1".  To finish it, I need to create the directory "sd1" in 
media.
>> My recipe for the rule looks like:
>> ###################
>> SUMMARY = "the udev rules for the board"
>> SECTION = "rules"
>> LICENSE = "CLOSED"
>>
>> SRC_URI = "file://50-mmc.rules \
>>          "
>> S = "${WORKDIR}"
>>
>> do_install () {
>>          install -d ${D}${sysconfdir}/udev/rules.d
>>          install -m 0644 ${WORKDIR}/50-mmc.rules
>> ${D}${sysconfdir}/udev/rules.d/
>> }
>> ###################
>> How to create a dir in do_install which goes to the package?
>>
>> By the way:
>> I was also appending fstab after this article
>>
>> https://communities.intel.com/thread/49251
>>
>> Is there an better way to uncomment/modify that one line in fstab?
>>
>> Regards!
>>
>> Stefan Jaritz
>>
>> ------------------------------------------------------------
>> ESA Elektroschaltanlagen Grimma GmbH
>> Broner Ring 30
>> 04668 Grimma
>> Telefon: +49 3437 9211 176
>> Telefax: +49 3437 9211 26
>> E-Mail: s.jaritz@esa-grimma.de
>> Internet: www.esa-grimma.de
>>
>>
>> Geschäftsführer:
>> Dipl.-Ing. Jörg Gaitzsch
>> Jörg Reinker
>>
>> Sitz der Gesellschaft: Grimma
>> Ust.-ID: DE 141784437
>> Amtsgericht: Leipzig, HRB 5159
>> Steuernummer: 238/108/00755
>>
>>
>> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
>> Informationen.
>> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
>> erhalten
>> haben, informieren Sie bitte sofort den Absender und löschen Sie diese
>> Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe 
dieser
>> Mail
>> ist nicht gestattet.
>>
>> This e-mail may contain confidential and/or privileged information. If 
you
>> are
>> not the intended recipient (or have received this e-mail in error) 
please
>> notify the sender immediately and destroy this e-mail. Any unauthorized
>> copying, disclosure or distribution of the material in this e-mail is
>> strictly
>> forbidden.
>> --
>> 
 
Kind regards,
 
Mike Looijmans
System Expert
 



TOPIC Products
 
 

Materiaalweg 4
 
 

5681 RJ Best
T:
+31 (0) 499 33 69 69

Postbus 440
E:
mike.looijmans@topicproducts.com

5680 AK Best
W:
www.topicproducts.com

The Netherlands




Please consider the environment before printing this e-mail

Topic zoekt gedreven (embedded) software specialisten!

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


[-- Attachment #1.2: Type: text/html, Size: 12444 bytes --]

[-- Attachment #2: Type: image/png, Size: 9075 bytes --]

[-- Attachment #3: Type: image/jpeg, Size: 745 bytes --]

[-- Attachment #4: Type: image/jpeg, Size: 734 bytes --]

[-- Attachment #5: Type: image/jpeg, Size: 723 bytes --]

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

end of thread, other threads:[~2016-07-07  6:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 14:44 How to create a directory for an SD-Card mount? S.Jaritz
2016-07-06 18:09 ` Daniel.
2016-07-06 19:45   ` Khem Raj
2016-07-07  6:02   ` Mike Looijmans
2016-07-07  6:13     ` Antwort: " S.Jaritz

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.