Add 16k page support

This commit is contained in:
topjohnwu 2024-07-17 11:10:24 -07:00
parent e9dc4d4ac8
commit 9fa83933e1
19 changed files with 48 additions and 22 deletions

View File

@ -4,6 +4,7 @@ APP_CFLAGS := -Wall -Oz -fomit-frame-pointer -flto
# Disable all security features
APP_CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -U_FORTIFY_SOURCE
APP_LDFLAGS := -flto -Wl,--icf=all
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
ifeq ($(OS),Windows_NT)
APP_SHORT_COMMANDS := true

View File

@ -1,7 +1,7 @@
From 4d264bc921b1a74381d356167b4c15673c819456 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sat, 13 Jul 2024 18:26:16 -0700
Subject: [PATCH 01/17] Fix incorrect assumptions about NDK
Subject: [PATCH 01/18] Fix incorrect assumptions about NDK
---
include/platform.h | 5 ++++-

View File

@ -1,7 +1,7 @@
From 62dc3c2191e35983b619fc750f9f731c4a84a232 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Thu, 3 Dec 2015 01:29:35 -0400
Subject: [PATCH 02/17] loadfont/setfont/conspy: add missing header
Subject: [PATCH 02/18] loadfont/setfont/conspy: add missing header
Imported from dorimanx's combined ported header toolchain:
https://github.com/dorimanx/android-busybox-ndk

View File

@ -1,7 +1,7 @@
From 9cf0fa6cd156d864a738c21d34ee273392c56dfc Mon Sep 17 00:00:00 2001
From: Tias Guns <tias@ulyssis.org>
Date: Tue, 20 Mar 2012 21:26:07 +0000
Subject: [PATCH 03/17] fix ipcs, ipcrm no sys/sem-shm-msg, etc
Subject: [PATCH 03/18] fix ipcs, ipcrm no sys/sem-shm-msg, etc
patch from 'no-sys-shm,msg,sem' by Dan Drown
http://dan.drown.org/android/src/busybox/

View File

@ -1,7 +1,7 @@
From 41a741b2213a0f127c239e163d1f8f894f5390f6 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sat, 13 Jul 2024 18:35:56 -0700
Subject: [PATCH 04/17] Bionic does not have ether_hostton
Subject: [PATCH 04/18] Bionic does not have ether_hostton
---
networking/ether-wake.c | 2 +-

View File

@ -1,7 +1,7 @@
From 79bdb8978e9ffcfc4799ed00206602d5e57b5844 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sun, 14 Jul 2024 16:54:36 -0700
Subject: [PATCH 05/17] Prevent duplicate in6_ifreq definition
Subject: [PATCH 05/18] Prevent duplicate in6_ifreq definition
---
networking/ifconfig.c | 8 --------

View File

@ -1,7 +1,7 @@
From 1b95c833d8cda62bf79f0ec8da7cca8f3ea1e4d8 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sun, 14 Jul 2024 16:55:01 -0700
Subject: [PATCH 06/17] Add missing sigisemptyset implementation
Subject: [PATCH 06/18] Add missing sigisemptyset implementation
---
shell/hush.c | 9 +++++++++

View File

@ -1,7 +1,7 @@
From f258400ac6119a369865606883245ecf176005ae Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sun, 14 Jul 2024 21:26:56 -0700
Subject: [PATCH 07/17] Prevent compiling mtab related features
Subject: [PATCH 07/18] Prevent compiling mtab related features
---
util-linux/mount.c | 4 +++-

View File

@ -1,7 +1,7 @@
From 12334c3e19a1e902a90b7d4898f61b08301de94d Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Mon, 15 Jul 2024 18:50:57 -0700
Subject: [PATCH 08/17] Remove CBQ support from tc
Subject: [PATCH 08/18] Remove CBQ support from tc
CBQ support is removed from Linux.
More info: https://bugs.busybox.net/show_bug.cgi?id=15931

View File

@ -1,7 +1,7 @@
From 2eb6acaf13508003e26d51cbce7bc42b49634e3c Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Mon, 15 Jul 2024 17:20:17 -0700
Subject: [PATCH 09/17] Use bionic libresolv for nslookup
Subject: [PATCH 09/18] Use bionic libresolv for nslookup
---
networking/bionic_resolv.h | 112 +++++++++++++++++++++++++++++++++++++

View File

@ -1,7 +1,7 @@
From 9cb8d202d99a8126413283d50dbe83e457387689 Mon Sep 17 00:00:00 2001
From: Chris Renshaw <osm0sis@outlook.com>
Date: Wed, 24 May 2023 14:15:00 -0300
Subject: [PATCH 10/17] Fix direct mount auto loopback and losetup for Android
Subject: [PATCH 10/18] Fix direct mount auto loopback and losetup for Android
---
include/libbb.h | 12 +++++++++---

