Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from buildroot:master #374

Merged
merged 15 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .checkpackageignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,11 @@ package/am33x-cm3/0004-Makefile-add-fno-builtin.patch lib_patch.Upstream
package/am33x-cm3/S93-am335x-pm-firmware-load lib_sysv.Variables
package/android-tools/0001-Fix-makefiles-for-out-of-tree-build.patch lib_patch.Upstream
package/android-tools/0002-Fix-adbd-for-non-Ubuntu-systems.patch lib_patch.Upstream
package/android-tools/0003-Fix-build-issue-with-uclibc.patch lib_patch.Upstream
package/android-tools/0004-Fix-build-issue-with-musl.patch lib_patch.Upstream
package/android-tools/0005-Use-pkgconf-to-get-libs-deps.patch lib_patch.Upstream
package/android-tools/0006-fix-big-endian-build.patch lib_patch.Upstream
package/android-tools/0007-include-cdefs-h-when-needed.patch lib_patch.Upstream
package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch lib_patch.Sob lib_patch.Upstream
package/android-tools/0005-makefiles-use-pkgconf-to-get-libs-deps.patch lib_patch.Upstream
package/android-tools/0006-Fix-build-on-big-endian-systems.patch lib_patch.Upstream
package/android-tools/0007-Include-cdefs.h-wherever-it-is-needed.patch lib_patch.Upstream
package/android-tools/0008-usb_linux.c-fix-minor-major-build-failure-due-to-gli.patch lib_patch.Upstream
package/android-tools/0009-Fix-makefiles-for-out-of-tree-ext4_utils-build.patch lib_patch.Upstream
package/android-tools/0010-adb-added-patch-for-openssl-1.1.0-compatibility.patch lib_patch.Upstream
package/aoetools/0001-Change-shell-script-interpreter-from-bin-bash-to-bin.patch lib_patch.Upstream
Expand Down
30 changes: 15 additions & 15 deletions boot/grub2/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ Notes on using Grub2 for BIOS-based platforms
is enough free space *before* the first partition to
store Grub2. Leaving 1 MB of free space is safe.
3. Setup loop device and loop partitions
sudo losetup -f disk.img
sudo partx -a /dev/loop0
loop_dev=$(sudo losetup -f disk.img)
sudo partx -a "$loop_dev"
4. Prepare the root partition
sudo mkfs.ext3 -L root /dev/loop0p1
sudo mount /dev/loop0p1 /mnt
sudo mkfs.ext3 -L root "${loop_dev}p1"
sudo mount "${loop_dev}p1" /mnt
sudo tar -C /mnt -xf output/images/rootfs.tar
sudo umount /mnt
5. Install Grub2
sudo ./output/host/sbin/grub-bios-setup \
-b ./output/host/lib/grub/i386-pc/boot.img \
-c ./output/images/grub.img -d . /dev/loop0
-c ./output/images/grub.img -d . "$loop_dev"
6. Cleanup loop device
sudo partx -d /dev/loop0
sudo losetup -d /dev/loop0
sudo partx -d "$loop_dev"
sudo losetup -d "$loop_dev"
7. Your disk.img is ready!

