SC9832 Android7.0 基准仓库建立

一入做机深似海,从此红尘是路人。


首先FTP取得新鲜出炉的SDK,然后建立自己的Git-Repo仓库。

MOCORDROID7.0_Trunk_K310_17A_SHARKLS_W17.16.2$ tree -l
.
├── IDH
│   ├── conf-scx35l.tar.gz
│   ├── Doc
│   │   ├── 9832_7.0_Release_Info_17.3.31.xlsx
│   │   ├── Modem_Bin说明_V1.10.docx
│   │   ├── tee_makepac
│   │   │   ├── 9832_pac.ini
│   │   │   ├── pacenvsetup.sh
│   │   │   ├── pac_via_conf.pl
│   │   │   ├── readme.txt
│   │   │   └── UpdatedPacCRC_Linux
│   │   ├── VOLTE锁说明文档_7.0.doc
│   │   └── W17.16.2版本升级说明 .docx
│   ├── idh.code.tgz
│   ├── manifest.xml
│   ├── proprietories-sp9832a_2h11_4mvoltesea_tee-userdebug.zip
│   ├── proprietories-sp9832a_2h11_4mvoltesea_tee-user.zip
│   ├── proprietories-sp9832a_3h10_cmcc-userdebug.zip
│   └── proprietories-sp9832a_3h10_cmcc-user.zip
├── modem
│   ├── CP0
│   │   └── FM_BASE_15C_W17.10.2_P2_9832_CUSTOMER_6.0&7.0.rar
│   └── CP2
│       └── Marlin_15C_Integration_W17.10.2.rar
└── Release_Notes
    ├── AP
    │   ├── modify.log
    │   └── Release_Notes_MOCORDROID7.0_Trunk_K310_17A.xls
    ├── CP0
    │   └── Release_Notes_FM_BASE_15C.xlsx
    ├── CP2
    │   ├── Release_Notes_Marlin_15C_WCN.xls
    │   └── Release_Notes_Marlin_BA_Release.xls
    └── GNSS
        └── GE2_ReleaseNote.xlsx



1. tar -zxvf idh.code.tgz -C ~/project/p9832an/

2. tar -zxvf conf-scx35l.tar.gz

3. mv device/sprd/scx35l  idh.code/device/sprd/

4. unrar  x modem/CP0 CP2  移动到idh.code/

5. 移动tee_makepac脚本至idh.code/

这样就取得代码:

sc9832a_androidN$ ls
abi  bionic    build    cts     developers   device  external    hardware  kernel   libnativehelper  modem  packages  platform_testing  sdk     tee_makepac  tools     u-boot64
art  bootable  chipram  dalvik  development  docs    frameworks  idh       libcore  Makefile         ndk    pdk       prebuilts         system  toolchain    u-boot15  vendor

6. 细节备份处理:

mkdir bak
cp kernel/.gitignore bak/.gitignore-k
cp u-boot15/.gitignore bak/.gitignore-u15
cp u-boot64/.gitignore bak/.gitignore-u64
mv ./cts/tests/tests/telecom2/res/.gitignore ./cts/tests/tests/telecom2/res/.gitignore-bak //这个必须保留

find ./ -name .gitignore | xargs rm -rf   //为建立git裸仓库准备

7. 脚本创建裸仓库

./repogit.sh abi art bionic bootable build chipram cts dalvik developers development device docs external frameworks hardware kernel modem libcore libnativehelper ndk packages pdk platform_testing prebuilts sdk system toolchain tee_makepac tools u-boot15 u-boot64 vendor

8.  将*.git 裸仓库移动至服务器

/home/git/git_repo/spreadtrum/sc9832/androidN$ ls
abi.git     bootable.git  config.sh   developers.git   docs.git        hardware.git  libcore.git          modem.git     pdk.git               prebuilts.git  tee_makepac.git  u-boot15.git
art.git     build.git     cts.git     development.git  external.git    idh.git       libnativehelper.git  ndk.git       platform_testing.git  sdk.git        toolchain.git    u-boot64.git
bionic.git  chipram.git   dalvik.git  device.git       frameworks.git  kernel.git    manifests.git        packages.git post-receive.sh       system.git     tools.git        vendor.git


/home/git/git_repo/spreadtrum/sc9832/androidN$sudo chown git:git * -R


9. 执行脚本config.sh 及 post-receive.sh  配置邮件通知

10. 自动解压proprietories 方式有:

vim build/core/main.mk
extract_proprietories_package:
+       if [ ! -d "out/IDH" ]; then \
+               mkdir -p out/IDH; \
+       fi
+       if [ ! -d "out/target/product/${TARGET_DEVICE}" ];then \
+               mkdir -p out/target/product/${TARGET_DEVICE}; \
+       fi;
+       echo +++++Try to extract idh/proprietories-${TARGET_PRODUCT}-${TARGET_BUILD_VARIANT}.zip ++++
+       if [ -f idh/proprietories-${TARGET_PRODUCT}-${TARGET_BUILD_VARIANT}.zip ];then \
+               unzip -o idh/proprietories-${TARGET_PRODUCT}-${TARGET_BUILD_VARIANT}.zip -d out/IDH; \
+               cp -avR out/IDH/out/target/product/*/* out/target/product/${TARGET_DEVICE}/; \
+       fi

或 vim device/sprd/scx35l/sp9832a_2h11/sp9832a_2h11_4mvoltesea_tee.mk
SPRD_IDH_PROP := out/

或 vendor/./sprd/build/buildidh/unzip_prop.sh

或 . ./build/envsetup.sh;lunch 35;kheader;IDH_PROP_ZIP=idh/proprietories-sp9832a_2h11_4mvoltesea_tee-user.zip make -j32 2>&1 | tee build.log

11. 取服务器SC9832 androidN基准仓库代码:

repo init -u ssh://git/home/git/git_repo/spreadtrum/sc9832/androidN/manifests.git -m default.xml
repo sync;repo sync

12. repo start GS201 --all;repo forall -c git push origin GS201:GS201  //创建GS201 项目分支并推送



Git 提交邮件通知配置: msmtp 加 mutt 加 post-receive 脚本

Git-Repo  仓库: ssh 加 Repo 工具

你可能感兴趣的:(Spreadtrum)