Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
From 41410b72746cfc7ff515aefed62b0b179bf6e8da Mon Sep 17 00:00:00 2001
|
||||
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
|
||||
Date: Sun, 2 Jun 2013 20:48:53 +0600
|
||||
Subject: [PATCH] Fix compilation with libX11 >= 1.5.99.902.
|
||||
|
||||
These changes fixes bug #1769 for SDL 1.2
|
||||
(http://bugzilla.libsdl.org/show_bug.cgi?id=1769).
|
||||
|
||||
Upstream: 5d79977ec7a6b58afa6e4817035aaaba186f7e9f
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
---
|
||||
configure.in | 11 +++++++++++
|
||||
include/SDL_config.h.in | 1 +
|
||||
src/video/x11/SDL_x11sym.h | 4 ++++
|
||||
3 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 08c8e1e9..89c526d4 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -1127,6 +1127,17 @@ AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for ful
|
||||
if test x$definitely_enable_video_x11_xrandr = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
|
||||
fi
|
||||
+ AC_MSG_CHECKING(for const parameter to _XData32)
|
||||
+ have_const_param_xdata32=no
|
||||
+ AC_TRY_COMPILE([
|
||||
+ #include <X11/Xlibint.h>
|
||||
+ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
|
||||
+ ],[
|
||||
+ ],[
|
||||
+ have_const_param_xdata32=yes
|
||||
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
|
||||
+ ])
|
||||
+ AC_MSG_RESULT($have_const_param_xdata32)
|
||||
fi
|
||||
fi
|
||||
}
|
||||
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
|
||||
index 8bb1773c..78ca747b 100644
|
||||
--- a/include/SDL_config.h.in
|
||||
+++ b/include/SDL_config.h.in
|
||||
@@ -282,6 +282,7 @@
|
||||
#undef SDL_VIDEO_DRIVER_WINDIB
|
||||
#undef SDL_VIDEO_DRIVER_WSCONS
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
+#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
|
||||
#undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
||||
diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
|
||||
index 4875b989..bd83f7f5 100644
|
||||
--- a/src/video/x11/SDL_x11sym.h
|
||||
+++ b/src/video/x11/SDL_x11sym.h
|
||||
@@ -165,7 +165,11 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return)
|
||||
*/
|
||||
#ifdef LONG64
|
||||
SDL_X11_MODULE(IO_32BIT)
|
||||
+#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
|
||||
+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
|
||||
+#else
|
||||
SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
|
||||
+#endif
|
||||
SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
|
||||
#endif
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From c24c08c9aa0f92213793e5ef404f2c387603d7f8 Mon Sep 17 00:00:00 2001
|
||||
From: Ozkan Sezer <sezeroz@gmail.com>
|
||||
Date: Sat, 18 Jun 2022 14:55:00 +0300
|
||||
Subject: [PATCH] SDL_x11yuv.c: fix possible use-after-free
|
||||
|
||||
CVE: CVE-2022-34568
|
||||
Fixes: https://github.com/libsdl-org/SDL-1.2/issues/863
|
||||
Upstream: d7e00208738a0bc6af302723fe64908ac35b777b
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
src/video/x11/SDL_x11yuv.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/video/x11/SDL_x11yuv.c b/src/video/x11/SDL_x11yuv.c
|
||||
index 62698dfd..0d5754e3 100644
|
||||
--- a/src/video/x11/SDL_x11yuv.c
|
||||
+++ b/src/video/x11/SDL_x11yuv.c
|
||||
@@ -374,8 +374,8 @@ SDL_Overlay *X11_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, S
|
||||
#ifdef PITCH_WORKAROUND
|
||||
if ( hwdata->image != NULL && hwdata->image->pitches[0] != (width*bpp) ) {
|
||||
/* Ajust overlay width according to pitch */
|
||||
- XFree(hwdata->image);
|
||||
width = hwdata->image->pitches[0] / bpp;
|
||||
+ XFree(hwdata->image);
|
||||
hwdata->image = SDL_NAME(XvCreateImage)(GFX_Display, xv_port, format,
|
||||
0, width, height);
|
||||
}
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From 6fb5aadafc9d99c25fb4f1a37d225d5b79bc92e9 Mon Sep 17 00:00:00 2001
|
||||
From: orbea <orbea@riseup.net>
|
||||
Date: Sat, 15 Oct 2022 15:10:48 -0700
|
||||
Subject: [PATCH] Xext: Fix function declarations without a prototype
|
||||
|
||||
This is not supported with the upcoming clang 16.
|
||||
|
||||
error: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Werror,-Wdeprecated-non-prototype]
|
||||
|
||||
reference: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
|
||||
|
||||
Upstream: e738cfffced8a006094d55337d917386582ada47
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
src/video/Xext/XME/xme.c | 2 +-
|
||||
src/video/Xext/Xinerama/Xinerama.c | 3 ++-
|
||||
src/video/Xext/Xv/Xv.c | 6 +++---
|
||||
3 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/video/Xext/XME/xme.c b/src/video/Xext/XME/xme.c
|
||||
index 2cead35a..bb8d04d4 100644
|
||||
--- a/src/video/Xext/XME/xme.c
|
||||
+++ b/src/video/Xext/XME/xme.c
|
||||
@@ -206,7 +206,7 @@ static char *xigmisc_extension_name = XIGMISC_PROTOCOL_NAME;
|
||||
/*
|
||||
* find_display - locate the display info block
|
||||
*/
|
||||
-static int XiGMiscCloseDisplay();
|
||||
+static int XiGMiscCloseDisplay(Display*, XExtCodes*);
|
||||
|
||||
static XExtensionHooks xigmisc_extension_hooks = {
|
||||
NULL, /* create_gc */
|
||||
diff --git a/src/video/Xext/Xinerama/Xinerama.c b/src/video/Xext/Xinerama/Xinerama.c
|
||||
index 4ff42ebf..57f64b9c 100644
|
||||
--- a/src/video/Xext/Xinerama/Xinerama.c
|
||||
+++ b/src/video/Xext/Xinerama/Xinerama.c
|
||||
@@ -50,7 +50,8 @@ static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;
|
||||
#define PanoramiXSimpleCheckExtension(dpy,i) \
|
||||
XextSimpleCheckExtension (dpy, i, panoramiX_extension_name)
|
||||
|
||||
-static int close_display();
|
||||
+static int close_display(Display*, XExtCodes*);
|
||||
+
|
||||
static /* const */ XExtensionHooks panoramiX_extension_hooks = {
|
||||
NULL, /* create_gc */
|
||||
NULL, /* copy_gc */
|
||||
diff --git a/src/video/Xext/Xv/Xv.c b/src/video/Xext/Xv/Xv.c
|
||||
index 7147b9e8..c254a1dc 100644
|
||||
--- a/src/video/Xext/Xv/Xv.c
|
||||
+++ b/src/video/Xext/Xv/Xv.c
|
||||
@@ -63,9 +63,9 @@ static char *xv_extension_name = XvName;
|
||||
#define XvCheckExtension(dpy, i, val) \
|
||||
XextCheckExtension(dpy, i, xv_extension_name, val)
|
||||
|
||||
-static char *xv_error_string();
|
||||
-static int xv_close_display();
|
||||
-static Bool xv_wire_to_event();
|
||||
+static char *xv_error_string(Display*, int, XExtCodes*, char*, int);
|
||||
+static int xv_close_display(Display*, XExtCodes*);
|
||||
+static Bool xv_wire_to_event(Display*, XEvent*, xEvent*);
|
||||
|
||||
static XExtensionHooks xv_extension_hooks = {
|
||||
NULL, /* create_gc */
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From 390974b8a9d5e513d48d794818dbe180e0f80b16 Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
Date: Fri, 28 Nov 2025 10:57:41 +0100
|
||||
Subject: [PATCH] src/stdlib/SDL_iconv.c: fix types mismatch
|
||||
|
||||
When building sdl this error shows up:
|
||||
./src/stdlib/SDL_iconv.c: In function 'SDL_iconv':
|
||||
./src/stdlib/SDL_iconv.c:50:29: error: passing argument 2 of 'iconv' from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
50 | retCode = iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
| ^~~~~
|
||||
| |
|
||||
| const char **
|
||||
|
||||
Let's pick only this code from upstream commit[1] and left the rest
|
||||
untouched.
|
||||
|
||||
Upstream: [1]
|
||||
|
||||
[1]:
|
||||
https://github.com/libsdl-org/SDL-1.2/commit/8a8135d91f9361448521765c9da00401fab866a1
|
||||
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
---
|
||||
src/stdlib/SDL_iconv.c | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c
|
||||
index fa56a99e..369f6881 100644
|
||||
--- a/src/stdlib/SDL_iconv.c
|
||||
+++ b/src/stdlib/SDL_iconv.c
|
||||
@@ -43,12 +43,10 @@ size_t SDL_iconv(SDL_iconv_t cd,
|
||||
const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft)
|
||||
{
|
||||
- size_t retCode;
|
||||
-#ifdef ICONV_INBUF_NONCONST
|
||||
- retCode = iconv(cd, (char **)inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
-#else
|
||||
- retCode = iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
-#endif
|
||||
+ /* iconv's second parameter may or may not be `const char const *` depending on the
|
||||
+ C runtime's whims. Casting to void * seems to make everyone happy, though. */
|
||||
+ const size_t retCode = iconv((iconv_t) ((uintptr_t) cd), (void *)inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
+
|
||||
if ( retCode == (size_t)-1 ) {
|
||||
switch(errno) {
|
||||
case E2BIG:
|
||||
--
|
||||
2.47.3
|
||||
|
||||
22
package/sdl/Config.in
Normal file
22
package/sdl/Config.in
Normal file
@@ -0,0 +1,22 @@
|
||||
config BR2_PACKAGE_SDL
|
||||
bool "SDL"
|
||||
help
|
||||
Simple DirectMedia Layer - SDL is a library that allows
|
||||
programs portable low level access to a video framebuffer,
|
||||
audio output, mouse, and keyboard.
|
||||
|
||||
http://www.libsdl.org/
|
||||
|
||||
if BR2_PACKAGE_SDL
|
||||
|
||||
config BR2_PACKAGE_SDL_FBCON
|
||||
bool "SDL framebuffer console video driver"
|
||||
default y
|
||||
|
||||
config BR2_PACKAGE_SDL_X11
|
||||
bool "SDL X11 video driver"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XLIB_LIBX11
|
||||
select BR2_PACKAGE_XLIB_LIBXEXT
|
||||
|
||||
endif
|
||||
4
package/sdl/sdl.hash
Normal file
4
package/sdl/sdl.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
sha256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00 SDL-1.2.15.tar.gz
|
||||
# Locally computed
|
||||
sha256 bb117c0fbd7f57f64170b690285d7df07c2371b578e3b3cd3aa2e1155ef461a0 COPYING
|
||||
95
package/sdl/sdl.mk
Normal file
95
package/sdl/sdl.mk
Normal file
@@ -0,0 +1,95 @@
|
||||
################################################################################
|
||||
#
|
||||
# sdl
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SDL_VERSION = 1.2.15
|
||||
SDL_SOURCE = SDL-$(SDL_VERSION).tar.gz
|
||||
SDL_SITE = http://www.libsdl.org/release
|
||||
SDL_LICENSE = LGPL-2.1+
|
||||
SDL_LICENSE_FILES = COPYING
|
||||
SDL_CPE_ID_VENDOR = libsdl
|
||||
SDL_CPE_ID_PRODUCT = simple_directmedia_layer
|
||||
SDL_INSTALL_STAGING = YES
|
||||
|
||||
# 0002-SDL_x11yuv.c-fix-possible-use-after-free.patch
|
||||
SDL_IGNORE_CVES += CVE-2022-34568
|
||||
|
||||
# we're patching configure.in, but package cannot autoreconf with our version of
|
||||
# autotools, so we have to do it manually instead of setting SDL_AUTORECONF = YES
|
||||
define SDL_RUN_AUTOGEN
|
||||
cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
|
||||
endef
|
||||
|
||||
SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
|
||||
HOST_SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
|
||||
|
||||
SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
|
||||
HOST_SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
|
||||
|
||||
SDL_CONF_OPTS += \
|
||||
--enable-video-qtopia=no \
|
||||
--enable-video-directfb=no
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SDL_FBCON),y)
|
||||
SDL_CONF_OPTS += --enable-video-fbcon=yes
|
||||
else
|
||||
SDL_CONF_OPTS += --enable-video-fbcon=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SDL_X11),y)
|
||||
SDL_CONF_OPTS += --enable-video-x11=yes
|
||||
SDL_DEPENDENCIES += \
|
||||
xlib_libX11 xlib_libXext \
|
||||
$(if $(BR2_PACKAGE_XLIB_LIBXRENDER), xlib_libXrender) \
|
||||
$(if $(BR2_PACKAGE_XLIB_LIBXRANDR), xlib_libXrandr)
|
||||
else
|
||||
SDL_CONF_OPTS += --enable-video-x11=no
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_USE_MMU),y)
|
||||
SDL_CONF_OPTS += --enable-dga=no
|
||||
endif
|
||||
|
||||
# overwrite autodection (prevents confusion with host libpth version)
|
||||
ifeq ($(BR2_PACKAGE_LIBPTHSEM_COMPAT),y)
|
||||
SDL_CONF_OPTS += --enable-pth
|
||||
SDL_CONF_ENV += ac_cv_path_PTH_CONFIG=$(STAGING_DIR)/usr/bin/pth-config
|
||||
SDL_DEPENDENCIES += libpthsem
|
||||
else
|
||||
SDL_CONF_OPTS += --disable-pth
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_TSLIB),y)
|
||||
SDL_DEPENDENCIES += tslib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
|
||||
SDL_DEPENDENCIES += alsa-lib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D),y)
|
||||
SDL_DEPENDENCIES += mesa3d
|
||||
endif
|
||||
|
||||
SDL_CONF_OPTS += \
|
||||
--disable-rpath \
|
||||
--enable-pulseaudio=no \
|
||||
--disable-arts \
|
||||
--disable-esd \
|
||||
--disable-nasm \
|
||||
--disable-video-ps3
|
||||
|
||||
HOST_SDL_CONF_OPTS += \
|
||||
--enable-pulseaudio=no \
|
||||
--enable-video-x11=no \
|
||||
--disable-arts \
|
||||
--disable-esd \
|
||||
--disable-nasm \
|
||||
--disable-video-ps3
|
||||
|
||||
SDL_CONFIG_SCRIPTS = sdl-config
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user