赞
踩
sudo apt-get install open-vm-tools
sudo apt-get install open-vm-tools-desktop
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list
阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential
sudo apt-get install git-core gnupg flex bison build-essential zip
curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386
libncurses5 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-
dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig
sudo apt-get install git
git config --global user.email "xxx@gmail.com"
git config --global user.name "xxx"
sudo apt-get install curl
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo >
~/bin/repo
chmod a+x ~/bin/repo
add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
sudo ln -s /usr/bin/python3 /usr/bin/python
点这里查看自己的源码分支
下载源码
repo init -u https://android.googlesource.com/kernel/manifest -b
android-msm-coral-4.14-android12
repo sync
使用adb shell cat /proc/version查看自己的内核版本号, 我的内核版本是Linux version
4.14.261-gdbc92b7a2b83-ab8577204
然后进入private/msm-google文件夹checkout一下
git checkout dbc92b7a2b83
sudo swapoff /swapfile
sudo rm /swapfile
## 我设置了32g交换区, 防止编译失败
sudo dd if=/dev/zero of=/swapfile bs=1GB count=32
sudo chmod 600 /swapfile
sudo mkswap -f /swapfile
sudo swapon /swapfile
打开下面这个链接下载android-image-kitchen
链接: android-image-kitchen
将boot.img放到其文件夹下面, 运行unpackimg.bat得到命令行参数
将解压后的boot.img-ramdisk.cpio放在源码的根目录下
下载: 文件到源码的根目录下
修改build/build.sh, 在echo " Files copied to ${DIST_DIR}"之前加上下面这几句
if [ -f "${VENDOR_RAMDISK_BINARY}" ]; then
cp ${VENDOR_RAMDISK_BINARY} ${DIST_DIR}
fi
下载rwProcMem33源码
git clone https://github.com/abcz316/rwProcMem33
驱动模块放到源码的drivers目录下, 修改Makefile文件为
obj-m += rwProcMem.o
将drivers目录下的Makefile文件加一行
obj-m += rwProcMem/
修改ver_control.h, 将使用pagemap的宏定义启用
输入命令开始编译, 命令参数需要自己按照自己的配置修改
BUILD_CONFIG=private/msm-google/build.config.floral
BUILD_BOOT_IMG=1 MKBOOTIMG_PATH=mkbootimg.py
VENDOR_RAMDISK_BINARY=boot.img-ramdisk.cpio KERNEL_BINARY=Image.lz4
BOOT_IMAGE_HEADER_VERSION=2
KERNEL_CMDLINE="console=ttyMSM0,115200n8
androidboot.console=ttyMSM0 printk.devkmsg=on msm_rtb.filter=0x237
ehci-hcd.park=3 service_locator.enable=1 androidboot.memcg=1
cgroup.memory=nokmem usbcore.autosuspend=7
androidboot.usbcontroller=a600000.dwc3 swiotlb=2048
androidboot.boot_devices=soc/1d84000.ufshc loop.max_part=7
buildvariant=user" BASE_ADDRESS=0x00000000 PAGE_SIZE=4096
build/build.sh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。