Re: [oe] [meta-handheld][PATCH 1/4] zaurusd: fix build with kernels < 4.16 and newer libc headers

2020-04-20 Thread Khem Raj
Thanks!

On Mon, Apr 20, 2020 at 11:26 AM Andrea Adami 
wrote:

> On Mon, Apr 20, 2020 at 7:44 PM Khem Raj  wrote:
> >
> > On Mon, Apr 20, 2020 at 10:07 AM Andrea Adami 
> wrote:
> > >
> > > The Y2038 changes broke the build for older 32bit devices using
> > > older kernels.
> > >
> > > As seen on: https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
> > >
> > > Signed-off-by: Andrea Adami 
> > > ---
> > >  .../zaurusd/zaurusd/add_64bit_time_t.patch| 43 +++
> > >  recipes-bsp/zaurusd/zaurusd_git.bb|  3 +-
> > >  2 files changed, 45 insertions(+), 1 deletion(-)
> > >  create mode 100644 recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> > >
> > > diff --git a/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> > > new file mode 100644
> > > index 000..5f9587a
> > > --- /dev/null
> > > +++ b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> > > @@ -0,0 +1,43 @@
> > > +From d15b20fd9e8927db5dc4303f2e6c11cfa8d6fe95 Mon Sep 17 00:00:00 2001
> > > +From: Andrea Adami 
> > > +Date: Mon, 20 Apr 2020 16:21:22 +0200
> > > +Subject: [PATCH] tskeys.c: add support for 64bit time_t
> > > +
> > > +Upgrade the recipe to cope with the 64-bit time changes introduced in
> 4.16
> > > +
> > > +Fix:
> > > +
> > > +| tskeys.c: In function 'press_key':
> > > +| tskeys.c:141:4: error: 'struct input_event' has no member named
> 'time'
> > > +|   141 |  ev.time.tv_sec = time(0);
> > > +|   |^
> > > +| tskeys.c:142:4: error: 'struct input_event' has no member named
> 'time'
> > > +|   142 |  ev.time.tv_usec = 0;
> > > +|   |^
> > > +
> > > +Signed-off-by: Andrea Adami 
> > > +---
> > > + apps/tskeys/tskeys.c | 5 +
> > > + 1 file changed, 5 insertions(+)
> > > +
> > > +diff --git a/apps/tskeys/tskeys.c b/apps/tskeys/tskeys.c
> > > +index 264dfb7..36e3bfd 100644
> > > +--- a/apps/tskeys/tskeys.c
> > >  b/apps/tskeys/tskeys.c
> > > +@@ -138,8 +138,13 @@ void press_key(int fd, int key, int pressed)
> > > +   struct input_event ev;
> > > +   int r;
> > > +
> > > ++#if !defined(__USE_TIME_BITS64)
> > > +   ev.time.tv_sec = time(0);
> > > +   ev.time.tv_usec = 0;
> > > ++#else
> > > ++  ev.input_event_sec = time(0);
> > > ++  ev.input_event_usec = 0;
> > > ++#endif
> >
> > does this work with musl ?
> >
>
>
> Yes, actually I tested it on musl first.
>
> Build Configuration:
> BB_VERSION   = "1.46.0"
> BUILD_SYS= "x86_64-linux"
> NATIVELSBSTRING  = "ubuntu-18.04"
> TARGET_SYS   = "arm-oe-linux-musleabi"
> MACHINE  = "spitz"
> DISTRO   = "nodistro"
> DISTRO_VERSION   = "nodistro.0"
> TUNE_FEATURES= "arm armv5 thumb dsp"
> TARGET_FPU   = "soft"
> meta =
> "master-next:b450b0a2f5df27c4ea903ae9c5f6f5b96b9ddfc3"
> meta-oe  =
> "master-next:205440e40f9a2d37a4f48391b03673a4aa042982"
> meta-handheld= "master:a876aaa33317d388aa2e865f665fe6cc58d500a7"
>
>
>
>
> > > +   ev.type = EV_KEY;
> > > +   ev.code = key;
> > > +   ev.value = pressed;
> > > +--
> > > +2.17.1
> > > +
> > > diff --git a/recipes-bsp/zaurusd/zaurusd_git.bb b/recipes-bsp/zaurusd/
> zaurusd_git.bb
> > > index d69805b..1f8e40b 100644
> > > --- a/recipes-bsp/zaurusd/zaurusd_git.bb
> > > +++ b/recipes-bsp/zaurusd/zaurusd_git.bb
> > > @@ -24,7 +24,8 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}
>  \
> > > file://01-check-toggle-portait \
> > > file://use-ts-symlink-instead-of-hardcoding.diff \
> > > file://0001-zaurusd-add-support-for-collie.patch \
> > > -   file://allow-newer-tslib.patch"
> > > +   file://allow-newer-tslib.patch \
> > > +   file://add_64bit_time_t.patch"
> > >
> > >
> > >  S = "${WORKDIR}/git"
> > > --
> > > 2.17.1
> > >
> > > 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84002): 
https://lists.openembedded.org/g/openembedded-devel/message/84002
Mute This Topic: https://lists.openembedded.org/mt/73154204/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [oe] [meta-handheld][PATCH 1/4] zaurusd: fix build with kernels < 4.16 and newer libc headers

