ubuntu编译AOSP

系统环境: ubuntu 20.04 LTS

安装必要工具:

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip openjdk-8-jdk libtinfo-dev libncurses-dev libncurses5 libssl-dev

修改BaseTools路径:

cd bootable/bootloader/edk2
rm -rf Conf/BuildEnv.sh
unset EDK_TOOLS_PATH
./edksetup.sh BaseTools
cd -

开始编译吧:

source build/envsetup.sh
lunch xxx
make -j40

等等……

需要LLVM?

sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"