wget http://www.privoxy.org/sf-download-mirror/Sources/3.0.26%20%28stable%29/privoxy-3.0.26-stable-src.tar.gz tar -zxvf privoxy-3.0.26-stable-src.tar.gz cd privoxy-3.0.26-stable
privoxy服务需要新建privoxy用户,并添加到privoxy用户组来运行
1 2 3
useradd privoxy groupadd -g 888 privoxy gpasswd -a privoxy privoxy
查看privoxy用户信息
1
id privoxy
安装provoxy
1 2 3 4
apt-get -y install autoconf autoheader && autoconf ./configure make && make install
- 4 交叉编译架构: HOST OS 通常为Linux,包含自身的kernel、glibc基础库和Target程序的依赖库。Toolchain包含C/C++及其他语言编译器和汇编、链接器等组件。Toolchain依赖于HOST的glibc基础库。Target binary是编译出的目标镜像/程序,编译过程依赖于Toolchain及HOST的build essential libs。
2.2 高通Android平台编译概念
高通平台HDK845推荐的编译环境如下:
HOST
Toolchain
Source code repository
build out Android version
Ubuntu14.04 LTS
Clang/LLVM
CAF
support Android 9 Pie
高通平台HDK845推荐的编译流程如下:
Clang/LLVM编译器介绍
CAF和AOSP的介绍
1 2 3 4 5 6 7 8 9 10 11 12
CAF is Code Aurora repository. It's the place where Qualcomm releases source code for their phone processors. It's directly supported by Qualcomm and it's generally a more optimized branch for Snapdragon phones. Actually, there are two main baselines for support of Qualcomm devices: - 1. CodeAurora (CAF) - These are Qualcomm's reference sources for their platform. This is what they provide to OEMs, and what nearly all OEMs base their software off of. As a result - nearly all non-Nexus devices are running kernels/display HALs/etc. that are derived from a CAF baseline. - 2. Google's software baseline(AOSP) - Usually when Google starts working on a new Android version, they'll fork from CAF at the beginning. Very often Google will be adding "new" features specific to the new Android version, while Qualcomm will continue with performance enhancements and bugfixes against the "old" baseline. - 3. So when a new Android revision comes out, you have two baselines: CAF which is usually "ahead" in performance but "behind" in features, while AOSP is “behind” in performance (relatively) but “ahead” in features. Nowadays, developers are directly compiling the builds from CAF source code which is really difficult as this is what Google does initially before upgrading to a new version, and then they add features and the source by the time gets ‘compilable’, it is easier to compile the one on Google Sources than the one which is there on CAF. CAF can be considered as Vanilla version of a Vanilla version of Android.
function download_CAF_CODE() { # Do repo sanity test if [ $? -eq 0 ] then echo "Downloading code please wait.." repo init -q -u git://codeaurora.org/platform/manifest.git -b release -m ${CAFTAG}.xml repo sync -q -c -j 4 --no-tags --no-clone-bundle if [ $? -eq 0 ] then echo -e "$GREEN Downloading done..$ENDCOLOR" else echo -e "$RED!!!Error Downloading code!!!$ENDCOLOR" fi else echo "repo tool problem, make sure you have setup your build environment" echo "1) http://source.android.com/source/initializing.html" echo "2) http://source.android.com/source/downloading.html (Installing Repo Section Only)" exit -1 fi }
# Function to check result for failures check_result() { if [ $? -ne 0 ] then echo echo -e "$RED FAIL: Current working dir:$(pwd) $ENDCOLOR" echo exit 1 else echo -e "$GREEN DONE! $ENDCOLOR" fi }
# Function to autoapply patches to CAF code apply_android_patches() { echo "Applying patches ..." if [ ! -e $PATCH_DIR ] then echo -e "$RED $PATCH_DIR : Not Found $ENDCOLOR" return fi cd $PATCH_DIR patch_root_dir="$PATCH_DIR" android_patch_list=$(find . -type f -name "*.patch" | sort) && for android_patch in $android_patch_list; do android_project=$(dirname $android_patch) echo -e "$YELLOW applying patches on $android_project ... $ENDCOLOR" cd $BUILDROOT/$android_project if [ $? -ne 0 ]; then echo -e "$RED $android_project does not exist in BUILDROOT:$BUILDROOT $ENDCOLOR" exit 1 fi git am --3way $patch_root_dir/$android_patch check_result done }
# Function to check whether host utilities exists check_program() { for cmd in "$@" do which ${cmd} > /dev/null 2>&1 if [ $? -ne 0 ] then echo echo -e "$RED Cannot find command \"${cmd}\" $ENDCOLOR" echo exit 1 fi done }
#Main Script starts here #Note: Check necessary program for installation echo echo -e "$CYAN Product : $DB_PRODUCT_STRING $ENDCOLOR" echo -e "$MAGENTA Intrinsyc Release Version : $ITCVER $ENDCOLOR" echo -e "$MAGENTA WorkDir : $WORKDIR $ENDCOLOR" echo -e "$MAGENTA Build Root : $BUILDROOT $ENDCOLOR" echo -e "$MAGENTA Patch Dir : $PATCH_DIR $ENDCOLOR" echo -e "$MAGENTA CodeAurora TAG : $CAFTAG $ENDCOLOR" echo -n "Checking necessary program for installation......" echo check_program tar repo git patch if [ -e $BUILDROOT ] then cd $BUILDROOT else mkdir $BUILDROOT cd $BUILDROOT fi
#1 Download code download_CAF_CODE cd $BUILDROOT
#2 Apply Open-Q 845 HDK Development Kit Patches apply_android_patches
#3 Extract the proprietary objs cd $BUILDROOT echo -e "$YELLOW Extracting proprietary binary package to $BUILDROOT ... $ENDCOLOR" tar -xzvf ../proprietary.tar.gz -C vendor/qcom/
#4 Build echo -e "$YELLOW Building Source code from $BUILDROOT ... $ENDCOLOR" if [[ -z "${BUILD_NUMBER}" ]]; then export BUILD_NUMBER=$(date +%m%d%H%M); fi . build/envsetup.sh lunch sdm845-${BV:="userdebug"} ITC_ID=Open-Q_845_${ITCVER} make -j $(nproc) $@