diff options
author | Daniel Drake <dsd@laptop.org> | 2010-08-09 19:25:32 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2010-08-09 19:25:32 (GMT) |
commit | 89895c957b8835fd708a550ccdfa8a2ea61e8a36 (patch) | |
tree | 2dc801fc3fb9a141300e834a43fd3ff1f286a551 /modules | |
parent | 13b2c3427c08442586d92c838daffadb2c876e01 (diff) |
Add usb_update module for olpc-update --usb
Diffstat (limited to 'modules')
-rw-r--r-- | modules/usb_update/README | 10 | ||||
-rw-r--r-- | modules/usb_update/image.60.makeusb.sh | 18 |
2 files changed, 28 insertions, 0 deletions
diff --git a/modules/usb_update/README b/modules/usb_update/README new file mode 100644 index 0000000..ef70133 --- /dev/null +++ b/modules/usb_update/README @@ -0,0 +1,10 @@ +This module creates produces an output file named osXX.usb. This file can +be used with the command "olpc-update --usb" to update the software on a +laptop. + +This module requires the versioned_fs option in the base module to be enabled. +(the update system revolves around the fact that a versioned fs is used) + +The .usb file is actually an ISO image in disguise. In the future, we should +enable squashfs in the XO kernel and distribute a squashfs image instead. + diff --git a/modules/usb_update/image.60.makeusb.sh b/modules/usb_update/image.60.makeusb.sh new file mode 100644 index 0000000..03e3907 --- /dev/null +++ b/modules/usb_update/image.60.makeusb.sh @@ -0,0 +1,18 @@ +# Copyright (C) 2010 One Laptop Per Child +# Licensed under the terms of the GNU GPL v2 or later; see COPYING for details. + +. $OOB__shlib +majver=$(read_config global olpc_version_major) +minver=$(read_config global olpc_version_minor) +relver=$(read_config global olpc_version_release) +versioned_fs=$(read_config base versioned_fs) +buildnr=$(read_buildnr) + +if [ "$versioned_fs" != "1" ]; then + echo "ERROR: usb_upgrade requires base.versioned_fs=1" >&2 + exit 1 +fi + +echo "Making USB olpc-update image..." +mkisofs -o $outputdir/os$buildnr.usb -quiet -cache-inodes -iso-level 4 -publisher "olpc-os-builder" -R -V "$majver.$minver.$relver $buildnr" $fsmount/versions/pristine/* + |