OS Builder/Run on XO hardware: Difference between revisions
Line 99: | Line 99: | ||
Hardware performance measurements: |
Hardware performance measurements: |
||
* internal |
* internal microSD, sequential read, 18.2 MiB/s, (operating system), |
||
* internal microSD, filesystem write, 6.23 MiB/s, |
|||
* USB HDD, sequential read, 32 MiB/s, (osbuilder filesystem), |
* USB HDD, sequential read, 32 MiB/s, (osbuilder filesystem), |
||
* USB HDD, filesystem write, 29.4 MiB/s, |
* USB HDD, filesystem write, 29.4 MiB/s, |
Revision as of 23:16, 29 July 2013
It is usually possible, if a bit slow, to run OS builder on XO hardware. On platforms where fast machines are available (such as x86), using a server-class "builder" machine is recommended.
When resources are limited, or if server-class machines are not available for the platform (such as ARM), this recipe is recommended.
The procedure has been tested with XO-1.75 and XO-4 hardware and builds of the 11.3.x series and 13.2.x series.
Ingredients
- XO-1.75 or XO-4
- Good, fast SD card for swap,
- External USB HDD -- fast, large capacity, to store cached RPMs and build files,
Recipe
- Install a recent OS (we used 11.3.1-17 or 13.2.0-8)
- Boot to Sugar or Gnome, log in, connect to network
- Disable automatic power management from the Sugar control panel, or in Gnome:
touch /etc/powerd/flags/inhibit-suspend
- Insert external SD card to be used for swap
- Prepare the SD for swap -- in a terminal, as root
# see what block device id is the external SD mount # unmount any existing partitions umount /media/mysdcard # delete manufacturer's partition # create a new partition, of at least 2GB, type 82 parted /dev/mmcblkN (parted) rm 1 (parted) mkpart primary linux-swap 1M -1s (parted) quit # prepare the new partition to be swap # it will report a UUID identifier mkswap /dev/mmcblkNp1 # add this line to fstab to use swap automatically on every boot echo UUID=<UUID reported by mkswap> swap swap defaults 0 0 >> /etc/fstab # enable all swap partitions in fstab swapon -a -v
- Prepare the USB HDD partitioning it with a large partition of type "83", then use mkfs to create an ext3 or ext4 partition.
- Ensure the system date is correct, set it if necessary:
date --utc --set="2024-12-18 05:30:40"
- Follow the OS Builder development installation instructions -- remember to disable firstboot, and note that you will want to have your OS Builder directory on the external USB disk
- move /var/tmp to the USB HDD; because some large files are created:
D=/run/media/olpc/DISK/var/tmp mkdir -p $D cp -pr /var/tmp/* $D mount -o bind $D /var/tmp
- For 11.3.x, we want to work on branch v4.0, so
git checkout -b v4.0 origin/v4.0
- For 13.2.x, install the olpc-os-builder package:
sed -i '/excludedocs/d' /etc/rpm/macros.imgcreate yum install olpc-os-builder
- During test builds, generating only one image is faster -- edit examples/olpc-os-11.3.1-xo1.75.ini to disable 8GB image generation and comment out the "usb_update" module.
Your setup is ready, you can now do:
sudo ./osbuilder.py examples/olpc-os-11.3.1-xo1.75.ini
Experiences
2013-07-29, XO-4, 2GB RAM, 4GB SWAP, 500GB USB HDD, 13.2.0, using a warm file cache
Build took 31 minutes.
# time ./osbuilder.py examples/olpc-os-13.2.0-xo4.ini ... real 30m55.275s user 12m42.790s sys 2m8.370s
Configuration file: http://dev.laptop.org/~quozl/z/1V3fiW.txt (no Sugar activities)
Hardware performance measurements:
- internal eMMC, sequential read, 49 MiB/s, (operating system),
- USB HDD, sequential read, 27 MiB/s, (osbuilder filesystem),
- USB HDD, filesystem write, 27 MiB/s,
- external SD, sequential read, 15 MiB/s, (swap),
Performance tweaks:
- versioned_fs=0
- make_tree_tarball=0
- no sugar
2013-07-30, XO-1.5, 1GB RAM, no SWAP, 500GB USB HDD, 13.2.0, using a warm file cache
Build took 39 minutes.
# time ./osbuilder.py examples/olpc-os-13.2.0-xo4.ini ... real 38m50.632s user 21m16.550s sys 2m58.560s
Configuration file: http://dev.laptop.org/~quozl/z/1V3vxy.txt
Hardware performance measurements:
- internal microSD, sequential read, 18.2 MiB/s, (operating system),
- internal microSD, filesystem write, 6.23 MiB/s,
- USB HDD, sequential read, 32 MiB/s, (osbuilder filesystem),
- USB HDD, filesystem write, 29.4 MiB/s,
Performance tweaks:
- versioned_fs=0
- make_tree_tarball=0
- no sugar