2018-03-16 17:16:53 -07:00
|
|
|
#!/bin/bash
|
|
|
|
# Bootstrapper for buildbot slave
|
|
|
|
|
|
|
|
DIR="build"
|
|
|
|
MACHINE="qemuriscv64"
|
|
|
|
CONFFILE="conf/auto.conf"
|
|
|
|
BITBAKEIMAGE="core-image-full-cmdline"
|
|
|
|
|
|
|
|
# make sure sstate is there
|
|
|
|
#echo "Creating sstate directory"
|
|
|
|
#mkdir -p ~/sstate/$MACHINE
|
|
|
|
|
|
|
|
# fix permissions set by buildbot
|
2018-09-23 10:28:48 -07:00
|
|
|
#echo "Fixing permissions for buildbot"
|
|
|
|
#umask -S u=rwx,g=rx,o=rx
|
|
|
|
#chmod -R 755 .
|
|
|
|
|
|
|
|
# Reconfigure dash on debian-like systems
|
|
|
|
which aptitude > /dev/null 2>&1
|
|
|
|
ret=$?
|
|
|
|
if [ "$(readlink /bin/sh)" = "dash" -a "$ret" = "0" ]; then
|
|
|
|
sudo aptitude install expect -y
|
|
|
|
expect -c 'spawn sudo dpkg-reconfigure -freadline dash; send "n\n"; interact;'
|
|
|
|
elif [ "${0##*/}" = "dash" ]; then
|
|
|
|
echo "dash as default shell is not supported"
|
|
|
|
return
|
|
|
|
fi
|
2018-03-16 17:16:53 -07:00
|
|
|
# bootstrap OE
|
|
|
|
echo "Init OE"
|
2018-08-29 10:03:31 -07:00
|
|
|
export BASH_SOURCE="openembedded-core/oe-init-build-env"
|
2018-08-29 09:56:07 -07:00
|
|
|
. ./openembedded-core/oe-init-build-env $DIR
|
2018-03-16 17:16:53 -07:00
|
|
|
|
|
|
|
# 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-python
|
2019-07-11 09:23:11 -07:00
|
|
|
bitbake-layers add-layer ../meta-openembedded/meta-multimedia
|
2018-03-16 17:16:53 -07:00
|
|
|
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
|
2019-07-11 00:42:03 +09:00
|
|
|
MACHINE ?= "${MACHINE}"
|
2018-03-16 17:16:53 -07:00
|
|
|
#IMAGE_FEATURES += "tools-debug"
|
|
|
|
#IMAGE_FEATURES += "tools-tweaks"
|
|
|
|
#IMAGE_FEATURES += "dbg-pkgs"
|
|
|
|
# rootfs for debugging
|
|
|
|
#IMAGE_GEN_DEBUGFS = "1"
|
|
|
|
#IMAGE_FSTYPES_DEBUGFS = "tar.gz"
|
2021-08-02 09:43:09 -07:00
|
|
|
EXTRA_IMAGE_FEATURES:append = " ssh-server-dropbear"
|
|
|
|
EXTRA_IMAGE_FEATURES:append = " package-management"
|
|
|
|
PACKAGECONFIG:append:pn-qemu-native = " sdl"
|
|
|
|
PACKAGECONFIG:append:pn-nativesdk-qemu = " sdl"
|
2022-03-24 12:14:39 -07:00
|
|
|
USER_CLASSES ?= "buildstats buildhistory buildstats-summary"
|
2018-09-21 21:01:39 -07:00
|
|
|
|
|
|
|
require conf/distro/include/no-static-libs.inc
|
|
|
|
require conf/distro/include/yocto-uninative.inc
|
|
|
|
require conf/distro/include/security_flags.inc
|
|
|
|
|
|
|
|
INHERIT += "uninative"
|
|
|
|
|
2022-08-12 21:41:08 -07:00
|
|
|
DISTRO_FEATURES:append = " opengl ptest multiarch wayland pam systemd "
|
2018-09-26 06:01:18 +09:00
|
|
|
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
|
|
|
|
VIRTUAL-RUNTIME_init_manager = "systemd"
|
2021-08-02 09:43:09 -07:00
|
|
|
HOSTTOOLS_NONFATAL:append = " ssh"
|
2018-03-16 17:16:53 -07:00
|
|
|
EOF
|
|
|
|
|
|
|
|
echo "To build an image run"
|
2019-07-11 00:42:03 +09:00
|
|
|
echo "---------------------------------------------------"
|
|
|
|
echo "MACHINE=qemuriscv64 bitbake core-image-full-cmdline"
|
|
|
|
echo "---------------------------------------------------"
|
|
|
|
echo ""
|
|
|
|
echo "Buildable machine info"
|
|
|
|
echo "---------------------------------------------------"
|
|
|
|
echo "* qemuriscv64: The 64-bit RISC-V machine"
|
|
|
|
echo "* qemuriscv32: The 32-bit RISC-V machine"
|
2019-10-17 13:49:01 -07:00
|
|
|
echo "* freedom-u540: The SiFive HiFive Unleashed board"
|
2019-07-11 00:42:03 +09:00
|
|
|
echo "---------------------------------------------------"
|
2018-03-16 17:16:53 -07:00
|
|
|
|
|
|
|
# start build
|
|
|
|
#echo "Starting build"
|
|
|
|
#bitbake $BITBAKEIMAGE
|
|
|
|
|