123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #!/bin/bash
- # Bootstrapper for buildbot slave
- DIR="build"
- MACHINE="starfive-dubhe"
- CONFFILE="conf/auto.conf"
- BITBAKEIMAGE="virtual/kernel"
- # 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 .
- # 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
- # bootstrap OE
- echo "Init OE"
- export BASH_SOURCE="openembedded-core/oe-init-build-env"
- . ./openembedded-core/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-python
- bitbake-layers add-layer ../meta-openembedded/meta-multimedia
- bitbake-layers add-layer ../meta-openembedded/meta-filesystems
- bitbake-layers add-layer ../meta-openembedded/meta-networking
- bitbake-layers add-layer ../meta-riscv
- bitbake-layers add-layer ../meta-starfive
- # 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"
- #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"
- USER_CLASSES ?= "buildstats buildhistory buildstats-summary image-prelink"
- require conf/distro/include/no-static-libs.inc
- require conf/distro/include/yocto-uninative.inc
- require conf/distro/include/security_flags.inc
- INHERIT += "uninative"
- DISTRO_FEATURES_append = " largefile opengl ptest multiarch wayland pam systemd "
- DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
- VIRTUAL-RUNTIME_init_manager = "systemd"
- ##VIRTUAL-RUNTIME_initscripts = ""
- ##VIRTUAL-RUNTIME_syslog = ""
- HOSTTOOLS_NONFATAL_append = " ssh"
- DISTRO_NAME = "StarFive Linux SDK"
- #DISTRO_VERSION = ""
- #DISTRO_CODENAME = ""
- EOF
- echo "---------------------------------------------------"
- echo "Example: MACHINE=${MACHINE} bitbake ${BITBAKEIMAGE}"
- echo "---------------------------------------------------"
- echo ""
- echo "Buildable machine info"
- echo "---------------------------------------------------"
- echo "* starfive-dubhe : The StarFive Dubhe machine"
- echo "---------------------------------------------------"
- # start build
- #echo "Starting build"
- #bitbake $BITBAKEIMAGE
|