View File

@ -1,7 +1,7 @@
From 7d82ae116d7c3a3aa6d9048574fdf0564d513378 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Mon, 15 Jul 2024 17:44:50 -0700
Subject: [PATCH 11/17] Update shell paths to Android specific values
Subject: [PATCH 11/18] Update shell paths to Android specific values
---
include/libbb.h | 4 ++--

View File

@ -1,7 +1,7 @@
From 4732054018b9f22edeb2b47153352a1399c5bc5a Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sat, 2 May 2020 01:48:30 -0700
Subject: [PATCH 12/17] Disable SELinux features for install
Subject: [PATCH 12/18] Disable SELinux features for install
matchpathcon is not usable on Android
---

View File

@ -1,7 +1,7 @@
From 919bf6bfbe8b8a26ad3fc80d53aa5f2221aff1ed Mon Sep 17 00:00:00 2001
From cd4a191fd4c51117087c41c4898508b89389cb1e Mon Sep 17 00:00:00 2001
From: LoveSy <shana@zju.edu.cn>
Date: Sun, 20 Mar 2022 00:51:25 +0800
Subject: [PATCH 13/17] Replace `realpath` to BSD inplementation
Subject: [PATCH 13/18] Replace realpath to BSD implementation
---
libbb/Kbuild.src | 3 +

View File

@ -1,7 +1,7 @@
From 8c3bb497fbc8b780c8f6b163882f9b3e636b84ae Mon Sep 17 00:00:00 2001
From 6e402158a42bab0f1f45053d356beb8ec8d8e615 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Sat, 2 Sep 2023 05:21:13 -0700
Subject: [PATCH 14/17] Replace rename(2) with direct system call
Subject: [PATCH 14/18] Replace rename(2) with direct system call
NDK r26 introduced the following change:
https://android-review.googlesource.com/c/platform/bionic/+/2240019

View File

@ -1,7 +1,7 @@
From 0cc05e531c03124e9611f411b97fb32b90a8d229 Mon Sep 17 00:00:00 2001
From 11d2be8946ebc995890bf81bd80210ae1045cd0f Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Fri, 7 Feb 2020 14:32:06 -0800
Subject: [PATCH 15/17] Add runtime toggle to enable standalone ash
Subject: [PATCH 15/18] Add runtime toggle to enable standalone ash
---
shell/ash.c | 42 ++++++++++++++++++++++++------------------

View File

@ -1,7 +1,7 @@
From 9e08908e035682a76ca93410bbd651a0407cddc4 Mon Sep 17 00:00:00 2001
From 86557f542be8f62b583717ae22cf10a4bbbe78f9 Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Thu, 25 Jun 2020 03:54:53 -0700
Subject: [PATCH 16/17] Resolve /proc/self/exe when re-exec ourselves
Subject: [PATCH 16/18] Resolve /proc/self/exe when re-exec ourselves
Use resolved path of /proc/self/exe to workaround Samsung kernel
blocking executables running as UID=0 in paths such as /proc.

View File

@ -1,7 +1,7 @@
From 0efb2683727f165c1e729db9c2c01a341f038c31 Mon Sep 17 00:00:00 2001
From 63e82e940984e1ee6f93f9ee4a6b0255bc2006dc Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Thu, 21 Jan 2021 00:07:41 -0800
Subject: [PATCH 17/17] Allow running as libbusybox.so
Subject: [PATCH 17/18] Allow running as libbusybox.so
---
libbb/appletlib.c | 5 ++++-

View File

@ -0,0 +1,25 @@
From 091ecfecb34cbc0724dedf07accc7d16880f69ca Mon Sep 17 00:00:00 2001
From: topjohnwu <topjohnwu@gmail.com>
Date: Fri, 21 Jun 2024 03:09:47 -0700
Subject: [PATCH 18/18] Allow variable page size on x64
---
include/libbb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/libbb.h b/include/libbb.h
index 112e45197..401a8ec9a 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -435,7 +435,7 @@ void *mmap_read(int fd, size_t size) FAST_FUNC;
void *mmap_anon(size_t size) FAST_FUNC;
void *xmmap_anon(size_t size) FAST_FUNC;
-#if defined(__x86_64__) || defined(i386)
+#if defined(i386) /* only 32bit, x64 has emulated variable page size */
# define BB_ARCH_FIXED_PAGESIZE 4096
#elif defined(__arm__) /* only 32bit, 64bit ARM has variable page size */
# define BB_ARCH_FIXED_PAGESIZE 4096
--
2.45.2