2014年7月29日 星期二

QC: 如何產生update.zip for recovery

環境布建與假設:
mainchip: QC8974
HLOS: /qc8974
NonHLOS:  /qc8974_bin

step1: build HLOS code
        cd QC8974 && ./build.sh msm8974

step2: create packages
        make target-files-package

step3: copy all mbn from NonHLOS to /qc8974/out/target/platform/msm8974/obj/PACKAGING/target_files_intermediates/msm8974-target_files-eng.root/RADIO  (我是以root的身分build的)
        依NonHLOS 的 contents.xml中的說明copy 有列出的mbn檔就可以了,
        我是copy了:
                   adsp_proc/obj/qdsp6v5_ReleaseG/*.mbn
                   boot_images/build/ms/bin/8974/*.mbn
                   debug_image/build/ms/bin/AAAxxx/*.mbn
                   modem_proc/build/ms/bin/AAAxxx/*.mbn
                   rpm_proc/build/ms/bin/AAAxxx/rpm.mbn
                   trustzone_images/build/ms/bin/AAAxxx/*.mbn
                   wcnss_proc/build/ms/bin/8974/reloc/wcnss.mbn
                   LINUX/android/out/target/product/msm8974/emmc_appsboot.mbn
                   boot_images/build/ms/bin/EMMCBLD/8974_msimage.mbn

step 4: zip all images
        cd /qc8974/out/target/platform/msm8974/obj/PACKAGING/target_files/intermediates/msm8974-target_files-eng.root/
        zip -qry target_updates.zip

step 5: create update.zip package for recovery
        cd /qc8974
        ./build/tools/releasetools/ota_from)target)files 0p out/host/linux-x86 -k build/target/product/security/testkey -d MMC -v out/target/platform/msm8974/obj/PACKAGING/target_files/intermediates/msm8974-target-files-eng.root/target_updates.zip update.zip

step 6: copy update.zip 到sdcard或usb 由手機直接update 或是放到PC用ADB更新


2014年7月2日 星期三

Linux kernel source code的kernel 版本是多少?

這天從網上找到了份 kernel的source code, 可是卻無法從log或summary中知道其kernel 的version... 

這個問題以前壓根想都沒想過,
因為... 每次拿到的kernel source都是 linux-kernel.2.6.x.xx.tgz 之類的 一眼就可看出...
不就是 2.6版的嘛...

 不然是是compile後燒進版子後, 嘿~~ 從console的log可看出..
一開機就看到啦...  3.4....








可是這次卻是給了一個kernel source的目錄.... ㄟ~~~
找了找... 原來在 root/Makefile 裡就有了... 還在一開頭的位置哩...
不過得自幾組裝才行...  就把它們全裝一起就是了: 3.12.0-rc6
https://www.codeaurora.org/cgit/quic/kernel/davidb-msm/tree/Makefile?h=agross/console








原來越簡單的東西越會讓人想都沒想過...
當一開始想時才發現它一點都不簡單啊~~