OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 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 # Script to build a bootable keyfob-based chromeos system image from within | 7 # Script to build a bootable keyfob-based chromeos system image from within |
8 # a chromiumos setup. This assumes that all needed packages have been built into | 8 # a chromiumos setup. This assumes that all needed packages have been built into |
9 # the given target's root with binary packages turned on. This script will | 9 # the given target's root with binary packages turned on. This script will |
10 # build the Chrome OS image using only pre-built binary packages. | 10 # build the Chrome OS image using only pre-built binary packages. |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 "${PKGDIR}/${CHOST}/cross-${CHOST}"/glibc-${LIBC_VERSION}.tbz2 \ | 230 "${PKGDIR}/${CHOST}/cross-${CHOST}"/glibc-${LIBC_VERSION}.tbz2 \ |
231 -C "$ROOT_FS_DIR" --strip-components=3 \ | 231 -C "$ROOT_FS_DIR" --strip-components=3 \ |
232 --exclude=usr/include --exclude=sys-include --exclude=*.a --exclude=*.o | 232 --exclude=usr/include --exclude=sys-include --exclude=*.a --exclude=*.o |
233 | 233 |
234 # We need to install libstdc++ manually from the cross toolchain. | 234 # We need to install libstdc++ manually from the cross toolchain. |
235 # TODO: Figure out a better way of doing this? | 235 # TODO: Figure out a better way of doing this? |
236 sudo cp -a "${BOARD_ROOT}"/lib/libgcc_s.so* "${ROOT_FS_DIR}/lib" | 236 sudo cp -a "${BOARD_ROOT}"/lib/libgcc_s.so* "${ROOT_FS_DIR}/lib" |
237 sudo cp -a "${BOARD_ROOT}"/usr/lib/libstdc++.so* "${ROOT_FS_DIR}/usr/lib" | 237 sudo cp -a "${BOARD_ROOT}"/usr/lib/libstdc++.so* "${ROOT_FS_DIR}/usr/lib" |
238 | 238 |
239 INSTALL_MASK="" | 239 INSTALL_MASK="" |
240 if [[ $FLAGS_installmask -eq $FLAGS_TRUE ]] ; then | 240 if [[ $FLAGS_installmask -eq $FLAGS_FALSE ]] ; then |
241 INSTALL_MASK="/usr/include/ /usr/man /usr/share/man /usr/share/doc /usr/share/
gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include /usr/share/info /usr/share/a
clocal /usr/lib/gcc /usr/lib/pkgconfig /usr/share/pkgconfig /usr/share/gettext /
usr/share/readline /etc/runlevels /usr/share/openrc /lib/rc *.a *.la" | 241 INSTALL_MASK="$DEFAULT_INSTALL_MASK" |
242 fi | 242 fi |
243 | 243 |
244 if [[ $FLAGS_jobs -ne -1 ]]; then | 244 if [[ $FLAGS_jobs -ne -1 ]]; then |
245 EMERGE_JOBS="--jobs=$FLAGS_jobs" | 245 EMERGE_JOBS="--jobs=$FLAGS_jobs" |
246 fi | 246 fi |
247 | 247 |
248 if [ $FLAGS_statefuldev -eq $FLAGS_TRUE ] ; then | 248 if [ $FLAGS_statefuldev -eq $FLAGS_TRUE ] ; then |
249 # Creating stateful partition. | 249 # Creating stateful partition. |
250 echo "Setting up symlinks for stateful partition install" | 250 echo "Setting up symlinks for stateful partition install" |
251 DEV_IMAGE_ROOT="$STATEFUL_DIR/dev_image" | 251 DEV_IMAGE_ROOT="$STATEFUL_DIR/dev_image" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" | 365 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" |
366 echo "Done. Image created in ${OUTPUT_DIR}" | 366 echo "Done. Image created in ${OUTPUT_DIR}" |
367 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 367 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
368 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" | 368 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" |
369 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 369 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
370 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 370 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
371 echo "from the scripts directory where you entered the chroot." | 371 echo "from the scripts directory where you entered the chroot." |
372 | 372 |
373 trap - EXIT | 373 trap - EXIT |
OLD | NEW |