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

Side by Side Diff: build_kernel_image.sh

Issue 5612008: Support booting from non zero MMC device numbers (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Helper script that generates the signed kernel image 7 # Helper script that generates the signed kernel image
8 8
9 . "$(dirname "$0")/common.sh" 9 . "$(dirname "$0")/common.sh"
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 kernel_image="${FLAGS_vmlinuz/vmlinuz/vmlinux.uimg}" 213 kernel_image="${FLAGS_vmlinuz/vmlinuz/vmlinux.uimg}"
214 WORK="${WORK} ${kernel_script} ${kernel_script_img}" 214 WORK="${WORK} ${kernel_script} ${kernel_script_img}"
215 215
216 kernel_size=$((($(stat -c %s "${kernel_image}") + 511) / 512)) 216 kernel_size=$((($(stat -c %s "${kernel_image}") + 511) / 512))
217 script_size=16 217 script_size=16
218 218
219 # Build boot script image 219 # Build boot script image
220 echo -n 'setenv bootargs ${bootargs} ' > "${kernel_script}" 220 echo -n 'setenv bootargs ${bootargs} ' > "${kernel_script}"
221 tr '\n' ' ' <"${FLAGS_working_dir}/boot.config" >> "${kernel_script}" 221 tr '\n' ' ' <"${FLAGS_working_dir}/boot.config" >> "${kernel_script}"
222 echo >> "${kernel_script}" 222 echo >> "${kernel_script}"
223 printf 'read ${devtype} 0:${kernelpart} ${loadaddr} %x %x\n' \ 223 printf 'read ${devtype} ${devnum}:${kernelpart} ${loadaddr} %x %x\n' \
224 ${script_size} ${kernel_size} >> "${kernel_script}" 224 ${script_size} ${kernel_size} >> "${kernel_script}"
225 echo 'bootm ${loadaddr}' >> ${kernel_script} 225 echo 'bootm ${loadaddr}' >> ${kernel_script}
226 mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ 226 mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
227 -n kernel_script -d "${kernel_script}" "${kernel_script_img}" 227 -n kernel_script -d "${kernel_script}" "${kernel_script_img}"
228 228
229 if [ $(stat -c %s "${kernel_script_img}") -gt $((512 * ${script_size})) ] 229 if [ $(stat -c %s "${kernel_script_img}") -gt $((512 * ${script_size})) ]
230 then 230 then
231 echo 'Kernel script too large for reserved space.' 231 echo 'Kernel script too large for reserved space.'
232 exit 1 232 exit 1
233 fi 233 fi
(...skipping 17 matching lines...) Expand all
251 info "Cleaning up temporary files: ${WORK}" 251 info "Cleaning up temporary files: ${WORK}"
252 rm ${WORK} 252 rm ${WORK}
253 rmdir ${FLAGS_working_dir} 253 rmdir ${FLAGS_working_dir}
254 fi 254 fi
255 255
256 info "Kernel partition image emitted: ${FLAGS_to}" 256 info "Kernel partition image emitted: ${FLAGS_to}"
257 257
258 if [[ -f ${FLAGS_rootfs_hash} ]]; then 258 if [[ -f ${FLAGS_rootfs_hash} ]]; then
259 info "Root filesystem hash emitted: ${FLAGS_rootfs_hash}" 259 info "Root filesystem hash emitted: ${FLAGS_rootfs_hash}"
260 fi 260 fi
OLDNEW
« 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