mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 14:01:43 +01:00
update_kernel: add support for modules and firmware
Change-Id: I7b38b5f9656bd21f6c88c5385c1aa0c526f48294 Signed-off-by: Olof Johansson <olofj@chromium.org> BUG=n0ne TEST=build kernel and firmware, update a mario Review URL: http://codereview.chromium.org/5974003
This commit is contained in:
parent
4e32890c9b
commit
5a46bfb321
@ -14,6 +14,8 @@
|
||||
|
||||
DEFINE_string board "" "Override board reported by target"
|
||||
DEFINE_string partition "" "Override kernel partition reported by target"
|
||||
DEFINE_boolean modules false "Update modules on target"
|
||||
DEFINE_boolean firmware false "Update firmware on target"
|
||||
|
||||
function cleanup {
|
||||
cleanup_remote_access
|
||||
@ -74,6 +76,28 @@ function main() {
|
||||
|
||||
remote_sh dd if=/tmp/new_kern.bin of="${FLAGS_partition}"
|
||||
|
||||
if [[ ${FLAGS_modules} -eq ${FLAGS_TRUE} ]]; then
|
||||
echo "copying modules"
|
||||
cmd="tar -C /build/${FLAGS_board}/lib/modules -cjf new_modules.tar ."
|
||||
./enter_chroot.sh -- ${cmd}
|
||||
|
||||
remote_cp_to new_modules.tar /tmp/
|
||||
|
||||
remote_sh mount -o remount,rw /
|
||||
remote_sh tar -C /lib/modules -xjf /tmp/new_modules.tar
|
||||
fi
|
||||
|
||||
if [[ ${FLAGS_firmware} -eq ${FLAGS_TRUE} ]]; then
|
||||
echo "copying firmware"
|
||||
cmd="tar -C /build/${FLAGS_board}/lib/firmware -cjf new_firmware.tar ."
|
||||
./enter_chroot.sh -- ${cmd}
|
||||
|
||||
remote_cp_to new_firmware.tar /tmp/
|
||||
|
||||
remote_sh mount -o remount,rw /
|
||||
remote_sh tar -C /lib/firmware -xjf /tmp/new_firmware.tar
|
||||
fi
|
||||
|
||||
remote_reboot
|
||||
|
||||
remote_sh uname -r -v
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user