diff options
author | Aníbal Limón <anibal.limon@linaro.org> | 2018-07-16 13:06:01 -0500 |
---|---|---|
committer | Aníbal Limón <anibal.limon@linaro.org> | 2018-07-16 13:06:01 -0500 |
commit | a5ba1aba0f0a20deecfea5802477292606dde30c (patch) | |
tree | 4766ac2814c8204c1e7ea8a673990b8e2d332005 /lt-qcom-linux-integration | |
parent | 73415530bacd3aa02f067e98471b2a05429b8c9d (diff) |
lt-qcom-linux-integration: Uses ramdisk to load rootfs in all boards
The sdm845 requires a ramdisk init to load the rootfs because we only
have access to the Android bootloader, so change the db{410, 820}c to
use the same method to avoid maintenance effort.
Change-Id: Ic2efc95cb5dedb0cc066ff3b5428311c1592d5aa
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Diffstat (limited to 'lt-qcom-linux-integration')
-rwxr-xr-x | lt-qcom-linux-integration/builders.sh | 74 |
1 files changed, 30 insertions, 44 deletions
diff --git a/lt-qcom-linux-integration/builders.sh b/lt-qcom-linux-integration/builders.sh index 3d87feae8a..fab177f975 100755 --- a/lt-qcom-linux-integration/builders.sh +++ b/lt-qcom-linux-integration/builders.sh @@ -305,52 +305,38 @@ skales-mkbootimg \ --ramdisk_base "${RAMDISK_BASE}" \ --cmdline "root=/dev/ram0 init=/init rw console=tty0 console=${SERIAL_CONSOLE},115200n8" -# Create boot image (functional), sdm845_mtp requires an initramfs to mount the rootfs and then -# exec switch_rootfs +# Create boot image (functional), sdm845-mtp requires an initramfs to mount the rootfs and then +# exec switch_rootfs, use the same method in other boards too 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_rootfs_file \ - $dt_mkbootimg_arg \ - --pagesize "${BOOTIMG_PAGESIZE}" \ - --base "${BOOTIMG_BASE}" \ - --ramdisk_base "${RAMDISK_BASE}" \ - --cmdline "root=/dev/ram0 init=/init rw console=tty0 console=${SERIAL_CONSOLE},115200n8" -else - ramdisk_dummy_file=out/initrd.img - echo "This is not an initrd" > $ramdisk_dummy_file - skales-mkbootimg \ - --kernel $kernel_file \ - --ramdisk $ramdisk_dummy_file \ - --output out/$boot_rootfs_file \ - $dt_mkbootimg_arg \ - --pagesize "${BOOTIMG_PAGESIZE}" \ - --base "${BOOTIMG_BASE}" \ - --ramdisk_base "${RAMDISK_BASE}" \ - --cmdline "root=${ROOTFS_PARTITION} rw rootwait console=tty0 console=${SERIAL_CONSOLE},115200n8" +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_rootfs_file \ + $dt_mkbootimg_arg \ + --pagesize "${BOOTIMG_PAGESIZE}" \ + --base "${BOOTIMG_BASE}" \ + --ramdisk_base "${RAMDISK_BASE}" \ + --cmdline "root=/dev/ram0 init=/init rw console=tty0 console=${SERIAL_CONSOLE},115200n8" echo BOOT_FILE=$boot_file >> builders_out_parameters echo BOOT_ROOTFS_FILE=$boot_rootfs_file >> builders_out_parameters |