diff --git a/mk_mmc.sh b/mk_mmc.sh index 25388c9..aa0d5dc 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -288,13 +288,28 @@ function dl_kernel_image { ACTUAL_DEB_FILE="linux-image-${ACTUAL_DEB_FILE}.deb" wget -c --directory-prefix="${DIR}/dl/${DISTARCH}" ${MIRROR}/${DISTARCH}/v${KERNEL}/${ACTUAL_DEB_FILE} + + if [ "${need_dtbs}" ] ; then + ACTUAL_DTB_FILE=$(cat ${TEMPDIR}/dl/index.html | grep dtbs.tar.gz) + #3.5.0-imx2-dtbs.tar.gz 08-Aug-2012 21:34 8.7K + ACTUAL_DTB_FILE=$(echo ${ACTUAL_DTB_FILE} | awk -F ">" '{print $2}') + #3.5.0-imx2-dtbs.tar.gz> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ + initrd_high=0xffffffff + fdt_high=0xffffffff + + xyz_mmcboot=run xyz_load_image; run xyz_load_initrd; run xyz_load_dtb; echo Booting from mmc ... + + deviceargs=setenv device_args + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; ${boot} ${kernel_addr} ${initrd_addr}:\${initrd_size} ${dtb_addr} + + __EOF__ + + cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ + initrd_high=0xffffffff + fdt_high=0xffffffff + + xyz_mmcboot=run xyz_load_image; run xyz_load_initrd; run xyz_load_dtb; echo Booting from mmc ... + + optargs=VIDEO_CONSOLE + deviceargs=setenv device_args + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; ${boot} ${kernel_addr} ${initrd_addr}:\${initrd_size} ${dtb_addr} + __EOF__ ;; bone) @@ -1061,6 +1100,7 @@ function populate_boot { if mount -t ${boot_part_format} ${MMC}${PARTITION_PREFIX}1 ${TEMPDIR}/disk; then mkdir -p ${TEMPDIR}/disk/backup + mkdir -p ${TEMPDIR}/disk/dtbs if [ ! "${bootloader_installed}" ] ; then if [ "${spl_name}" ] ; then @@ -1114,6 +1154,16 @@ function populate_boot { fi fi + if [ "${need_dtbs}" ] ; then + echo "Copying Device Tree Files:" + if [ "x${boot_fstype}" == "xfat" ] ; then + sudo tar xfvo "${DIR}/dl/${DISTARCH}/${ACTUAL_DTB_FILE}" -C ${TEMPDIR}/disk/dtbs + else + sudo tar xfv "${DIR}/dl/${DISTARCH}/${ACTUAL_DTB_FILE}" -C ${TEMPDIR}/disk/dtbs + fi + echo "-----------------------------" + fi + echo "Copying ${startup_script} based boot scripts to Boot Partition" echo "Net Install Boot Script:" cp -v ${TEMPDIR}/bootscripts/netinstall.cmd ${TEMPDIR}/disk/${startup_script} @@ -1126,7 +1176,7 @@ function populate_boot { cat ${TEMPDIR}/bootscripts/normal.cmd echo "-----------------------------" -cp -v "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/disk/ + cp -v "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/disk/ cat > ${TEMPDIR}/disk/SOC.sh <<-__EOF__ #!/bin/sh @@ -1462,6 +1512,7 @@ function check_uboot_type { unset bootloader_location unset spl_name unset boot_name + unset need_dtbs KERNEL_SEL="STABLE" boot="bootz" @@ -1604,6 +1655,22 @@ function check_uboot_type { #Planned, to be default with 2012.07... # boot_fstype="ext2" ;; + mx51evk_dtb) + SYSTEM="mx51evk_dtb" + BOOTLOADER="MX51EVK" + SERIAL="ttymxc0" + is_imx + kernel_addr="0x90010000" + initrd_addr="0x92000000" + load_addr="0x90008000" + dtb_addr="0x91ff0000" + dtb_file="imx51-babbage.dtb" + KERNEL_SEL="EXPERIMENTAL" + SERIAL_MODE=1 +#Planned, to be default with 2012.07... +# boot_fstype="ext2" + need_dtbs=1 + ;; mx53loco) SYSTEM="mx53loco" BOOTLOADER="MX53LOCO" @@ -1619,6 +1686,22 @@ function check_uboot_type { #Planned, to be default with 2012.07... # boot_fstype="ext2" ;; + mx53loco_dtb) + SYSTEM="mx53loco_dtb" + BOOTLOADER="MX53LOCO" + SERIAL="ttymxc0" + is_imx + kernel_addr="0x70010000" + initrd_addr="0x72000000" + load_addr="0x70008000" + dtb_addr="0x71ff0000" + dtb_file="imx53-qsb.dtb" + KERNEL_SEL="EXPERIMENTAL" + SERIAL_MODE=1 +#Planned, to be default with 2012.07... +# boot_fstype="ext2" + need_dtbs=1 + ;; *) IN_VALID_UBOOT=1 cat <<-__EOF__