原贴地址
肉丝大佬文章
https://www.anquanke.com/post/id/199898#h3-8
乌师傅
谷歌云和驱动的建议
众多翻阅过的博客文章
最后创建就好了。
打包刷机镜像
tar zcvf sailfish.tar.gz sailfish
打包文件如下图所示
利用NodeJs的served来做文件服务器
现在的内核版本是3.18,分支是g382d7256ce44
这里选择我们内核版本
我们去切到分支
https://android.googlesource.com/kernel/msm/+/refs/heads/android-msm-marlin-3.18-android10
开始编译
编译完成后,生成的文件在:
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -u dist-upgrade
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get install git -y
git config --global user.email "your mail"
git config --global user.name "your name"
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
apt install htop -y
mkdir android/
cd android/
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r2
repo sync
repo sync -j8 #8个线程同步代码
nohup repo sync -j8 >sync.log 2>&1 & #推荐:后台去同步,ssh断开也没事。
extract-google_devices-sailfish.sh
extract-qcom-sailfish.sh
google_devices
marlin
BoardConfigVendor.mk
device-vendor-sailfish.mk
sailfish
android-info.txt
BoardConfigPartial.mk
device-partial.mk
proprietary
vendor.img
qcom
sailfish
BoardConfigPartial.mk
device-partial.mk
proprietary
ATT_profiles.xml
lib64
vendor.qti.atcmdfwd@1.0.so
vendor.qti.qcril.am@1.0.so
pktlogconf
qcrilhook.jar
ROW_profiles.xml
VZW_profiles.xml
make clobber
sudo apt-get install openjdk-8-jdk -y
apt install bison tree
dpkg --add-architecture i386
apt update
apt install libc6:i386 libncurses5:i386 libstdc++6:i386
apt install libxml2-utils
sudo apt-get install libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev g++-multilib
sudo apt-get install -y git flex bison gperf build-essential libncurses5-dev:i386
sudo apt-get install tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo apt-get install dpkg-dev libsdl1.2-dev libesd0-dev
sudo apt-get install git-core gnupg flex bison gperf build-essential
sudo apt-get install zip curl zlib1g-dev gcc-multilib g++-multilib
sudo apt-get install libc6-dev-i386
sudo apt-get install lib32ncurses5-dev x11proto-core-dev libx11-dev
sudo apt-get install libgl1-mesa-dev libxml2-utils xsltproc unzip m4
sudo apt-get install lib32z-dev ccache
source build/envsetup.sh
lunch
cd build
source benvsetup.sh
lunch #选择自己的设备
cd .. #进入源码文件夹
export LC_ALL=C #recipe for target 'run_soong_ui' failed 解决方案二
#下面两行命令其中一行就行
make -j60 #这个60是cpu核心个数*2,我这是30个cpu
nohup make -j 60 >>123.log 2>&1 & #推荐这个命令,后台运行。
cd /
sudo dd if=/dev/zero of=/swp bs=10M count=400
sudo mkswap /swp
sudo swapon /swp
apt install npm nodejs-legacy
npm install -g served curl
served 8000 #在要下载的文件的目录下运行
export ANDROID_PRODUCT_OUT=/Users/zxc/Downloads/sailfishimg
echo ${ANDROID_PRODUCT_OUT}
adb reboot bootloader
fastboot flashall -w
git clone https://android.googlesource.com/kernel/msm.git
cd msm
git checkout android-msm-marlin-3.18-pi-qpr1
sudo apt install bc #/bin/sh: 1: bc: not found
sudo apt-get install liblz4-tool #lz4c: not found
source build/envsetup.sh
lunch aosp_sailfish-userdebug
#上边命令需要在源码文件夹进行操作。
export PATH=$PATH:/root/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin #这里是在源码里面
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-
export SUBARCH=arm64
make marlin_defconfig
make -j60
ls arch/arm64/boot/
export TARGET_PREBUILT_KERNEL=/root/android/msm/arch/arm64/boot/Image.lz4-dtb
rm out/target/product/sailfish/boot.img && make -j60 bootimage
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
最后于 2020-7-21 13:59
被mb_aoooaosd编辑
,原因: