serial line - file interface
Hello.
I hope that this will be interesting for you...
I'm making some experiments with embedde OS, currently with RTEMS on i386. I use some PC (to hand) for my tests and got to the problem with booting. See, it's just to much time for each boot! So I made some changes to grub to be able to boot images from the serial line. I know that there are better sulutions for this problem but maybe this can help on some way to the grub project. There is a new command 'comload' - it's a bit silly but that's Ok for me. That's what I have used first... before the idea for the `(com)' device.
The patch to release 1.92 can be found here:
http://81.161.251.159/pub/grub/grub-1.92-comio.patch
and that's the changelog entry:
+2005-02-03 Kiril Paunov <[email protected]> +
+ * util/i386/pc/grub-install.in: Found an syntaxis error.
+
+ * commands/comload: New command for serial data download.
+ I's a bit ~~~ but can be usefull for people that work with
+ embedded systems.
+
+ * util/grub-comiosrv.c: Server program for the `(com)' interface
+ (See bellow include/grub/comio.h io/comio.c).
+
+ * include/grub/comio.h io/comio.c: New file interface.
+ This allows to download and boot ower the serial line.
+ I't usefull for people that work with embedded systems.
+ It's not very good covered by the file interface but i't
+ works well. There is not a good abstraction for this kind
+ off filesystem (net/serial/???)!!!
+ Example:
+ grub.cfg:
+ #
+ # serial --unit=1 --speed=9600 --word=8 --parity=no --stop=1
+ # terminal serial
+ #
+ Host: on /dev/ttyS0
+ #
+ # ./grub-comiosrv -b 115200 /dev/ttyS0
+ #
+ Host: on /dev/ttyS1
+ #
+ # > multiboot (com)/0-115200-n-8-1-my_test_image
+ # > boot
+ #
+ The sintax is:
+ `(com)/<name>'
+ `<name>' = <unit>-<baud>-<parity>-<databits>-<stopbits>-<file-name>
+ `<unit>' = <0|1> - comm port
+ `<baud>' = <xxxx> - valid baud rate
+ `<parity>' = <n|e|o> + `<databits>' = <5|6|7|8> + `<stopbits>' = <1|2>
+ <file-name>' = file name on the host relative to grub-comiosrv'
+ Protocol:
+ Request_A: `[my_test_image]'
+ Respons_A: `[<size>]'
+ Request_B: `[my_test_image:<start>:<length>]'
+ Request_B: `[<data-length>]<data>'
+
+ Enjoy yourself!
Signature · 6 lines
With respect & pleasure
Kiril Paunov
--
________________________
http://mail.tu-sofia.bg/Quoted 1 line · Kiril Paunov
I hope that this will be interesting for you...
Great. :)
Quoted 8 lines
I'm making some experiments with embedde OS, currently with RTEMS on i386. I use some PC (to hand) for my tests and got to the problem with booting. See, it's just to much time for each boot! So I made some changes to grub to be able to boot images from the serial line. I know that there are better sulutions for this problem but maybe this can help on some way to the grub project. There is a new command 'comload' - it's a bit silly but that's Ok for me. That's what I have used first... before the idea for the `(com)' device.
I'd like to ask why you invented your own protocol. Why don't you use an existing protocol, for example, Kermit?
Review
Quoted 6 lines
(quoted diff) +6
-0+ * include/grub/comio.h io/comio.c: New file interface. + This allows to download and boot ower the serial line. + I't usefull for people that work with embedded systems. + It's not very good covered by the file interface but i't + works well. There is not a good abstraction for this kind + off filesystem (net/serial/???)!!!
This should be handled by the network device layer. Actually, the purpose of "net" devices in GRUB 2 is to support all non-disk devices.
Okuji
Would it be hard to implement SLIP driver in existing network code?
Quoted 33 lines · Kiril Paunov
Quoted 1 line
I hope that this will be interesting for you...
Great. :)
Quoted 5 lines
I'm making some experiments with embedde OS, currently with RTEMS on i386.
I use some PC (to hand) for my tests and got to the problem with booting.
See, it's just to much time for each boot! So I made some changes toQuoted 8 lines
grub
to be able to boot images from the serial line. I know that there are better sulutions for this problem but maybe this can help on some way to the grub project. There is a new command 'comload' - it's a bit silly but
that's Ok for me. That's what I have used first... before the idea for the
`(com)' device.I'd like to ask why you invented your own protocol. Why don't you use an existing protocol, for example, Kermit?
Quoted 6 lines
+ *
include/grub/comio.hio/comio.c: New file interface.
+ This allows to download and boot ower the serial line.
+ I't usefull for people that work with embedded systems.
+ It's not very good covered by the file interface but i't
+ works well. There is not a good abstraction for this kind
+ off filesystem (net/serial/???)!!!This should be handled by the network device layer. Actually, the purpose of
"net" devices in GRUB 2 is to support all non-disk devices.
Quoted 8 lines
Okuji
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
---------------------------------------------------------------------------
o Lubomir Kundrak
°O° <[email protected]>, http://skosi.org/~lkundrak/
(_) SKOSI -- Slovak OpenSource Initiative
---------------------------------------------------------------------------
Quoted 1 line · Lubomir Kundrak
Would it be hard to implement SLIP driver in existing network code?
At the moment I am working on networking support. It would be easy to support SLIP, I think.
--
Marco
Quoted 2 lines · Yoshinori K. Okuji
I'd like to ask why you invented your own protocol. Why don't you use an existing protocol, for example, Kermit?
Invention saves a lot of time :-). I had to hurry!
But you are right the protocol shoud be standart and supported by the softuare of many peopel. I tryed to do this by implementing the interfce to the device level and the file system abstraction but it got hard (on the file open method... the net devices abstraction have seen a bit not finished). So... the 'invention' ;-).
Quoted 2 lines
This should be handled by the network device layer. Actually, the purpose of "net" devices in GRUB 2 is to support all non-disk devices.
I don't have very much free time but i'm interested on this and try to keep in tack with the development. I think the net interface may have not to be the same for all net devices. But i don't have a solution for this.
It may be that i'm seeing old source so if this is not on place - sorry.
Thanks again for the RE
Kiril Paunov
________________________
http://mail.tu-sofia.bg/