[amd64,arm64,armhf] android: Build modules to support Anbox (Closes: #901492)
This commit is contained in:
parent
9f91ced888
commit
5316cb1c19
|
@ -1,3 +1,15 @@
|
||||||
|
linux (4.17.2-1~exp2) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* [amd64,arm64,armhf] android: Build modules to support Anbox
|
||||||
|
(Closes: #901492)
|
||||||
|
- Enable building ashmem and binder as modules
|
||||||
|
- Enable ANDROID
|
||||||
|
- Enable ANDROID_BINDER_IPC, ASHMEM as modules
|
||||||
|
- Set ANDROID_BINDER_DEVICES="binder"
|
||||||
|
- Disable ANDROID_BINDER_IPC_32BIT
|
||||||
|
|
||||||
|
-- Ben Hutchings <ben@decadent.org.uk> Fri, 22 Jun 2018 17:34:37 +0100
|
||||||
|
|
||||||
linux (4.17.2-1~exp1) experimental; urgency=medium
|
linux (4.17.2-1~exp1) experimental; urgency=medium
|
||||||
|
|
||||||
* New upstream release: https://kernelnewbies.org/Linux_4.17
|
* New upstream release: https://kernelnewbies.org/Linux_4.17
|
||||||
|
|
|
@ -81,6 +81,11 @@ CONFIG_SIGNED_PE_FILE_VERIFICATION=y
|
||||||
##
|
##
|
||||||
CONFIG_ACPI_BGRT=y
|
CONFIG_ACPI_BGRT=y
|
||||||
|
|
||||||
|
##
|
||||||
|
## file: drivers/android/Kconfig
|
||||||
|
##
|
||||||
|
CONFIG_ANDROID=y
|
||||||
|
|
||||||
##
|
##
|
||||||
## file: drivers/block/Kconfig
|
## file: drivers/block/Kconfig
|
||||||
##
|
##
|
||||||
|
|
|
@ -73,6 +73,11 @@ CONFIG_ACPI_NUMA=y
|
||||||
##
|
##
|
||||||
CONFIG_ACPI_NFIT=y
|
CONFIG_ACPI_NFIT=y
|
||||||
|
|
||||||
|
##
|
||||||
|
## file: drivers/android/Kconfig
|
||||||
|
##
|
||||||
|
CONFIG_ANDROID=y
|
||||||
|
|
||||||
##
|
##
|
||||||
## file: drivers/ata/Kconfig
|
## file: drivers/ata/Kconfig
|
||||||
##
|
##
|
||||||
|
|
|
@ -151,6 +151,11 @@ CONFIG_OMAP_SERIAL_WAKE=y
|
||||||
CONFIG_OMAP_PM_NOOP=y
|
CONFIG_OMAP_PM_NOOP=y
|
||||||
## end choice
|
## end choice
|
||||||
|
|
||||||
|
##
|
||||||
|
## file: drivers/android/Kconfig
|
||||||
|
##
|
||||||
|
CONFIG_ANDROID=y
|
||||||
|
|
||||||
##
|
##
|
||||||
## file: drivers/ata/Kconfig
|
## file: drivers/ata/Kconfig
|
||||||
##
|
##
|
||||||
|
|
|
@ -189,6 +189,11 @@ CONFIG_ACPI_NFIT=m
|
||||||
## file: drivers/android/Kconfig
|
## file: drivers/android/Kconfig
|
||||||
##
|
##
|
||||||
# CONFIG_ANDROID is not set
|
# CONFIG_ANDROID is not set
|
||||||
|
CONFIG_ANDROID_BINDER_IPC=m
|
||||||
|
#. This configuration should support Anbox
|
||||||
|
CONFIG_ANDROID_BINDER_DEVICES="binder"
|
||||||
|
# CONFIG_ANDROID_BINDER_IPC_32BIT is not set
|
||||||
|
# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
|
||||||
|
|
||||||
##
|
##
|
||||||
## file: drivers/ata/Kconfig
|
## file: drivers/ata/Kconfig
|
||||||
|
@ -4462,6 +4467,16 @@ CONFIG_SSB_PCMCIAHOST=y
|
||||||
##
|
##
|
||||||
CONFIG_STAGING=y
|
CONFIG_STAGING=y
|
||||||
|
|
||||||
|
##
|
||||||
|
## file: drivers/staging/android/Kconfig
|
||||||
|
##
|
||||||
|
CONFIG_ASHMEM=m
|
||||||
|
|
||||||
|
##
|
||||||
|
## file: drivers/staging/android/ion/Kconfig
|
||||||
|
##
|
||||||
|
# CONFIG_ION is not set
|
||||||
|
|
||||||
##
|
##
|
||||||
## file: drivers/staging/board/Kconfig
|
## file: drivers/staging/board/Kconfig
|
||||||
##
|
##
|
||||||
|
|
73
debian/patches/debian/android-enable-building-ashmem-and-binder-as-modules.patch
vendored
Normal file
73
debian/patches/debian/android-enable-building-ashmem-and-binder-as-modules.patch
vendored
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
From: Ben Hutchings <ben@decadent.org.uk>
|
||||||
|
Date: Fri, 22 Jun 2018 17:27:00 +0100
|
||||||
|
Subject: android: Enable building ashmem and binder as modules
|
||||||
|
Bug-Debian: https://bugs.debian.org/901492
|
||||||
|
|
||||||
|
We want to enable use of the Android ashmem and binder drivers to
|
||||||
|
support Anbox, but they should not be built-in as that would waste
|
||||||
|
resources and increase security attack surface on systems that don't
|
||||||
|
need them.
|
||||||
|
|
||||||
|
- Add a MODULE_LICENSE declaration to ashmem
|
||||||
|
- Change the Makefiles to build each driver as an object with the
|
||||||
|
"_linux" suffix (which is what Anbox expects)
|
||||||
|
- Change config symbol types to tristate
|
||||||
|
|
||||||
|
---
|
||||||
|
--- a/drivers/android/Kconfig
|
||||||
|
+++ b/drivers/android/Kconfig
|
||||||
|
@@ -9,7 +9,7 @@ config ANDROID
|
||||||
|
if ANDROID
|
||||||
|
|
||||||
|
config ANDROID_BINDER_IPC
|
||||||
|
- bool "Android Binder IPC Driver"
|
||||||
|
+ tristate "Android Binder IPC Driver"
|
||||||
|
depends on MMU
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
--- a/drivers/android/Makefile
|
||||||
|
+++ b/drivers/android/Makefile
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
ccflags-y += -I$(src) # needed for trace events
|
||||||
|
|
||||||
|
-obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o
|
||||||
|
-obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
|
||||||
|
+obj-$(CONFIG_ANDROID_BINDER_IPC) += binder_linux.o
|
||||||
|
+binder_linux-y := binder.o binder_alloc.o
|
||||||
|
+binder_linux-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
|
||||||
|
--- a/drivers/staging/android/Kconfig
|
||||||
|
+++ b/drivers/staging/android/Kconfig
|
||||||
|
@@ -3,7 +3,7 @@ menu "Android"
|
||||||
|
if ANDROID
|
||||||
|
|
||||||
|
config ASHMEM
|
||||||
|
- bool "Enable the Anonymous Shared Memory Subsystem"
|
||||||
|
+ tristate "Enable the Anonymous Shared Memory Subsystem"
|
||||||
|
default n
|
||||||
|
depends on SHMEM
|
||||||
|
---help---
|
||||||
|
--- a/drivers/staging/android/Makefile
|
||||||
|
+++ b/drivers/staging/android/Makefile
|
||||||
|
@@ -2,4 +2,5 @@ ccflags-y += -I$(src) # needed for tra
|
||||||
|
|
||||||
|
obj-y += ion/
|
||||||
|
|
||||||
|
-obj-$(CONFIG_ASHMEM) += ashmem.o
|
||||||
|
+obj-$(CONFIG_ASHMEM) += ashmem_linux.o
|
||||||
|
+ashmem_linux-y += ashmem.o
|
||||||
|
--- a/drivers/staging/android/ashmem.c
|
||||||
|
+++ b/drivers/staging/android/ashmem.c
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
#include <linux/bitops.h>
|
||||||
|
#include <linux/mutex.h>
|
||||||
|
#include <linux/shmem_fs.h>
|
||||||
|
+#include <linux/module.h>
|
||||||
|
#include "ashmem.h"
|
||||||
|
|
||||||
|
#define ASHMEM_NAME_PREFIX "dev/ashmem/"
|
||||||
|
@@ -895,3 +896,5 @@ out:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
device_initcall(ashmem_init);
|
||||||
|
+
|
||||||
|
+MODULE_LICENSE("GPL v2");
|
|
@ -12,6 +12,7 @@ debian/modpost-symbol-prefix.patch
|
||||||
debian/tools-perf-version.patch
|
debian/tools-perf-version.patch
|
||||||
debian/tools-perf-install.patch
|
debian/tools-perf-install.patch
|
||||||
debian/wireless-add-debian-wireless-regdb-certificates.patch
|
debian/wireless-add-debian-wireless-regdb-certificates.patch
|
||||||
|
debian/android-enable-building-ashmem-and-binder-as-modules.patch
|
||||||
|
|
||||||
# Fixes/improvements to firmware loading
|
# Fixes/improvements to firmware loading
|
||||||
features/all/drivers-media-dvb-usb-af9005-request_firmware.patch
|
features/all/drivers-media-dvb-usb-af9005-request_firmware.patch
|
||||||
|
|
Loading…
Reference in New Issue