Using genimage
Expand Down Expand Up @@ -65,22 +65,22 @@ Notes on using Grub2 for x86/x86_64 EFI-based platforms
- Create a second partition, type 8300, for the root
filesystem.
3. Setup loop device and loop partitions
sudo losetup -f disk.img
sudo partx -a /dev/loop0
loop_dev=$(sudo losetup -f disk.img)
sudo partx -a "$loop_dev"
4. Prepare the boot partition
sudo mkfs.vfat -n boot /dev/loop0p1
sudo mount /dev/loop0p1 /mnt
sudo mkfs.vfat -n boot "${loop_dev}p1"
sudo mount "${loop_dev}p1" /mnt
sudo cp -a output/images/efi-part/* /mnt/
sudo cp output/images/bzImage /mnt/
sudo umount /mnt
5. Prepare the root partition
sudo mkfs.ext3 -L root /dev/loop0p2
sudo mount /dev/loop0p2 /mnt
sudo mkfs.ext3 -L root "${loop_dev}p2"
sudo mount "${loop_dev}p2" /mnt
sudo tar -C /mnt -xf output/images/rootfs.tar
sudo umount /mnt
6 Cleanup loop device
sudo partx -d /dev/loop0
sudo losetup -d /dev/loop0
sudo partx -d "$loop_dev"
sudo losetup -d "$loop_dev"
7. Your disk.img is ready!

To test your i386/x86-64 EFI image in Qemu
Expand Down
1 change: 1 addition & 0 deletions package/alsa-lib/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ config BR2_PACKAGE_ALSA_LIB_SEQ
config BR2_PACKAGE_ALSA_LIB_UCM
bool "ucm"
default y
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_ALSA_LIB_MIXER

config BR2_PACKAGE_ALSA_LIB_ALISP
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[PATCH] Fix makefiles for out-of-tree build
From 1fe49c34aa3e32e801af5c56293ec71ff6e7e2bc Mon Sep 17 00:00:00 2001
From: Gary Bisson <[email protected]>
Date: Sun, 1 Dec 2024 15:43:17 +0100
Subject: [PATCH] Fix makefiles for out-of-tree build

Signed-off-by: Gary Bisson <[email protected]>
---
Expand Down Expand Up @@ -158,5 +161,5 @@ index 9e8b751..94a069b 100644
LIBS+= -lz -lselinux

--
2.5.1
2.47.0

Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[PATCH] Fix adbd for non-Ubuntu systems
From d433d5c340f3b36de58ea8550fd140dbdaea13b4 Mon Sep 17 00:00:00 2001
From: Gary Bisson <[email protected]>
Date: Sun, 1 Dec 2024 15:43:33 +0100
Subject: [PATCH] Fix adbd for non-Ubuntu systems

Remove glib/dbus dependencies and partially restore services.c to be
closer to the original source code in order to run on systems without
Expand All @@ -7,7 +10,7 @@ sudo.
Signed-off-by: Gary Bisson <[email protected]>
---
core/adbd/adb.c | 1 -
core/adbd/services.c | 160 ++++-------------------------------------------
core/adbd/services.c | 160 +++------------------------------------
debian/makefiles/adbd.mk | 4 +-
3 files changed, 14 insertions(+), 151 deletions(-)

Expand Down Expand Up @@ -260,5 +263,5 @@ index 49dab8c..22c1816 100644
OBJS= $(patsubst %, %.o, $(basename $(SRCS)))

--
2.5.1
2.47.0

96 changes: 96 additions & 0 deletions package/android-tools/0003-Adjust-base64-function-handling.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
From 946dbb00fe4b2a75c688a470fc0c3924aa018a24 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <[email protected]>
Date: Sun, 14 Jul 2024 11:39:49 +0200
Subject: [PATCH] Adjust base64 function handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In order to support libcs that do not provide b64_pton(), one of the
Debian patches adds a copy of b64_pton() and b64_ntop(). However, no
prototype is added for those functions, causing an "implicit
declaration" warning... or error depending on the compiler version
used:

core/adbd/adb_auth_client.c:75:15: error: implicit declaration of function ‘b64_pton’ [-Wimplicit-function-declaration]

This patch adds appropriate prototypes, but while at it, also renames
the internal copy of b64_*() functions to have an adb_ prefix in order
to clarify things and not clash with definitions potentially coming
from the C library.

Upstream: N/A, we're too far from upstream
Signed-off-by: Thomas Petazzoni <[email protected]>
---
core/adb/adb_auth_client.c | 3 ++-
core/adbd/adb_auth_client.c | 3 ++-
core/adbd/base64.c | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/core/adb/adb_auth_client.c b/core/adb/adb_auth_client.c
index 0b4913e..25b9828 100644
--- a/core/adb/adb_auth_client.c
+++ b/core/adb/adb_auth_client.c
@@ -45,6 +45,7 @@ static char *key_paths[] = {
static fdevent listener_fde;
static int framework_fd = -1;

+extern int adb_b64_pton(char const *src, u_char *target, size_t targsize);

static void read_keys(const char *file, struct listnode *list)
{
@@ -72,7 +73,7 @@ static void read_keys(const char *file, struct listnode *list)
if (sep)
*sep = '\0';

- ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
+ ret = adb_b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
if (ret != sizeof(key->key)) {
D("%s: Invalid base64 data ret=%d\n", file, ret);
free(key);
diff --git a/core/adbd/adb_auth_client.c b/core/adbd/adb_auth_client.c
index 0b4913e..25b9828 100644
--- a/core/adbd/adb_auth_client.c
+++ b/core/adbd/adb_auth_client.c
@@ -45,6 +45,7 @@ static char *key_paths[] = {
static fdevent listener_fde;
static int framework_fd = -1;

+extern int adb_b64_pton(char const *src, u_char *target, size_t targsize);

static void read_keys(const char *file, struct listnode *list)
{
@@ -72,7 +73,7 @@ static void read_keys(const char *file, struct listnode *list)
if (sep)
*sep = '\0';

- ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
+ ret = adb_b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
if (ret != sizeof(key->key)) {
D("%s: Invalid base64 data ret=%d\n", file, ret);
free(key);
diff --git a/core/adbd/base64.c b/core/adbd/base64.c
index 7270703..91fc1b2 100644
--- a/core/adbd/base64.c
+++ b/core/adbd/base64.c
@@ -134,7 +134,7 @@ static const char Pad64 = '=';
*/

int
-b64_ntop(src, srclength, target, targsize)
+adb_b64_ntop(src, srclength, target, targsize)
u_char const *src;
size_t srclength;
char *target;
@@ -212,7 +212,7 @@ b64_ntop(src, srclength, target, targsize)
*/

int
-b64_pton(src, target, targsize)
+adb_b64_pton(src, target, targsize)
char const *src;
u_char *target;
size_t targsize;
--
2.47.0

36 changes: 0 additions & 36 deletions package/android-tools/0003-Fix-build-issue-with-uclibc.patch

This file was deleted.

