diff options
author | Aníbal Limón <anibal.limon@linaro.org> | 2018-07-12 20:39:20 -0500 |
---|---|---|
committer | Aníbal Limón <anibal.limon@linaro.org> | 2018-07-12 20:40:07 -0500 |
commit | 67d1e6b19214655ca12d24072cdb4229ca909402 (patch) | |
tree | 5e541d2e761c07967615a3b12dac5fb1abbfb7c3 | |
parent | 21c3c3e7cdf595efb866b7f67c4d2229038a6edb (diff) |
lt-qcom-linux-integration/builders.sh: Fixes for sdm845 functional
- Uncompress cpio ramdisk to install new init (switch_rootfs)
- Give +x permissions to new /init
- Fix override of boot_file
Change-Id: Ibe4a91d2d1bad9284dfbeea75915a78c9a137331
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
-rwxr-xr-x | lt-qcom-linux-integration/builders.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lt-qcom-linux-integration/builders.sh b/lt-qcom-linux-integration/builders.sh index 0a41dfba72..4084acf031 100755 --- a/lt-qcom-linux-integration/builders.sh +++ b/lt-qcom-linux-integration/builders.sh @@ -254,10 +254,14 @@ fi if [[ $ramdisk_comp = "gz" ]]; then ${GZ} $ramdisk_file ramdisk_file="$ramdisk_file".gz + ramdisk_file_type=$(file $ramdisk_file) + ramdisk_comp="" fi if [[ $rootfs_comp = "gz" ]]; then ${GZ} $rootfs_file rootfs_file="$rootfs_file".gz + rootfs_file_type=$(file $rootfs_file) + rootfs_comp="" fi # Compress kernel image if isn't @@ -292,17 +296,30 @@ skales-mkbootimg \ # exec switch_rootfs boot_rootfs_file=boot-rootfs-${KERNEL_FLAVOR}-${KERNEL_VERSION}-${BUILD_NUMBER}-${MACHINE}.img if [ "${MACHINE}" = "sdm845_mtp" ]; then + if [[ $ramdisk_file_type = *"gzip compressed data"* ]]; then + ${GZ} -d $ramdisk_file + ramdisk_file=out/$(basename ${RAMDISK_URL} .gz) + ramdisk_file_type=$(file $ramdisk_file) + ramdisk_comp='gz' + fi init_file=init init_tar_file=init.tar.gz echo "${INITRAMFS_ROOTFS}" | sed -e "s|__ROOTFS_PARTITION__|${ROOTFS_PARTITION}|g" > ./$init_file + chmod +x ./$init_file tar -czf $init_tar_file ./$init_file copy_tarball_to_rootfs "$init_tar_file" "$ramdisk_file" "$ramdisk_file_type" rm -f $init_file $init_tar_file + if [[ $ramdisk_comp = "gz" ]]; then + ${GZ} $ramdisk_file + ramdisk_file="$ramdisk_file".gz + ramdisk_file_type=$(file $ramdisk_file) + ramdisk_comp= + fi skales-mkbootimg \ --kernel $kernel_file \ --ramdisk $ramdisk_file \ - --output out/$boot_file \ + --output out/$boot_rootfs_file \ $dt_mkbootimg_arg \ --pagesize "${BOOTIMG_PAGESIZE}" \ --base "${BOOTIMG_BASE}" \ |