Skip to contentSkip to conversation

package/kexec: fix build on pre 4.4 kernels

PATCH New Federico Pellegrin 3 participants 4 messages Feb 3, 2021 – May 7, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/kexec: fix build on pre 4.4 kernels

kexec build will fail on older kernels (pre 4.4) as the define VIDEO_CAPABILITY_64BIT_BASE was not present at that time.

This patch adds it, as per linux/include/uapi/linux/screen_info.h, if not present.

---
 ...c-tools-fix-build-on-pre-4.4-kernels.patch | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/kexec/0003-kexec-tools-fix-build-on-pre-4.4-kernels.patch
package/kexec/0003-kexec-tools-fix-build-on-pre-4.4-kernels.patch new file +34 -0
new file mode 100644
index 0000000000..fcac604dfd
@@ -0,0 +1,34 @@
+From cbbe4c47cb2acae04083c510dbe0efc5f48f5bb6 Mon Sep 17 00:00:00 2001
+From: Federico Pellegrin <[email protected]>
+Date: Wed, 3 Feb 2021 11:00:17 +0100
+Subject: [PATCH] kexec-tools: fix build on pre 4.4 kernels
+
+kexec build will fail on older kernels (pre 4.4) as the define
+VIDEO_CAPABILITY_64BIT_BASE was not present at that time.
+
+This patch adds it, as per linux/include/uapi/linux/screen_info.h,
+if not present.
+
+Signed-off-by: Federico Pellegrin <[email protected]>
+---
+ kexec/arch/i386/x86-linux-setup.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
+index 76e1185..ab54a4a 100644
+--- a/kexec/arch/i386/x86-linux-setup.c
++++ b/kexec/arch/i386/x86-linux-setup.c
+@@ -37,6 +37,10 @@
+ #include "x86-linux-setup.h"
+ #include "../../kexec/kexec-syscall.h"
+ 
++#ifndef VIDEO_CAPABILITY_64BIT_BASE
++#define VIDEO_CAPABILITY_64BIT_BASE (1 << 1)	/* Frame buffer base is 64-bit */
++#endif
++
+ void init_linux_parameters(struct x86_linux_param_header *real_mode)
+ {
+ 	/* Fill in the values that are usually provided by the kernel. */
+-- 
+2.26.2
+
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/kexec: fix build on pre 4.4 kernels

Hi Thomas,
This has now been merged upstream:
https://github.com/horms/kexec-tools/commit/d73822b8985b68694336cd6a1aa47fe0233b55cc

I don't know if you think it's the case to merge therefore to Buildroot or we can wait for the next release of kexec-tools (not sure when that could happend).

Thanks,
Federico

Il giorno mer 3 feb 2021 alle ore 11:09 Federico Pellegrin <[email protected]> ha scritto:

Quoted 54 lines

kexec build will fail on older kernels (pre 4.4) as the define VIDEO_CAPABILITY_64BIT_BASE was not present at that time.

This patch adds it, as per linux/include/uapi/linux/screen_info.h, if not present.

---
 ...c-tools-fix-build-on-pre-4.4-kernels.patch | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/kexec/0003-kexec-tools-fix-build-on-pre-4.4-kernels.patch
package/kexec/0003-kexec-tools-fix-build-on-pre-4.4-kernels.patch new file +34 -1
new file mode 100644
index 0000000000..fcac604dfd
@@ -0,0 +1,34 @@
+From cbbe4c47cb2acae04083c510dbe0efc5f48f5bb6 Mon Sep 17 00:00:00 2001
+From: Federico Pellegrin <[email protected]>
+Date: Wed, 3 Feb 2021 11:00:17 +0100
+Subject: [PATCH] kexec-tools: fix build on pre 4.4 kernels
+
+kexec build will fail on older kernels (pre 4.4) as the define
+VIDEO_CAPABILITY_64BIT_BASE was not present at that time.
+
+This patch adds it, as per linux/include/uapi/linux/screen_info.h,
+if not present.
+
+Signed-off-by: Federico Pellegrin <[email protected]>
+---
+ kexec/arch/i386/x86-linux-setup.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
+index 76e1185..ab54a4a 100644
+--- a/kexec/arch/i386/x86-linux-setup.c
++++ b/kexec/arch/i386/x86-linux-setup.c
+@@ -37,6 +37,10 @@
+ #include "x86-linux-setup.h"
+ #include "../../kexec/kexec-syscall.h"
+
++#ifndef VIDEO_CAPABILITY_64BIT_BASE
++#define VIDEO_CAPABILITY_64BIT_BASE (1 << 1)  /* Frame buffer base is 64-bit */
++#endif
++
+ void init_linux_parameters(struct x86_linux_param_header *real_mode)
+ {
+       /* Fill in the values that are usually provided by the kernel. */
+--
+2.26.2
+
--

2.26.2

#2 lore raw

PATCH 1/1 package/kexec: fix build on pre 4.4 kernels

In reply to Federico Pellegrin

Federico, All,

On 2021-02-03 11:09 +0100, Federico Pellegrin spake thusly:

Quoted 5 lines

kexec build will fail on older kernels (pre 4.4) as the define VIDEO_CAPABILITY_64BIT_BASE was not present at that time.

This patch adds it, as per linux/include/uapi/linux/screen_info.h, if not present.

This patch is no longer needed now that we updated kexec to 2.0.21, then 2.0.22.

Sorry it took so long to handle that... :-/

Regards,
Yann E. MORIN.

Quoted 52 lines
---
 ...c-tools-fix-build-on-pre-4.4-kernels.patch | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/kexec/0003-kexec-tools-fix-build-on-pre-4.4-kernels.patch
package/kexec/0003-kexec-tools-fix-build-on-pre-4.4-kernels.patch new file +34 -0
new file mode 100644
index 0000000000..fcac604dfd
@@ -0,0 +1,34 @@
+From cbbe4c47cb2acae04083c510dbe0efc5f48f5bb6 Mon Sep 17 00:00:00 2001
+From: Federico Pellegrin <[email protected]>
+Date: Wed, 3 Feb 2021 11:00:17 +0100
+Subject: [PATCH] kexec-tools: fix build on pre 4.4 kernels
+
+kexec build will fail on older kernels (pre 4.4) as the define
+VIDEO_CAPABILITY_64BIT_BASE was not present at that time.
+
+This patch adds it, as per linux/include/uapi/linux/screen_info.h,
+if not present.
+
+Signed-off-by: Federico Pellegrin <[email protected]>
+---
+ kexec/arch/i386/x86-linux-setup.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
+index 76e1185..ab54a4a 100644
+--- a/kexec/arch/i386/x86-linux-setup.c
++++ b/kexec/arch/i386/x86-linux-setup.c
+@@ -37,6 +37,10 @@
+ #include "x86-linux-setup.h"
+ #include "../../kexec/kexec-syscall.h"
+ 
++#ifndef VIDEO_CAPABILITY_64BIT_BASE
++#define VIDEO_CAPABILITY_64BIT_BASE (1 << 1)	/* Frame buffer base is 64-bit */
++#endif
++
+ void init_linux_parameters(struct x86_linux_param_header *real_mode)
+ {
+ 	/* Fill in the values that are usually provided by the kernel. */
+-- 
+2.26.2
+
Signature · 6 lines
2.26.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/kexec: fix build on pre 4.4 kernels

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Federico, All,
On 2021-02-03 11:09 +0100, Federico Pellegrin spake thusly:

Quoted 8 lines
Quoted 5 lines

kexec build will fail on older kernels (pre 4.4) as the define VIDEO_CAPABILITY_64BIT_BASE was not present at that time.

This patch adds it, as per linux/include/uapi/linux/screen_info.h, if not present.

This patch is no longer needed now that we updated kexec to 2.0.21, then 2.0.22.

But on 2021.02.x we still have 2.0.20, so committed to 2021.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard