
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