Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
Index: 23.x/Makefile
===================================================================
--- 23.x/Makefile	(revision 383)
+++ 23.x/Makefile	(revision 384)
@@ -16,6 +16,7 @@
 
 patches     = $(CURDIR)/patches/mesa-23.2.1-gallium-vc4-format.patch
 patches    += $(CURDIR)/patches/mesa-23.2.1-llvm-cross.patch
+patches    += $(CURDIR)/patches/mesa-23.2.1-baikal-m1.patch
 
 .NOTPARALLEL: $(patches)
 
@@ -52,6 +53,7 @@
 	@echo -e "\n======= Create Patches =======\n" ; \
 	 ( cd create-23.2.1-gallium-vc4-format-patch ; ./create.patch.sh ) ; \
 	 ( cd create-23.2.1-llvm-cross-patch         ; ./create.patch.sh ) ; \
+	 ( cd create-23.2.1-baikal-m1-patch          ; ./create.patch.sh ) ; \
 	 echo -e "\n"
 
 download_clean:
Index: 23.x/create-23.2.1-baikal-m1-patch/create.patch.sh
===================================================================
--- 23.x/create-23.2.1-baikal-m1-patch/create.patch.sh	(nonexistent)
+++ 23.x/create-23.2.1-baikal-m1-patch/create.patch.sh	(revision 384)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=23.2.1
+
+tar --files-from=file.list -xJvf ../mesa-$VERSION.tar.xz
+mv mesa-$VERSION mesa-$VERSION-orig
+
+cp -rf ./mesa-$VERSION-new ./mesa-$VERSION
+
+diff --unified -Nr  mesa-$VERSION-orig  mesa-$VERSION > mesa-$VERSION-baikal-m1.patch
+
+mv mesa-$VERSION-baikal-m1.patch ../patches
+
+rm -rf ./mesa-$VERSION
+rm -rf ./mesa-$VERSION-orig

