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

Issue 5974003: update_kernel: add support for modules and firmware (Closed)

Created:
10 years ago by Olof Johansson
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

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

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -0 lines) Patch
M update_kernel.sh View 2 chunks +24 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Olof Johansson
This isn't perfect -- it assumes that you've got a writeable root fs (i.e. --noenable_rootfs_verification), ...
10 years ago (2010-12-21 22:14:31 UTC) #1
Mandeep Singh Baines
10 years ago (2010-12-21 23:45:35 UTC) #2
LGTM

olofj@chromium.org (olofj@chromium.org) wrote:
> Reviewers: Mandeep Singh Baines,
> 
> Message:
> This isn't perfect -- it assumes that you've got a writeable root fs (i.e.
> --noenable_rootfs_verification), but just as the previous version
> without any
> support, it's a step in the right direction. :-)
> 
> 
> Description:
> update_kernel: add support for modules and firmware
> 
> Change-Id: I7b38b5f9656bd21f6c88c5385c1aa0c526f48294
> Signed-off-by: Olof Johansson <olofj@chromium.org>
> 
> BUG=none
> TEST=build kernel and firmware, update a mario
> 
> Please review this at http://codereview.chromium.org/5974003/
> 
> SVN Base: ssh://git@gitrw.chromium.org:9222/crosutils.git
> 
> Affected files:
>   M update_kernel.sh
> 
> 
> 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
> 
> 

Powered by Google App Engine
This is Rietveld 408576698