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

383 Commits   1 Branch   1 Tag
Index: drivers/baikal-m1/vdec/6.4-20231227/Makefile
===================================================================
--- drivers/baikal-m1/vdec/6.4-20231227/Makefile	(nonexistent)
+++ drivers/baikal-m1/vdec/6.4-20231227/Makefile	(revision 377)
@@ -0,0 +1,183 @@
+
+COMPONENT_TARGETS  = $(HARDWARE_BAIKAL_M1)
+
+NEED_ABS_PATH      = true
+
+COMPONENT_IS_3PP   = true
+
+NO_CCACHE = true
+
+include ../../../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES    = sources/hal/drivers/Baikal/M1000/vdec
+
+REQUIRES           = boot/kernel/baikal-m1/6.1.63-6.4.92
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 6.4-20231227
+kernel_version     = 6.1.63-6.4.92
+modules_version    = 6.1.63
+tar_xz_archive     = $(SRC_PACKAGE_PATH)/hal/drivers/Baikal/M1000/vdec/vdec-$(version).tar.xz
+SRC_ARCHIVE        = $(tar_xz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/vdec-$(version)
+src_dir_name       = vdec-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+kernel_sources     = $(TARGET_DEST_DIR)/usr/src/linux-m1-$(kernel_version)
+
+build_vdec_pkg     = $(TARGET_BUILD_DIR)/.vdec_pkg_done
+
+modules_done       = $(TARGET_BUILD_DIR)/.modules_done
+
+
+PATCHES = PATCHES
+
+
+####### Targets
+
+PKG_GROUP = boot
+
+
+VDEC_PKG_NAME                = vdec
+VDEC_PKG_VERSION             = 6.4-20231227
+VDEC_PKG_ARCH                = $(PKGARCH)
+VDEC_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+VDEC_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+VDEC_PKG_GROUP               = $(PKG_GROUP)
+###                           |---handy-ruler-------------------------------|
+VDEC_PKG_SHORT_DESCRIPTION   = HD Video Decoder driver and libraries
+VDEC_PKG_URL                 = $(BUG_URL)
+VDEC_PKG_LICENSE             = GPLv2
+VDEC_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(VDEC_PKG_NAME)-pkg-description
+VDEC_PKG_DESCRIPTION_FILE_IN = $(VDEC_PKG_NAME)-pkg-description.in
+VDEC_PKG_INSTALL_SCRIPT      = $(TARGET_BUILD_DIR)/$(VDEC_PKG_NAME)-pkg-install.sh
+VDEC_PKG_INSTALL_SCRIPT_IN   = $(VDEC_PKG_NAME)-pkg-install.sh.in
+
+VDEC_PKG         = $(CURDIR)/$(TARGET_BUILD_DIR)/$(VDEC_PKG_NAME)-package
+
+pkg_basename     = $(VDEC_PKG_NAME)-$(VDEC_PKG_VERSION)-$(VDEC_PKG_ARCH)-$(VDEC_PKG_DISTRO_NAME)-$(VDEC_PKG_DISTRO_VERSION)
+
+pkg_archive      = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature    = $(call sign-name,$(pkg_archive))
+pkg_description  = $(call desc-name,$(pkg_archive))
+products         = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS    = $(modules_done)
+BUILD_TARGETS   += $(build_vdec_pkg)
+
+PRODUCT_TARGETS  = $(products)
+
+ROOTFS_TARGETS   = $(pkg_archive)
+
+
+include ../../../../../build-system/core.mk
+
+
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_M1000_GLIBC)),)
+ARCH = arm64
+endif
+
+INSTALL_MOD_PATH=$(VDEC_PKG)
+KERNEL_SOURCES_DIR = $(kernel_sources)
+
+USE_TARGET_DEST_DIR_SYSROOT = no
+
+
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+LMAKE := $(BUILD_ENVIRONMENT) KBUILD_NOPEDANTIC=1 KBUILD_MODPOST_WARN=1 \
+                              $(MAKE) -C $(KERNEL_SOURCES_DIR) \
+                                         ARCH=$(ARCH) CROSS_COMPILE="$(CROSS_PREFIX)" \
+                                         M=$(CURDIR)/$(SRC_DIR) $(extra_build_environment) \
+                                         V=$(if $(VERBOSE),1,0)
+
+# add to LMAKE: CONFIG_DEBUG_SECTION_MISMATCH=y for more detailed log.
+
+$(modules_done): $(src_done)
+	@+$(LMAKE) modules
+	@touch $@
+
+$(build_vdec_pkg): $(modules_done)
+	@+$(LMAKE) modules_install INSTALL_MOD_PATH=$(INSTALL_MOD_PATH)
+	@mkdir -p $(VDEC_PKG)/etc/xdg
+	@mkdir -p $(VDEC_PKG)/lib/firmware
+	@mkdir -p $(VDEC_PKG)/lib/modules/$(modules_version)
+	@mkdir -p $(VDEC_PKG)/lib/udev/rules.d
+	@mkdir -p $(VDEC_PKG)/usr/lib$(LIBSUFFIX)/gstreamer-1.0
+	# ======= Install firmware: =======
+	@cp -a $(SRC_DIR)/target/lib/firmware/{pvdec_full_bin,vxd_loopback}.fw $(VDEC_PKG)/lib/firmware/
+	@chmod 0644 $(VDEC_PKG)/lib/firmware/*
+	@ln -srf $(VDEC_PKG)/lib/firmware/pvdec_{full,sec}_bin.fw
+	# ======= Install libraries: =======
+	@cp -a $(SRC_DIR)/target/usr/lib/aarch64-linux-gnu/libomx_vxd.so \
+	       $(VDEC_PKG)/usr/lib$(LIBSUFFIX)/
+	@cp -a $(SRC_DIR)/target/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstomx.so \
+	       $(VDEC_PKG)/usr/lib$(LIBSUFFIX)/gstreamer-1.0/
+	@chmod 0755 $(VDEC_PKG)/usr/lib$(LIBSUFFIX)/libomx_vxd.so
+	@chmod 0755 $(VDEC_PKG)/usr/lib$(LIBSUFFIX)/gstreamer-1.0/libgstomx.so
+ifneq ($(PATCHELF),)
+	# ======= Set RPATH/RUNPATH for target shared objects =======
+	@( cd $(VDEC_PKG)/usr/lib$(LIBSUFFIX)/gstreamer-1.0 ; \
+	   $(PATCHELF) --set-rpath $(TARGET_LIB_RPATH) libgstomx.so 1> /dev/null 2> /dev/null ; \
+	 )
+endif
+	# ======= Install config files: =======
+	@cp -a $(SRC_DIR)/target/etc/udev/rules.d/99-vdec.rules $(VDEC_PKG)/lib/udev/rules.d/
+	@chmod 0644 $(VDEC_PKG)/lib/udev/rules.d/*
+	@cp -a $(SRC_DIR)/target/etc/xdg/gstomx.conf $(VDEC_PKG)/etc/xdg
+	@chmod 0644 $(VDEC_PKG)/etc/xdg/*
+	# ======= Install Documentation =======
+	@mkdir -p $(VDEC_PKG)/usr/doc/$(src_dir_name)
+	@cp -a $(SRC_DIR)/GPLHEADER $(SRC_DIR)/MIT_COPYING \
+	       $(VDEC_PKG)/usr/doc/$(src_dir_name)
+	@mkdir -p $(VDEC_PKG)/usr/share/doc/$(src_dir_name)
+	@( cd $(SRC_DIR) ; \
+	   cp -a GPLHEADER MIT_COPYING target/README \
+	         $(VDEC_PKG)/usr/share/doc/$(src_dir_name) ; \
+	 )
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(VDEC_PKG))
+	# ======= Strip binaries =======
+	@( cd $(VDEC_PKG)/usr/lib$(LIBSUFFIX) ; \
+	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	 )
+	@touch $@
+
+$(VDEC_PKG_DESCRIPTION_FILE): $(VDEC_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(VDEC_PKG_INSTALL_SCRIPT): $(VDEC_PKG_INSTALL_SCRIPT_IN)
+	@cat $< | $(SED) -e "s/@MODULES_VERSION@/$(modules_version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(build_vdec_pkg) $(VDEC_PKG_DESCRIPTION_FILE) $(VDEC_PKG_INSTALL_SCRIPT)
+	@cp $(VDEC_PKG_DESCRIPTION_FILE) $(VDEC_PKG)/.DESCRIPTION
+	@cp $(VDEC_PKG_INSTALL_SCRIPT) $(VDEC_PKG)/.INSTALL
+	@chmod a+x $(VDEC_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(VDEC_PKG)/.REQUIRES
+	@echo "pkgname=$(VDEC_PKG_NAME)"                            >  $(VDEC_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(VDEC_PKG_VERSION)"                          >> $(VDEC_PKG)/.PKGINFO ; \
+	 echo "arch=$(VDEC_PKG_ARCH)"                               >> $(VDEC_PKG)/.PKGINFO ; \
+	 echo "distroname=$(VDEC_PKG_DISTRO_NAME)"                  >> $(VDEC_PKG)/.PKGINFO ; \
+	 echo "distrover=$(VDEC_PKG_DISTRO_VERSION)"                >> $(VDEC_PKG)/.PKGINFO ; \
+	 echo "group=$(VDEC_PKG_GROUP)"                             >> $(VDEC_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(VDEC_PKG_SHORT_DESCRIPTION)\"" >> $(VDEC_PKG)/.PKGINFO ; \
+	 echo "url=$(VDEC_PKG_URL)"                                 >> $(VDEC_PKG)/.PKGINFO ; \
+	 echo "license=$(VDEC_PKG_LICENSE)"                         >> $(VDEC_PKG)/.PKGINFO
+	@$(PSEUDO) sh -c "cd $(VDEC_PKG) && \
+	                  chown -R root:root . && \
+	                  $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: drivers/baikal-m1/vdec/6.4-20231227/PATCHES
===================================================================
Index: drivers/baikal-m1/vdec/6.4-20231227/vdec-pkg-description.in
===================================================================
--- drivers/baikal-m1/vdec/6.4-20231227/vdec-pkg-description.in	(nonexistent)
+++ drivers/baikal-m1/vdec/6.4-20231227/vdec-pkg-description.in	(revision 377)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+    |-----handy-ruler------------------------------------------------------|
+vdec: vdec @VERSION@ (HD Video Decoder driver and libraries)
+vdec:
+vdec: Baikal Electronics BE-M1000 Video Decoder Driver, support Libraries
+vdec: and Firmware.
+vdec:
+vdec:
+vdec:
+vdec:
+vdec:
+vdec:
+vdec:
Index: drivers/baikal-m1/vdec/6.4-20231227/vdec-pkg-install.sh.in
===================================================================
--- drivers/baikal-m1/vdec/6.4-20231227/vdec-pkg-install.sh.in	(nonexistent)
+++ drivers/baikal-m1/vdec/6.4-20231227/vdec-pkg-install.sh.in	(revision 377)
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+  NEW="$1"
+  OLD="`dirname $NEW`/`basename $NEW .new`"
+  # If there's no file by that name, mv it over:
+  if [ ! -r $OLD ]; then
+    mv $NEW $OLD
+  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+    rm $NEW
+  fi
+  # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  # Notice we use an absolute path below, rather than sbin/depmod. This is because
+  # we're testing to see if we are on the bootdisk, which will not have /sbin/depmod.
+  # If we aren't, we will signal init to restart using the new binary.
+  # The presence of "/etc/system-installer" is under consideration as a better test.
+  # Also we have to check that we are not in the installer mode on the target system
+  # ("/etc/system-installer"), and we have to be sure that we are on the working system
+  # on the target hardware ("proc/sys/kernel/osrelease" - relative path).
+  if [ -r proc/sys/kernel/osrelease -a ! -r /etc/system-installer -a x /bin/uname -a -x /sbin/depmod ]; then
+    # Determine the version of the running kernel:
+    RELEASE=$(uname -r)
+    ### Update module dependencies ###
+    # If /usr is mounted and we have 'find', we can try to take a shortcut:
+    if [ -x /usr/bin/find -a -e /lib/modules/$RELEASE/modules.dep \
+         -a /lib/modules/$RELEASE/modules.dep -nt /etc/modules.conf ]; then
+      NEWMODS="$(/usr/bin/find /lib/modules/$RELEASE -mindepth 2 -type f -newer /lib/modules/$RELEASE/modules.dep)"
+      # Only rebuild dependencies if new module(s) are found:
+      if [ ! "" = "$NEWMODS" ]; then
+        echo "Updating module dependencies for Linux $RELEASE:"
+        /sbin/depmod -a
+      else
+        echo "Module dependencies up to date (no new kernel modules found)."
+      fi
+    else # we don't have find, or there is no existing modules.dep, or it is out of date.
+      echo "Updating module dependencies for Linux $RELEASE:"
+      /sbin/depmod -b / $RELEASE
+    fi
+  fi
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*

Property changes on: drivers/baikal-m1/vdec/6.4-20231227/vdec-pkg-install.sh.in
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: drivers/baikal-m1/vdec/6.4-20231227
===================================================================
--- drivers/baikal-m1/vdec/6.4-20231227	(nonexistent)
+++ drivers/baikal-m1/vdec/6.4-20231227	(revision 377)

Property changes on: drivers/baikal-m1/vdec/6.4-20231227
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~