From 9eec514c1e78ff1c17c891c0cdcfcc698395abcc Mon Sep 17 00:00:00 2001 From: Charles Steinkuehler <charles@steinkuehler.net> Date: Sat, 13 Jul 2013 03:19:18 +0200 Subject: [PATCH] Add custom uEnv.txt for MachineKit image --- machinekit/chroot_hook.sh | 4 ++++ machinekit/uEnv.txt | 43 +++++++++++++++++++++++++++++++++++++++ scripts/chroot.sh | 4 ++-- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100755 machinekit/uEnv.txt diff --git a/machinekit/chroot_hook.sh b/machinekit/chroot_hook.sh index 3294bbd8d..7bc8d34d5 100755 --- a/machinekit/chroot_hook.sh +++ b/machinekit/chroot_hook.sh @@ -22,3 +22,7 @@ for SCRIPT in ${tempdir}/tmp/[0-9][0-9][0-9]* ; do esac done +# Copy custom uEnv.txt file to destination, which will prevent the +# setup_sdcard.sh script from using it's default version +cp ${DIR}/machinekit/uEnv.txt ${DIR}/deploy/${export_filename}/ + diff --git a/machinekit/uEnv.txt b/machinekit/uEnv.txt new file mode 100755 index 000000000..754bb717b --- /dev/null +++ b/machinekit/uEnv.txt @@ -0,0 +1,43 @@ +kernel_file=zImage +initrd_file=uInitrd +initrd_high=0xffffffff +fdt_high=0xffffffff + +#Video: Uncomment to override: +#kms_force_mode=video=HDMI-A-1:1024x768@60 + +##BeagleBone Cape Overrides +##Note: On the BeagleBone Black, there is also an uEnv.txt in the eMMC, so if these changes do not seem to be makeing a difference... + +##BeagleBone Black: +# Disable HDMI/eMMC +# Note it is necessary to disable BOTH HDMI and HDMIN (no audio) "capes" +# in order to use the HDMI pins for I/O +#optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G + +# Default to leaving the HDMIN "cape" enabled, so HDMI works "out of the box" +# Comment the line below and uncomment the optargs= line above to use an unmodified +# BeBoPr or other board that uses the HDMI/LCD pins +optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONE-EMMC-2G + +console=ttyO0,115200n8 + +mmcroot=/dev/mmcblk0p2 ro +mmcrootfstype=ext4 rootwait fixrtc + +loadkernel=load mmc ${mmcdev}:${mmcpart} 0x80200000 ${kernel_file} +loadinitrd=load mmc ${mmcdev}:${mmcpart} 0x81000000 ${initrd_file}; setenv initrd_size ${filesize} +loadfdt=load mmc ${mmcdev}:${mmcpart} 0x815f0000 /dtbs/${fdtfile} + +boot_classic=run loadkernel; run loadinitrd +boot_ftd=run loadkernel; run loadinitrd; run loadfdt + +device_args=run expansion_args; run mmcargs +mmcargs=setenv bootargs console=${console} ${optargs} ${kms_force_mode} root=${mmcroot} rootfstype=${mmcrootfstype} ${expansion} + +expansion_args=setenv expansion ip=${ip_method} +#Classic Board File Boot: +#uenvcmd=run boot_classic; run device_args; bootz 0x80200000 0x81000000:${initrd_size} +#New Device Tree Boot: +uenvcmd=run boot_ftd; run device_args; bootz 0x80200000 0x81000000:${initrd_size} 0x815f0000 + diff --git a/scripts/chroot.sh b/scripts/chroot.sh index 343804dc9..efb8878d5 100755 --- a/scripts/chroot.sh +++ b/scripts/chroot.sh @@ -521,6 +521,8 @@ chroot_mount sudo chroot ${tempdir} /bin/sh chroot_script.sh echo "Log: Complete: [sudo chroot ${tempdir} /bin/sh chroot_script.sh]" +mkdir -p ${DIR}/deploy/${export_filename}/ || true + if [ -n "${chroot_hook}" -a -r "${DIR}/${chroot_hook}" ] ; then report_size echo "Calling chroot_hook script: ${chroot_hook}" @@ -532,8 +534,6 @@ if [ -f ${tempdir}/usr/bin/qemu-arm-static ] ; then sudo rm -f ${tempdir}/usr/bin/qemu-arm-static || true fi -mkdir -p ${DIR}/deploy/${export_filename}/ || true - if ls ${tempdir}/boot/vmlinuz-* >/dev/null 2>&1 ; then sudo mv -v ${tempdir}/boot/vmlinuz-* ${DIR}/deploy/${export_filename}/ fi -- GitLab