Patch for compiling Linux for meson

Yes it’s the patch metioned in [v2,0/6] ARM64: meson: GXBaby (S905) and Vega S95 enablement.

You might also would like to take a look at how did I build Debian 9 for meson.

Posted the patch here so that I wouldn’t need to patch the file manually each time.

diff -uNr a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
--- a/arch/arm64/kernel/head.S  2019-01-31 00:00:00.000000000 +0000
+++ b/arch/arm64/kernel/head.S  2019-01-31 00:00:00.000000000 +0000
@@ -51,7 +51,7 @@
 #elif (PAGE_OFFSET & 0x1fffff) != 0
 #error PAGE_OFFSET must be at least 2MB aligned
 #elif TEXT_OFFSET > 0x1fffff
-#error TEXT_OFFSET must be less than 2MB
+// #error TEXT_OFFSET must be less than 2MB
 #endif

 /*
diff -uNr a/arch/arm64/Makefile b/arch/arm64/Makefile
--- a/arch/arm64/Makefile   2019-01-31 00:00:00.000000000 +0000
+++ b/arch/arm64/Makefile   2019-01-31 00:00:00.000000000 +0000
@@ -88,7 +88,7 @@
         int(2 * 1024 * 1024 / (2 ^ $(CONFIG_ARM64_PAGE_SHIFT)) * \
         rand()) * (2 ^ $(CONFIG_ARM64_PAGE_SHIFT))}")
 else
-TEXT_OFFSET := 0x00080000
+TEXT_OFFSET := 0x01080000
 endif

 # KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - KASAN_SHADOW_SCALE_SHIFT))

2 thoughts on “Patch for compiling Linux for meson”

Leave a Reply

Your email address will not be published. Required fields are marked *