u-boot-litecell15: Update patch with sysmocom specific content
Add several more commands to flash from tftp.
This commit is contained in:
parent
822f15f414
commit
f69a60d261
|
@ -1,13 +1,13 @@
|
||||||
From 83a428ec10bb58df55b139e628096ccbb8249634 Mon Sep 17 00:00:00 2001
|
From b33c1d7ab8881cf9e68ef9692a8c5079f1b53db7 Mon Sep 17 00:00:00 2001
|
||||||
From: Pau Espin Pedrol <pespin@sysmocom.de>
|
From: Pau Espin Pedrol <pespin@sysmocom.de>
|
||||||
Date: Fri, 28 Jul 2017 12:12:05 +0200
|
Date: Fri, 28 Jul 2017 12:12:05 +0200
|
||||||
Subject: [PATCH] Add sysmocom specific tweaks
|
Subject: [PATCH] Add sysmocom specific tweaks
|
||||||
|
|
||||||
---
|
---
|
||||||
common/autoboot.c | 2 +-
|
common/autoboot.c | 2 +-
|
||||||
include/configs/litecell15.h | 48 ++++++++++++++++++++++++++++-----------
|
include/configs/litecell15.h | 91 +++++++++++++++++++++++++++++++++------
|
||||||
include/configs/ti_armv7_common.h | 2 +-
|
include/configs/ti_armv7_common.h | 2 +-
|
||||||
3 files changed, 37 insertions(+), 15 deletions(-)
|
3 files changed, 80 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
diff --git a/common/autoboot.c b/common/autoboot.c
|
diff --git a/common/autoboot.c b/common/autoboot.c
|
||||||
index c4e21452df..369f2c55a1 100644
|
index c4e21452df..369f2c55a1 100644
|
||||||
|
@ -23,7 +23,7 @@ index c4e21452df..369f2c55a1 100644
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
diff --git a/include/configs/litecell15.h b/include/configs/litecell15.h
|
diff --git a/include/configs/litecell15.h b/include/configs/litecell15.h
|
||||||
index bb6629a3ce..275d8fab29 100644
|
index bb6629a3ce..6d030bedcb 100644
|
||||||
--- a/include/configs/litecell15.h
|
--- a/include/configs/litecell15.h
|
||||||
+++ b/include/configs/litecell15.h
|
+++ b/include/configs/litecell15.h
|
||||||
@@ -81,13 +81,19 @@
|
@@ -81,13 +81,19 @@
|
||||||
|
@ -62,23 +62,63 @@ index bb6629a3ce..275d8fab29 100644
|
||||||
|
|
||||||
/* WDT by default 128 secs (2<<CONFIG_WDT_INIT, max 128secs), theorically do not use lower than 1 (2 secs) to match CONFIG_MIN_WDT_TICK_TIME */
|
/* WDT by default 128 secs (2<<CONFIG_WDT_INIT, max 128secs), theorically do not use lower than 1 (2 secs) to match CONFIG_MIN_WDT_TICK_TIME */
|
||||||
/* WARNING: actual wdt expiration min value is (2<<CONFIG_WDT_INIT) secs, but it could be as long as 2 * (2<<CONFIG_WDT_INIT) secs */
|
/* WARNING: actual wdt expiration min value is (2<<CONFIG_WDT_INIT) secs, but it could be as long as 2 * (2<<CONFIG_WDT_INIT) secs */
|
||||||
@@ -204,21 +210,35 @@
|
@@ -204,21 +210,75 @@
|
||||||
"sf erase 0x120000 0x80000 && " \
|
"sf erase 0x120000 0x80000 && " \
|
||||||
"sf write 0x83000000 0x120000 0x80000 \0"
|
"sf write 0x83000000 0x120000 0x80000 \0"
|
||||||
|
|
||||||
+#define FLASH_ROOTFS_TFTP \
|
+#define ERASE_UBOOT_ENV \
|
||||||
+ "tftpflash=echo Loading rootfs from network and flashing to mmc...; " \
|
+ "erase_uboot_env=echo Erasing saved u-boot env...; " \
|
||||||
|
+ "sf probe 0 && " \
|
||||||
|
+ "sf erase 0x100000 0x10000 && " \
|
||||||
|
+ "sf erase 0x110000 0x10000;\0"
|
||||||
|
+
|
||||||
|
+#define TFTP_FLASH_MLO \
|
||||||
|
+ "tftp_flash_mlo=echo Loading MLO from network and flashing it....; " \
|
||||||
+ "setenv prev_bootfile ${bootfile}; " \
|
+ "setenv prev_bootfile ${bootfile}; " \
|
||||||
+ "setenv autoload no; " \
|
+ "setenv autoload no; " \
|
||||||
+ "dhcp; " \
|
+ "dhcp && " \
|
||||||
+ "setenv filesize 0; " \
|
+ "setenv filesize 0 && " \
|
||||||
|
+ "if tftp ${loadaddr} MLO; then " \
|
||||||
|
+ "sf probe 0 && " \
|
||||||
|
+ "sf erase 0x00000 0x20000 && " \
|
||||||
|
+ "sf write ${loadaddr} 0x00000 0x20000 && " \
|
||||||
|
+ "sf erase 0x20000 0x20000 && " \
|
||||||
|
+ "sf write ${loadaddr} 0x20000 0x20000 && " \
|
||||||
|
+ "sf erase 0x40000 0x20000 && " \
|
||||||
|
+ "sf write ${loadaddr} 0x40000 0x20000 && " \
|
||||||
|
+ "sf erase 0x60000 0x20000 && " \
|
||||||
|
+ "sf write ${loadaddr} 0x60000 0x20000; " \
|
||||||
|
+ "fi; " \
|
||||||
|
+ "setenv bootfile ${prev_bootfile};\0"
|
||||||
|
+
|
||||||
|
+#define TFTP_FLASH_UBOOT \
|
||||||
|
+ "tftp_flash_uboot=echo Loading u-boot.img from network and flashing it....; " \
|
||||||
|
+ "setenv prev_bootfile ${bootfile}; " \
|
||||||
|
+ "setenv autoload no; " \
|
||||||
|
+ "dhcp && " \
|
||||||
|
+ "setenv filesize 0 && " \
|
||||||
|
+ "if tftp ${loadaddr} u-boot.img; then " \
|
||||||
|
+ "sf probe 0 && " \
|
||||||
|
+ "sf erase 0x80000 0x80000 && " \
|
||||||
|
+ "sf write ${loadaddr} 0x80000 0x80000 && " \
|
||||||
|
+ "sf erase 0x120000 0x80000 && " \
|
||||||
|
+ "sf write ${loadaddr} 0x120000 0x80000; " \
|
||||||
|
+ "fi; " \
|
||||||
|
+ "setenv bootfile ${prev_bootfile};\0"
|
||||||
|
+
|
||||||
|
+#define TFTP_FLASH_ROOTFS \
|
||||||
|
+ "tftp_flash_rootfs=echo Loading rootfs from network and flashing to mmc...; " \
|
||||||
|
+ "setenv prev_bootfile ${bootfile}; " \
|
||||||
|
+ "setenv autoload no; " \
|
||||||
|
+ "dhcp && " \
|
||||||
|
+ "setenv filesize 0 && " \
|
||||||
+ "if tftp ${loadaddr} rootfs-sysmobts2100.img; then " \
|
+ "if tftp ${loadaddr} rootfs-sysmobts2100.img; then " \
|
||||||
+ "setexpr fs ${filesize} + 0x1ff; " \
|
+ "setexpr fs ${filesize} + 0x1ff; " \
|
||||||
+ "setexpr fs ${fs} / 0x200; " \
|
+ "setexpr fs ${fs} / 0x200; " \
|
||||||
+ "mmc write ${fileaddr} 0x0001f000 ${fs}; " \
|
+ "mmc write ${fileaddr} 0x0001f000 ${fs} && " \
|
||||||
+ "mmc write ${fileaddr} 0x003ef800 ${fs}; " \
|
+ "mmc write ${fileaddr} 0x003ef800 ${fs}; " \
|
||||||
+ "fi; " \
|
+ "fi; " \
|
||||||
+ "setenv bootfile ${prev_bootfile};\0 "
|
+ "setenv bootfile ${prev_bootfile};\0"
|
||||||
+
|
+
|
||||||
#include <configs/ti_omap5_common.h>
|
#include <configs/ti_omap5_common.h>
|
||||||
|
|
||||||
|
@ -104,7 +144,7 @@ index bb6629a3ce..275d8fab29 100644
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Overwrite extra settings */
|
/* Overwrite extra settings */
|
||||||
@@ -226,6 +246,7 @@
|
@@ -226,6 +286,7 @@
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
DEFAULT_LINUX_BOOT_ENV \
|
DEFAULT_LINUX_BOOT_ENV \
|
||||||
"console=" CONSOLEDEV ",115200n8\0" \
|
"console=" CONSOLEDEV ",115200n8\0" \
|
||||||
|
@ -112,13 +152,16 @@ index bb6629a3ce..275d8fab29 100644
|
||||||
"fdtfile=litecell15.dtb\0" \
|
"fdtfile=litecell15.dtb\0" \
|
||||||
"bootdir=/boot\0" \
|
"bootdir=/boot\0" \
|
||||||
"bootfile=zImage\0" \
|
"bootfile=zImage\0" \
|
||||||
@@ -292,7 +313,8 @@
|
@@ -292,7 +353,11 @@
|
||||||
MYBOOT_LIMIT \
|
MYBOOT_LIMIT \
|
||||||
NANDARGS \
|
NANDARGS \
|
||||||
FLASH_UBOOT_LINUXFS \
|
FLASH_UBOOT_LINUXFS \
|
||||||
- FLASH_UBOOT2
|
- FLASH_UBOOT2
|
||||||
+ FLASH_UBOOT2 \
|
+ FLASH_UBOOT2 \
|
||||||
+ FLASH_ROOTFS_TFTP
|
+ ERASE_UBOOT_ENV \
|
||||||
|
+ TFTP_FLASH_MLO \
|
||||||
|
+ TFTP_FLASH_UBOOT \
|
||||||
|
+ TFTP_FLASH_ROOTFS
|
||||||
|
|
||||||
#undef CONFIG_BOOTCOMMAND
|
#undef CONFIG_BOOTCOMMAND
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
|
|
@ -2,7 +2,7 @@ require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
|
||||||
|
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:"
|
||||||
|
|
||||||
INC_PR = "r1"
|
INC_PR = "r2"
|
||||||
|
|
||||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue