Commit Graph

27 Commits

Author SHA1 Message Date
skrll
959d9b34bf cmdline needs to be a line! hi jak. 2013-01-23 22:20:06 +00:00
skrll
9a42078a69 Size for 512 byte sectors and base ffs partition size on totalsize minus
others.
2013-01-23 21:59:37 +00:00
jakllsch
05b3b9d385 Specify the root device in cmdline.txt, also, it's 'Pi', not 'PI'. 2013-01-21 17:14:23 +00:00
skrll
bc399b5b4e kernel.img is for rpi only 2013-01-21 16:59:23 +00:00
skrll
a4ac7e4aff More usage updates 2013-01-21 16:49:49 +00:00
skrll
33441e3917 Update usage output a little 2013-01-21 16:47:23 +00:00
christos
b0de292a79 - Add support for xsets
- Factor out common evbarm code
2013-01-16 23:27:34 +00:00
christos
ca6f14109b tidy up some more by factoring out the sizing code. 2013-01-16 15:58:19 +00:00
christos
095a11f03d Make autosizing really work:
- Use newfs to compute the actual filesystem required size.
    - Fix the computation of set sizes to account for blocks and fragments.
This results into a 95% full filesystem for my test (Total 566MB, 24MB free)
from which 8MB is my requested overhead. Not perfect, but good enough.
2013-01-15 21:04:41 +00:00
christos
7a6821a937 now that we compute sizes correctly, reduce the extra to how much free space
we want.
2013-01-15 20:55:00 +00:00
christos
a58843234c make autosizing work (kind of) 2013-01-15 03:56:20 +00:00
christos
db11691a33 first step at autosizing, still does not work. 2013-01-15 03:26:27 +00:00
jmcneill
72bcdf0815 set kerneldir= to the path used by build.sh 2013-01-15 02:51:10 +00:00
jmcneill
7889ef773d expand set name to path when checking to see if the tgz exists 2013-01-15 02:50:08 +00:00
jmcneill
e83fa335b8 move 'trap' after command args are parsed 2013-01-14 12:12:19 +00:00
jmcneill
715c501991 add mkimage config for generating beagleboard images 2013-01-14 11:32:40 +00:00
christos
284486f905 append to rc.conf, don't overwrite 2013-01-13 22:08:43 +00:00
christos
8629ccb3a8 add the comp set 2013-01-13 21:52:42 +00:00
christos
855d500be1 honor ${TMPDIR} 2013-01-13 21:51:47 +00:00
christos
363bebcb93 use variables for the fdisk command too 2013-01-13 21:46:03 +00:00
christos
e49597500d Autosize label 2013-01-13 21:38:45 +00:00
christos
04c5a03c2c complain on unknown options 2013-01-13 20:59:22 +00:00
christos
8066385b56 move configuration to new place. 2013-01-13 20:58:38 +00:00
christos
df3192c082 Adjust mkimage to handle RPI. From skrll@ 2013-01-13 20:57:18 +00:00
agc
1923fda99b consolidate all of the volatile /var.* directories which are mounted as tmpfs
into a single one for /var - same as /root, /etc
2012-02-29 04:49:50 +00:00
agc
d2e3329102 While the resulting image from mkimage can always be mounted with vnd,
and then modified, it is much easier to let this late, user-oriented
customisation be done automatically.  These mods let mkimage change
information based on files in a "custom" directory, which can be set
in mkimage using -c customdir.

After all other configuration, the files under custom/ will be copied
into the main image.  The files under custom/ are taken into account
when performing autosizing.

Also, generalise the sets directory to point to the current machine
architecture, although this can be overwritten from the command line
by anyone making cross-images.

An example to make a user image with an embedded read-only 100 MB
iSCSI target:

% ./mkimage -c custom
=== making a new 272 MB image in usermode.img ===
272+0 records in
272+0 records out
285212672 bytes transferred in 7.616 secs (37449142 bytes/sec)
=== mounting image via vnd vnd0 ===
/dev/rvnd0a: 272.0MB (557056 sectors) block size 8192, fragment size 1024
        using 6 cylinder groups of 45.34MB, 5803 blks, 11264 inodes.
super-block backups (for fsck_ffs -b #) at:
32, 92880, 185728, 278576, 371424, 464272,
=== installing sets ===
base
etc
modules
=== performing customisations ===
=== making extra directories ===
=== customising /var/tmp ===
=== user customisations from files in custom ===
Filesystem    1K-blocks       Used      Avail %Cap Mounted on
/dev/vnd0a       269967     263958      -7489 102% /mnt
% ls -l -R custom
total 8
drwxr-xr-x  3 agc  agc  512 Jan 18 03:58 etc
drwxr-xr-x  2 agc  agc  512 Jan 18 04:00 iscsi

custom/etc:
total 8
drwxr-xr-x  2 agc  agc  512 Jan 18 03:58 iscsi
-rw-r--r--  1 agc  agc  564 Jan 18 03:58 rc.conf

custom/etc/iscsi:
total 6
-r--r--r--  1 agc  agc  799 Jan 18 04:27 targets

custom/iscsi:
total 102484
-rw-r--r--  1 agc  agc  104857600 Jan 18 04:00 iscsi-target0
% sudo vnconfig vnd0 usermode.img
% sudo mount /dev/vnd0a /mnt
% cat /mnt/etc/iscsi/targets
# $NetBSD: targets,v 1.2 2006/02/16 19:30:57 agc Exp $
#
# Structure of this file:
#
# + an extent is a straight (offset, length) pair of a file or device
#   it's the lowest common storage denominator
#   at least one is needed
# + a device is made up of one or more extents or other devices
#   devices can be added in a hierachical manner, to enhance resilience
# + in this example, no device definitions are necessary, as the target
#   will just use a simple extent for persistent storage
# + a target is made up of 1 or more devices
# The code does not support RAID1 recovery at present

# Simple file showing 1 extent, mapped straight into 1 target

# extent        file or device          start           length
extent0         /iscsi/iscsi-target0    0               100MB

# target        flags   storage         netmask
target0         ro      extent0         0.0.0.0/0
% ls -l /mnt/iscsi/iscsi-target0
-rw-r--r--  1 agc  agc  104857600 Jan 18 04:00 /mnt/iscsi/iscsi-target0
% diff custom/etc/iscsi/targets /mnt/etc/iscsi/targets
%
2012-01-20 02:19:47 +00:00
agc
00c311bc00 Add 3 scripts which are useful for making images for usermode, or any
embedded platform in particular.

+ mkimage will make an autosized image in a file (using vnd) from sets
the resulting image can be mounted read-only, with tmpfs used for volatile
files on top of read-only bases

+ mkpkgs will make an autosized image in a file (using vnd) from binary
packages

+ usermode is an easy way to invoke usermode, making sure that bridging
is set up properly, and that the host syscallemu module is loaded. This
script then runs usermode with two file images (as produced by mkimage
and mkpkgs)
2012-01-15 02:01:02 +00:00