diff --git a/lib/debian-finish.sh b/lib/debian-finish.sh index 938784a..2556325 100644 --- a/lib/debian-finish.sh +++ b/lib/debian-finish.sh @@ -176,20 +176,30 @@ if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then fi fi -echo "uname_r=$(uname -r)" > /boot/uEnv.txt -echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/uEnv.txt +wfile="/boot/uEnv.txt" if [ "x${conf_smart_uboot}" = "xenable" ] ; then rootdrive=$(echo ${FINAL_PART} | awk -F"p" '{print $1}' || true) if [ "x${bootdrive}" = "x${rootdrive}" ] ; then rm -f /boot/uboot/boot/uEnv.txt || true else - echo "uname_r=current" > /boot/uboot/boot/uEnv.txt - echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/uboot/boot/uEnv.txt + wfile="/boot/uboot/boot/uEnv.txt" cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current fi fi +echo "uname_r=$(uname -r)" > ${wfile} +echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> ${wfile} +if [ ! "x${dtb}" = "x" ] ; then + echo "dtb=${dtb}" >> ${wfile} +fi +if [ ! "x${optargs}" = "x" ] ; then + echo "optargs=${optargs}" >> ${wfile} +fi +if [ ! "x${video}" = "x" ] ; then + echo "cmdline=video=${video}" >> ${wfile} +fi + # diff --git a/lib/ubuntu-finish.sh b/lib/ubuntu-finish.sh index 2dde00d..ff8074f 100644 --- a/lib/ubuntu-finish.sh +++ b/lib/ubuntu-finish.sh @@ -210,20 +210,30 @@ if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then fi fi -echo "uname_r=$(uname -r)" > /boot/uEnv.txt -echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/uEnv.txt +wfile="/boot/uEnv.txt" if [ "x${conf_smart_uboot}" = "xenable" ] ; then rootdrive=$(echo ${FINAL_PART} | awk -F"p" '{print $1}' || true) if [ "x${bootdrive}" = "x${rootdrive}" ] ; then rm -f /boot/uboot/boot/uEnv.txt || true else - echo "uname_r=current" > /boot/uboot/boot/uEnv.txt - echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/uboot/boot/uEnv.txt + wfile="/boot/uboot/boot/uEnv.txt" cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current fi fi +echo "uname_r=$(uname -r)" > ${wfile} +echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> ${wfile} +if [ ! "x${dtb}" = "x" ] ; then + echo "dtb=${dtb}" >> ${wfile} +fi +if [ ! "x${optargs}" = "x" ] ; then + echo "optargs=${optargs}" >> ${wfile} +fi +if [ ! "x${video}" = "x" ] ; then + echo "cmdline=video=${video}" >> ${wfile} +fi + # diff --git a/mk_mmc.sh b/mk_mmc.sh index 53c03c8..838c478 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -981,6 +981,12 @@ generate_soc () { echo "" >> ${wfile} echo "usbnet_mem=${usbnet_mem}" >> ${wfile} echo "" >> ${wfile} + + if [ ! "x${di_serial_mode}" = "xenable" ] ; then + echo "optargs=console=tty0" >> ${wfile} + echo "" >> ${wfile} + fi + if [ "x${drm_read_edid_broken}" = "xenable" ] ; then echo "video=${drm_device_identifier}:1024x768@60e" >> ${wfile} echo "" >> ${wfile}