Skip to contentSkip to conversation

package/rauc: needs kernel headers >= 3.0

PATCH New Yann E. MORIN 2 participants 5 messages Aug 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rauc: needs kernel headers >= 3.0

rauc includes <linux/mmc/ioctl.h> which was introduced only in linux 3.0.

Also change order to have arch dependencies first.

---
 package/rauc/Config.in | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
package/rauc/Config.in +5 -3
index 6433b827d3..864aa6b9c6 100644
@@ -1,8 +1,9 @@
 config BR2_PACKAGE_RAUC
 	bool "rauc"
-	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_USE_WCHAR # glib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_DBUS # run-time dependency
@@ -32,6 +33,7 @@ config BR2_PACKAGE_RAUC_JSON
 
 endif
 
-comment "rauc needs a toolchain w/ wchar, threads"
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+comment "rauc needs a toolchain w/ wchar, threads, headers >= 3.0"
 	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/rauc: needs kernel headers >= 3.0

Hello,

Quoted 7 lines · Yann E. MORIN

rauc includes <linux/mmc/ioctl.h> which was introduced only in linux 3.0.

Also change order to have arch dependencies first.

As discussed separately, this only solves the problem for the target build, and not for the host build. So, I would prefer a solution that adjusts the RAUC code to build with headers < 3.0, so that we solve both the host and the target problem@the same time.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/rauc: needs kernel headers >= 3.0

Thomas, All,

On 2018-08-24 13:49 +0200, Thomas Petazzoni spake thusly:

Quoted 6 lines · Yann E. MORIN
Quoted 5 lines

rauc includes <linux/mmc/ioctl.h> which was introduced only in linux 3.0.

Also change order to have arch dependencies first.

Quoted 7 lines
Quoted 2 lines

As discussed separately, this only solves the problem for the target build, and not for the host build. So, I would prefer a solution that adjusts the RAUC code to build with headers < 3.0, so that we solve both the host and the target problem at the same time.

That is not really possible, because emmc support is core to rauc; it is not even optional in the current code. Removing it (by making it conditional) does not make sense IMHO (but I'm not using rauc).

And then, technically, it would require quite some overhaul in rauc, because access to the emmc code is made from a lot of places.

So I'm not the one that will be doing that.

Regards,
Yann E. MORIN.

Quoted 7 lines

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/rauc: needs kernel headers >= 3.0

Hello,

Quoted 6 lines · Yann E. MORIN

That is not really possible, because emmc support is core to rauc; it is not even optional in the current code. Removing it (by making it conditional) does not make sense IMHO (but I'm not using rauc).

And then, technically, it would require quite some overhaul in rauc, because access to the emmc code is made from a lot of places.

Tadada. The problematic piece of code is not used for eMMC support in general, just for eMMC boot partition support. It was added by a single commit between v0.3 and v0.4 and is pretty self-contained and well-isolated.

So I took what you said as a challenge, and came up with:

http://patchwork.ozlabs.org/patch/961842/

Which has the added benefit of fixing the build issue of host-rauc :-)

Since it took me 36 minutes between your e-mail and this e-mail being, I don't think "quite some overhaul in rauc" was really needed :-P

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 package/rauc: needs kernel headers >= 3.0

Thomas, All,

On 2018-08-24 14:37 +0200, Thomas Petazzoni spake thusly:

Quoted 13 lines · Yann E. MORIN
Quoted 6 lines

That is not really possible, because emmc support is core to rauc; it is not even optional in the current code. Removing it (by making it conditional) does not make sense IMHO (but I'm not using rauc).

And then, technically, it would require quite some overhaul in rauc, because access to the emmc code is made from a lot of places.

Tadada. The problematic piece of code is not used for eMMC support in general, just for eMMC boot partition support. It was added by a single commit between v0.3 and v0.4 and is pretty self-contained and well-isolated.

Quoted 8 lines

So I took what you said as a challenge, and came up with:

http://patchwork.ozlabs.org/patch/961842/

Which has the added benefit of fixing the build issue of host-rauc :-)

Since it took me 36 minutes between your e-mail and this e-mail being, I don't think "quite some overhaul in rauc" was really needed :-P

Wooo... You took the bait quite easily! ;-)

But seriously, I indeed only skimmed for 'emmc' in the code. and there are quite a few call sites. Now, does it make sense to disable this emmc boot support at all? Let's see what upstream has to say about that. ;-)

Regards,
Yann E. MORIN.

Quoted 7 lines

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'