Difference between pages "Pandaboard" and "Package:Eselect (OpenGL)"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
m (Removed the Pandaboard category, as there was only one member. This page is now only in ARM.)
 
 
Line 1: Line 1:
The '''PandaBoard''' is a low-power, low-cost single-board computer development platform based on the Texas Instruments OMAP4430 system on a chip (SoC). The board has been available to the public since 27 October 2010. It is a community supported development platform.
{{Ebuild
|Summary=A Gentoo/Funtoo utility that allows the active OpenGL implementation on a system to be switched between a variety of installed options.
|CatPkg=app-admin/eselect-opengl
|Maintainer=
}}
== Introduction ==


The '''PandaBoard ES''' is a newer version based on the OMAP4460 SoC, with the CPU and GPU running at higher clock rates. The board has been available to the public since 16 November 2011. Like its predecessor, it is a community supported development platform.
Eselect (OpenGL) (also called <tt>eselect-opengl</tt>) is a module for [[Package:Eselect|Eselect]] that allows the OpenGL implementation on a Funtoo Linux or Gentoo Linux system to be switched between a variety of installed OpenGL implementations. It functions by creating an <tt>env.d</tt> file at <tt>/etc/env.d/03opengl</tt> which contains OpenGL settings, as well as managing symbolic links to OpenGL libraries and headers.  


== Features ==
=== Sample env.d File ===
The OMAP4430 SoC on the PandaBoard features a dual-core 1&nbsp;GHz ARM Cortex-A9 MPCore CPU, a 304&nbsp;MHz PowerVR SGX540 graphics processing unit (GPU), a Texas Instruments TMS320C6400 digital signal processor (DSP), and 1&nbsp;GiB of DDR2 SDRAM.


The PandaBoard ES uses a newer SoC, with a dual-core 1.2&nbsp;GHz CPU and 384&nbsp;MHz GPU. Primary persistent storage is via an Secure Digital (SD) Card slot allowing SDHC cards up to 32&nbsp;GB to be used. The board includes wired 10/100 Ethernet as well as wireless Ethernet and bluetooth connectivity. The board can output video signals via Digital Visual Interface (DVI) and HDMI interfaces. It also has 3.5&nbsp;mm audio connectors. It has two Universal Serial Bus (USB) host ports and one USB On-The-Go port, supporting USB 2.0.
A sample <tt>env.d</tt> file for a multilib system with xorg-x11 OpenGL implementation may look like this:


=== CPUinfo ===
{{file|name=/etc/env.d/03opengl|desc=An example env.d file for eselect-opengl|body=
* Pandaboard
# Configuration file for eselect
<pre>
# This file has been automatically generated.
Processor      : ARMv7 Processor rev 2 (v7l)
LDPATH="/usr/lib32/opengl/xorg-x11/lib:/usr/lib64/opengl/xorg-x11/lib"
processor      : 0
OPENGL_PROFILE="xorg-x11"
BogoMIPS        : 599.22
}}


processor      : 1
== Implementation ==
BogoMIPS        : 582.68


Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
Eselect-opengl is implemented as a single bash-based [[Package:Eselect|Eselect]] module approximately 10K in size, installed at <tt>/usr/share/eselect/modules/opengl.eselect</tt>. One interfaces with this module via the main <tt>eselect</tt> command:
CPU implementer : 0x41
CPU architecture: 7
CPU variant    : 0x1
CPU part        : 0xc09
CPU revision    : 2


Hardware        : OMAP4 Panda board
<console>
Revision        : 0020
# ##i##eselect opengl help
Serial          : 0000000000000000
Manage the OpenGL implementation used by your system
</pre>
Usage: eselect opengl <action> <options>


== Funtoo Linux Instalation ==
##g##Standard actions:
First of all you have to prepare/format your SD card (ALL DATA WILL BE LOST!).
  help                      Display help text
  usage                    Display usage information
  version                  Display version information


<pre>
##g##Extra actions:
sdcardsetup.sh
  list                      List the available OpenGL implementations.
# sdcardsetup.sh script
  set <target>              Select the OpenGL implementation.
#!/bin/sh
    <target>                  The profile to activate
    --use-old                If an implementation is already set, use that one instead
    --prefix=<val>           Set the source prefix (default: /usr)
    --dst-prefix=<val>        Set the destination prefix (default: /usr)
    --ignore-missing          Ignore missing files when setting a new implementation
  show                      Print the current OpenGL implementation.
</console>


if [ ! "$1" = "/dev/sda" ] ; then
== What is Switched ==
        DRIVE=$1
        if [ -b "$DRIVE" ] ; then
                dd if=/dev/zero of=$DRIVE bs=1024 count=1024
                SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
                echo DISK SIZE - $SIZE bytes
                CYLINDERS=`echo $SIZE/255/63/512 | bc`
                echo CYLINDERS - $CYLINDERS
                {
                echo ,9,0x0C,*
                echo ,,,-
                } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
                mkfs.vfat -F 32 -n "boot" ${DRIVE}1
                mke2fs -j -L "rootfs" ${DRIVE}2
        fi