25 changes: 11 additions & 14 deletions package/android-tools/0004-Fix-build-issue-with-musl.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[PATCH] Fix build issue with musl
From d14ca3e3362448590adaebacb76d4d8046f9b556 Mon Sep 17 00:00:00 2001
From: Gary Bisson <[email protected]>
Date: Sun, 1 Dec 2024 15:44:16 +0100
Subject: [PATCH] Fix build issue with musl

arpa/nameser.h doesn't use the same macro name to avoid several
inclusions.
Expand All @@ -8,19 +11,12 @@ TEMP_FAILURE_RETRY macro.

Signed-off-by: Gary Bisson <[email protected]>
---
core/adbd/arpa_nameser.h | 12 +++++++++---
core/adbd/base64.c | 1 -
core/adbd/framebuffer_service.c | 1 +
core/adbd/qemu_pipe.h | 1 -
core/include/cutils/android_reboot.h | 8 ++++++--
core/include/cutils/bitops.h | 10 ++++++----
core/include/cutils/partition_utils.h | 8 ++++++--
extras/ext4_utils/sha1.c | 3 ---
extras/ext4_utils/sha1.h | 13 ++++++-------
9 files changed, 34 insertions(+), 23 deletions(-)
core/adbd/arpa_nameser.h | 3 +++
core/adbd/framebuffer_service.c | 1 +
2 files changed, 4 insertions(+)

diff --git a/core/adbd/arpa_nameser.h b/core/adbd/arpa_nameser.h
index 438dc04..b2a28d6 100644
index 438dc04..f3d2fee 100644
--- a/core/adbd/arpa_nameser.h
+++ b/core/adbd/arpa_nameser.h
@@ -52,6 +52,8 @@
Expand All @@ -32,7 +28,7 @@ index 438dc04..b2a28d6 100644

#define BIND_4_COMPAT

@@ -574,4 +579,5 @@ __END_DECLS
@@ -574,4 +576,5 @@ __END_DECLS
#define XLOG(...) do {} while (0)
#endif

Expand All @@ -51,4 +47,5 @@ index 20c08d2..48e0241 100644
#include <sys/ioctl.h>
#include <sys/mman.h>
--
2.6.1
2.47.0

Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
makefiles: use pkgconf to get libs deps
From 10f3f6fb75da72f155e72794d6647e4fa21a87d0 Mon Sep 17 00:00:00 2001
From: Giulio Benetti <[email protected]>
Date: Sun, 1 Dec 2024 15:45:01 +0100
Subject: [PATCH] makefiles: use pkgconf to get libs deps

LIBS lists library dependencies without taking into account static linking
that need ordered listing and more libraries listed since differently from
Expand All @@ -10,26 +13,36 @@ needed libraries are listed during linking.

Signed-off-by: Giulio Benetti <[email protected]>
---
diff -urpN android-tools-4.2.2+git20130218.orig/debian/makefiles/adbd.mk android-tools-4.2.2+git20130218/debian/makefiles/adbd.mk
--- android-tools-4.2.2+git20130218.orig/debian/makefiles/adbd.mk 2019-04-08 16:05:02.967710428 +0200
+++ android-tools-4.2.2+git20130218/debian/makefiles/adbd.mk 2019-04-08 16:30:42.463084426 +0200
debian/makefiles/adb.mk | 2 +-
debian/makefiles/adbd.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/makefiles/adb.mk b/debian/makefiles/adb.mk
index 654b9f1..a03c93a 100644
--- a/debian/makefiles/adb.mk
+++ b/debian/makefiles/adb.mk
@@ -41,7 +41,7 @@ CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -I$(SRCDIR)/core/adb
CPPFLAGS+= -I$(SRCDIR)/core/include

-LIBS+= -lc -lpthread -lz -lcrypto
+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto`

OBJS= $(SRCS:.c=.o)

diff --git a/debian/makefiles/adbd.mk b/debian/makefiles/adbd.mk
index 22c1816..a8eee3a 100644
--- a/debian/makefiles/adbd.mk
+++ b/debian/makefiles/adbd.mk
@@ -44,7 +44,7 @@ CPPFLAGS+= -DADBD_NON_ANDROID
CPPFLAGS+= -I$(SRCDIR)/core/adbd
CPPFLAGS+= -I$(SRCDIR)/core/include

-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt
+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto` -lcrypt

OBJS= $(patsubst %, %.o, $(basename $(SRCS)))

--
2.47.0

diff -urpN android-tools-4.2.2+git20130218.orig/debian/makefiles/adb.mk android-tools-4.2.2+git20130218/debian/makefiles/adb.mk
--- android-tools-4.2.2+git20130218.orig/debian/makefiles/adb.mk 2019-04-08 16:05:02.959701400 +0200
+++ android-tools-4.2.2+git20130218/debian/makefiles/adb.mk 2019-04-08 16:31:06.529426250 +0200
@@ -41,7 +41,7 @@ CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -I$(SRCDIR)/core/adb
CPPFLAGS+= -I$(SRCDIR)/core/include

-LIBS+= -lc -lpthread -lz -lcrypto
+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto`

OBJS= $(SRCS:.c=.o)
Loading