diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-10-09 16:11:15 (GMT) |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-10-20 16:40:28 (GMT) |
commit | 3b82402597622d04d0b0eb7b382068fe8456c7f5 (patch) | |
tree | f7a3a1981269a7740bb49dddac434dd2bde29b51 | |
parent | a29c32be6c784e012c2c00f306e3daac3141aa2a (diff) | |
download | u-boot-3b82402597622d04d0b0eb7b382068fe8456c7f5.tar.xz |
sunxi: Add a bootcmd_sunxi_compat to the default environment to boot old kernels
Add a bootcmd_sunxi_compat value to the default environment when building
with CONFIG_OLD_SUNXI_KERNEL_COMPAT, this way people who occasionally want
to boot an old kernel can do so by simply typing "run bootcmd_sunxi_compat"
rather then needing to have 2 separate setups / sdcards for old and
new kernels.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
-rw-r--r-- | include/configs/sunxi-common.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index ed7879a..879d0f4 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -435,6 +435,22 @@ extern int soft_i2c_gpio_scl; func(PXE, pxe, na) \ func(DHCP, dhcp, na) +#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT +#define BOOTCMD_SUNXI_COMPAT \ + "bootcmd_sunxi_compat=" \ + "setenv root /dev/mmcblk0p3 rootwait; " \ + "if ext2load mmc 0 0x44000000 uEnv.txt; then " \ + "echo Loaded environment from uEnv.txt; " \ + "env import -t 0x44000000 ${filesize}; " \ + "fi; " \ + "setenv bootargs console=${console} root=${root} ${extraargs}; " \ + "ext2load mmc 0 0x43000000 script.bin && " \ + "ext2load mmc 0 0x48000000 uImage && " \ + "bootm 0x48000000\0" +#else +#define BOOTCMD_SUNXI_COMPAT +#endif + #include <config_distro_bootcmd.h> #ifdef CONFIG_USB_KEYBOARD @@ -465,6 +481,7 @@ extern int soft_i2c_gpio_scl; MEM_LAYOUT_ENV_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ "console=ttyS0,115200\0" \ + BOOTCMD_SUNXI_COMPAT \ BOOTENV #else /* ifndef CONFIG_SPL_BUILD */ |