I would like to use uboot to probe the I2C bus and record the existence of a device. If the device is there, I would like to change some boot parameters.
The command I would like to run is something like
if i2c probe = 5C; then setenv otherbootargs 'do stuff if device'; else setenv otherbootargs 'do stuff if no device'; fi
But this obviously won't work. I don't know how to make uboot evaluate the conditional 'if' statement based on the return value of the i2c probe command. Is this even possible? How might I make it work?