Slackware inside Pyra


Linux-SWAT

Forum Addict!
Joined
Feb 13, 2010
Messages
9,188
################################################

Below is the development thread.

################################################

http://arm.slackware.com/
https://dev.pyra-handheld.com/packages

Done:
-boot
-start X
-get the screen rotated under X (working with 5.10.x kernel, using less-optimized etnaviv rotation with 6.4.x kernel)
-3D and gl4es
-Wi-Fi
-bluetooth
-leds
-nubs and page up/down buttons
-sound output through the jack
-Firefox

To do:
-get the right keyboard layout under console (missing keys)
-get the right keyboard layout under X (missing keys despite using the right Pyra mapping)
-battery control
-speakers
-modem
-box86-pyra (compilation ok, but not tested yet)
-get the dbp system working (compilation ok, not working due to aufs module not part of the kernel)
-lid control
-and probably a lot of other stuff

Any help/tips are welcome.
 
Last edited:
Boot:
At the time of this post/edit, I used this Letux kernel https://download.goldelico.com/letux-kernel/letux-6.4-rc2-lpae/

uEnv.txt on the SD card:
It works, I can point to a dtb, kernel etc.

Kernel command line: console=ttyO2,115200n8 root=PARTUUID=9f15472b-02 rw rootfstype=ext4 rootwait coherent_pool=1M fsck.repair=yes rootwait ignore_loglevel

But no matter which root= or mmcroot= option I try in the uEnv.txt, I can't change the rw to ro, which is needed by Slackware in order to do a filesystem check.

I tried stuff like:
mmcroot=/dev/mmcblk1p2 ro
mmcroot=/dev/mmcblk0p2 ro

My actual uEnv.txt:
fdtfile=omap5-letux-cortex15+pyra.dtb

bootdir=
bootfile=zImage
bootfilecmd=bootm

console=ttyO2,115200n8
Post automatically merged:

How to access the internal flash memory when booting from the SD card ?
 
Last edited:
Wasn't that multiplexed wth some other storage ? Did one have to toggle some gpio ?
I forget ...
 
Last edited:
The manual say it's the SD card under the battery which is multiplexed with the internal eMMC.
 
Stopped the boot with the serial line, "env print" has:
Code:
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
So the rw is hardcoded.
 
I compiled the xorg driver from:
https://dev.pyra-handheld.com/packages/xserver-xorg-video-armsoc-omap5

I use this /etc/X11/xorg.conf.d/10-pyra-driver.conf file:
Code:
Section "Device"
        Identifier      "Pyra  FBDEV"
        Driver          "omap5"
        Option          "DRICard" "2" # must point to the /dev/dri/cardX corresponding to omapdrm because detection can sometimes fail
        Option          "DriverName" "omapdrm"
        Option          "SoftEXA" "FALSE" # will disable etnaviv acceleration. CPU only EXA is actually faster, but let all the work to A15 core
        Option          "SwapbuffersWait" "true"
        #Option          "TilerRotation" "270"
EndSection
 
Last edited:
I do not know much about that Tiler but here are some Informations:

Another Question..can you Try the HDMI Output?
Maybe Tiler is not realy Activated and therefore you have HDMI Output working on the Pyra.

The PyraOS does not support HDMI Output yet...HDMI will lost Signal when Tiler is activating for Screen Rotating.
(or Framebuffer or other Things..but we cannot use HDMI yet)
 
Last edited:
Wow good News..
..it looks like you have in Console the right Position for the Pyra Display but not in the X.

Good for using hdmi with X..Bad for using X in the Display.
Maybe you must search the X Display Settings.
Maybe there is just a missing Command in the X Startup Settings?

Edit..i found this

maybe it can help
 
Stopped the boot with the serial line, "env print" has:
Code:
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
So the rw is hardcoded.

I was able to boot in ro with this line:
Code:
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=/dev/mmcblk0p2 ro rootfstype=${mmcrootfstype}
 
Last edited:
  • Like
Reactions: rSl
3D:
Now struggling with:
https://dev.pyra-handheld.com/packages/omap5-sgx-ddk-um-linux

Letux has the pvrsrvkm_omap5_sgx544_116 module so I edited the rc.pvr file:
Code:
sed -i -e "s/pvrsrvkm/pvrsrvkm_omap5_sgx544_116/g" rc.pvr

Short version, launching "rc.pvr start" complained about missing libraries:
Code:
/usr/bin/pvrsrvctl: error while loading shared libraries: libgbm.so.2: cannot open shared object file: No such file or directory
/usr/bin/pvrsrvctl: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory

So I did ugly links:
Code:
ln -s /usr/lib/libgbm.so /usr/lib/libgbm.so.2
ln -s /usr/lib/libffi.so /usr/lib/libffi.so.6

Unfortunately I got:
Code:
# /usr/bin/pvrsrvctl --start --no-module
PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086861 (strerror returns no value.). [0, ]
PVR:(Error): OpenServices: PVRSRVBridgeCall failed. [0, ]
PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]
/usr/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)
 
Last edited:
3D:
I use this /etc/powervr.ini :
Code:
[default]
#WindowSystem=libpvrws_WAYLAND.so
WindowSystem=libpvrDRMWSEGL.so
DefaultPixelFormat=RGB888

Doing "strace /usr/bin/pvrsrvctl --start --no-module" shows no access to /etc/powervr.ini .

--EDIT:
Looks like I miss something...
Code:
# find / -name libpvrDRMWSEGL.so
#

--EDIT 2:
I did:
Code:
# find / -name "libpvrDRMWSEGL.so*"
/usr/lib/libpvrDRMWSEGL.so.1
/usr/lib/libpvrDRMWSEGL.so.1.14.3699939

So AFAIK it looks ok.
 
Last edited:
Audio:
# /usr/share/pyra/scripts/pyra-init-alsa.sh
Bash:
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
No state is present for card H58040000encode
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "HDMI_58040000_e" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card H58040000encode

Boot:
Here's my actual uEnv.txt, on the fat filesystem in the first partition of the SD card :
Code:
fdtfile=omap5-letux-cortex15-v5.3+pyra-v5.3.dtb

bootdir=
bootfile=uImage
bootfilecmd=bootm
console=ttyO2,115200n8

args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=/dev/mmcblk0p2 ro rootfstype=${mmcrootfstype}

Based on https://download.goldelico.com/letux-u-boot/Pyra+LC15-4GB/latest/uEnv.txt
 
Last edited:
X rotation:
Appended to the big line in uEnv.txt:
Code:
drm_kms_helper.fbdev_rotation=8

But dmesg shows:
Code:
drm_kms_helper: unknown parameter 'fbdev_rotation' ignored

Module parameters:
Code:
Module: drm_kms_helper
Parameter: drm_fbdev_overalloc --> 100
Parameter: edid_firmware --> Parameter: fbdev_emulation --> Y
Parameter: poll --> Y
 
Last edited:
This script is quite useful, it lists modules + parameters:
Code:
#!/bin/sh

cat /proc/modules | cut -f 1 -d " " | while read module; do
  echo "Module: $module";
  if [ -d "/sys/module/$module/parameters" ]; then
    ls /sys/module/$module/parameters/ | while read parameter; do
      echo -n "Parameter: $parameter --> ";
      cat /sys/module/$module/parameters/$parameter;
    done;
  fi;
  echo;
done

Result:
Code:
Module: bnep
Parameter: compress_dst --> Y
Parameter: compress_src --> Y

Module: ipv6
Parameter: autoconf --> 0
Parameter: disable --> 0
Parameter: disable_ipv6 --> 0

Module: asix

Module: usbnet

Module: phylink

Module: dm_mod
Parameter: dm_mq_nr_hw_queues --> 1
Parameter: dm_mq_queue_depth --> 2048
Parameter: dm_numa_node --> -1
Parameter: kcopyd_subjob_size_kb --> 512
Parameter: reserved_bio_based_ios --> 16
Parameter: reserved_rq_based_ios --> 256
Parameter: stats_current_allocated_bytes --> 0
Parameter: swap_bios --> 2048
Parameter: use_blk_mq --> Y

Module: dax

Module: wl18xx
Parameter: board_type --> (null)
Parameter: checksum --> N
Parameter: dc2dc --> -1
Parameter: high_band_component --> -1
Parameter: high_band_component_type --> -1
Parameter: ht_mode --> (null)
Parameter: low_band_component --> -1
Parameter: low_band_component_type --> -1
Parameter: n_antennas_2 --> -1
Parameter: n_antennas_5 --> -1
Parameter: num_rx_desc --> -1
Parameter: pwr_limit_reference_11_abg --> -1

Module: wlcore
Parameter: bug_on_recovery --> -1
Parameter: debug_level --> 0
Parameter: fwlog_mem_blocks --> -1
Parameter: no_recovery --> -1

Module: mac80211
Parameter: beacon_loss_count --> 7
Parameter: ieee80211_default_rc_algo --> minstrel_ht
Parameter: max_nullfunc_tries --> 2
Parameter: max_probe_tries --> 5
Parameter: minstrel_vht_only --> Y
Parameter: probe_wait_ms --> 500

Module: libarc4

Module: cfg80211
Parameter: bss_entries_limit --> 1000
Parameter: cfg80211_disable_40mhz_24ghz --> N
Parameter: ieee80211_regdom --> 00

Module: snd_soc_spdif_tx

Module: snd_soc_dmic
Parameter: modeswitch_delay --> 0
Parameter: wakeup_delay --> 0

Module: gpio_twl6040

Module: dwc3

Module: clk_twl6040

Module: roles

Module: twl6040_vibra

Module: snd_soc_omap_abe_twl6040

Module: pvrsrvkm_omap5_sgx544_116
Parameter: gPVRDebugLevel --> 15

Module: snd_soc_omap_mcpdm

Module: snd_soc_twl6040

Module: omap_sham

Module: leds_gpio

Module: omap_aes_driver

Module: omap_crypto

Module: crypto_engine

Module: ohci_platform

Module: ohci_hcd

Module: ehci_omap

Module: wlcore_sdio
Parameter: dump --> N

Module: dwc3_omap

Module: ina2xx_adc

Module: leds_is31fl319x

Module: bq27xxx_battery_i2c

Module: tsc2007

Module: snd_soc_ts3a227e

Module: hci_uart
Parameter: hciextn --> Y
Parameter: irq_polarity --> -1
Parameter: txcrc --> Y

Module: bq2429x_charger

Module: bq27xxx_battery
Parameter: dt_monitored_battery_updates_nvm --> Y
Parameter: poll_interval --> 360

Module: ina2xx

Module: btbcm

Module: bmp280_spi

Module: as5013

Module: tca8418_keypad

Module: bluetooth
Parameter: disable_ertm --> N
Parameter: disable_esco --> N
Parameter: enable_ecred --> Y

Module: palmas_pwrbutton

Module: palmas_gpadc

Module: ecdh_generic

Module: bno055_i2c

Module: bmc150_accel_i2c

Module: bmg160_i2c

Module: bno055_ser

Module: bmc150_magn_i2c

Module: bno055

Module: bmc150_accel_core

Module: bmg160_core

Module: ecc

Module: bmc150_magn

Module: usb3503

Module: bmp280_i2c

Module: industrialio_triggered_buffer

Module: bmp280

Module: kfifo_buf

Module: industrialio

Module: snd_soc_omap_mcbsp

Module: snd_soc_omap_aess

Module: display_connector

Module: snd_soc_ti_sdma

Module: drm_kms_helper
Parameter: drm_fbdev_overalloc --> 100
Parameter: edid_firmware --> Parameter: fbdev_emulation --> Y
Parameter: poll --> Y

Module: ti_tpd12s015

Module: syscopyarea

Module: sysfillrect

Module: sysimgblt

Module: drm
Parameter: debug --> 0
Parameter: edid_firmware -->
Parameter: edid_fixup --> 6
Parameter: timestamp_precision_usec --> 20
Parameter: vblankoffdelay --> 5000

Module: drm_panel_orientation_quirks

Module: pwm_bl

Module: wwan_on_off

Module: pwm_omap_dmtimer
 
Sound:
# cat /lib/modprobe.d/pyra-alsa.conf
Code:
options snd_soc_omap_abe_twl6040 index=0
options snd_soc_omap_hdmi_audio index=-2
Note: there's no snd_soc_omap_hdmi_audio in Letux.

According to @hns, I removed the AESS firmware (as AESS isn't working yet) in order to get only one sound card:
# mv /lib/firmware/omap_aess-adfw.bin /tmp/

I tried to blacklist the module in /lib/modprobe.d/snd_soc_omap_aess.conf
Code:
blacklist snd_soc_omap_aess
but it keeps loaded anyway.

And got in dmesg:
Code:
omap-abe-twl6040 sound: Direct firmware load for omap_aess-adfw.bin failed with error -2
omap-abe-twl6040 sound: Failed to load firmware omap_aess-adfw.bin: -2

Now there's a different output from /usr/share/pyra/scripts/pyra-init-alsa.sh
Code:
Found hardware: "Pyra" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card Pyra
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
No state is present for card H58040000encode
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "HDMI_58040000_e" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card H58040000encode

Anyway no speaker sound, the pulse audio mixer only sees dummy audio.
I configured Audacious to use ALSA and Sysdefault CARD=Pyra .
Then launched "alsamixer" and selected card Pyra. From this setup I'm able to have sound from the jack output, but not from the speakers:
alsamixer.png


Changing Handsfree L/R produces cracks and noise. Handsfree slider increases/decreases the noise when music is played.
 
Last edited:
I was trying colors on leds, then I had this message on the terminal:
Code:
The system is going down to maintenance mode NOW!

Then I was kicked out by the system and it looks like it changed its runlevel... I had to telinit 3.
Strange, I've never encountered that on any Linux...

--EDIT: a few moment later I had
Code:
DSI: omapdss DSI error: DSI error, irqstatus 4000

--EDIT 2: probably unrelated, I noticed this double free problem in a X console log:
Code:
waiting for X server to shut down free(): double free detected in tcache 2
 
Last edited:
  • Wow
Reactions: rSl
As a workaround, I was able to use a X rotation using etnaviv:

/etc/X11/xorg.conf.d/10-video-etnaviv.conf
Code:
Section "Device"
    Identifier "etnaviv"
    Driver "modesetting"
    Option "kmsdev" "/dev/dri/card1"
    Option "AccelMethod" "glamor"
EndSection

Section "ServerFlags"
    Option "AutoAddGPU" "false"
EndSection

Then I used Xfce's display manager to rotate the screen.
I guess I could also use xrandr.
 
Last edited:
Back
Top