Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: tatemono on May 17, 2016, 12:40:22 PM
-
[my H/W]
(1) RPi: Raspberry Pi 3 Model B
(2) USB DVD drive: PIONEER DVD-RW DVR-XD11T
[O.S.] TC 7.1 beta 4 with the following 3 modifications:
(1) add "dtparam=audio=on" to config.txt
(2) comment out "dtparam=i2c=on,spi=on,i2s=on,i2c_vc=on" in config.txt
(3) tce-load -w -i alsa-config.tcz
-----
After connecting my USB DVD drive with a data CD loaded, the symbolic link /dev/cdrom and /dev/dvd did not be created.
I was sure that TC detected my USB DVD drive because of the messages produced by dmesg.
tc@box:/mnt/mmcblk0p2/tce$ dmesg | tail
[ 2319.019433] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[ 2319.120794] usb 1-1.5: New USB device found, idVendor=08e4, idProduct=016e
[ 2319.120812] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2319.120826] usb 1-1.5: Product: Pioneer external optical drive
[ 2319.120839] usb 1-1.5: Manufacturer: Pioneer Corporation
[ 2319.120851] usb 1-1.5: SerialNumber: NDQC062521WL
[ 2319.121667] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[ 2319.121990] scsi host1: usb-storage 1-1.5:1.0
[ 2320.120574] scsi 1:0:0:0: CD-ROM PIONEER DVD-RW DVR-XD11 1.00 PQ: 0 ANSI: 0
[/font]
I tried to mount the data CD by using /dev/sr0 or /dev/sr1 and failed.
tc@box:/mnt/mmcblk0p2/tce$ mkdir /tmp/DATA
tc@box:/mnt/mmcblk0p2/tce$ sudo mount /dev/sr0 /tmp/DATA
mount: /dev/sr0 is not a valid block device
tc@box:/mnt/mmcblk0p2/tce$ sudo mount /dev/sr1 /tmp/DATA
mount: /dev/sr1 is not a valid block device
[/font]
I do not know how to use my USB DVD drive to read the loaded data CD. Could you please give me some ideas of solving this problem?
Thank you in advance.
-
There should also be messages like these:
sr 3:0:0:0: [sr0] scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
cdrom: Uniform CD-ROM driver Revision: 3.20
sr 3:0:0:0: Attached scsi CD-ROM sr0
I guess the sr driver - cdrom drive support - is disabled in the pi kernel. It is rather unexpected to use with a pi, to me at least.
-
The DVD drive was identified, but not enumerated as a storage device. You need the driver for it, at least cdrom.ko.gz and may be some scsi, or sometimes firmware.
Search here: http://www.tinycorelinux.net/7.x/armv7/releases/RPi2/src/kernel/4.1.20-piCore_v7+_modules.tar.xz and test.
-
I am very thankful to everyone who gave me ideas of solving this problem.
Well, it seems that TC 7.1 beta 4 does not have drivers to support USB DVD drives. Unfortunately, I do not know how to build the missing drivers from Linux kernel source code. I have to wait until TC is capable of supporting USB DVD drives.
-
Does it work with Raspbian? If so, can you tell which kernel modules used?
-
Does it work with Raspbian?
My USB DVD drive works well with Raspbian. The version of Raspbian I just tried is "Raspbian Jessie Lite May 2016."
If so, can you tell which kernel modules used?
lsmod did not show sg, sr_mod and cdrom until USB DVD drive was connected. It seems that sg, sr_mod and cdrom are the CDROM/DVD-related kernel modules. Please refer to the following commands for details.
/* MY USB DVD DRIVE WAS NOT PLUGGED. */pi@raspberrypi:~ $ lsmod | tee /tmp/LSMOD_BEFORE
Module Size Used by
bnep 10340 2
hci_uart 17943 1
btbcm 5929 1 hci_uart
bluetooth 326105 22 bnep,btbcm,hci_uart
brcmfmac 186599 0
brcmutil 5661 1 brcmfmac
cfg80211 427855 1 brcmfmac
rfkill 16037 4 cfg80211,bluetooth
snd_bcm2835 20511 0
snd_pcm 75698 1 snd_bcm2835
snd_timer 19160 1 snd_pcm
bcm2835_wdt 3225 0
snd 51844 3 snd_bcm2835,snd_timer,snd_pcm
bcm2835_gpiomem 3040 0
uio_pdrv_genirq 3164 0
uio 8000 1 uio_pdrv_genirq
ipv6 347530 30
pi@raspberrypi:~ $ ls -l /dev/{cdrom,dvd,sr*}
ls: cannot access /dev/cdrom: No such file or directory
ls: cannot access /dev/dvd: No such file or directory
ls: cannot access /dev/sr*: No such file or directory
[/font]
/* MY USB DVD DRIVE WAS PLUGGED. */pi@raspberrypi:~ $ dmesg | tail -15
[ 12.444506] Bluetooth: BNEP filters: protocol multicast
[ 12.444519] Bluetooth: BNEP socket layer initialized
[ 151.417491] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
[ 151.518853] usb 1-1.5: New USB device found, idVendor=08e4, idProduct=016e
[ 151.518875] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 151.518888] usb 1-1.5: Product: Pioneer external optica\xffffffe2\xffffff81\xffffffac\xffffffe6\xffffff90\xffffff80\xffffffe7\xffffff88\xffffff80\xffffffe6\xffffffa4\xffffff80\xffffffe7\xffffff98\xffffff80\xffffffe6\xffffff94\xffffff80\xffffffe2\xffffff88\xffffff80
[ 151.518912] usb 1-1.5: Manufacturer: Pioneer Corporation
[ 151.518924] usb 1-1.5: SerialNumber: NDQC062521WL
[ 151.519865] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[ 151.522756] scsi host0: usb-storage 1-1.5:1.0
[ 152.518639] scsi 0:0:0:0: CD-ROM PIONEER DVD-RW DVR-XD11 1.00 PQ: 0 ANSI: 0
[ 152.537394] sr 0:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[ 152.537414] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 152.538368] sr 0:0:0:0: Attached scsi CD-ROM sr0
[ 152.543880] sr 0:0:0:0: Attached scsi generic sg0 type 5
pi@raspberrypi:~ $ ls -l /dev/{cdrom,dvd,sr*}
lrwxrwxrwx 1 root root 3 May 19 15:31 /dev/cdrom -> sr0
lrwxrwxrwx 1 root root 3 May 19 15:31 /dev/dvd -> sr0
brw-rw---- 1 root cdrom 11, 0 May 19 15:31 /dev/sr0
pi@raspberrypi:~ $ lsmod | tee /tmp/LSMOD_AFTER
Module Size Used by
sg 18319 0
sr_mod 13220 0
cdrom 27410 1 sr_mod
bnep 10340 2
hci_uart 17943 1
btbcm 5929 1 hci_uart
bluetooth 326105 22 bnep,btbcm,hci_uart
brcmfmac 186599 0
brcmutil 5661 1 brcmfmac
cfg80211 427855 1 brcmfmac
rfkill 16037 4 cfg80211,bluetooth
snd_bcm2835 20511 0
snd_pcm 75698 1 snd_bcm2835
snd_timer 19160 1 snd_pcm
bcm2835_wdt 3225 0
snd 51844 3 snd_bcm2835,snd_timer,snd_pcm
bcm2835_gpiomem 3040 0
uio_pdrv_genirq 3164 0
uio 8000 1 uio_pdrv_genirq
ipv6 347530 30
pi@raspberrypi:~ $ mkdir /tmp/DATA
pi@raspberrypi:~ $ sudo mount -t iso9660 /dev/cdrom /tmp/DATA
mount: /dev/sr0 is write-protected, mounting read-only
pi@raspberrypi:~ $ mount | grep /tmp/DATA
/dev/sr0 on /tmp/DATA type iso9660 (ro,relatime)
pi@raspberrypi:~ $ diff /tmp/LSMOD_BEFORE /tmp/LSMOD_AFTER
2a3,5
> sg 18319 0
> sr_mod 13220 0
> cdrom 27410 1 sr_mod
[/font]
By the way, I found a difference between Raspbian and TC in /dev/sr*. In Raspbian, /dev/sr* does not exist until USB DVD drive is connected. In TC 7.1 beta4, there are /dev/sr0 and /dev/sr1 after booting.
Thank you, bmarkus.
-
sg.ko, sr_mod.ko and cdrom.ko kernel modules are not part of the base but built. For 7.x armv7 you can find them in this file:
http://tinycorelinux.net/7.x/armv7/releases/RPi2/src/kernel/4.1.13-piCore_v7+_modules.tar.xz
-
That's what I've stated and wrote before. cdrom and scsi drivers.
BTW, the latest is this: http://tinycorelinux.net/7.x/armv7/releases/RPi2/src/kernel/4.1.20-piCore_v7+_modules.tar.xz
And how to build the extension, look in the wiki, or corebook: http://tinycorelinux.net/book.html.
-
sg.ko, sr_mod.ko and cdrom.ko kernel modules are not part of the base but built.
@bmarkus
Being a HTPC is one of the major applications of a RPi. A DVD/CD-ROM drive is one of the audio/video sources of a HTPC.
Furthermore, USB DVD/CD-ROM drives are not uncommon devices, they are popular. If TC supports USB DVD/CD-ROM drives, more RPi users can benefit from TC.
Could you please add "USB DVD/CD-ROM drive support issue" to your TO-DO list?
Thank you.
-
BTW, the latest is this: http://tinycorelinux.net/7.x/armv7/releases/RPi2/src/kernel/4.1.20-piCore_v7+_modules.tar.xz
And how to build the extension, look in the wiki, or corebook: http://tinycorelinux.net/book.html.
[UPDATE MY LAST POST]
@bmarkus
Thanks to jgrulich's hint, I created TCZ file supporting USB DVD/CD-ROM drive successfully.
If you are too busy to add "USB DVD/CD-ROM drive supprt" to your TO-DO list, it is okay because creating such TCZ file is unexpectedly easy.
For those who need USB DVD/CD-ROM support, please do the following steps.
[1] download 4.1.20-piCore_v7+_modules.tar.xz
mkdir /tmp
cd /tmp
wget http://tinycorelinux.net/7.x/armv7/releases/RPi2/src/kernel/4.1.20-piCore_v7+_modules.tar.xz
[2] extract drivers
4 drivers are needed. isofs.ko is for mounting ISO9660 dics. The other 3 drivers are for USB DVD/CD-ROM drive.
tar /tmp/tJf 4.1.20-piCore_v7+_modules.tar.xz > /tmp/_MODULES
mkdir /tmp/DATA
cd /tmp/DATA
tar xJf /tmp/4.1.20-piCore_v7+_modules.tar.xz `grep sg.ko /tmp/_MODULES`
tar xJf /tmp/4.1.20-piCore_v7+_modules.tar.xz `grep sr_mod.ko /tmp/_MODULES`
tar xJf /tmp/4.1.20-piCore_v7+_modules.tar.xz `grep cdrom.ko /tmp/_MODULES`
tar xJf /tmp/4.1.20-piCore_v7+_modules.tar.xz `grep isofs.ko /tmp/_MODULES`
[3] create TCZ file
tce-load -w squashfs-tools.tcz
tce-load -i squashfs-tools.tcz
cd /tmp
mksquashfs DATA /tmp/cdrom_and_isofs_drivers.tcz
[4] update onboot.txt
cp -p /tmp/cdrom_and_isofs_drivers.tcz /mnt/mmcblk0p2/tce/optional
echo cdrom_and_isofs_drivers.tcz >> /etc/sysconfig/tcedir/onboot.lst
[5] reboot
---------------------
MANY THANKS TO THOSE WHO REPLIED THIS TOPIC.
-
isofs.ko is provided by filesystems-KERNEL.tcz which must be a dependency of your custom kernel package.
Also follow TC naming standard for kernel modules, add kernel version to identify related kernel version.
-
isofs.ko is provided by filesystems-KERNEL.tcz which must be a dependency of your custom kernel package.
Also follow TC naming standard for kernel modules, add kernel version to identify related kernel version.
@bmarkus
I am sorry that I did not know isofs.ko has been provided by filesystems-KERNEL.tcz.
Thank you for pointing out that my custom TCZ filename does not follow TC's naming convention.
Actually, I am a newbie of TC because I did not use it until 2 weeks ago. So, I still have a lot of things and knowledge about TC to learn. Thank you for giving me information and advice.