1 Star 1 Fork 1

PolyOS - 聚元操作系统 / meta-xiangshan

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
setup.sh 4.60 KB
一键复制 编辑 原始数据 按行查看 历史
xiaoyu_tong 提交于 2022-07-19 05:59 . update the files
#!/bin/bash
# Bootstrapper for buildbot slave
DIR="build"
MACHINE="xiangshan"
CONFFILE="conf/auto.conf"
BITBAKEIMAGE="riscv-pk"
# 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
if [ -e $CONFFILE ]; then
echo "Your build directory already has local configuration file!"
echo "If you want to start from scratch remove old build directory:"
echo ""
echo " rm -rf $PWD"
echo ""
else
# 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-riscv
bitbake-layers add-layer ../meta-xiangshan
# 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/yocto-uninative.inc
require conf/distro/include/security_flags.inc
INHERIT += "uninative"
DISTRO_FEATURES:append = " largefile opengl ptest multiarch pam systemd vulkan "
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
VIRTUAL-RUNTIME_init_manager = "busybox"
VIRTUAL-RUNTIME_initscripts = "initscripts"
VIRTUAL-RUNTIME_syslog = ""
VIRTUAL-RUNTIME_keymaps = "keymaps"
VIRTUAL-RUNTIME_login_manager = "busybox"
HOSTTOOLS_NONFATAL:append = " ssh"
PREFERRED_PROVIDER_base-utils = "packagegroup-core-base-utils"
VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock"
VIRTUAL-RUNTIME_base-utils-syslog = ""
# Use full features vim instead of vim-tiny
VIRTUAL-RUNTIME_vim = "vim"
# We use NetworkManager instead
PACKAGECONFIG:remove:pn-systemd = "networkd"
PACKAGECONFIG:remove:pn-systemd = "resolved"
PACKAGECONFIG:remove:pn-systemd = "nss-resolve"
# SECURITY_CFLAGS:pn-opensbi = ""
# SECURITY_LDFLAGS:pn-opensbi = ""
# Add r600 drivers for AMD GPU
PACKAGECONFIG:append:pn-mesa = " r600"
# Add support for modern AMD GPU (e.g. RX550 / POLARIS)
PACKAGECONFIG:append:pn-mesa = " radeonsi"
PACKAGECONFIG:append:pn-mesa = " gallium-llvm"
PACKAGECONFIG:append:pn-mesa = " vdpau"
PACKAGECONFIG:append:pn-gdb = " python"
PACKAGECONFIG:append:pn-gdb = " tui"
PACKAGECONFIG:append:pn-gdb = " xz"
PACKAGECONFIG:append:pn-elfutils = " bzip2"
PACKAGECONFIG:append:pn-elfutils = " xz"
PACKAGECONFIG:append:pn-pulseaudio = " autospawn-for-root"
PACKAGECONFIG:append:pn-mousepad = " spell"
PACKAGECONFIG:append:pn-perf = " dwarf"
PACKAGECONFIG:append:pn-perf = " libunwind"
PACKAGECONFIG:append:pn-perf = " manpages"
PACKAGECONFIG:append:pn-perf = " jvmti"
PACKAGECONFIG:append:pn-perf = " cap"
QEMU_TARGETS = "riscv64 x86_64"
CLANGSDK = "1"
FORTRAN:forcevariable = ",fortran"
# BBMASK += "openembedded-core/meta/recipes-bsp/opensbi/opensbi_0.9.bb"
DISTRO_NAME = "FreedomUSDK"
DISTRO_VERSION = "2021.12.00"
DISTRO_CODENAME = "2021December"
EOF
fi
echo "---------------------------------------------------"
echo "Example: MACHINE=${MACHINE} bitbake ${BITBAKEIMAGE}"
echo "---------------------------------------------------"
echo ""
echo "Buildable machine info"
echo "---------------------------------------------------"
echo "* unmatched : The SiFive HiFive Unmatched board"
echo "* freedom-u540 : The SiFive HiFive Unleashed board"
echo "* qemuriscv64 : The 64-bit RISC-V machine"
echo "* nuclei : The 64-bit RISC-V machine"
echo "---------------------------------------------------"
# start build
#echo "Starting build"
#bitbake $BITBAKEIMAGE
1
https://gitee.com/riscv-raios/meta-xiangshan.git
git@gitee.com:riscv-raios/meta-xiangshan.git
riscv-raios
meta-xiangshan
meta-xiangshan
main

搜索帮助

53164aa7 5694891 3bd8fe86 5694891