fi
</pre>


Follow the general steps from [[Funtoo on ARM#Installing Funtoo]].
Using <tt>eselect opengl set</tt> causes the following symbolic links to be updated to point to the files corresponding to the OpenGL implementation that you chose:


These steps include:
* ''Libraries'' (32-bit and 64-bit):
* Extract stage3 to the 2nd partition of the SD card
** <tt>/usr/lib(64)/libGL.so.*</tt>
* Extract portage snapshot (required to emerge things and ntp(see below))
** <tt>/usr/lib(64)/libEGL.so.*</tt>
* Setup fstab
** <tt>/usr/lib/(32|64|)/libGLESv1.so.*</tt>
* Setup root password
** <tt>/usr/lib/(32|64|)/libGLESv2.so.*</tt>
* Configure hostname and networking (optional, but recommended)
* ''C Headers'':
* Enable SSH access (optional, but recommended)
** <tt>/usr/include/GL/*</tt>
* Enable serial console access (optional, but recommended)
** <tt>/usr/include/EGL/*</tt>
* Correct RTC "bug" with swclock
** <tt>/usr/include/KHR/*</tt>
* <tt>/usr/lib(64|)/xorg/modules/extensions/libglx.so</tt>


The symbolic links point to an installed OpenGL implementation, stored inside <tt>/usr/lib(32|64|)/opengl/(implementation-name)</tt>. These files are structured as follows:


=== Enabling serial console access ===
* <tt>/usr/lib/opengl/(implementation-name)/lib</tt>
These are instructions specific for Pandaboard.
* <tt>/usr/lib/opengl/(implementation-name)/include/(GL|EGL|KHR)</tt>
nano -w /mnt/SD_root/etc/inittab
* <tt>/usr/lib/opengl/(implementation-name)/extensions/libglx.so</tt>
s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100


=== Kernel and bootloader ===
On multilib systems, ebuilds that provide an OpenGL implementation install 32-bit libraries in <tt>/usr/lib32/opengl/(implementation name)/lib</tt> and 64-bit libraries in <tt>/usr/lib64/opengl/(implementation name)/lib</tt>.
Here you can find kernel and bootloader files for a quick start.
Put these on first partition of your SD card. Archive name boot.tar.xz


* http://www.mediafire.com/?h5m1mnqqdrnyb
== Criticisms ==


Of course you can build your own kernel and U-Boot files, but these are provided here so you don't have to go through the cross-compiling pains and can use your Pandaboard to do native compiling once running.
=== Violation of Build Consistency ===


=== Modules and firmware ===
As documented in {{Bug|FL-1309}}, sometimes packages fail to merge when the "wrong" eselect opengl implementation is selected. This violates Portage's ability to consistently build a package from source, assuming all its dependencies are satisfied. This could be classified as a design bug -- eselect-opengl is functioning as intended, but its underlying theory of operation is not correct.
Put these inside /lib folder on second partition. Archive name modules.tar.xz


* http://www.mediafire.com/?h5m1mnqqdrnyb
== eselect-opengl-1.3* experiment ==


[[Category:ARM]]
=== Introduction ===
 
As a result of {{Bug|FL-1309}}, an experimental solution was implemented in eselect-opengl-1.3*. With this version, all packages are built unconditionally against xorg-x11 OpenGL implementation and the other implementations are used only in runtime.
 
The rationale for this design change is that:
# There should be a consistent and repeatable build/linking process for all OpenGL applications.
# AMD and NVIDIA implementations of OpenGL are designed to be more of a "drop-in" runtime replacement for xorg-x11, rather than a standalone replacement for xorg-x11, and thus appear to exhibit more build-time bugs.
 
=== Implementation ===
 
The new version of eselect-opengl switched two files:
* an env.d file <tt>000opengl</tt> specifying <tt>LDPATH</tt> for the run-time implementation override,
* an xorg.conf.d file overriding the ModulePath for custom glx xorg modules.
 
The env.d file has the same contents as the original one, except that the name was changed to ensure that the additional linker paths are added before the system paths where xorg-x11 libraries are installed.
 
The xorg.conf.d sets ModulePaths for non-xorg module replacements (such as the nvidia glx module), if necessary.
 
=== Issues ===
 
The widespread testing of eselect-opengl-1.3* has proven some issues with the new design:
 
# xorg-server is unable to handle multiple occurences of <code>Files</code> section gracefully. Therefore, eselect-opengl's generated xorg.conf.d file collides with many user-defined configurations. This has been patched locally and the patch is awaiting upstream review)
# There are rumors of arm mali's prioprietary OpenGL implementations requiring applications to be built against its own GLES headers.
 
{{EbuildFooter}}

Latest revision as of 08:00, March 1, 2015

Eselect (OpenGL)

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Introduction

Eselect (OpenGL) (also called eselect-opengl) is a module for Eselect that allows the OpenGL implementation on a Funtoo Linux or Gentoo Linux system to be switched between a variety of installed OpenGL implementations. It functions by creating an env.d file at /etc/env.d/03opengl which contains OpenGL settings, as well as managing symbolic links to OpenGL libraries and headers.

Sample env.d File

A sample env.d file for a multilib system with xorg-x11 OpenGL implementation may look like this:

   /etc/env.d/03opengl - An example env.d file for eselect-opengl
# Configuration file for eselect
# This file has been automatically generated.
LDPATH="/usr/lib32/opengl/xorg-x11/lib:/usr/lib64/opengl/xorg-x11/lib"
OPENGL_PROFILE="xorg-x11"

Implementation

Eselect-opengl is implemented as a single bash-based Eselect module approximately 10K in size, installed at /usr/share/eselect/modules/opengl.eselect. One interfaces with this module via the main eselect command:

root # eselect opengl help
Manage the OpenGL implementation used by your system
Usage: eselect opengl <action> <options>

root ##g##Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

root ##g##Extra actions:
  list                      List the available OpenGL implementations.
  set <target>              Select the OpenGL implementation.
    <target>                  The profile to activate
    --use-old                 If an implementation is already set, use that one instead
    --prefix=<val>            Set the source prefix (default: /usr)
    --dst-prefix=<val>        Set the destination prefix (default: /usr)
    --ignore-missing          Ignore missing files when setting a new implementation
  show                      Print the current OpenGL implementation.

What is Switched

Using eselect opengl set causes the following symbolic links to be updated to point to the files corresponding to the OpenGL implementation that you chose:

  • Libraries (32-bit and 64-bit):
    • /usr/lib(64)/libGL.so.*
    • /usr/lib(64)/libEGL.so.*
    • /usr/lib/(32|64|)/libGLESv1.so.*
    • /usr/lib/(32|64|)/libGLESv2.so.*
  • C Headers:
    • /usr/include/GL/*
    • /usr/include/EGL/*
    • /usr/include/KHR/*
  • /usr/lib(64|)/xorg/modules/extensions/libglx.so

The symbolic links point to an installed OpenGL implementation, stored inside /usr/lib(32|64|)/opengl/(implementation-name). These files are structured as follows:

  • /usr/lib/opengl/(implementation-name)/lib
  • /usr/lib/opengl/(implementation-name)/include/(GL|EGL|KHR)
  • /usr/lib/opengl/(implementation-name)/extensions/libglx.so

On multilib systems, ebuilds that provide an OpenGL implementation install 32-bit libraries in /usr/lib32/opengl/(implementation name)/lib and 64-bit libraries in /usr/lib64/opengl/(implementation name)/lib.

Criticisms

Violation of Build Consistency

As documented in FL-1309, sometimes packages fail to merge when the "wrong" eselect opengl implementation is selected. This violates Portage's ability to consistently build a package from source, assuming all its dependencies are satisfied. This could be classified as a design bug -- eselect-opengl is functioning as intended, but its underlying theory of operation is not correct.

eselect-opengl-1.3* experiment

Introduction

As a result of FL-1309, an experimental solution was implemented in eselect-opengl-1.3*. With this version, all packages are built unconditionally against xorg-x11 OpenGL implementation and the other implementations are used only in runtime.

The rationale for this design change is that:

  1. There should be a consistent and repeatable build/linking process for all OpenGL applications.
  2. AMD and NVIDIA implementations of OpenGL are designed to be more of a "drop-in" runtime replacement for xorg-x11, rather than a standalone replacement for xorg-x11, and thus appear to exhibit more build-time bugs.

Implementation

The new version of eselect-opengl switched two files:

  • an env.d file 000opengl specifying LDPATH for the run-time implementation override,
  • an xorg.conf.d file overriding the ModulePath for custom glx xorg modules.

The env.d file has the same contents as the original one, except that the name was changed to ensure that the additional linker paths are added before the system paths where xorg-x11 libraries are installed.

The xorg.conf.d sets ModulePaths for non-xorg module replacements (such as the nvidia glx module), if necessary.

Issues

The widespread testing of eselect-opengl-1.3* has proven some issues with the new design:

  1. xorg-server is unable to handle multiple occurences of Files section gracefully. Therefore, eselect-opengl's generated xorg.conf.d file collides with many user-defined configurations. This has been patched locally and the patch is awaiting upstream review)
  2. There are rumors of arm mali's prioprietary OpenGL implementations requiring applications to be built against its own GLES headers.