Skip to contentSkip to conversation

kexec-tools: fix build on pre 4.4 kernels

PATCH Applied Federico Pellegrin 4 participants 6 messages Feb 5, 2021 – Apr 2, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 kexec/arch/i386/x86-linux-setup.c | 4 ++++
 1 file changed, 4 insertions(+)
kexec/arch/i386/x86-linux-setup.c +4 -0
index 76e1185..ab54a4a 100644
@@ -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. */
Signature · 7 lines
2.26.2


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

Added Kairui in cc since he contributed that part

Quoted 36 lines · Federico Pellegrin

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.

---
 kexec/arch/i386/x86-linux-setup.c | 4 ++++
 1 file changed, 4 insertions(+)
kexec/arch/i386/x86-linux-setup.c +4 -0
index 76e1185..ab54a4a 100644
@@ -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. */
Signature · 7 lines
2.26.2


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw

Hi,
Just trying my luck with a "ping", if someone could evaluate if the patch seems correct and/or eventually merge.

Many thanks!
Federico

Il giorno dom 7 feb 2021 alle ore 09:00 Dave Young <[email protected]> ha scritto:

Quoted 33 lines

Added Kairui in cc since he contributed that part

Quoted 30 lines · Federico Pellegrin

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.

---
 kexec/arch/i386/x86-linux-setup.c | 4 ++++
 1 file changed, 4 insertions(+)
kexec/arch/i386/x86-linux-setup.c +4 -1
index 76e1185..ab54a4a 100644
@@ -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

Quoted 7 lines
Quoted 6 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reviewed-by on v1 1/1
#3 lore raw
In reply to Federico Pellegrin
Quoted 16 lines · Federico Pellegrin

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.

---
  kexec/arch/i386/x86-linux-setup.c | 4 ++++
  1 file changed, 4 insertions(+)
kexec/arch/i386/x86-linux-setup.c +0 -0
index 76e1185..ab54a4a 100644

kexec/arch/i386/x86-linux-setup.c line 46

Quoted 10 lines
kexec/arch/i386/x86-linux-setup.c +4 -0
@@ -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. */

Thanks for the fix, I didn't notice pre 4.4 kernels don't have this defined when I submitted that patch.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw

Hello,
Just pinging on this... not sure if I need to do something else to get it merged, please just let me know.

Thanks,
Federico

Il giorno mar 23 feb 2021 alle ore 11:32 Kairui Song <[email protected]> ha scritto:

Quoted 32 lines · Federico Pellegrin
Quoted 16 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.

---
  kexec/arch/i386/x86-linux-setup.c | 4 ++++
  1 file changed, 4 insertions(+)
kexec/arch/i386/x86-linux-setup.c +0 -0
index 76e1185..ab54a4a 100644

kexec/arch/i386/x86-linux-setup.c line 46

Quoted 10 lines
kexec/arch/i386/x86-linux-setup.c +4 -0
@@ -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. */

Thanks for the fix, I didn't notice pre 4.4 kernels don't have this defined when I submitted that patch.

Quoted 2 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Applied
#5 lore raw
In reply to Kairui Song
Quoted 30 lines · Kairui Song
Quoted 16 lines · Federico Pellegrin

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.

---
  kexec/arch/i386/x86-linux-setup.c | 4 ++++
  1 file changed, 4 insertions(+)
kexec/arch/i386/x86-linux-setup.c +0 -0
index 76e1185..ab54a4a 100644

kexec/arch/i386/x86-linux-setup.c line 45

Quoted 9 lines
kexec/arch/i386/x86-linux-setup.c +4 -0
@@ -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. */

Thanks for the fix, I didn't notice pre 4.4 kernels don't have this defined when I submitted that patch.

Quoted 1 line

Thanks, applied.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec