[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#783074: flash-kernel: improvements to uboot-generic bootscript



Package: flash-kernel
Version: 3.35
Severity: wishlist
Tags: patch

This patch adds a few improvements to the uboot-generic bootscript:

* Use kernel version in versioned files
* Include kernel version, device and partition in boot message
* Set the console in bootargs
* Set workaround for console value for some imx systems

The kernel versioning its also make it possible to use a kernel without
relying on the various vmlinuz, initrd, dtb smlinks being valid, or for
troubleshooting an alternate version.

Including some or all of these could remove the need for several
board-specific boot scripts, and possibly allow a reasonable default
for unknown systems.

diff --git a/bootscript/bootscr.uboot-generic b/bootscript/bootscr.uboot-generic
index 7451112..e68c306 100644
--- a/bootscript/bootscr.uboot-generic
+++ b/bootscript/bootscr.uboot-generic
@@ -13,11 +13,21 @@
 #
 # The uboot must support the bootz and generic filesystem load commands.
 
+if test "${console}" = "ttymxc0" && test -n "${baudrate}"; then
+  setenv console "${console},${baudrate}"
+fi
+
+if test -n "${console}"; then
+  setenv bootargs "${bootargs} console=${console}"
+fi
+
 setenv bootargs ${bootargs} @@LINUX_KERNEL_CMDLINE@@
 @@UBOOT_ENV_EXTRA@@
 
-load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} ${prefix}vmlinuz \
-&& load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} ${prefix}dtb \
-&& load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} ${prefix}initrd.img \
-&& echo "Booting Debian..." \
+kvers='@@KERNEL_VERSION@@'
+
+load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} ${prefix}vmlinuz-${kvers} \
+&& load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} ${prefix}dtb-${kvers} \
+&& load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} ${prefix}initrd.img-${kvers} \
+&& echo "Booting Debian ${kvers} from ${devtype} ${devnum}:${bootpart}..." \
 && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


Reply to: