Jump to content

Azq2

Members
  • Posts

    14
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Azq2 got a reaction from milkboy in Canon printer drivers (cnijfilter)   
    Canon provides source code for cups driver, but with some proprietary binary libs.
    This libs available only for x86. No way for direct compiling cnijfilter for ARM (and other architectures).
     
    But we have qemu! We can transparently run x86 executables on any other host architectures.
     
    Easy steps to run cnijfilter on ARM (or any other arch):
    - Build https://github.com/endlessm/cnijfilter-common for x86
    - Copy all needed x86 libs using recursive ldd. And copy it to /usr/lib/bjlib/
    - Patch all executables: set interpreter to /usr/lib/bjlib/x86/ld-linux.so.2 and rpath to /usr/lib/bjlib/
    - Install these patched packages to ARM system
    - Install qemu-user and qemu-user-binfmt (or qemu-arm-static)
     
    You do not need to do this manually. I have implemented an automated build system: https://github.com/Azq2/cnijfilter-arm-build
     
    All you need is any x86 machine to do the build.
     
    How to use
    1. On any x86 machine:
     
    # Install dependencies sudo apt install debootstrap git util-linux # Get build system git clone https://github.com/Azq2/cnijfilter-arm-build # Start building cd cnijfilter-arm-build sudo ./build.sh build # Get .deb packages ls -lah ./result/full ls -lah ./result/light  
    After build we have two variants of packages: full and light
     
    Item Full Light PPD files
    + + CUPS filters
    + + CUPS backends
    + - lgmon + - canon-maintenance
    + - cngpij + - cngpijmnt + - cnijlgmon2 + - cnijnetprn + - cnijnpr + - docs + -  
    In most cases, a light package is completely sufficient:
    - We don't need canon usb backend, because cups have builtin USB support
    - We don't need canon network backend, because cups have builtin BJNP support (package cups-backend-bjnp)
    - Other canon maintenance utils are useless (in my opinion)
     
    2. Copy .deb from result/light or result/full to your ARM machine.
     
    3. On your ARM machine:
     
    # Install dependencies sudo apt install qemu-user qemu-user-binfmt # or sudo apt install qemu-user-static # Install common for all printers package sudo dpkg -i cnijfilter-common.deb # Install printer-specific package # Choose right package for your printer! e400series only for reference! sudo dpkg -i cnijfilter-e400series.deb  
    4. Done. You can now configure CUPS.
     
    Security with apparmor (optional)
     
    CUPS filters don't need any specific permissions.
     
    Create file /etc/apparmor.d/cnijfilter-filters with contents:
     
    #include <tunables/global> /usr/bin/bjfilter* { #include <abstractions/base> @{PROC}/sys/vm/mmap_min_addr r, } /usr/bin/cif[a-z]*[0-9d]* { #include <abstractions/base> @{PROC}/sys/vm/mmap_min_addr r, } /usr/lib/cups/filter/{cmdtocanonij,pstocanonbj,pstocanonij} { #include <abstractions/base> @{PROC}/sys/vm/mmap_min_addr r, }  
    Then restart apparmor:
     
    sudo systemctl reload apparmor sudo aa-enforce cnijfilter-filters  
    Note: this minimal file full coverage all executables in light package. For full package you need write additional rules by yourself.
  2. Like
    Azq2 reacted to JMCC in RK3288/RK3328 Legacy Multimedia Framework   
    IT'S FINALLY HERE...

    THE OFFICIAL ROCKCHIP-LEGACY MULTIMEDIA INTEGRATION
     
    After two years of using a separate script to enable the multimedia features in RK3288/3328 Legacy Kernel, the whole framework has been incorporated to the official Armbian packaging system. The choice distro for this integration is Debian Buster (see FAQ at the end of this post about the reasons).
     
    I. Installation
    Download a Armbian Buster Legacy Desktop image for your board, and install it with the standard Armbian method. Install the complete multimedia solution with sudo apt update && sudo apt upgrade sudo apt install media-buster-legacy-tinkerboard --install-recommends ## Or ## sudo apt install media-buster-legacy-rk3328 --install-recommends The switch "--install-recommends" will add the whole Kodi binary addons collection (retro-gaming cores, music visualizations, screensavers, additional media decoders/encoders, vfs, etc.), plus the GLES-to-OpenGL wrapper "gl4es".  
    II. Features
    Accelerated GLES/EGL X desktop: No action needed. Accelerated Chromium, with WebGL and video display acceleration: No action needed Desktop video player capable of smooth 4K HEVC-HDR: Use the "Rockchip Gst Player" from the Multimedia menu, or choose it with right-click on the media file. Command-line 4K playing is also possible with "gst-play-1.0 --videosink=kmssink". RKMPP-accelerated MPV: Use normally for standard operation (windowed with mouse-operated GUI). For fullscreen, keyboard-operated mode, use the command line switch "--gpu-context=drm" (this will allow you to play smooth 4K).
            - See instructions below, in the next post, for playing Youtube videos up to 4k with this MPV. ISP Camera with real-time h.264/1080p HW encoding (RK3288 only): Using the Gstreamer Plugin. Check this wiki for instructions on how to use it. Most of it applies to Armbian, except for the selection of ov5647/imx219 camera, which must be done using DT overlays. OpenCL 1.2 support (RK3288 only): It will be fully functional, no further action needed. You can download some tests and examples from this link. Kodi 18.9 Leia with full RKMPP+GBM acceleration, 4K-HDR capable: You can start it from Light DM menu as your user account: 
     
    Alternatively, you can also run it as a system service with these command lines: sudo systemctl disable lightdm sudo systemctl enable kodi-gbm sudo reboot  
    Full collection of Kodi binary add-ons: Includes retrogaming cores, media encoders and decoders, PVR, screensavers, vfs and audio visualizations. They are all installed with the package "kodi-addons-full", but are disabled by default. They need to be enabled individually within the Kodi GUI. OpenGL 2.1 support through the gl4es wrapper: It is installed with the package "gl4es", with no further action needed.  
    III. Sources
    This is the list of the sources used for the packages:
     
    IV. FAQ
    ¿Why did you use Debian Buster as a base for this implementation?
    It was the most appropriate for several reasons. Upstream Rockchip-Linux developers use Debian buster, so the software could be ported with less modifications than if we chose a different distro. Besides, it is a completely stable distro, unlike Bullseye, which is a moving target as of today. It also has Chromium as a package, unlike Focal that uses snap instead. For last, it has a good backports repo, with several libs that would otherwise need to be compiled and maintained if we chose, for example, Focal.
      ¿Why Legacy instead of Mainline?
    This is an implementation based on the vendor's BSP kernel. It has been tested and is reliable, which many people will prefer rather than having a bleeding-edge, less stable implementation. In addition to that, Mainline upstream multimedia support is still a WIP, and lacks many features that are only present on Legacy kernels.
      ¿Will you add new features to this implementation?
    No, this implementation will only receive bug fixes if necessary. From now on, all multimedia work will be focused on Mainline and recent distros (like Focal or Bullseye). All new features will go there.
  3. Like
    Azq2 reacted to JMCC in RK3288/RK3328 Legacy Multimedia Framework   
    Decoding is done in software, but the video is displayed in a HW accelerated EGL layer. Otherwise it would not be possible to have vsync and smooth 1080p@60
     
    AFAIK Chromium has no HW decoding support in Linux. There was some work going on for using v4l2, I am not sure if it made it into the release already 
  4. Like
    Azq2 reacted to Igor in Tinker Board HDMI resolutions do not all work   
    True. I didn't have time for deep investigation and that was noted. Alternative option was to leave things completely broken.
     
    BTW. Thanks!
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines