Steam Link

Steam Link

Mounting external DVD player in a steam link
Hello to all,

I have an external USB DVD player and I'm looking to mount it in my steam link so I can view things there on Kodi.

I plugged the player in and checked /dev and /dev/block for the device. I found that the Link doesn't have the necessary kernel drivers to detect it, so I followed the steps in
here kindly provided by BuntStiftLecker replacing USBIP with the DVD drivers.

I moved sg.ko, sr_mod.ko, cdrom.ko, isofs.ko to /mnt/config/modules/ and tried to run insmod on them. However, sg.ko won't work with this command and leaves in dmesg the message:

"sg: Unknown symbol scsi_logging_level (err 0)"

Am I going the right direction?
Does anyone know what is failing?

Thanks in advance
< >
Showing 1-6 of 6 comments
Was just building a kernel module last night; so I happen to know part of the answer to this question...

When using 'insmod' to insert a kernel module, you will receive 'Unknown symbol' warnings if the module you are inserting has a dependency on other kernel modules.

To add a kernel module:
1. Add the module(s) to /lib/modules/3.8.13-mrvl ( modules because you will need to add the module you want as well as any dependencies it has )
2. Add the name of the new module on a line by itself within '/etc/modules'. This tells Linux to load that additional kernel module when the system starts. This file does not exist on the steam link. Adding it should work.
3. Run 'depmod' so that the system can trace what other kernel modules your new module depends on and load those as well. This will regenerate the file /lib/modules/3.8.13-mrvl/modules.dep ( and possibly the .bin version too? ) You may want to backup those files first in case this doesn't work right, and double check them after doing so.

I haven't tried this on the steam link myself, so I am not sure if 'depmod' will actually work properly. The directories may not be read/write??

Also, it seems odd that '/etc/modules' does not exist on the steam link. I suppose the installed scripts are just running 'modprobe' during bootup to load the kernel modules that the steam link already has and is using?

As far as what other kernel module is missing that contains scsi_logging_level... Probably scsi_mod? That is, just enable 'scsi' as a module also when building the kernel / modules and include that one also.

According to documentation, you should/may be able to run 'modinfo [your kernel module name]' and get output showing what modules it depends on.

There are a variety of scsi modules. See http://www.ru.j-npcs.org/usoft/WWW/HOWTO/Module-HOWTO-6.html
Other possibilities besides scsi is sg ( scsi generic ) and sr ( scsi cdrom support ).

Looks like /lib/modules/3.8.13-mrvl is read-only.

Tried loading scsi_mod.ko but it seems the kernel has a version of that, I get the message:

scsi_mod: exports duplicate symbol __scsi_add_device (owned by kernel)

Did lsmod and there seems to a sd8897 module that might be the source.
Originally posted by androidbarata:
Looks like /lib/modules/3.8.13-mrvl is read-only.

Tried loading scsi_mod.ko but it seems the kernel has a version of that, I get the message:

scsi_mod: exports duplicate symbol __scsi_add_device (owned by kernel)

Did lsmod and there seems to a sd8897 module that might be the source.


You can remount the entire / partition as rw
'depmod' generates the file '/lib/modules/[running system]/modules.dep'
See https://linux.die.net/man/5/modules.dep

The format of the modules.dep file is pretty simple.
Upon mounting the filesystem rw and running depmod, is the modules.dep file updated?

Another way to generates the module dependency information is to build the kernel.
If you rebuild the Valve SDK kernel, you can run the following command to deploy the module dependency information to a directory.

'make ARCH=arm CROSS_COMPILE=[path to compiler prefix to use] INSTALL_MOD_PATH=[some dir] modules_install'

This is, of course, assuming that you already did 'make ARCH=arm menuconfig' and selected to build the cdrom drivers as modules.

WARNING WARNING WARNING
The stuff that modules_install places in [some dir] should be copied over to the steamlink. Be aware that it may be possible to break the boot process by altering the stuff in /lib/modules on the actual steam link.

To play it safe it would be a good idea to only add the new lines to the various files that relate to the cdrom stuff. That is; be careful not to overwrite the pre-existing kernel mods, especially the graphics drivers, just in case you built the kernel mods incorrectly and cause the boot process of the steam link to get stuck.

CONTINUED WARNING
Generally, when remounting the system partition rw, it is exceedingly easy to break the functionality of the link and effectively "brick" it. I don't know offhand how to recover from such a state, or if it is even possible. You should consider that doing so makes you responsible for whatever you change and definitely should void your warranty. If you break the steam link, that is just too bad.

This is one of the reasons I am attempting to get kexec working with graphics to a full Linux distribution deployed on a USB drive. If that is done, then there is no danger of "screwing up" the Steam Link default contents. We can then alter the contents of the USB drive to our hearts content. If it breaks; just erase the USB drive and start over.
Well I have it working at the moment using a script in /etc/init.d/startup with:

#!/bin/sh

insmod /mnt/config/modules/scsi_dh.ko
insmod /mnt/config/modules/cdrom.ko
insmod /mnt/config/modules/sr_mod.ko
insmod /mnt/config/modules/isofs.ko
insmod /mnt/config/modules/scsi_tgt.ko

Unfortunately playing DVDs with Kodi seems to be horribly laggy, but thats another issue.

------------------------

What I did:

sudo -i
cd /usr/src
git clone https://github.com/ValveSoftware/steamlink-sdk.git
apt-get install kernel-package libncurses-dev
cd /usr/src/steamlink-sdk/
source setenv.sh
export ARCH=arm; export LOCALVERSION="-mrvl"
cd /usr/src/steamlink-sdk/kernel/
make bg2cd_penguin_mlc_defconfig
make menuconfig

Device Drivers > SCSI device support
  • [M] SCSI device support
  • [M] SCSI target support
  • [M] SCSI disk support
  • [M] SCSI OnStream SC-x0 tape support
  • [M] SCSI CDROM support
  • [x] Enable vendor-specific extensions (for SCSI CDROM)
  • [M] SCSI generic support
  • [x] Asynchronous SCSI scanning
  • [M] SCSI Device Handlers
    File systems > CD-ROM/DVD Filesystems
  • [M] ISO 9660 CDROM file system support
  • [x] Microsoft Joliet CDROM extensions
  • [x] Transparent decompresion extension

    make clean && make && make modules

    copied

    /usr/src/steamlink-sdk/kernel/drivers/scsi/device_handler/scsi_dh.ko
    /usr/src/steamlink-sdk/kernel/drivers/cdrom/cdrom.ko
    /usr/src/steamlink-sdk/kernel/drivers/scsi/sr_mod.ko
    /usr/src/steamlink-sdk/kernel/fs/isofs/isofs.ko
    /usr/src/steamlink-sdk/kernel/drivers/scsi/scsi_tgt.ko

    to /mnt/config/modules/ in the steam link

    created /etc/init.d/dvd_drivers.sh in the steam link with

    #!/bin/sh

    insmod /mnt/config/modules/scsi_dh.ko
    insmod /mnt/config/modules/cdrom.ko
    insmod /mnt/config/modules/sr_mod.ko
    insmod /mnt/config/modules/isofs.ko
    insmod /mnt/config/modules/scsi_tgt.ko

    and /etc/init.d/startup/S14dvd_drivers.sh with

    #!/bin/sh

    sh /etc/init.d/dvd_drivers.sh &

    Restarted it and now the player shows up ad /dev/block/sr0

    Going to try to get working a solution with modprobe, the way the modules are loaded might be causing the lag in Kodi.
Thank you.

The steps worked very well, but I needed to add this:

mkdir /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8787/ touch /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8787/Makefile mkdir /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8797/ touch /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8797/Makefile mkdir /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8801/ touch /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8801/Makefile mkdir /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8897/ touch /usr/src/steamlink-sdk/kernel/arch/arm/mach-berlin/modules/wlan_sd8897/Makefile

just before

make clean && make && make modules

Source: https://github.com/excelsi0r/SteamLinkBluetoothKeybordMouseCompanion/wiki/Research#kernel-compilation-not-needed

Now I can explore my DVD disc, but I haven't be able to make Kodi to see it as "Drive" yet, so I'll keep trying.

Unfortunately playing DVDs with Kodi seems to be horribly laggy, but thats another issue.

Looks like steam link doesn't have a dedicated MPEG-2 decoder, so it uses CPU. That happens with Raspberry Pi, but in that case you only have to buy a license.

https://raspberrypi.stackexchange.com/questions/1919/why-does-the-raspberry-pi-need-a-mpeg-2-licence
< >
Showing 1-6 of 6 comments
Per page: 1530 50