OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script modifies a base image to act as a recovery installer. | 7 # This script modifies a base image to act as a recovery installer. |
8 # If no kernel image is supplied, it will build a devkeys signed recovery | 8 # If no kernel image is supplied, it will build a devkeys signed recovery |
9 # kernel. Alternatively, a signed recovery kernel can be used to | 9 # kernel. Alternatively, a signed recovery kernel can be used to |
10 # create a Chromium OS recovery image. | 10 # create a Chromium OS recovery image. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 echo "$out" | 168 echo "$out" |
169 } | 169 } |
170 | 170 |
171 emerge_recovery_kernel() { | 171 emerge_recovery_kernel() { |
172 echo "Emerging custom recovery initramfs and kernel" | 172 echo "Emerging custom recovery initramfs and kernel" |
173 local emerge_flags="-uDNv1 --usepkg=n --selective=n" | 173 local emerge_flags="-uDNv1 --usepkg=n --selective=n" |
174 | 174 |
175 $EMERGE_BOARD_CMD \ | 175 $EMERGE_BOARD_CMD \ |
176 $emerge_flags --binpkg-respect-use=y \ | 176 $emerge_flags --binpkg-respect-use=y \ |
177 chromeos-initramfs || die "no initramfs" | 177 chromeos-initramfs || die "no initramfs" |
178 USE="initramfs" $EMERGE_BOARD_CMD \ | 178 USE="fbconsole initramfs" $EMERGE_BOARD_CMD \ |
179 $emerge_flags --binpkg-respect-use=y \ | 179 $emerge_flags --binpkg-respect-use=y \ |
180 virtual/kernel | 180 virtual/kernel |
181 } | 181 } |
182 | 182 |
183 create_recovery_kernel_image() { | 183 create_recovery_kernel_image() { |
184 local sysroot="${FLAGS_build_root}/${FLAGS_board}" | 184 local sysroot="${FLAGS_build_root}/${FLAGS_board}" |
185 local vmlinuz="$sysroot/boot/vmlinuz" | 185 local vmlinuz="$sysroot/boot/vmlinuz" |
186 local root_dev=$(sudo losetup -f) | 186 local root_dev=$(sudo losetup -f) |
187 local root_offset=$(partoffset "$FLAGS_image" 3) | 187 local root_offset=$(partoffset "$FLAGS_image" 3) |
188 local root_size=$(partsize "$FLAGS_image" 3) | 188 local root_size=$(partsize "$FLAGS_image" 3) |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 | 449 |
450 trap cleanup EXIT | 450 trap cleanup EXIT |
451 | 451 |
452 maybe_resize_stateful # Also copies the image if needed. | 452 maybe_resize_stateful # Also copies the image if needed. |
453 | 453 |
454 install_recovery_kernel | 454 install_recovery_kernel |
455 | 455 |
456 echo "Recovery image created at $RECOVERY_IMAGE" | 456 echo "Recovery image created at $RECOVERY_IMAGE" |
457 print_time_elapsed | 457 print_time_elapsed |
458 trap - EXIT | 458 trap - EXIT |
OLD | NEW |