From a01196d55d9cf7e317e5be302bad3f2b0e54090a Mon Sep 17 00:00:00 2001 From: DrUm78 Date: Wed, 12 Mar 2025 14:51:21 +0100 Subject: [PATCH] Fixed build on Ubuntu 22.04 --- .gitmodules | 2 +- FunKey/board/funkey/patches/linux/0000_Makefile.patch | 11 +++++++++++ .../board/funkey/patches/linux/0002_dtc-lexer.patch | 11 +++++++++++ FunKey/board/funkey/patches/linux/0003_shipped.patch | 11 +++++++++++ FunKey/configs/funkey_defconfig | 1 + .../board/funkey/patches/linux/0000_Makefile.patch | 11 +++++++++++ .../board/funkey/patches/linux/0002_dtc-lexer.patch | 11 +++++++++++ .../board/funkey/patches/linux/0003_shipped.patch | 11 +++++++++++ Recovery/configs/recovery_defconfig | 1 + buildroot | 2 +- 10 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 FunKey/board/funkey/patches/linux/0000_Makefile.patch create mode 100644 FunKey/board/funkey/patches/linux/0002_dtc-lexer.patch create mode 100644 FunKey/board/funkey/patches/linux/0003_shipped.patch create mode 100644 Recovery/board/funkey/patches/linux/0000_Makefile.patch create mode 100644 Recovery/board/funkey/patches/linux/0002_dtc-lexer.patch create mode 100644 Recovery/board/funkey/patches/linux/0003_shipped.patch diff --git a/.gitmodules b/.gitmodules index 4bf7ba1..7dea0f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "buildroot"] path = buildroot - url = https://github.com/FunKey-Project/buildroot.git + url = https://github.com/DrUm78/buildroot.git diff --git a/FunKey/board/funkey/patches/linux/0000_Makefile.patch b/FunKey/board/funkey/patches/linux/0000_Makefile.patch new file mode 100644 index 0000000..72d8482 --- /dev/null +++ b/FunKey/board/funkey/patches/linux/0000_Makefile.patch @@ -0,0 +1,11 @@ +--- a/Makefile 2024-02-16 14:58:29.220126035 +0000 ++++ b/Makefile 2024-02-16 14:58:46.572468923 +0000 +@@ -393,7 +393,7 @@ + + KBUILD_AFLAGS := -D__ASSEMBLY__ + KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ +- -fno-strict-aliasing -fno-common -fshort-wchar \ ++ -fno-strict-aliasing -fcommon -fshort-wchar \ + -Werror-implicit-function-declaration \ + -Wno-format-security \ + -std=gnu89 diff --git a/FunKey/board/funkey/patches/linux/0002_dtc-lexer.patch b/FunKey/board/funkey/patches/linux/0002_dtc-lexer.patch new file mode 100644 index 0000000..5ff9f04 --- /dev/null +++ b/FunKey/board/funkey/patches/linux/0002_dtc-lexer.patch @@ -0,0 +1,11 @@ +--- a/scripts/dtc/dtc-lexer.l 2024-02-16 09:12:07.182655128 +0000 ++++ b/scripts/dtc/dtc-lexer.l 2024-02-16 09:12:18.870713228 +0000 +@@ -38,7 +38,7 @@ + #include "srcpos.h" + #include "dtc-parser.tab.h" + +-YYLTYPE yylloc; ++extern YYLTYPE yylloc; + extern bool treesource_error; + + /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ diff --git a/FunKey/board/funkey/patches/linux/0003_shipped.patch b/FunKey/board/funkey/patches/linux/0003_shipped.patch new file mode 100644 index 0000000..0eeb5a8 --- /dev/null +++ b/FunKey/board/funkey/patches/linux/0003_shipped.patch @@ -0,0 +1,11 @@ +--- a/scripts/dtc/dtc-lexer.lex.c_shipped 2024-02-16 15:05:07.227705986 +0000 ++++ b/scripts/dtc/dtc-lexer.lex.c_shipped 2024-02-16 15:05:35.040218551 +0000 +@@ -631,7 +631,7 @@ + #include "srcpos.h" + #include "dtc-parser.tab.h" + +-YYLTYPE yylloc; ++extern YYLTYPE yylloc; + extern bool treesource_error; + + /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ diff --git a/FunKey/configs/funkey_defconfig b/FunKey/configs/funkey_defconfig index af02768..36275d0 100644 --- a/FunKey/configs/funkey_defconfig +++ b/FunKey/configs/funkey_defconfig @@ -122,3 +122,4 @@ BR2_PACKAGE_COMMANDER=y BR2_PACKAGE_P7ZIP=y BR2_PACKAGE_UNRAR=y BR2_PACKAGE_FILE=y +BR2_PACKAGE_HOST_PYTHON3=y diff --git a/Recovery/board/funkey/patches/linux/0000_Makefile.patch b/Recovery/board/funkey/patches/linux/0000_Makefile.patch new file mode 100644 index 0000000..72d8482 --- /dev/null +++ b/Recovery/board/funkey/patches/linux/0000_Makefile.patch @@ -0,0 +1,11 @@ +--- a/Makefile 2024-02-16 14:58:29.220126035 +0000 ++++ b/Makefile 2024-02-16 14:58:46.572468923 +0000 +@@ -393,7 +393,7 @@ + + KBUILD_AFLAGS := -D__ASSEMBLY__ + KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ +- -fno-strict-aliasing -fno-common -fshort-wchar \ ++ -fno-strict-aliasing -fcommon -fshort-wchar \ + -Werror-implicit-function-declaration \ + -Wno-format-security \ + -std=gnu89 diff --git a/Recovery/board/funkey/patches/linux/0002_dtc-lexer.patch b/Recovery/board/funkey/patches/linux/0002_dtc-lexer.patch new file mode 100644 index 0000000..5ff9f04 --- /dev/null +++ b/Recovery/board/funkey/patches/linux/0002_dtc-lexer.patch @@ -0,0 +1,11 @@ +--- a/scripts/dtc/dtc-lexer.l 2024-02-16 09:12:07.182655128 +0000 ++++ b/scripts/dtc/dtc-lexer.l 2024-02-16 09:12:18.870713228 +0000 +@@ -38,7 +38,7 @@ + #include "srcpos.h" + #include "dtc-parser.tab.h" + +-YYLTYPE yylloc; ++extern YYLTYPE yylloc; + extern bool treesource_error; + + /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ diff --git a/Recovery/board/funkey/patches/linux/0003_shipped.patch b/Recovery/board/funkey/patches/linux/0003_shipped.patch new file mode 100644 index 0000000..0eeb5a8 --- /dev/null +++ b/Recovery/board/funkey/patches/linux/0003_shipped.patch @@ -0,0 +1,11 @@ +--- a/scripts/dtc/dtc-lexer.lex.c_shipped 2024-02-16 15:05:07.227705986 +0000 ++++ b/scripts/dtc/dtc-lexer.lex.c_shipped 2024-02-16 15:05:35.040218551 +0000 +@@ -631,7 +631,7 @@ + #include "srcpos.h" + #include "dtc-parser.tab.h" + +-YYLTYPE yylloc; ++extern YYLTYPE yylloc; + extern bool treesource_error; + + /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ diff --git a/Recovery/configs/recovery_defconfig b/Recovery/configs/recovery_defconfig index 75b5394..4a4fc3a 100644 --- a/Recovery/configs/recovery_defconfig +++ b/Recovery/configs/recovery_defconfig @@ -83,3 +83,4 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_PYTHON3=y diff --git a/buildroot b/buildroot index a9b0381..c9f9ab4 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit a9b038158e13fa2b0037e9318ef310d35fe7e720 +Subproject commit c9f9ab47e17f5084fa815c36400bc2848ee72cee