2020-04-20 Thread Andrea Adami
On Mon, Apr 20, 2020 at 7:44 PM Khem Raj  wrote:
>
> On Mon, Apr 20, 2020 at 10:07 AM Andrea Adami  wrote:
> >
> > The Y2038 changes broke the build for older 32bit devices using
> > older kernels.
> >
> > As seen on: https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
> >
> > Signed-off-by: Andrea Adami 
> > ---
> >  .../zaurusd/zaurusd/add_64bit_time_t.patch| 43 +++
> >  recipes-bsp/zaurusd/zaurusd_git.bb|  3 +-
> >  2 files changed, 45 insertions(+), 1 deletion(-)
> >  create mode 100644 recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> >
> > diff --git a/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch 
> > b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> > new file mode 100644
> > index 000..5f9587a
> > --- /dev/null
> > +++ b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> > @@ -0,0 +1,43 @@
> > +From d15b20fd9e8927db5dc4303f2e6c11cfa8d6fe95 Mon Sep 17 00:00:00 2001
> > +From: Andrea Adami 
> > +Date: Mon, 20 Apr 2020 16:21:22 +0200
> > +Subject: [PATCH] tskeys.c: add support for 64bit time_t
> > +
> > +Upgrade the recipe to cope with the 64-bit time changes introduced in 4.16
> > +
> > +Fix:
> > +
> > +| tskeys.c: In function 'press_key':
> > +| tskeys.c:141:4: error: 'struct input_event' has no member named 'time'
> > +|   141 |  ev.time.tv_sec = time(0);
> > +|   |^
> > +| tskeys.c:142:4: error: 'struct input_event' has no member named 'time'
> > +|   142 |  ev.time.tv_usec = 0;
> > +|   |^
> > +
> > +Signed-off-by: Andrea Adami 
> > +---
> > + apps/tskeys/tskeys.c | 5 +
> > + 1 file changed, 5 insertions(+)
> > +
> > +diff --git a/apps/tskeys/tskeys.c b/apps/tskeys/tskeys.c
> > +index 264dfb7..36e3bfd 100644
> > +--- a/apps/tskeys/tskeys.c
> >  b/apps/tskeys/tskeys.c
> > +@@ -138,8 +138,13 @@ void press_key(int fd, int key, int pressed)
> > +   struct input_event ev;
> > +   int r;
> > +
> > ++#if !defined(__USE_TIME_BITS64)
> > +   ev.time.tv_sec = time(0);
> > +   ev.time.tv_usec = 0;
> > ++#else
> > ++  ev.input_event_sec = time(0);
> > ++  ev.input_event_usec = 0;
> > ++#endif
>
> does this work with musl ?
>


Yes, actually I tested it on musl first.

Build Configuration:
BB_VERSION   = "1.46.0"
BUILD_SYS= "x86_64-linux"
NATIVELSBSTRING  = "ubuntu-18.04"
TARGET_SYS   = "arm-oe-linux-musleabi"
MACHINE  = "spitz"
DISTRO   = "nodistro"
DISTRO_VERSION   = "nodistro.0"
TUNE_FEATURES= "arm armv5 thumb dsp"
TARGET_FPU   = "soft"
meta = "master-next:b450b0a2f5df27c4ea903ae9c5f6f5b96b9ddfc3"
meta-oe  = "master-next:205440e40f9a2d37a4f48391b03673a4aa042982"
meta-handheld= "master:a876aaa33317d388aa2e865f665fe6cc58d500a7"




