Re: [U-Boot-Users] 'Syslog implementation in u-boot'

[Please keep this discussion on the mailing list so it gets archived and others can benefit from it, too.]
In message 36446.202.62.67.130.1116316510.squirrel@202.62.67.130 you wrote:
Suppose if any currepted image exists in server,u-boot downloads this currepted file into embedded system flash.
If it's a corruption that happened on the way of copying and transferring images, then the CRC32 checksum mechanism can be used to prevent you from storing corrupted images in the flash at all. Just use the "imi" command before storing the image to flash, somthing like
tftp ... && imi && cp.b ...
[assuming you have the hish shell enabled, which you should have for such purposes.]
Once we reset the embdded system kernel may not comeup. To overcome this we have made some changes to u-boot to get images from externel server when it finds kernel is not OK. But this is contineous loop .
There is no need for this. U-Boot supports a boot counter which can be used to break out of tsuch a loop. It was implemented EXACTLY for this purpose. See the "bootcnt", "bootlimit" and "altbootcmd" environment variables.
With this we can solve problem, but we may complete FALSH write cycles(if it works contineously for day/two).
Don't do it, then ;-)
It it does not get, then it should send a log message to external system(where the syslog server is running).so that user can see the message and plase the correct iamge in tftp server.
You can use simple console redirection in U-Boot for this purpose. We support console over network.
Summarizing: there is no need to implement anything at all: all features you might need are already in place. The only exception is that the CPU dependent part of the bootcount feature is not available on all processors yet, but it is trivial to implement.
Best regards,
Wolfgang Denk

Dear Denk,
Thanks for spending time on this issue.
I think console redirection over the network is the solution for my problem.
kindly let me know the libraries to be used to configure console redirection and is it possible to send this messages to a specified system(syslog server).
Thnaks & Regards Nagi
[Please keep this discussion on the mailing list so it gets archived and others can benefit from it, too.]
In message 36446.202.62.67.130.1116316510.squirrel@202.62.67.130 you wrote:
Suppose if any currepted image exists in server,u-boot downloads this currepted file into embedded system flash.
If it's a corruption that happened on the way of copying and transferring images, then the CRC32 checksum mechanism can be used to prevent you from storing corrupted images in the flash at all. Just use the "imi" command before storing the image to flash, somthing like
tftp ... && imi && cp.b ...
[assuming you have the hish shell enabled, which you should have for such purposes.]
Once we reset the embdded system kernel may not comeup. To overcome this we have made some changes to u-boot to get images from externel server when it finds kernel is not OK. But this is contineous loop .
There is no need for this. U-Boot supports a boot counter which can be used to break out of tsuch a loop. It was implemented EXACTLY for this purpose. See the "bootcnt", "bootlimit" and "altbootcmd" environment variables.
With this we can solve problem, but we may complete FALSH write cycles(if it works contineously for day/two).
Don't do it, then ;-)
It it does not get, then it should send a log message to external system(where the syslog server is running).so that user can see the message and plase the correct iamge in tftp server.
You can use simple console redirection in U-Boot for this purpose. We support console over network.
Summarizing: there is no need to implement anything at all: all features you might need are already in place. The only exception is that the CPU dependent part of the bootcount feature is not available on all processors yet, but it is trivial to implement.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Wenn das dann in die Hose geht, nehme ich es auf meine Kappe. -- Rudi Völler, 15. Nov 2003

In message 37122.202.62.67.130.1116319835.squirrel@202.62.67.130 you wrote:
kindly let me know the libraries to be used to configure console redirection and is it possible to send this messages to a specified system(syslog server).
How about reading the documentation? Have a look at the contents of the doc/ directory...
Best regards,
Wolfgang Denk

Hi Denk, I got it done sending messages to syslog server on port number 514.
I used the below functions to implemant this concept. NetSetEther (NetTxPacket, ether, PROT_IP); NetSetIP (NetTxPacket + ETHER_HDR_SIZE, dest, dport, sport, len=75); (void) eth_send(NetTxPacket, ETHER_HDR_SIZE + IP_HDR_SIZE + len);
In responce to syslog message my external server is going to send some message through UDP protocol to my embedded system.
I would like to know how do i read UDP data in u-boot.
Please help me out in this regard.
Thanks in advance.
Nagi
In message 37122.202.62.67.130.1116319835.squirrel@202.62.67.130 you wrote:
kindly let me know the libraries to be used to configure console redirection and is it possible to send this messages to a specified system(syslog server).
How about reading the documentation? Have a look at the contents of the doc/ directory...
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.

In message 32816.202.62.67.130.1116488981.squirrel@202.62.67.130 you wrote:
I got it done sending messages to syslog server on port number 514.
Fine.
I would like to know how do i read UDP data in u-boot.
You call NetLoop() with the correct protocol as parameter; probably you will have to extend NetLoop() for this purpose.
Best regards,
Wolfgang Denk
participants (2)
-
nreddy@netenrich.com
-
Wolfgang Denk