-
Notifications
You must be signed in to change notification settings - Fork 36
/
mkxpud
executable file
·45 lines (40 loc) · 1014 Bytes
/
mkxpud
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# mkxpud - binary level image build system
# for xPUD project <http://xpud.org>
# Copyright (c) 2009 by Ping-Hsun Chen <penkia@gmail.com>
export LC_ALL=C
[ -f tools/function.sh ] && . tools/function.sh
if [ -z $1 ]; then
usage
else
if [ ! -z $2 ] && [ -f "config/$2.cookbook" ]; then export MKXPUD_CODENAME=$2
else export MKXPUD_CODENAME='default'; fi
export MKXPUD_CONFIG=config/$MKXPUD_CODENAME.cookbook
eval export `./tools/parser $MKXPUD_CONFIG config`
case $1 in
all)
setup $MKXPUD_CODENAME
echo "[mkxpud] Project Name: $MKXPUD_NAME"
install && strip
kernel $MKXPUD_CODENAME
post
image $MKXPUD_CODENAME
echo "[mkxpud] $MKXPUD_CODENAME Done"
;;
clean)
sudo rm -rf working/$MKXPUD_CODENAME
;;
image)
image $MKXPUD_CODENAME
;;
test)
sudo qemu -kernel $MKXPUD_KERNEL_IMAGE -initrd deploy/$MKXPUD_CODENAME/rootfs.cpio -hda /dev/zero -m 512
;;
help|usage)
usage
;;
*)
echo "[mkxpud] $1: not yet implemented"
;;
esac
fi