update_kernel: Iterate over all kernel releases for depmod

This code intends to run depmod on all the different versions of kernel
modules in /lib/modules/ on the DUT. If there's more than one release in
that directory we'll end up in a situation where the REMOTE_OUT variable
contains space separated kernel versions and then the depmod command
won't be run. Let's create an array out of the REMOTE_OUT variable and
then iterate over the elements in the array instead so that we always
run depmod on all kernel releases.

BUG=None
TEST=Run update_kernel on a DUT with many directories in /lib/modules
and see the loop run many times in this script with the proper directory
each time

Change-Id: I9a7b3c534f9669950fb1c9362bfb31cfa2d8855c
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1724860
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
1 file changed