diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2018-07-07 02:02:09 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2018-07-07 02:02:09 +0800 |
commit | 090fcfd3d7eef23a7d06cc4f84744b5882223dc1 (patch) | |
tree | 96b26d4474a624f7b869112f0e0505f232d016f3 | |
parent | addc880a17c25320cb775fa672429682731e5edc (diff) | |
parent | c8609e55c8d51a90bfd02da2a7d09a03fcce8365 (diff) |
Merge branch 'master' of ssh://git.linaro.org/people/yongqin.liu/public/android
-rw-r--r-- | .gitreview | 4 | ||||
-rwxr-xr-x | build.sh | 1 | ||||
-rwxr-xr-x | host-tools/build-kernel.sh | 105 | ||||
-rwxr-xr-x | host-tools/check_newcts.sh | 3 | ||||
-rw-r--r-- | host-tools/ubuntu-postgresql.txt | 6 | ||||
-rwxr-xr-x | sync-master.sh | 13 |
6 files changed, 128 insertions, 4 deletions
diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..adbd132 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.linaro.org +port=29418 +project=people/yongqin.liu/public/android.git @@ -320,6 +320,7 @@ function build_board_ver(){ build ${TARGET_PRODUCT} } +export CFG_TEE_SUPP_LOG_LEVEL=3 #build_board_ver hikey o #build_board_ver x15 o #build_board_ver hikey p diff --git a/host-tools/build-kernel.sh b/host-tools/build-kernel.sh new file mode 100755 index 0000000..6e25ce9 --- /dev/null +++ b/host-tools/build-kernel.sh @@ -0,0 +1,105 @@ +#!/bin/bash -ex + +KERNEL_VERBOSE="V=1" +KERNEL_TARGET="Image-dtb" +KERNEL_TARGET="Image.gz-dtb" +CPUS=$(grep processor /proc/cpuinfo |wc -l) + + +MAKE="make" +HOST_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +export PATH + +AOSP_ROOT=$(cd $(dirname $0)/..; pwd) +function build_kernel(){ + KERNEL_SRC=$1 && shift + KERNEL_OUT=$1 && shift + + ## ARCH + ## LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN + ## CROSS_COMPILE + ## DEFCONFIG + ## CC && CLANG_PREBUILT_BIN for clang + build_config=${KERNEL_SRC}/build.config.clang && use_clang=true + source ${build_config} + CLANG_PREBUILT_BIN=$(echo ${CLANG_PREBUILT_BIN}|sed 's/-master//') + + KERNEL_TOOLS_PREFIX=${AOSP_ROOT}/${LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN}/${CROSS_COMPILE} + + PATH=$PATH:${CLANG_PREBUILT_BIN}:${LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN} + CMD_MKCONFIG="${MAKE} -j1 -C ${KERNEL_SRC} -j1 ${KERNEL_VERBOSE} O=${KERNEL_OUT} ARCH=${ARCH} CROSS_COMPILE=${KERNEL_TOOLS_PREFIX} ${DEFCONFIG}" + PATH=$PATH:${HOST_PATH} ${CMD_MKCONFIG} 2>&1 | tee ${KERNEL_OUT}/build-mkconfig.log + + + TOOLCHAIN_OPT="CROSS_COMPILE=${KERNEL_TOOLS_PREFIX}" + if ${use_clang}; then + ABS_CLANG=${AOSP_ROOT}/${CLANG_PREBUILT_BIN}/${CC} + CLANG_OPT="CC=${ABS_CLANG} HOSTCC=${ABS_CLANG}" + if [ -n "${CLANG_TRIPLE}" ]; then + CLANG_TRIPLE_OPT="CLANG_TRIPLE=${CLANG_TRIPLE}" + else + CLANG_TRIPLE_OPT="" + fi + CLANG_OPT="${CLANG_OPT} ${CLANG_TRIPLE_OPT}" + TOOLCHAIN_OPT="${TOOLCHAIN_OPT} ${CLANG_OPT}" + else + CLANG_OPT="" + fi + + KERNEL_MAKE_CMDS="${MAKE} -j${CPUS} ${KERNEL_VERBOSE} -C ${KERNEL_SRC} O=${KERNEL_OUT} ARCH=${ARCH} ${TOOLCHAIN_OPT} ${KERNEL_TARGET}" + PATH=$PATH:${HOST_PATH} ${KERNEL_MAKE_CMDS} 2>&1 | tee ${KERNEL_OUT}/build-kernel.log +} + + +function merge_kernel_config(){ + export ARCH=arm64 + export KERNEL_OUT=/development/android/master/out/target/product/hikey/obj/kernel + export KERNEL_SRC=/development/android/master/kernel/linaro/hisilicon + export KERNEL_CONFIG="\ + arch/arm64/configs/hikey_defconfig \ + configs/android-4.9/android-base.cfg \ + configs/android-4.9/android-base-arm64.cfg \ + configs/android-4.9/android-recommended.cfg \ + " + export KCONFIG_CONFIG=${KERNEL_OUT}/.merged.config + #cd ${KERNEL_SRC} && ./scripts/kconfig/merge_config.sh -m $(KERNEL_CONFIG) && cd - && make -j1 -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(ARCH) KCONFIG_ALLCONFIG=$(KERNEL_OUT)/.merged.config alldefconfig + pushd ${KERNEL_SRC} + ./scripts/kconfig/merge_config.sh -m ${KERNEL_CONFIG} + popd + make -j1 -C ${KERNEL_SRC} O=${KERNEL_OUT} ARCH=${ARCH} KCONFIG_ALLCONFIG=${KERNEL_OUT}/.merged.config alldefconfig +} +###################################################################### +###################################################################### +## build/make/core/version_defaults.mk +PLATFORM_SECURITY_PATCH="2017-12-01" +PLATFORM_VERSION=Q +#PLATFORM_VERSION=QPR1 + + +F_KERNEL="${AOSP_ROOT}/out/target/product/hikey/kernel" +F_RAMDISK="${AOSP_ROOT}/out/target/product/hikey/ramdisk.img" +BIN_MKBOOTIMG="${AOSP_ROOT}/out/host/linux-x86/bin/mkbootimg" +BOARD_KERNEL_CMDLINE="console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/vendor/firmware efi=noruntime overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab video=HDMI-A-1:1280x720@60 printk.devkmsg=on" +TARGET_BUILD_VARIANT="userdebug" +VERITY_KEYID="" +function make_bootimg(){ + local F_KERNEL=$1 && shift + local F_RAMDISK=$1 && shift + local F_BOOTIMG=$1 && shift + + local INTERNAL_KERNEL_CMDLINE="${BOARD_KERNEL_CMDLINE} buildvariant=${TARGET_BUILD_VARIANT} ${VERITY_KEYID}" + local INTERNAL_MKBOOTIMG_VERSION_ARGS="--os_version ${PLATFORM_VERSION} --os_patch_level ${PLATFORM_SECURITY_PATCH}" + local BOARD_MKBOOTIMG_ARGS="" + ${BIN_MKBOOTIMG} --kernel ${F_KERNEL} --ramdisk ${F_RAMDISK} --cmdline "${INTERNAL_KERNEL_CMDLINE}" ${INTERNAL_MKBOOTIMG_VERSION_ARGS} ${BOARD_MKBOOTIMG_ARGS} --output ${F_BOOTIMG} +} + +KERNEL_SRC_BASE="${AOSP_ROOT}/kernel/linaro" +KERNEL_OUT_BASE="${AOSP_ROOT}/out/target/product/hikey/obj" +build_kernel "${KERNEL_SRC_BASE}/hisilicon-4.14" ${KERNEL_OUT_BASE}/kernel-4.14 +#build_kernel "${KERNEL_SRC_BASE}/hisilicon-4.9" ${KERNEL_OUT_BASE}/kernel-4.9 +#build_kernel "${KERNEL_SRC_BASE}/hisilicon-4.4" ${KERNEL_OUT_BASE}/kernel-4.4 + +make_bootimg ${KERNEL_OUT_BASE}/kernel-4.14/arch/arm64/boot/Image.gz-dtb ${F_RAMDISK} ${AOSP_ROOT}/out/target/product/hikey/boot-4.14.img +#make_bootimg ${KERNEL_OUT_BASE}/kernel-4.9/arch/arm64/boot/Image.gz-dtb ${F_RAMDISK} ${AOSP_ROOT}/out/target/product/hikey/boot-4.9.img +#make_bootimg ${KERNEL_OUT_BASE}/kernel-4.4/arch/arm64/boot/Image.gz-dtb ${F_RAMDISK} ${AOSP_ROOT}/out/target/product/hikey/boot-4.4.img + diff --git a/host-tools/check_newcts.sh b/host-tools/check_newcts.sh index 20dbc92..2e436a2 100755 --- a/host-tools/check_newcts.sh +++ b/host-tools/check_newcts.sh @@ -139,7 +139,7 @@ function upload_to_s3(){ function upload_build_info_to_s3(){ local remote_dir_path=$1 - local build_info_path=$(mktemp -p /tmp/ BUILD-INFO.txt_XXX) + local build_info_path="/tmp/BUILD-INFO.txt" local build_info="Format-Version: 0.5\n\nFiles-Pattern: *\nLicense-Type: open\n" echo -e ${build_info} >${build_info_path} @@ -269,3 +269,4 @@ function main(){ } main "$@" +#upload_build_info_to_s3 "cts/18.06" diff --git a/host-tools/ubuntu-postgresql.txt b/host-tools/ubuntu-postgresql.txt index e78dc74..9daf778 100644 --- a/host-tools/ubuntu-postgresql.txt +++ b/host-tools/ubuntu-postgresql.txt @@ -28,6 +28,9 @@ https://help.ubuntu.com/community/PostgreSQL update-alternatives: 使用 /usr/share/postgresql/9.6/man/man1/postmaster.1.gz 来在自动模式中提供 /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) 4. cheatsheet + sudo su - postgres + postgres@dl380p:~$ psql + \l or \list to show all database in postgressql \c dbname or \connect dbname to change to a new database \dt display all the tables in currect database @@ -35,6 +38,7 @@ https://help.ubuntu.com/community/PostgreSQL \h help \q exit + https://www.techonthenet.com/postgresql/delete.php CREATE DATABASE myproject; CREATE USER myprojectuser WITH PASSWORD 'password'; # for django @@ -44,5 +48,7 @@ https://help.ubuntu.com/community/PostgreSQL GRANT ALL PRIVILEGES ON DATABASE myproject TO myprojectuser; + select * from report_testcase where job_id = '299593'; + delete from report_testcase where job_id = '299593'; 5. config file /etc/postgresql/9.6/main/postgresql.conf defines the database directory and configuration file path diff --git a/sync-master.sh b/sync-master.sh index 464d46a..6afcab4 100755 --- a/sync-master.sh +++ b/sync-master.sh @@ -50,6 +50,11 @@ ${BASE}/sync-projects.sh \ # art \ # external/opencv-upstream \ +${BASE}/sync-projects.sh \ + external/optee_client \ + external/optee_test \ + optee/optee_os \ + fi #export http_proxy=192.168.0.102:37586 #export https_proxy=192.168.0.102:37586 @@ -57,14 +62,16 @@ fi func_apply_patch MASTER-RLCR-PATCHSET func_apply_patch hikey-master-workarounds func_apply_patch hikey-optee-master -func_apply_patch hikey-optee-4.9 -#func_apply_patch hikey-optee-4.14 +#func_apply_patch hikey-optee-4.9 +func_apply_patch hikey-optee-4.14 #func_apply_patch MASTER-CLANG-PATCHSET -func_apply_patch x15-p-workarounds +func_apply_patch x15-master-workarounds +func_apply_patch x15-master-workarounds-lcr #func_apply_patch NOUGAT-BOOTTIME-OPTIMIZATIONS-HIKEY #func_apply_patch NOUGAT-BOOTTIME-OPTIMIZATIONS-X15 #func_apply_patch NOUGAT-BOOTTIME-OPTIMIZATIONS-JUNO +func_apply_patch optee-master-workarounds func_apply_patch LIUYQ-PATCHSET #./build.sh |