[U-Boot] Bootoloader remote automation

Hi all,
I would like to automate the kernel and filesystem loading using the u-boot instructions. Basically, I would start the loading process from a remote system such as a pc computer for example, and then take some actions depending of the log this pc would receive from the target. Is there a way to make the u-boot to send some logs to the remote system telling if the image was succesfully loaded or not so, with this information, the remote system could create a log that would telll the operator about the procedure situation for example?
Thanks in advance and best regards
Pet harp

-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Pet Harp Sent: Thursday, May 27, 2010 7:12 PM To: u-boot@lists.denx.de Subject: [U-Boot] Bootoloader remote automation
Hi all,
I would like to automate the kernel and filesystem loading using the u-boot instructions. Basically, I would start the loading process from a remote system such as a pc computer for example, and then take some actions depending of the log this pc would receive from the target. Is there a way to make the u-boot to send some logs to the remote system telling if the image was succesfully loaded or not so, with this information, the remote system could create a log that would telll the operator about the procedure situation for example?
You can check/use netconsole feature within u-boot for this. You can search for for pxeboot and check if it is applicable in your case
Regards.. Prafulla . .
Thanks in advance and best regards
Pet harp

Dear Pet Harp,
In message AANLkTikGRQXjJ_6QIGXAuEu-EXdyqLsq5PMVaLL1w0WI@mail.gmail.com you wrote:
I would like to automate the kernel and filesystem loading using the u-boot instructions.
No problem. This has been done many, many times before, including completely automatic production systems.
Basically, I would start the loading process from a remote system such as a pc computer for example, and then take some actions depending of the log this pc would receive from the target. Is there a way to make the u-boot to send some logs to the remote system telling if the image was succesfully loaded or not so, with this information, the remote system could create a log that would telll the operator about the procedure situation for example?
The standard tool to do things like these is "expect"; in the trivial case (without the usually needed error checking) this results in expect scripts like this:
send -s "setenv serial# $serial\r" expect "=>" send -s "setenv ethaddr $ethaddr\r" expect "=>" send -s "saveenv\r" expect "=>" send -s "setenv preboot 'echo;echo Type \\"run flash_nfs\\" to mount root filesystem over NFS;echo'\r" expect "=>" send -s "setenv nfsargs 'setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}'\r" expect "=>" send -s "setenv ramargs setenv bootargs root=/dev/ram rw\r" expect "=>" ... send -s "setenv ipaddr $TARGET_IP\r" expect "=>" send -s "setenv netmask $NETMASK\r" expect "=>" send -s "setenv netdev eth0\r" expect "=>" send -s "setenv hostname $HOSTNAME\r" expect "=>" send -s "setenv serverip $SERVER_IP\r" expect "=>"
Best regards,
Wolfgang Denk
participants (3)
-
Pet Harp
-
Prafulla Wadaskar
-
Wolfgang Denk