Property changes on: 23.x/create-23.2.1-baikal-m1-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: 23.x/create-23.2.1-baikal-m1-patch/file.list
===================================================================
--- 23.x/create-23.2.1-baikal-m1-patch/file.list	(nonexistent)
+++ 23.x/create-23.2.1-baikal-m1-patch/file.list	(revision 384)
@@ -0,0 +1,2 @@
+mesa-23.2.1/src/gallium/targets/dri/meson.build
+mesa-23.2.1/src/gallium/targets/dri/target.c
Index: 23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/meson.build
===================================================================
--- 23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/meson.build	(nonexistent)
+++ 23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/meson.build	(revision 384)
@@ -0,0 +1,146 @@
+# Copyright © 2017 Dylan Baker
+# Copyright © 2018 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+# TODO: support non-static targets
+# Static targets are always enabled in autotools (unless you modify
+# configure.ac)
+
+gallium_dri_c_args = []
+gallium_dri_ld_args = []
+gallium_dri_link_depends = []
+gallium_dri_drivers = []
+
+if with_ld_version_script
+  gallium_dri_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'dri.sym')]
+  gallium_dri_link_depends += files('dri.sym')
+endif
+if with_ld_dynamic_list
+  gallium_dri_ld_args += ['-Wl,--dynamic-list', join_paths(meson.current_source_dir(), '../dri-vdpau.dyn')]
+  gallium_dri_link_depends += files('../dri-vdpau.dyn')
+endif
+
+libgallium_dri = shared_library(
+  'gallium_dri',
+  files('target.c'),
+  include_directories : [
+    inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_drivers,
+    inc_gallium_winsys, include_directories('../../frontends/dri'),
+  ],
+  gnu_symbol_visibility : 'hidden',
+  link_args : [ld_args_build_id, ld_args_gc_sections, gallium_dri_ld_args],
+  link_depends : gallium_dri_link_depends,
+  link_with : [
+    libdri, libmesa, libgalliumvl,
+    libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
+    libswkmsdri,
+  ],
+  dependencies : [
+    dep_selinux, dep_libdrm, dep_llvm, dep_thread, idep_xmlconfig, idep_mesautil,
+    driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
+    driver_kmsro, driver_v3d, driver_vc4, driver_freedreno, driver_etnaviv,
+    driver_tegra, driver_i915, driver_svga, driver_virgl,
+    driver_panfrost, driver_iris, driver_lima, driver_zink, driver_d3d12,
+    driver_asahi, driver_crocus
+  ],
+  # Will be deleted during installation, see install_megadrivers.py
+  install : true,
+  install_dir : dri_drivers_path,
+  name_suffix : 'so',
+)
+
+foreach d : [[with_gallium_kmsro, [
+               'armada-drm_dri.so',
+               'baikal-vdu_dri.so',
+               'exynos_dri.so',
+               'hx8357d_dri.so',
+               'ili9225_dri.so',
+               'ili9341_dri.so',
+               'imx-drm_dri.so',
+               'imx-dcss_dri.so',
+               'imx-lcdif_dri.so',
+               'ingenic-drm_dri.so',
+               'kirin_dri.so',
+               'komeda_dri.so',
+               'mali-dp_dri.so',
+               'mcde_dri.so',
+               'mediatek_dri.so',
+               'meson_dri.so',
+               'mi0283qt_dri.so',
+               'mxsfb-drm_dri.so',
+               'pl111_dri.so',
+               'rcar-du_dri.so',
+               'repaper_dri.so',
+               'rockchip_dri.so',
+               'st7586_dri.so',
+               'st7735r_dri.so',
+               'stm_dri.so',
+	       'sun4i-drm_dri.so',
+             ]],
+             [with_gallium_radeonsi, 'radeonsi_dri.so'],
+             [with_gallium_nouveau, 'nouveau_dri.so'],
+             [with_gallium_freedreno, ['msm_dri.so', 'kgsl_dri.so']],
+             [with_gallium_softpipe, 'swrast_dri.so'],
+             [with_gallium_softpipe and with_gallium_drisw_kms, 'kms_swrast_dri.so'],
+             [with_gallium_v3d, 'v3d_dri.so'],
+             [with_gallium_vc4, 'vc4_dri.so'],
+             [with_gallium_panfrost, 'panfrost_dri.so'],
+             [with_gallium_etnaviv, 'etnaviv_dri.so'],
+             [with_gallium_tegra, 'tegra_dri.so'],
+             [with_gallium_crocus, 'crocus_dri.so'],
+             [with_gallium_iris, 'iris_dri.so'],
+             [with_gallium_i915, 'i915_dri.so'],
+             [with_gallium_r300, 'r300_dri.so'],
+             [with_gallium_r600, 'r600_dri.so'],
+             [with_gallium_svga, 'vmwgfx_dri.so'],
+             [with_gallium_virgl or
+               (with_gallium_freedreno and freedreno_kmds.contains('virtio')),
+               'virtio_gpu_dri.so'],
+             [with_gallium_lima, 'lima_dri.so'],
+             [with_gallium_zink, 'zink_dri.so'],
+             [with_gallium_d3d12, 'd3d12_dri.so'],
+             [with_gallium_asahi, 'asahi_dri.so']]
+  if d[0]
+    gallium_dri_drivers += d[1]
+  endif
+endforeach
+
+# This only works on Unix-like oses, which is probably fine for dri
+prog_ln = find_program('ln', required : false)
+if prog_ln.found()
+  devenv.set('LIBGL_DRIVERS_PATH', meson.current_build_dir())
+
+  foreach d : gallium_dri_drivers
+    custom_target(
+      'devenv_@0@'.format(d),
+      input : libgallium_dri,
+      output : d,
+      command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'],
+      build_by_default : true,
+    )
+  endforeach
+endif
+
+meson.add_install_script(
+  install_megadrivers_py.full_path(),
+  libgallium_dri.full_path(),
+  dri_drivers_path,
+  gallium_dri_drivers,
+)
Index: 23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/target.c
===================================================================
--- 23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/target.c	(nonexistent)
+++ 23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/target.c	(revision 384)
@@ -0,0 +1,147 @@
+#include "target-helpers/drm_helper.h"
+#include "target-helpers/sw_helper.h"
+
+#include "dri_screen.h"
+
+#define DEFINE_LOADER_DRM_ENTRYPOINT(drivername)                          \
+const __DRIextension **__driDriverGetExtensions_##drivername(void);       \
+PUBLIC const __DRIextension **__driDriverGetExtensions_##drivername(void) \
+{                                                                         \
+   return galliumdrm_driver_extensions;                                   \
+}
+
+#if defined(GALLIUM_SOFTPIPE)
+
+const __DRIextension **__driDriverGetExtensions_swrast(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void)
+{
+   return galliumsw_driver_extensions;
+}
+
+#if defined(HAVE_LIBDRM)
+
+const __DRIextension **__driDriverGetExtensions_kms_swrast(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_kms_swrast(void)
+{
+   return dri_swrast_kms_driver_extensions;
+}
+
+#endif
+#endif
+
+#if defined(GALLIUM_I915)
+DEFINE_LOADER_DRM_ENTRYPOINT(i915)
+#endif
+
+#if defined(GALLIUM_IRIS)
+DEFINE_LOADER_DRM_ENTRYPOINT(iris)
+#endif
+
+#if defined(GALLIUM_CROCUS)
+DEFINE_LOADER_DRM_ENTRYPOINT(crocus)
+#endif
+
+#if defined(GALLIUM_NOUVEAU)
+DEFINE_LOADER_DRM_ENTRYPOINT(nouveau)
+#endif
+
+#if defined(GALLIUM_R300)
+DEFINE_LOADER_DRM_ENTRYPOINT(r300)
+#endif
+
+#if defined(GALLIUM_R600)
+DEFINE_LOADER_DRM_ENTRYPOINT(r600)
+#endif
+
+#if defined(GALLIUM_RADEONSI)
+DEFINE_LOADER_DRM_ENTRYPOINT(radeonsi)
+#endif
+
+#if defined(GALLIUM_VMWGFX)
+DEFINE_LOADER_DRM_ENTRYPOINT(vmwgfx)
+#endif
+
+#if defined(GALLIUM_FREEDRENO)
+DEFINE_LOADER_DRM_ENTRYPOINT(msm)
+DEFINE_LOADER_DRM_ENTRYPOINT(kgsl)
+#endif
+
+#if defined(GALLIUM_VIRGL) || (defined(GALLIUM_FREEDRENO) && !defined(PIPE_LOADER_DYNAMIC))
+DEFINE_LOADER_DRM_ENTRYPOINT(virtio_gpu)
+#endif
+
+#if defined(GALLIUM_V3D)
+DEFINE_LOADER_DRM_ENTRYPOINT(v3d)
+#endif
+
+#if defined(GALLIUM_VC4)
+DEFINE_LOADER_DRM_ENTRYPOINT(vc4)
+#endif
+
+#if defined(GALLIUM_PANFROST)
+DEFINE_LOADER_DRM_ENTRYPOINT(panfrost)
+#endif
+
+#if defined(GALLIUM_ASAHI)
+DEFINE_LOADER_DRM_ENTRYPOINT(asahi)
+#endif
+
+#if defined(GALLIUM_ETNAVIV)
+DEFINE_LOADER_DRM_ENTRYPOINT(etnaviv)
+#endif
+
+#if defined(GALLIUM_TEGRA)
+DEFINE_LOADER_DRM_ENTRYPOINT(tegra);
+#endif
+
+#if defined(GALLIUM_KMSRO)
+DEFINE_LOADER_DRM_ENTRYPOINT(armada_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(baikal_vdu)
+DEFINE_LOADER_DRM_ENTRYPOINT(exynos)
+DEFINE_LOADER_DRM_ENTRYPOINT(hx8357d)
+DEFINE_LOADER_DRM_ENTRYPOINT(ili9225)
+DEFINE_LOADER_DRM_ENTRYPOINT(ili9341)
+DEFINE_LOADER_DRM_ENTRYPOINT(imx_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(imx_dcss)
+DEFINE_LOADER_DRM_ENTRYPOINT(imx_lcdif)
+DEFINE_LOADER_DRM_ENTRYPOINT(ingenic_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(kirin)
+DEFINE_LOADER_DRM_ENTRYPOINT(komeda)
+DEFINE_LOADER_DRM_ENTRYPOINT(mali_dp)
+DEFINE_LOADER_DRM_ENTRYPOINT(mcde)
+DEFINE_LOADER_DRM_ENTRYPOINT(mediatek)
+DEFINE_LOADER_DRM_ENTRYPOINT(meson)
+DEFINE_LOADER_DRM_ENTRYPOINT(mi0283qt)
+DEFINE_LOADER_DRM_ENTRYPOINT(mxsfb_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(pl111)
+DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du)
+DEFINE_LOADER_DRM_ENTRYPOINT(repaper)
+DEFINE_LOADER_DRM_ENTRYPOINT(rockchip)
+DEFINE_LOADER_DRM_ENTRYPOINT(st7586)
+DEFINE_LOADER_DRM_ENTRYPOINT(st7735r)
+DEFINE_LOADER_DRM_ENTRYPOINT(stm)
+DEFINE_LOADER_DRM_ENTRYPOINT(sun4i_drm)
+#endif
+
+#if defined(GALLIUM_LIMA)
+DEFINE_LOADER_DRM_ENTRYPOINT(lima)
+#endif
+
+#if defined(GALLIUM_ZINK) && !defined(__APPLE__)
+#if defined(ANDROID)
+DEFINE_LOADER_DRM_ENTRYPOINT(zink);
+#else
+const __DRIextension **__driDriverGetExtensions_zink(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_zink(void)
+{
+   return galliumvk_driver_extensions;
+}
+#endif
+#endif
+
+#if defined(GALLIUM_D3D12)
+DEFINE_LOADER_DRM_ENTRYPOINT(d3d12);
+#endif