Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: update_kernel.sh

Issue 5974003: update_kernel: add support for modules and firmware (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_kernel.sh
diff --git a/update_kernel.sh b/update_kernel.sh
index 4166709aea65be6fabd654f08f1bdbfeca25635e..b5e26d3198c1ea6aa20a9a5a8eb50dadc985f9da 100755
--- a/update_kernel.sh
+++ b/update_kernel.sh
@@ -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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698