Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
From b56e9125db34614b2157516df3ee724180f2084f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sat, 13 Jul 2024 09:59:26 +0200
|
||||
Subject: [PATCH] CMakeLists.txt: do not force compiler flags
|
||||
|
||||
The compiler flags enforced by CMakeLists.txt can be problematic:
|
||||
|
||||
- When CROSS_COMPILE_ARM is set, one is not necessarily building for
|
||||
armv6 with soft float-abi: one may be using ARMv7 with hard float
|
||||
|
||||
- When CROSS_COMPILE_ARM is not set, forcing -mfloat-abi=hard is
|
||||
similarly wrong
|
||||
|
||||
Those compiler flags should be passed by the user depending on the
|
||||
exact target platform.
|
||||
|
||||
Inspired from
|
||||
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/x265/files/arm-r1.patch,
|
||||
and earlier work from Bertrand Jacquin <bertrand@jacquin.bzh> and
|
||||
Bernd Kuhls <bernd.kuhls@t-online.de>.
|
||||
|
||||
Upstream: https://bitbucket.org/multicoreware/x265_git/pull-requests/26
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
[Bernd: rebased for 4.1]
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
source/CMakeLists.txt | 6 +++---
|
||||
source/dynamicHDR10/CMakeLists.txt | 6 +++---
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
index c14489ea6..fa331e8af 100755
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -270,14 +270,14 @@ if(GCC)
|
||||
endif()
|
||||
if(ARM AND CROSS_COMPILE_ARM)
|
||||
message(STATUS "cross compile arm")
|
||||
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
elseif(ARM)
|
||||
find_package(Neon)
|
||||
if(CPU_HAS_NEON)
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
|
||||
+ set(ARM_ARGS -mfpu=neon -fPIC)
|
||||
add_definitions(-DHAVE_NEON)
|
||||
else()
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
endif()
|
||||
endif()
|
||||
if(ARM64)
|
||||
diff --git a/source/dynamicHDR10/CMakeLists.txt b/source/dynamicHDR10/CMakeLists.txt
|
||||
index 4243338c6..62853a06b 100644
|
||||
--- a/source/dynamicHDR10/CMakeLists.txt
|
||||
+++ b/source/dynamicHDR10/CMakeLists.txt
|
||||
@@ -43,14 +43,14 @@ if(GCC)
|
||||
endif()
|
||||
endif()
|
||||
if(ARM AND CROSS_COMPILE_ARM)
|
||||
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
elseif(ARM)
|
||||
find_package(Neon)
|
||||
if(CPU_HAS_NEON)
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
add_definitions(-DHAVE_NEON)
|
||||
else()
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
endif()
|
||||
endif()
|
||||
add_definitions(${ARM_ARGS})
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From b354c009a60bcd6d7fc04014e200a1ee9c45c167 Mon Sep 17 00:00:00 2001
|
||||
From: yaswanthsastry <yaswanth.sastry@multicorewareinc.com>
|
||||
Date: Mon, 24 Feb 2025 17:07:03 +0530
|
||||
Subject: [PATCH] Fix CMake build error with latest CMake 4.0 release
|
||||
|
||||
Upstream: https://bitbucket.org/multicoreware/x265_git/commits/b354c009a60bcd6d7fc04014e200a1ee9c45c167
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
source/CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
index 37dbe1a87..4f5b3ed82 100755
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -7,13 +7,13 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
message(STATUS "cmake version ${CMAKE_VERSION}")
|
||||
if(POLICY CMP0025)
|
||||
- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
|
||||
+ cmake_policy(SET CMP0025 NEW) # report Apple's Clang as just Clang
|
||||
endif()
|
||||
if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
|
||||
endif()
|
||||
if(POLICY CMP0054)
|
||||
- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted
|
||||
+ cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted
|
||||
endif()
|
||||
|
||||
project (x265)
|
||||
--
|
||||
2.51.0
|
||||
|
||||
60
package/x265/0003-Fix-for-CMake-Build-Errors-in-MacOS.patch
Normal file
60
package/x265/0003-Fix-for-CMake-Build-Errors-in-MacOS.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
From 51ae8e922bcc4586ad4710812072289af91492a8 Mon Sep 17 00:00:00 2001
|
||||
From: yaswanthsastry <yaswanth.sastry@multicorewareinc.com>
|
||||
Date: Mon, 7 Apr 2025 11:27:36 +0530
|
||||
Subject: [PATCH] Fix for CMake Build Errors in MacOS
|
||||
|
||||
Upstream: https://bitbucket.org/multicoreware/x265_git/commits/51ae8e922bcc4586ad4710812072289af91492a8
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
source/CMakeLists.txt | 15 +++++++--------
|
||||
1 file changed, 7 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
index 4f5b3ed82..7183fd3ce 100755
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -6,18 +6,14 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
FORCE)
|
||||
endif()
|
||||
message(STATUS "cmake version ${CMAKE_VERSION}")
|
||||
-if(POLICY CMP0025)
|
||||
- cmake_policy(SET CMP0025 NEW) # report Apple's Clang as just Clang
|
||||
-endif()
|
||||
+
|
||||
if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
|
||||
endif()
|
||||
-if(POLICY CMP0054)
|
||||
- cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted
|
||||
-endif()
|
||||
+
|
||||
|
||||
project (x265)
|
||||
-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
|
||||
+cmake_minimum_required (VERSION 2.8.8...3.10) # OBJECT libraries require 2.8.8
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckSymbolExists)
|
||||
@@ -168,7 +164,7 @@ if(APPLE)
|
||||
add_definitions(-DMACOS=1)
|
||||
endif()
|
||||
|
||||
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
+if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
|
||||
set(CLANG 1)
|
||||
endif()
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
|
||||
@@ -740,6 +736,9 @@ if((MSVC_IDE OR XCODE OR GCC) AND ENABLE_ASSEMBLY)
|
||||
if(ARM OR CROSS_COMPILE_ARM)
|
||||
# compile ARM arch asm files here
|
||||
enable_language(ASM)
|
||||
+ if(APPLE)
|
||||
+ set(ARM_ARGS ${ARM_ARGS} -arch ${CMAKE_OSX_ARCHITECTURES})
|
||||
+ endif()
|
||||
foreach(ASM ${ARM_ASMS})
|
||||
set(ASM_SRC ${CMAKE_CURRENT_SOURCE_DIR}/common/arm/${ASM})
|
||||
list(APPEND ASM_SRCS ${ASM_SRC})
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From ddb1933598736394b646cb0f78da4a4201ffc656 Mon Sep 17 00:00:00 2001
|
||||
From: Uthayakumar Muthu <uthayakumar.muthu@multicorewareinc.com>
|
||||
Date: Sun, 12 Jan 2025 13:17:21 +0530
|
||||
Subject: [PATCH] Fix neon undefined symbols in armv6l,armv7l
|
||||
|
||||
Upstream: https://bitbucket.org/multicoreware/x265_git/commits/ddb1933598736394b646cb0f78da4a4201ffc656
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
source/common/cpu.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/source/common/cpu.cpp b/source/common/cpu.cpp
|
||||
index ae0907890..35c43deaf 100644
|
||||
--- a/source/common/cpu.cpp
|
||||
+++ b/source/common/cpu.cpp
|
||||
@@ -352,7 +352,7 @@ uint32_t cpu_detect(bool benableavx512)
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
-#if HAVE_ARMV6
|
||||
+#if HAVE_ARMV6 && ENABLE_ASSEMBLY
|
||||
flags |= X265_CPU_ARMV6;
|
||||
|
||||
// don't do this hack if compiled with -mfpu=neon
|
||||
--
|
||||
2.51.0
|
||||
|
||||
29
package/x265/Config.in
Normal file
29
package/x265/Config.in
Normal file
@@ -0,0 +1,29 @@
|
||||
config BR2_PACKAGE_X265
|
||||
bool "x265"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS # dlfcn
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
help
|
||||
x265 is an open source free software and library for
|
||||
encoding video using the High Efficiency Video Coding
|
||||
(HEVC/H.265) standard. x265 is offered under either the GNU
|
||||
General Public License (GPL) 2 license or a commercial
|
||||
license, similar to the x264 project.
|
||||
|
||||
https://bitbucket.org/multicoreware/x265_git/wiki/Home
|
||||
|
||||
if BR2_PACKAGE_X265
|
||||
|
||||
config BR2_PACKAGE_X265_CLI
|
||||
bool "CLI"
|
||||
help
|
||||
Command-line tool to encode video streams into the
|
||||
H.265/HEVC compression format.
|
||||
|
||||
endif
|
||||
|
||||
comment "x265 needs a toolchain w/ C++, threads, dynamic library"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
3
package/x265/x265.hash
Normal file
3
package/x265/x265.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally generated
|
||||
sha256 a31699c6a89806b74b0151e5e6a7df65de4b49050482fe5ebf8a4379d7af8f29 x265_4.1.tar.gz
|
||||
sha256 d8afb1bcc7a2cfc603683b168d6987ef0a48e59e0da3693bf55c5d33b67e2b49 COPYING
|
||||
54
package/x265/x265.mk
Normal file
54
package/x265/x265.mk
Normal file
@@ -0,0 +1,54 @@
|
||||
################################################################################
|
||||
#
|
||||
# x265
|
||||
#
|
||||
################################################################################
|
||||
|
||||
X265_VERSION = 4.1
|
||||
X265_SOURCE = x265_$(X265_VERSION).tar.gz
|
||||
X265_SITE = https://bitbucket.org/multicoreware/x265_git/downloads
|
||||
X265_LICENSE = GPL-2.0+
|
||||
X265_LICENSE_FILES = COPYING
|
||||
X265_CPE_ID_VENDOR = multicorewareinc
|
||||
X265_SUBDIR = source
|
||||
X265_INSTALL_STAGING = YES
|
||||
|
||||
# For CPUs before ARMv6, x265 does not consider them "ARM" but generic
|
||||
# CPUs for which no optimized assembly is provided, hence we don't
|
||||
# pass -DCROSS_COMPILE_ARM=1.
|
||||
ifeq ($(BR2_ARM_CPU_ARMV6),y)
|
||||
X265_CONF_OPTS += -DCROSS_COMPILE_ARM=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ARM_CPU_ARMV7A),y)
|
||||
X265_CONF_OPTS += -DCROSS_COMPILE_ARM=1
|
||||
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
|
||||
X265_CONF_OPTS += -DENABLE_NEON=ON
|
||||
else
|
||||
X265_CONF_OPTS += -DENABLE_NEON=OFF
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_i386)$(BR2_x86_64),y)
|
||||
X265_DEPENDENCIES += host-nasm
|
||||
endif
|
||||
|
||||
# disable altivec, it has build issues
|
||||
# https://bitbucket.org/multicoreware/x265/issues/320/
|
||||
ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y)
|
||||
X265_CONF_OPTS += -DENABLE_ALTIVEC=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
|
||||
X265_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_PIC=ON
|
||||
else
|
||||
X265_CONF_OPTS += -DENABLE_SHARED=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_X265_CLI),y)
|
||||
X265_CONF_OPTS += -DENABLE_CLI=ON
|
||||
else
|
||||
X265_CONF_OPTS += -DENABLE_CLI=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user