> > +   ev.type = EV_KEY;
> > +   ev.code = key;
> > +   ev.value = pressed;
> > +--
> > +2.17.1
> > +
> > diff --git a/recipes-bsp/zaurusd/zaurusd_git.bb 
> > b/recipes-bsp/zaurusd/zaurusd_git.bb
> > index d69805b..1f8e40b 100644
> > --- a/recipes-bsp/zaurusd/zaurusd_git.bb
> > +++ b/recipes-bsp/zaurusd/zaurusd_git.bb
> > @@ -24,7 +24,8 @@ SRC_URI = "git://git.yoctoproject.org/${BPN} \
> > file://01-check-toggle-portait \
> > file://use-ts-symlink-instead-of-hardcoding.diff \
> > file://0001-zaurusd-add-support-for-collie.patch \
> > -   file://allow-newer-tslib.patch"
> > +   file://allow-newer-tslib.patch \
> > +   file://add_64bit_time_t.patch"
> >
> >
> >  S = "${WORKDIR}/git"
> > --
> > 2.17.1
> >
> > 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84001): 
https://lists.openembedded.org/g/openembedded-devel/message/84001
Mute This Topic: https://lists.openembedded.org/mt/73154204/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [oe] [meta-handheld][PATCH 1/4] zaurusd: fix build with kernels < 4.16 and newer libc headers

2020-04-20 Thread Khem Raj
On Mon, Apr 20, 2020 at 10:07 AM Andrea Adami  wrote:
>
> The Y2038 changes broke the build for older 32bit devices using
> older kernels.
>
> As seen on: https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
>
> Signed-off-by: Andrea Adami 
> ---
>  .../zaurusd/zaurusd/add_64bit_time_t.patch| 43 +++
>  recipes-bsp/zaurusd/zaurusd_git.bb|  3 +-
>  2 files changed, 45 insertions(+), 1 deletion(-)
>  create mode 100644 recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
>
> diff --git a/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch 
> b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> new file mode 100644
> index 000..5f9587a
> --- /dev/null
> +++ b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
> @@ -0,0 +1,43 @@
> +From d15b20fd9e8927db5dc4303f2e6c11cfa8d6fe95 Mon Sep 17 00:00:00 2001
> +From: Andrea Adami 
> +Date: Mon, 20 Apr 2020 16:21:22 +0200
> +Subject: [PATCH] tskeys.c: add support for 64bit time_t
> +
> +Upgrade the recipe to cope with the 64-bit time changes introduced in 4.16
> +
> +Fix:
> +
> +| tskeys.c: In function 'press_key':
> +| tskeys.c:141:4: error: 'struct input_event' has no member named 'time'
> +|   141 |  ev.time.tv_sec = time(0);
> +|   |^
> +| tskeys.c:142:4: error: 'struct input_event' has no member named 'time'
> +|   142 |  ev.time.tv_usec = 0;
> +|   |^
> +
> +Signed-off-by: Andrea Adami 
> +---
> + apps/tskeys/tskeys.c | 5 +
> + 1 file changed, 5 insertions(+)
> +
> +diff --git a/apps/tskeys/tskeys.c b/apps/tskeys/tskeys.c
> +index 264dfb7..36e3bfd 100644
> +--- a/apps/tskeys/tskeys.c
>  b/apps/tskeys/tskeys.c
> +@@ -138,8 +138,13 @@ void press_key(int fd, int key, int pressed)
> +   struct input_event ev;
> +   int r;
> +
> ++#if !defined(__USE_TIME_BITS64)
> +   ev.time.tv_sec = time(0);
> +   ev.time.tv_usec = 0;
> ++#else
> ++  ev.input_event_sec = time(0);
> ++  ev.input_event_usec = 0;
> ++#endif

does this work with musl ?

