Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 56 lines (49 sloc) 1.361 kb
afdbeba @penk initial commit
authored
1 #!/bin/bash
2 # mkxpud - binary level image build system
3 # for xPUD project <http://xpud.org>
4 # Copyright (c) 2009 by Ping-Hsun Chen <penkia@gmail.com>
5
6 export LC_ALL=C
7 [ -f tools/function.sh ] && . tools/function.sh
8
9 if [ -z $1 ]; then
10 usage
11 else
12
13 if [ ! -z $2 ] && [ -f "config/$2.cookbook" ]; then export MKXPUD_CODENAME=$2
14 else export MKXPUD_CODENAME='default'; fi
27fd47e @joshas Modified mkxpud test function to use correct kernel
joshas authored
15 export MKXPUD_CONFIG=config/$MKXPUD_CODENAME.cookbook
16 eval export `./tools/parser $MKXPUD_CONFIG config`
afdbeba @penk initial commit
authored
17
18 case $1 in
19 all)
34aee9c @joshas Clean working folder before build
joshas authored
20 clean
afdbeba @penk initial commit
authored
21 setup $MKXPUD_CODENAME
22 echo "[mkxpud] Project Name: $MKXPUD_NAME"
434a091 @penk opt is currently broken due to multi-layered rootfs
authored
23
24 ## FIXME: merge init, strip and opt function
f431b89 @penk add initiate support of squashfs/aufs multi-layered rootfs
authored
25 install && init && strip
2f6083f @penk add [opt] section for software add-ons
authored
26 opt
49e0b7b @penk fix working variable
authored
27 kernel $MKXPUD_CODENAME
bba23e3 @penk check dependencies of each files under usr/lib
authored
28 post
afdbeba @penk initial commit
authored
29 image $MKXPUD_CODENAME
30 echo "[mkxpud] $MKXPUD_CODENAME Done"
31 ;;
32 clean)
34aee9c @joshas Clean working folder before build
joshas authored
33 clean
afdbeba @penk initial commit
authored
34 ;;
35 image)
36 image $MKXPUD_CODENAME
37 ;;
38 test)
0baee45 @penk add qemu parameters to support KVM
authored
39 sudo qemu -kernel $MKXPUD_KERNEL_IMAGE -initrd deploy/$MKXPUD_CODENAME.cpio -hda /dev/zero -m 512 -net nic,model=ne2k_pci -net user
afdbeba @penk initial commit
authored
40 ;;
41 help|usage)
42 usage
43 ;;
370a7d6 @joshas Added opt creation function to mkxpud
joshas authored
44 mkopt)
45 # create opt using recipe: mkxpud mkopt {recipe name} {cookbook name}
46 # Attention! cookbook must be built first, before making opts, so all dependencies could be checked correctly
47 # create opt from directory: mkxpud mkopt {directory}
48 makeopt $2 $3
49 ;;
afdbeba @penk initial commit
authored
50 *)
51 echo "[mkxpud] $1: not yet implemented"
52 ;;
53 esac
54 fi
55
Something went wrong with that request. Please try again.