* [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
@ 2017-04-18 18:13 Andrei Gherzan
2017-04-18 18:13 ` [meta-raspberrypi][PATCH 2/3] rpi-base.inc: Recommend udev-rules-rpi Andrei Gherzan
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Andrei Gherzan @ 2017-04-18 18:13 UTC (permalink / raw)
To: yocto
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
recipes-core/udev/udev-rules-rpi.bb | 12 ++++++++++++
recipes-core/udev/udev-rules-rpi/99-com.rules | 21 +++++++++++++++++++++
2 files changed, 33 insertions(+)
create mode 100644 recipes-core/udev/udev-rules-rpi.bb
create mode 100644 recipes-core/udev/udev-rules-rpi/99-com.rules
diff --git a/recipes-core/udev/udev-rules-rpi.bb b/recipes-core/udev/udev-rules-rpi.bb
new file mode 100644
index 0000000..20443d3
--- /dev/null
+++ b/recipes-core/udev/udev-rules-rpi.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "udev rules for Raspberry Pi Boards"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = " file://99-com.rules"
+
+S = "${WORKDIR}"
+
+do_install () {
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
+}
diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules
new file mode 100644
index 0000000..6bf019b
--- /dev/null
+++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
@@ -0,0 +1,21 @@
+KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
+ ALIASES=/proc/device-tree/aliases; \
+ if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
+ echo 0;\
+ elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
+ echo 1; \
+ else \
+ exit 1; \
+ fi\
+'", SYMLINK+="serial%c"
+
+KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
+ ALIASES=/proc/device-tree/aliases; \
+ if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
+ echo 0; \
+ elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
+ echo 1; \
+ else \
+ exit 1; \
+ fi \
+'", SYMLINK+="serial%c"
--
2.12.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [meta-raspberrypi][PATCH 2/3] rpi-base.inc: Recommend udev-rules-rpi
2017-04-18 18:13 [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Andrei Gherzan
@ 2017-04-18 18:13 ` Andrei Gherzan
2017-04-18 18:13 ` [meta-raspberrypi][PATCH 3/3] raspberrypi*.conf: Be able to overwrite SERIAL_CONSOLE Andrei Gherzan
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2017-04-18 18:13 UTC (permalink / raw)
To: yocto
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
conf/machine/include/rpi-base.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index dc98099..50eebb4 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -57,3 +57,6 @@ IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE
# The kernel image is installed into the FAT32 boot partition and does not need
# to also be installed into the rootfs.
RDEPENDS_kernel-base = ""
+
+# Extra udev rules
+MACHINE_EXTRA_RRECOMMENDS += "udev-rules-rpi"
--
2.12.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [meta-raspberrypi][PATCH 3/3] raspberrypi*.conf: Be able to overwrite SERIAL_CONSOLE
2017-04-18 18:13 [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Andrei Gherzan
2017-04-18 18:13 ` [meta-raspberrypi][PATCH 2/3] rpi-base.inc: Recommend udev-rules-rpi Andrei Gherzan
@ 2017-04-18 18:13 ` Andrei Gherzan
2017-04-18 18:55 ` [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Khem Raj
2017-04-19 16:48 ` Andrei Gherzan
3 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2017-04-18 18:13 UTC (permalink / raw)
To: yocto
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
conf/machine/raspberrypi.conf | 2 +-
conf/machine/raspberrypi0-wifi.conf | 2 +-
conf/machine/raspberrypi0.conf | 2 +-
conf/machine/raspberrypi2.conf | 2 +-
conf/machine/raspberrypi3.conf | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/conf/machine/raspberrypi.conf b/conf/machine/raspberrypi.conf
index ad3b061..ddd3801 100644
--- a/conf/machine/raspberrypi.conf
+++ b/conf/machine/raspberrypi.conf
@@ -7,7 +7,7 @@ DEFAULTTUNE ?= "arm1176jzfshf"
require conf/machine/include/tune-arm1176jzf-s.inc
include conf/machine/include/rpi-base.inc
-SERIAL_CONSOLE = "115200 ttyAMA0"
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
UBOOT_MACHINE = "rpi_config"
VC4_CMA_SIZE_raspberrypi ?= "cma-64"
diff --git a/conf/machine/raspberrypi0-wifi.conf b/conf/machine/raspberrypi0-wifi.conf
index 2b7cea4..41be06b 100644
--- a/conf/machine/raspberrypi0-wifi.conf
+++ b/conf/machine/raspberrypi0-wifi.conf
@@ -7,5 +7,5 @@ include conf/machine/raspberrypi.conf
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
-SERIAL_CONSOLE = "115200 ttyS0"
+SERIAL_CONSOLE ?= "115200 ttyS0"
VC4_CMA_SIZE ?= "cma-128"
diff --git a/conf/machine/raspberrypi0.conf b/conf/machine/raspberrypi0.conf
index 7c2b811..3bd9e95 100644
--- a/conf/machine/raspberrypi0.conf
+++ b/conf/machine/raspberrypi0.conf
@@ -5,5 +5,5 @@
MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
include conf/machine/raspberrypi.conf
-SERIAL_CONSOLE = "115200 ttyAMA0"
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
VC4_CMA_SIZE ?= "cma-128"
diff --git a/conf/machine/raspberrypi2.conf b/conf/machine/raspberrypi2.conf
index 9b4c02a..a17289c 100644
--- a/conf/machine/raspberrypi2.conf
+++ b/conf/machine/raspberrypi2.conf
@@ -7,7 +7,7 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
require conf/machine/include/tune-cortexa7.inc
include conf/machine/include/rpi-base.inc
-SERIAL_CONSOLE = "115200 ttyAMA0"
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
UBOOT_MACHINE = "rpi_2_config"
VC4_CMA_SIZE ?= "cma-256"
diff --git a/conf/machine/raspberrypi3.conf b/conf/machine/raspberrypi3.conf
index 1ac5928..b15621d 100644
--- a/conf/machine/raspberrypi3.conf
+++ b/conf/machine/raspberrypi3.conf
@@ -7,5 +7,5 @@ include conf/machine/raspberrypi2.conf
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
-SERIAL_CONSOLE = "115200 ttyS0"
+SERIAL_CONSOLE ?= "115200 ttyS0"
VC4_CMA_SIZE ?= "cma-256"
--
2.12.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
2017-04-18 18:13 [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Andrei Gherzan
2017-04-18 18:13 ` [meta-raspberrypi][PATCH 2/3] rpi-base.inc: Recommend udev-rules-rpi Andrei Gherzan
2017-04-18 18:13 ` [meta-raspberrypi][PATCH 3/3] raspberrypi*.conf: Be able to overwrite SERIAL_CONSOLE Andrei Gherzan
@ 2017-04-18 18:55 ` Khem Raj
2017-04-19 10:41 ` Andrei Gherzan
2017-04-19 16:48 ` Andrei Gherzan
3 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2017-04-18 18:55 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: yocto
On Tue, Apr 18, 2017 at 11:13 AM, Andrei Gherzan <andrei@gherzan.ro> wrote:
> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> ---
> recipes-core/udev/udev-rules-rpi.bb | 12 ++++++++++++
> recipes-core/udev/udev-rules-rpi/99-com.rules | 21
perhaps a bbappend to udev-extraconf recipe is better ?
+++++++++++++++++++++
> 2 files changed, 33 insertions(+)
> create mode 100644 recipes-core/udev/udev-rules-rpi.bb
> create mode 100644 recipes-core/udev/udev-rules-rpi/99-com.rules
>
> diff --git a/recipes-core/udev/udev-rules-rpi.bb b/recipes-core/udev/udev-rules-rpi.bb
> new file mode 100644
> index 0000000..20443d3
> --- /dev/null
> +++ b/recipes-core/udev/udev-rules-rpi.bb
> @@ -0,0 +1,12 @@
> +DESCRIPTION = "udev rules for Raspberry Pi Boards"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +
> +SRC_URI = " file://99-com.rules"
> +
> +S = "${WORKDIR}"
> +
> +do_install () {
> + install -d ${D}${sysconfdir}/udev/rules.d
> + install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
> +}
> diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules
> new file mode 100644
> index 0000000..6bf019b
> --- /dev/null
> +++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
> @@ -0,0 +1,21 @@
> +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
> + ALIASES=/proc/device-tree/aliases; \
> + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
> + echo 0;\
> + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
> + echo 1; \
> + else \
> + exit 1; \
> + fi\
> +'", SYMLINK+="serial%c"
> +
> +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
> + ALIASES=/proc/device-tree/aliases; \
> + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
> + echo 0; \
> + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
> + echo 1; \
> + else \
> + exit 1; \
> + fi \
> +'", SYMLINK+="serial%c"
> --
> 2.12.2
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
2017-04-18 18:55 ` [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Khem Raj
@ 2017-04-19 10:41 ` Andrei Gherzan
2017-04-19 10:52 ` Andreas Müller
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Andrei Gherzan @ 2017-04-19 10:41 UTC (permalink / raw)
To: Khem Raj; +Cc: yocto
On Tue, Apr 18, 2017 at 7:55 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, Apr 18, 2017 at 11:13 AM, Andrei Gherzan <andrei@gherzan.ro> wrote:
>> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
>> ---
>> recipes-core/udev/udev-rules-rpi.bb | 12 ++++++++++++
>> recipes-core/udev/udev-rules-rpi/99-com.rules | 21
>
> perhaps a bbappend to udev-extraconf recipe is better ?
>
> +++++++++++++++++++++
>> 2 files changed, 33 insertions(+)
>> create mode 100644 recipes-core/udev/udev-rules-rpi.bb
>> create mode 100644 recipes-core/udev/udev-rules-rpi/99-com.rules
>>
>> diff --git a/recipes-core/udev/udev-rules-rpi.bb b/recipes-core/udev/udev-rules-rpi.bb
>> new file mode 100644
>> index 0000000..20443d3
>> --- /dev/null
>> +++ b/recipes-core/udev/udev-rules-rpi.bb
>> @@ -0,0 +1,12 @@
>> +DESCRIPTION = "udev rules for Raspberry Pi Boards"
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>> +
>> +SRC_URI = " file://99-com.rules"
>> +
>> +S = "${WORKDIR}"
>> +
>> +do_install () {
>> + install -d ${D}${sysconfdir}/udev/rules.d
>> + install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
>> +}
>> diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules
>> new file mode 100644
>> index 0000000..6bf019b
>> --- /dev/null
>> +++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
>> @@ -0,0 +1,21 @@
>> +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
>> + ALIASES=/proc/device-tree/aliases; \
>> + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
>> + echo 0;\
>> + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
>> + echo 1; \
>> + else \
>> + exit 1; \
>> + fi\
>> +'", SYMLINK+="serial%c"
>> +
>> +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
>> + ALIASES=/proc/device-tree/aliases; \
>> + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
>> + echo 0; \
>> + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
>> + echo 1; \
>> + else \
>> + exit 1; \
>> + fi \
>> +'", SYMLINK+="serial%c"
>> --
>> 2.12.2
>>
I was thinking about that but extraconf brings additional
functionality (ex automount) that might not be of interest. I
personally don't want that. What do you think?
--
Andrei Gherzan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
2017-04-19 10:41 ` Andrei Gherzan
@ 2017-04-19 10:52 ` Andreas Müller
2017-04-19 11:01 ` Andrei Gherzan
2017-04-19 11:18 ` Andreas Müller
2017-04-19 16:32 ` Khem Raj
2 siblings, 1 reply; 10+ messages in thread
From: Andreas Müller @ 2017-04-19 10:52 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: yocto
On Wed, Apr 19, 2017 at 12:41 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
> On Tue, Apr 18, 2017 at 7:55 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Tue, Apr 18, 2017 at 11:13 AM, Andrei Gherzan <andrei@gherzan.ro> wrote:
>>> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
>>> ---
>>> recipes-core/udev/udev-rules-rpi.bb | 12 ++++++++++++
>>> recipes-core/udev/udev-rules-rpi/99-com.rules | 21
>>
>> perhaps a bbappend to udev-extraconf recipe is better ?
>>
>> +++++++++++++++++++++
>>> 2 files changed, 33 insertions(+)
>>> create mode 100644 recipes-core/udev/udev-rules-rpi.bb
>>> create mode 100644 recipes-core/udev/udev-rules-rpi/99-com.rules
>>>
>>> diff --git a/recipes-core/udev/udev-rules-rpi.bb b/recipes-core/udev/udev-rules-rpi.bb
>>> new file mode 100644
>>> index 0000000..20443d3
>>> --- /dev/null
>>> +++ b/recipes-core/udev/udev-rules-rpi.bb
>>> @@ -0,0 +1,12 @@
>>> +DESCRIPTION = "udev rules for Raspberry Pi Boards"
>>> +LICENSE = "MIT"
>>> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>>> +
>>> +SRC_URI = " file://99-com.rules"
>>> +
>>> +S = "${WORKDIR}"
>>> +
>>> +do_install () {
>>> + install -d ${D}${sysconfdir}/udev/rules.d
>>> + install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
>>> +}
>>> diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules
>>> new file mode 100644
>>> index 0000000..6bf019b
>>> --- /dev/null
>>> +++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
>>> @@ -0,0 +1,21 @@
>>> +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
>>> + ALIASES=/proc/device-tree/aliases; \
>>> + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
>>> + echo 0;\
>>> + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
>>> + echo 1; \
>>> + else \
>>> + exit 1; \
>>> + fi\
>>> +'", SYMLINK+="serial%c"
>>> +
>>> +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
>>> + ALIASES=/proc/device-tree/aliases; \
>>> + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
>>> + echo 0; \
>>> + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
>>> + echo 1; \
>>> + else \
>>> + exit 1; \
>>> + fi \
>>> +'", SYMLINK+="serial%c"
>>> --
>>> 2.12.2
>>>
>
> I was thinking about that but extraconf brings additional
> functionality (ex automount) that might not be of interest. I
> personally don't want that. What do you think?
>
> --
> Andrei Gherzan
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
2017-04-19 10:52 ` Andreas Müller
@ 2017-04-19 11:01 ` Andrei Gherzan
0 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2017-04-19 11:01 UTC (permalink / raw)
To: Andreas Müller; +Cc: yocto
On Wed, Apr 19, 2017 at 11:52 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Wed, Apr 19, 2017 at 12:41 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
>> On Tue, Apr 18, 2017 at 7:55 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>> On Tue, Apr 18, 2017 at 11:13 AM, Andrei Gherzan <andrei@gherzan.ro> wrote:
>>>> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
>>>> ---
>>>> recipes-core/udev/udev-rules-rpi.bb | 12 ++++++++++++
>>>> recipes-core/udev/udev-rules-rpi/99-com.rules | 21
>>>
>>> perhaps a bbappend to udev-extraconf recipe is better ?
>>>
>>> +++++++++++++++++++++
>>>> 2 files changed, 33 insertions(+)
>>>> create mode 100644 recipes-core/udev/udev-rules-rpi.bb
>>>> create mode 100644 recipes-core/udev/udev-rules-rpi/99-com.rules
>>>>
>>>> diff --git a/recipes-core/udev/udev-rules-rpi.bb b/recipes-core/udev/udev-rules-rpi.bb
>>>> new file mode 100644
>>>> index 0000000..20443d3
>>>> --- /dev/null
>>>> +++ b/recipes-core/udev/udev-rules-rpi.bb
>>>> @@ -0,0 +1,12 @@
>>>> +DESCRIPTION = "udev rules for Raspberry Pi Boards"
>>>> +LICENSE = "MIT"
>>>> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>>>> +
>>>> +SRC_URI = " file://99-com.rules"
>>>> +
>>>> +S = "${WORKDIR}"
>>>> +
>>>> +do_install () {
>>>> + install -d ${D}${sysconfdir}/udev/rules.d
>>>> + install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
>>>> +}
>>>> diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules
>>>> new file mode 100644
>>>> index 0000000..6bf019b
>>>> --- /dev/null
>>>> +++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
>>>> @@ -0,0 +1,21 @@
>>>> +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
>>>> + ALIASES=/proc/device-tree/aliases; \
>>>> + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
>>>> + echo 0;\
>>>> + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
>>>> + echo 1; \
>>>> + else \
>>>> + exit 1; \
>>>> + fi\
>>>> +'", SYMLINK+="serial%c"
>>>> +
>>>> +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
>>>> + ALIASES=/proc/device-tree/aliases; \
>>>> + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
>>>> + echo 0; \
>>>> + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
>>>> + echo 1; \
>>>> + else \
>>>> + exit 1; \
>>>> + fi \
>>>> +'", SYMLINK+="serial%c"
>>>> --
>>>> 2.12.2
>>>>
>>
>> I was thinking about that but extraconf brings additional
>> functionality (ex automount) that might not be of interest. I
>> personally don't want that. What do you think?
>>
>> --
>> Andrei Gherzan
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
I don't see your comment. Could you resend?
--
Andrei Gherzan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
2017-04-19 10:41 ` Andrei Gherzan
2017-04-19 10:52 ` Andreas Müller
@ 2017-04-19 11:18 ` Andreas Müller
2017-04-19 16:32 ` Khem Raj
2 siblings, 0 replies; 10+ messages in thread
From: Andreas Müller @ 2017-04-19 11:18 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: yocto
On Wed, Apr 19, 2017 at 12:41 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
>
> I was thinking about that but extraconf brings additional
> functionality (ex automount) that might not be of interest. I
> personally don't want that. What do you think?
>
Ooops previous mail went out too early.
Agreed: Don't mix things which are unrelated and udev-extraconf breaks
at least gvfs automount used by thunar and other file managers.
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
2017-04-19 10:41 ` Andrei Gherzan
2017-04-19 10:52 ` Andreas Müller
2017-04-19 11:18 ` Andreas Müller
@ 2017-04-19 16:32 ` Khem Raj
2 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2017-04-19 16:32 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: yocto
On Wed, Apr 19, 2017 at 3:41 AM, Andrei Gherzan <andrei@gherzan.ro> wrote:
> On Tue, Apr 18, 2017 at 7:55 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Tue, Apr 18, 2017 at 11:13 AM, Andrei Gherzan <andrei@gherzan.ro> wrote:
>>> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
>>> ---
>>> recipes-core/udev/udev-rules-rpi.bb | 12 ++++++++++++
>>> recipes-core/udev/udev-rules-rpi/99-com.rules | 21
>>
>> perhaps a bbappend to udev-extraconf recipe is better ?
>>
>> +++++++++++++++++++++
>>> 2 files changed, 33 insertions(+)
>>> create mode 100644 recipes-core/udev/udev-rules-rpi.bb
>>> create mode 100644 recipes-core/udev/udev-rules-rpi/99-com.rules
>>>
>>> diff --git a/recipes-core/udev/udev-rules-rpi.bb b/recipes-core/udev/udev-rules-rpi.bb
>>> new file mode 100644
>>> index 0000000..20443d3
>>> --- /dev/null
>>> +++ b/recipes-core/udev/udev-rules-rpi.bb
>>> @@ -0,0 +1,12 @@
>>> +DESCRIPTION = "udev rules for Raspberry Pi Boards"
>>> +LICENSE = "MIT"
>>> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>>> +
>>> +SRC_URI = " file://99-com.rules"
>>> +
>>> +S = "${WORKDIR}"
>>> +
>>> +do_install () {
>>> + install -d ${D}${sysconfdir}/udev/rules.d
>>> + install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
>>> +}
>>> diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules
>>> new file mode 100644
>>> index 0000000..6bf019b
>>> --- /dev/null
>>> +++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
>>> @@ -0,0 +1,21 @@
>>> +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
>>> + ALIASES=/proc/device-tree/aliases; \
>>> + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
>>> + echo 0;\
>>> + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
>>> + echo 1; \
>>> + else \
>>> + exit 1; \
>>> + fi\
>>> +'", SYMLINK+="serial%c"
>>> +
>>> +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
>>> + ALIASES=/proc/device-tree/aliases; \
>>> + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
>>> + echo 0; \
>>> + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
>>> + echo 1; \
>>> + else \
>>> + exit 1; \
>>> + fi \
>>> +'", SYMLINK+="serial%c"
>>> --
>>> 2.12.2
>>>
>
> I was thinking about that but extraconf brings additional
> functionality (ex automount) that might not be of interest. I
> personally don't want that. What do you think?
>
yeah that seems fine on second thought, since its quite pi specific
rule
> --
> Andrei Gherzan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1
2017-04-18 18:13 [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Andrei Gherzan
` (2 preceding siblings ...)
2017-04-18 18:55 ` [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Khem Raj
@ 2017-04-19 16:48 ` Andrei Gherzan
3 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2017-04-19 16:48 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 2082 bytes --]
On Tue, Apr 18, 2017 at 07:13:20PM +0100, Andrei Gherzan wrote:
> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> ---
> recipes-core/udev/udev-rules-rpi.bb | 12 ++++++++++++
> recipes-core/udev/udev-rules-rpi/99-com.rules | 21 +++++++++++++++++++++
> 2 files changed, 33 insertions(+)
> create mode 100644 recipes-core/udev/udev-rules-rpi.bb
> create mode 100644 recipes-core/udev/udev-rules-rpi/99-com.rules
>
> diff --git a/recipes-core/udev/udev-rules-rpi.bb b/recipes-core/udev/udev-rules-rpi.bb
> new file mode 100644
> index 0000000..20443d3
> --- /dev/null
> +++ b/recipes-core/udev/udev-rules-rpi.bb
> @@ -0,0 +1,12 @@
> +DESCRIPTION = "udev rules for Raspberry Pi Boards"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +
> +SRC_URI = " file://99-com.rules"
> +
> +S = "${WORKDIR}"
> +
> +do_install () {
> + install -d ${D}${sysconfdir}/udev/rules.d
> + install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
> +}
> diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules
> new file mode 100644
> index 0000000..6bf019b
> --- /dev/null
> +++ b/recipes-core/udev/udev-rules-rpi/99-com.rules
> @@ -0,0 +1,21 @@
> +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
> + ALIASES=/proc/device-tree/aliases; \
> + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
> + echo 0;\
> + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
> + echo 1; \
> + else \
> + exit 1; \
> + fi\
> +'", SYMLINK+="serial%c"
> +
> +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
> + ALIASES=/proc/device-tree/aliases; \
> + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
> + echo 0; \
> + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
> + echo 1; \
> + else \
> + exit 1; \
> + fi \
> +'", SYMLINK+="serial%c"
> --
> 2.12.2
>
Merged only this patch from this series as the other 2 need some more
work.
--
Andrei Gherzan
gpg: rsa4096/D4D94F67AD0E9640 | t: @agherzan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-04-19 16:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 18:13 [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Andrei Gherzan
2017-04-18 18:13 ` [meta-raspberrypi][PATCH 2/3] rpi-base.inc: Recommend udev-rules-rpi Andrei Gherzan
2017-04-18 18:13 ` [meta-raspberrypi][PATCH 3/3] raspberrypi*.conf: Be able to overwrite SERIAL_CONSOLE Andrei Gherzan
2017-04-18 18:55 ` [meta-raspberrypi][PATCH 1/3] udev: Create rules file to generate serial0/1 Khem Raj
2017-04-19 10:41 ` Andrei Gherzan
2017-04-19 10:52 ` Andreas Müller
2017-04-19 11:01 ` Andrei Gherzan
2017-04-19 11:18 ` Andreas Müller
2017-04-19 16:32 ` Khem Raj
2017-04-19 16:48 ` Andrei Gherzan
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.