Hi, I'd like to have my udpcast to eject its CD-ROM before a broadcast so I can pick it and boot another box with it. Yeah I could just push the CD-ROM drive button but I'm a lazy bum. cast-o-matic is a great tool so I though I could just upload eject and call it. Ok eject is overkill, I did a smaller eject that I call miniject:
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <limits.h> #include <sys/ioctl.h> #include <linux/cdrom.h>
#define DEF_CDROM "/dev/cdrom"
int main(int argc, char **argv) { int fd; if (argc > 1) fd = open(argv[1], O_RDONLY|O_NONBLOCK); else fd = open(DEF_CDROM, O_RDONLY|O_NONBLOCK); ioctl(fd, CDROMEJECT); }
But unfortunatly I can't find the cdrom device in /dev. Are there any modules that I should add to the image in order to have the cdrom device created in /dev ?
Yannick Gingras wrote:
Hi, I'd like to have my udpcast to eject its CD-ROM before a broadcast so I can pick it and boot another box with it. Yeah I could just push the CD-ROM drive button but I'm a lazy bum. cast-o-matic is a great tool so I though I could just upload eject and call it. Ok eject is overkill, I did a smaller eject that I call miniject:
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <limits.h> #include <sys/ioctl.h> #include <linux/cdrom.h>
#define DEF_CDROM "/dev/cdrom"
int main(int argc, char **argv) { int fd; if (argc > 1) fd = open(argv[1], O_RDONLY|O_NONBLOCK); else fd = open(DEF_CDROM, O_RDONLY|O_NONBLOCK); ioctl(fd, CDROMEJECT); }
But unfortunatly I can't find the cdrom device in /dev. Are there any modules that I should add to the image in order to have the cdrom device created in /dev ?
In the current version, by default, CD-Rom drivers are not installed (not needed, because the loading of the OS is performed via the BIOS). So, it's currently not possible to do this miniject
Regards,
Alain
Alain Knaff alain@knaff.lu writes:
In the current version, by default, CD-Rom drivers are not installed (not needed, because the loading of the OS is performed via the BIOS). So, it's currently not possible to do this miniject
I don't know much about customizing embeded OSes but how hard would it be to add the cdrom module to ramdisk ?
Do I just need to recompile a kernel with the module builtin ?
Yannick Gingras wrote:
Alain Knaff alain@knaff.lu writes:
In the current version, by default, CD-Rom drivers are not installed (not needed, because the loading of the OS is performed via the BIOS). So, it's currently not possible to do this miniject
I don't know much about customizing embeded OSes but how hard would it be to add the cdrom module to ramdisk ?
Do I just need to recompile a kernel with the module builtin ?
The udpcast kernel already has the ide-cd module, it's just not included on the image.
In order to include it, add --modules ide-cd to the makeImage command line.
I've now added a checkbox to cast-o-matic to add the feature
Regards,
Alain
Alain Knaff alain@knaff.lu writes:
The udpcast kernel already has the ide-cd module, it's just not included on the image.
In order to include it, add --modules ide-cd to the makeImage command line.
I've now added a checkbox to cast-o-matic to add the feature
This is perfect!
Thanks!
: D
Hi Yannick,
i am not really fit in C, but on Linux it's enough to do just an eject without addressing the device. Just type in the bash "eject" and the device will be ejeceted.
On Mi, 2006-06-21 at 18:45 -0400, Yannick Gingras wrote:
Hi, I'd like to have my udpcast to eject its CD-ROM before a broadcast so I can pick it and boot another box with it. Yeah I could just push the CD-ROM drive button but I'm a lazy bum. cast-o-matic is a great tool so I though I could just upload eject and call it. Ok eject is overkill, I did a smaller eject that I call miniject:
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <limits.h> #include <sys/ioctl.h> #include <linux/cdrom.h>
#define DEF_CDROM "/dev/cdrom"
int main(int argc, char **argv) { int fd; if (argc > 1) fd = open(argv[1], O_RDONLY|O_NONBLOCK); else fd = open(DEF_CDROM, O_RDONLY|O_NONBLOCK); ioctl(fd, CDROMEJECT); }
But unfortunatly I can't find the cdrom device in /dev. Are there any modules that I should add to the image in order to have the cdrom device created in /dev ?
Mit freundlichen Grüßen Thomas Kühling
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 22 Jun 2006 at 10:29, Thomas Kuehling wrote:
Subject: Re: [Udpcast] Ejecting the CD-ROM before broadcast From: Thomas Kuehling thomas.kuehling@mapsolute.com To: Yannick Gingras ygingras@ygingras.net Organization: Mapsolute GmbH Date sent: Thu, 22 Jun 2006 10:29:24 +0200 Copies to: udpcast@udpcast.linux.lu Send reply to: thomas.kuehling@mapsolute.com mailto:udpcast-request@udpcast.linux.lu?subject=unsubscribe mailto:udpcast-request@udpcast.linux.lu?subject=subscribe
Hi Yannick,
i am not really fit in C, but on Linux it's enough to do just an eject without addressing the device. Just type in the bash "eject" and the device will be ejeceted.
Later versions of the busybox have the eject as an optoin. I added it to the g4l cd, and use it with a frontend script that is downloaded from the ftp server to automate the process,
On Mi, 2006-06-21 at 18:45 -0400, Yannick Gingras wrote:
Hi, I'd like to have my udpcast to eject its CD-ROM before a broadcast so I can pick it and boot another box with it. Yeah I could just push the CD-ROM drive button but I'm a lazy bum. cast-o-matic is a great tool so I though I could just upload eject and call it. Ok eject is overkill, I did a smaller eject that I call miniject:
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <limits.h> #include <sys/ioctl.h> #include <linux/cdrom.h>
#define DEF_CDROM "/dev/cdrom"
int main(int argc, char **argv) { int fd; if (argc > 1) fd = open(argv[1], O_RDONLY|O_NONBLOCK); else fd = open(DEF_CDROM, O_RDONLY|O_NONBLOCK); ioctl(fd, CDROMEJECT); }
But unfortunatly I can't find the cdrom device in /dev. Are there any modules that I should add to the image in order to have the cdrom device created in /dev ?
Mit freundlichen Grüßen Thomas Kühling
-- Mapsolute Gmbh - Techn. Administration - TK2325-RIPE Düsseldorfer Straße 40a - 65760 Eschborn/Frankfurt a.M. - Germany E-Mail: thomas.kuehling@mapsolute.com - web: http://www.mapsolute.com
Udpcast mailing list Udpcast@udpcast.linux.lu https://lll.lgl.lu/mailman/listinfo/udpcast
+----------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor Guam Community College Computer Center mailto:mikes@kuentos.guam.net mailto:msetzerii@gmail.com http://www.guam.net/home/mikes Guam - Where America's Day Begins +----------------------------------------------------------+
http://setiathome.berkeley.edu Number of Seti Units Returned: 19,471 Processing time: 32 years, 290 days, 12 hours, 58 minutes (Total Hours: 287,489)
BOINC Seti@Home Total Credits 1288277.115071
Thomas Kuehling thomas.kuehling@mapsolute.com writes:
i am not really fit in C, but on Linux it's enough to do just an eject without addressing the device. Just type in the bash "eject" and the device will be ejeceted.
miniject is actually a striped down version of eject. eject has many options to unmount and to eject stuff like floppies and tapes. When you remove all of it, you get miniject.