forked from riscv/meta-riscv
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.sh
65 lines (53 loc) · 1.52 KB
/
setup.sh
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# Bootstrapper for buildbot slave
DIR="build"
MACHINE="qemuriscv64"
CONFFILE="conf/auto.conf"
BITBAKEIMAGE="core-image-full-cmdline"
# clean up the output dir
echo "Cleaning build dir"
rm -rf $DIR
# make sure sstate is there
#echo "Creating sstate directory"
#mkdir -p ~/sstate/$MACHINE
# fix permissions set by buildbot
echo "Fixing permissions for buildbot"
umask -S u=rwx,g=rx,o=rx
chmod -R 755 .
# bootstrap OE
echo "Init OE"
export BASH_SOURCE="poky/oe-init-build-env"
. poky/oe-init-build-env $DIR
# Symlink the cache
#echo "Setup symlink for sstate"
#ln -s ~/sstate/${MACHINE} sstate-cache
# add the missing layers
echo "Adding layers"
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-openembedded/meta-multimedia
bitbake-layers add-layer ../meta-openembedded/meta-python
bitbake-layers add-layer ../meta-openembedded/meta-networking
bitbake-layers add-layer ../meta-riscv
# fix the configuration
echo "Creating auto.conf"
if [ -e $CONFFILE ]; then
rm -rf $CONFFILE
fi
cat <<EOF > $CONFFILE
MACHINE = "${MACHINE}"
#IMAGE_FEATURES += "tools-debug"
#IMAGE_FEATURES += "tools-tweaks"
#IMAGE_FEATURES += "dbg-pkgs"
# rootfs for debugging
#IMAGE_GEN_DEBUGFS = "1"
#IMAGE_FSTYPES_DEBUGFS = "tar.gz"
# explicitly disable x11 and enable opengl
HOSTTOOLS_NONFATAL_append = " ssh"
EOF
echo "To build an image run"
echo "-------------------------------"
echo "bitbake core-image-full-cmdline"
echo "-------------------------------"
# start build
#echo "Starting build"
#bitbake $BITBAKEIMAGE