forked from LibreELEC/LibreELEC.tv
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rockchip: add 32-bit userland support
- Loading branch information
Showing
13 changed files
with
161 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ang/Python/patches/aarch64/Python-001-fix_platform_machine_func_for_32bit_userspace.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -Naur Python-2.7.13.orig/Lib/platform.py Python-2.7.13/Lib/platform.py | ||
--- Python-2.7.13.orig/Lib/platform.py 2017-01-08 11:57:36.615886244 +0100 | ||
+++ Python-2.7.13/Lib/platform.py 2017-01-08 12:12:44.567848271 +0100 | ||
@@ -1250,6 +1250,9 @@ | ||
system = 'Windows' | ||
release = 'Vista' | ||
|
||
+ if machine == 'aarch64' and architecture()[0] == '32bit': | ||
+ machine = 'armv7l' | ||
+ | ||
_uname_cache = system,node,release,version,machine,processor | ||
return _uname_cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
projects/Rockchip/packages/gcc-linaro-aarch64-elf/package.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
################################################################################ | ||
# This file is part of LibreELEC - https://libreelec.tv | ||
# Copyright (C) 2017 Team LibreELEC | ||
# | ||
# LibreELEC is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# LibreELEC is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>. | ||
################################################################################ | ||
|
||
PKG_NAME="gcc-linaro-aarch64-elf" | ||
PKG_VERSION="6.3.1-2017.05" | ||
PKG_ARCH="any" | ||
PKG_LICENSE="GPL" | ||
PKG_SITE="" | ||
PKG_URL="https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-elf/gcc-linaro-${PKG_VERSION}-x86_64_aarch64-elf.tar.xz" | ||
PKG_SOURCE_DIR="gcc-linaro-${PKG_VERSION}-x86_64_aarch64-elf" | ||
PKG_DEPENDS_HOST="toolchain" | ||
PKG_SECTION="lang" | ||
PKG_SHORTDESC="" | ||
PKG_LONGDESC="" | ||
|
||
PKG_IS_ADDON="no" | ||
PKG_AUTORECONF="no" | ||
|
||
make_host() { | ||
: | ||
} | ||
|
||
makeinstall_host() { | ||
mkdir -p $TOOLCHAIN/lib/gcc-linaro-aarch64-elf/ | ||
cp -a * $TOOLCHAIN/lib/gcc-linaro-aarch64-elf | ||
} |
39 changes: 39 additions & 0 deletions
39
projects/Rockchip/packages/rkmpp/patches/rkmpp-0001-fix-32-bit-userland.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 376fb9c7c24c3b8a322cd583839d582cd7041d47 Mon Sep 17 00:00:00 2001 | ||
From: Jakob Unterwurzacher <[email protected]> | ||
Date: Mon, 29 May 2017 14:08:43 +0200 | ||
Subject: [PATCH] [drm] fix 32-bit mmap issue on 64-bit kernels | ||
|
||
Running 32-bit userland on a 64-bit kernel resulted in the error: | ||
|
||
mpp_drm: mmap failed: Invalid argument | ||
|
||
Both the pagesize_mask and the mmap call truncated the offset | ||
value to 32 bit. This patch fixes both issues. | ||
|
||
For details see https://github.com/rockchip-linux/kernel/issues/17 | ||
--- | ||
osal/allocator/allocator_drm.c | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/osal/allocator/allocator_drm.c b/osal/allocator/allocator_drm.c | ||
index 3057671f..9a4e31fe 100644 | ||
--- a/osal/allocator/allocator_drm.c | ||
+++ b/osal/allocator/allocator_drm.c | ||
@@ -15,6 +15,8 @@ | ||
*/ | ||
|
||
#define MODULE_TAG "mpp_drm" | ||
+/* Enable 64-bit mmap also when compiling for 32 bit */ | ||
+#define _FILE_OFFSET_BITS 64 | ||
|
||
#include <unistd.h> | ||
#include <string.h> | ||
@@ -67,7 +69,7 @@ static int drm_ioctl(int fd, int req, void *arg) | ||
|
||
static void* drm_mmap(int fd, size_t len, int prot, int flags, loff_t offset) | ||
{ | ||
- static unsigned long pagesize_mask = 0; | ||
+ static loff_t pagesize_mask = 0; | ||
#if !defined(__gnu_linux__) | ||
func_mmap64 fp_mmap64 = mpp_rt_get_mmap64(); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters