diff mbox series

fix buildroot installation so swupdate can find mtd headers

Message ID CAPxu4weG151Nx=HoF40Xw=JvrH9LkwaUMacAm_UqGV4Ca7BmXg@mail.gmail.com
State Rejected
Headers show
Series fix buildroot installation so swupdate can find mtd headers | expand

Commit Message

Thomas W. July 10, 2020, 6:33 p.m. UTC
Hello,

I've recently updated my buildroot installation to use swupdate 2020.4
(this is newer than the mainline buildroot package).  I could not
build swupdate because swupdate package cannot find <mtd/libmtd.h>.
Buildroot is patched to install the required libraries and headers,
but the mtd libraries are not found because it is included incorrectly
in the source code.

Note I did not test how this change will affect yocto because I cannot
test yocto

Signed-off-by: Thomas Chiantia <thomas.chiantia@gmail.com>

---
From c5fb3e8b74d0c30d3a427a932c319391c03802d6 Mon Sep 17 00:00:00 2001
From: thomas <thomas.chiantia@gmail.com>
Date: Fri, 10 Jul 2020 14:25:36 -0400
Subject: [PATCH] fix swupdate cannot find libmtd.h and libubi.h headers when
 using buildroot

---
 include/flash.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Babic July 10, 2020, 7:20 p.m. UTC | #1
Hi Thomas,

On 10.07.20 20:33, Thomas W. wrote:
> Hello,
> 
> I've recently updated my buildroot installation to use swupdate 2020.4
> (this is newer than the mainline buildroot package).  I could not
> build swupdate because swupdate package cannot find <mtd/libmtd.h>.
> Buildroot is patched to install the required libraries and headers,
> but the mtd libraries are not found because it is included incorrectly
> in the source code.
> 
> Note I did not test how this change will affect yocto because I cannot
> test yocto
> 
> Signed-off-by: Thomas Chiantia <thomas.chiantia@gmail.com>
> 
> ---
>  From c5fb3e8b74d0c30d3a427a932c319391c03802d6 Mon Sep 17 00:00:00 2001
> From: thomas <thomas.chiantia@gmail.com>
> Date: Fri, 10 Jul 2020 14:25:36 -0400
> Subject: [PATCH] fix swupdate cannot find libmtd.h and libubi.h headers when
>   using buildroot
> 
> ---
>   include/flash.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/flash.h b/include/flash.h
> index d3c1860..2999c8d 100644
> --- a/include/flash.h
> +++ b/include/flash.h
> @@ -10,8 +10,8 @@
>   #define _FLASH_PART_H
> 
>   #include <stdint.h>
> -#include <libmtd.h>
> -#include <libubi.h>
> +#include <mtd/libmtd.h>
> +#include <mtd/libubi.h>
>   #include "bsdqueue.h"
> 
>   #define DEFAULT_CTRL_DEV "/dev/ubi_ctrl"
> 

NAK. See this recent thread :

https://groups.google.com/forum/#!topic/swupdate/gd25RIPa00w
https://groups.google.com/forum/#!topic/swupdate/gei0Gc_5j8M

you should change your buildroot fix to install headers as described in 
<includedir> instead of <includedir>/mtd. Please also dend your patch to 
buildroot ML for inclusion in mainline (not here).

Best regards,
Stefano Babic
Thomas W. July 10, 2020, 7:43 p.m. UTC | #2
Ok, I fixed my buildroot instead and also sent buildroot patch to buildroot ml

On Fri, Jul 10, 2020 at 3:20 PM Stefano Babic <sbabic@denx.de> wrote:
>
> Hi Thomas,
>
> On 10.07.20 20:33, Thomas W. wrote:
> > Hello,
> >
> > I've recently updated my buildroot installation to use swupdate 2020.4
> > (this is newer than the mainline buildroot package).  I could not
> > build swupdate because swupdate package cannot find <mtd/libmtd.h>.
> > Buildroot is patched to install the required libraries and headers,
> > but the mtd libraries are not found because it is included incorrectly
> > in the source code.
> >
> > Note I did not test how this change will affect yocto because I cannot
> > test yocto
> >
> > Signed-off-by: Thomas Chiantia <thomas.chiantia@gmail.com>
> >
> > ---
> >  From c5fb3e8b74d0c30d3a427a932c319391c03802d6 Mon Sep 17 00:00:00 2001
> > From: thomas <thomas.chiantia@gmail.com>
> > Date: Fri, 10 Jul 2020 14:25:36 -0400
> > Subject: [PATCH] fix swupdate cannot find libmtd.h and libubi.h headers when
> >   using buildroot
> >
> > ---
> >   include/flash.h | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/flash.h b/include/flash.h
> > index d3c1860..2999c8d 100644
> > --- a/include/flash.h
> > +++ b/include/flash.h
> > @@ -10,8 +10,8 @@
> >   #define _FLASH_PART_H
> >
> >   #include <stdint.h>
> > -#include <libmtd.h>
> > -#include <libubi.h>
> > +#include <mtd/libmtd.h>
> > +#include <mtd/libubi.h>
> >   #include "bsdqueue.h"
> >
> >   #define DEFAULT_CTRL_DEV "/dev/ubi_ctrl"
> >
>
> NAK. See this recent thread :
>
> https://groups.google.com/forum/#!topic/swupdate/gd25RIPa00w
> https://groups.google.com/forum/#!topic/swupdate/gei0Gc_5j8M
>
> you should change your buildroot fix to install headers as described in
> <includedir> instead of <includedir>/mtd. Please also dend your patch to
> buildroot ML for inclusion in mainline (not here).
>
> Best regards,
> Stefano Babic
>
>
> --
> =====================================================================
> 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@denx.de
> =====================================================================
diff mbox series

Patch

diff --git a/include/flash.h b/include/flash.h
index d3c1860..2999c8d 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -10,8 +10,8 @@ 
 #define _FLASH_PART_H

 #include <stdint.h>
-#include <libmtd.h>
-#include <libubi.h>
+#include <mtd/libmtd.h>
+#include <mtd/libubi.h>
 #include "bsdqueue.h"

 #define DEFAULT_CTRL_DEV "/dev/ubi_ctrl"