> +   ev.type = EV_KEY;
> +   ev.code = key;
> +   ev.value = pressed;
> +--
> +2.17.1
> +
> diff --git a/recipes-bsp/zaurusd/zaurusd_git.bb 
> b/recipes-bsp/zaurusd/zaurusd_git.bb
> index d69805b..1f8e40b 100644
> --- a/recipes-bsp/zaurusd/zaurusd_git.bb
> +++ b/recipes-bsp/zaurusd/zaurusd_git.bb
> @@ -24,7 +24,8 @@ SRC_URI = "git://git.yoctoproject.org/${BPN} \
> file://01-check-toggle-portait \
> file://use-ts-symlink-instead-of-hardcoding.diff \
> file://0001-zaurusd-add-support-for-collie.patch \
> -   file://allow-newer-tslib.patch"
> +   file://allow-newer-tslib.patch \
> +   file://add_64bit_time_t.patch"
>
>
>  S = "${WORKDIR}/git"
> --
> 2.17.1
>
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84000): 
https://lists.openembedded.org/g/openembedded-devel/message/84000
Mute This Topic: https://lists.openembedded.org/mt/73154204/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[oe] [meta-handheld][PATCH 1/4] zaurusd: fix build with kernels < 4.16 and newer libc headers

2020-04-20 Thread Andrea Adami
The Y2038 changes broke the build for older 32bit devices using
older kernels.

As seen on: https://sourceware.org/glibc/wiki/Y2038ProofnessDesign

Signed-off-by: Andrea Adami 
---
 .../zaurusd/zaurusd/add_64bit_time_t.patch| 43 +++
 recipes-bsp/zaurusd/zaurusd_git.bb|  3 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch

diff --git a/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch 
b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
new file mode 100644
index 000..5f9587a
--- /dev/null
+++ b/recipes-bsp/zaurusd/zaurusd/add_64bit_time_t.patch
@@ -0,0 +1,43 @@
+From d15b20fd9e8927db5dc4303f2e6c11cfa8d6fe95 Mon Sep 17 00:00:00 2001
+From: Andrea Adami 
+Date: Mon, 20 Apr 2020 16:21:22 +0200
+Subject: [PATCH] tskeys.c: add support for 64bit time_t
+
+Upgrade the recipe to cope with the 64-bit time changes introduced in 4.16
+
+Fix:
+
+| tskeys.c: In function 'press_key':
+| tskeys.c:141:4: error: 'struct input_event' has no member named 'time'
+|   141 |  ev.time.tv_sec = time(0);
+|   |^
+| tskeys.c:142:4: error: 'struct input_event' has no member named 'time'
+|   142 |  ev.time.tv_usec = 0;
+|   |^
+
+Signed-off-by: Andrea Adami 
+---
+ apps/tskeys/tskeys.c | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/apps/tskeys/tskeys.c b/apps/tskeys/tskeys.c
+index 264dfb7..36e3bfd 100644
+--- a/apps/tskeys/tskeys.c
 b/apps/tskeys/tskeys.c
+@@ -138,8 +138,13 @@ void press_key(int fd, int key, int pressed)
+   struct input_event ev;
+   int r;
+ 
++#if !defined(__USE_TIME_BITS64)
+   ev.time.tv_sec = time(0);
+   ev.time.tv_usec = 0;
++#else
++  ev.input_event_sec = time(0);
++  ev.input_event_usec = 0;
++#endif
+   ev.type = EV_KEY;
+   ev.code = key;
+   ev.value = pressed;
+-- 
+2.17.1
+
diff --git a/recipes-bsp/zaurusd/zaurusd_git.bb 
b/recipes-bsp/zaurusd/zaurusd_git.bb
index d69805b..1f8e40b 100644
--- a/recipes-bsp/zaurusd/zaurusd_git.bb
+++ b/recipes-bsp/zaurusd/zaurusd_git.bb
@@ -24,7 +24,8 @@ SRC_URI = "git://git.yoctoproject.org/${BPN} \
file://01-check-toggle-portait \
file://use-ts-symlink-instead-of-hardcoding.diff \
file://0001-zaurusd-add-support-for-collie.patch \
-   file://allow-newer-tslib.patch"
+   file://allow-newer-tslib.patch \
+   file://add_64bit_time_t.patch"
 
 
 S = "${WORKDIR}/git"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#83995): 
https://lists.openembedded.org/g/openembedded-devel/message/83995
Mute This Topic: https://lists.openembedded.org/mt/73154204/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-