In order to support multiple control boards make all operations follow
indirections in the device context.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
We're not dereferencing the cdb pointer, so make it void * in order to
support alternative controllers.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Boards implementing a/b partitioning even for fastboot boot might
sometimes expire the counter and fail the boot. By always setting the
active image to 'a' we're catching this case and flipping it back, and
in other cases the operation becomes a nop.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
On Ubuntu the library link directive must come last for the libudev
references to be satisfied.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
In some occations dev_path is not valid and we therefor can't
dereference it. Check for this and ignore any events without a dev_path.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Register the stdin pipe with the write fdset in order to know when it's
appropriate to send commands over the pipe.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>