Skip to contentSkip to conversation

config: trats: trats2: extend dfu_alt_info by env update settings

PATCH New Przemyslaw Marczak 4 participants 5 messages Jan 22, 2014 – Feb 3, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: trats: trats2: extend dfu_alt_info by env update settings

This change allows updating environment stored on MMC by dfu or thor.

New setting:
- "params.bin mmc 0x38 0x8"

File params.bin can be generated by: tools/mkenvimage. e.g. ./mkenvimage -s 4096 -o params.bin <env_text_file>

Every new env variable in text file should start with a new line.

Sample env text file:
- board/samsung/common/dfu_sample_env.txt

Requirements:
- file name: "params.bin"
- file size: 4096 Bytes - the same as CONFIG_ENV_SIZE. Other size will cause CRC miscalculation at boot.

CC Piotr Wilczek <[email protected]>
CC Lukasz Majewski <[email protected]>
---
 board/samsung/common/dfu_sample_env.txt |    9 +++++++++
 include/configs/trats.h                 |    3 ++-
 include/configs/trats2.h                |    3 ++-
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 board/samsung/common/dfu_sample_env.txt
board/samsung/common/dfu_sample_env.txt new file +9 -0
new file mode 100644
index 0000000..d6ee8a2
@@ -0,0 +1,9 @@
+mmcboot=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} ${rootfstype} rootwait ${console}; run loaduimage; bootm 0x40007FC0
+rootfstype=ext4
+loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage
+mmcdev=0
+mmcbootpart=2
+mmcrootpart=5
+console=console=ttySAC2,115200n8
+bootcmd=run mmcboot
+dfu_alt_info=u-boot mmc 80 800;params.bin mmc 0x38 0x8;uImage ext4 0 2
include/configs/trats.h +2 -1
index fdd8b46..d09f7c7 100644
@@ -147,7 +147,8 @@
 	""PARTS_BOOT" part 0 2;" \
 	""PARTS_ROOT" part 0 5;" \
 	""PARTS_DATA" part 0 6;" \
-	""PARTS_UMS" part 0 7\0"
+	""PARTS_UMS" part 0 7;" \
+	"params.bin mmc 0x38 0x8\0"
 
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
include/configs/trats2.h +2 -1
index 83633b0..31c52f1 100644
@@ -178,7 +178,8 @@
 	""PARTS_BOOT" part 0 2;" \
 	""PARTS_ROOT" part 0 5;" \
 	""PARTS_DATA" part 0 6;" \
-	""PARTS_UMS" part 0 7\0"
+	""PARTS_UMS" part 0 7;" \
+	"params.bin mmc 0x38 0x8\0"
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"bootk=" \
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 config: trats: trats2: extend dfu_alt_info by env update settings

CC

Quoted 63 lines · Przemyslaw Marczak

This change allows updating environment stored on MMC by dfu or thor.

New setting:
- "params.bin mmc 0x38 0x8"

File params.bin can be generated by: tools/mkenvimage. e.g. ./mkenvimage -s 4096 -o params.bin <env_text_file>

Every new env variable in text file should start with a new line.

Sample env text file:
- board/samsung/common/dfu_sample_env.txt

Requirements:
- file name: "params.bin"
- file size: 4096 Bytes - the same as CONFIG_ENV_SIZE. Other size will cause CRC miscalculation at boot.

CC Piotr Wilczek <[email protected]>
CC Lukasz Majewski <[email protected]>
---
  board/samsung/common/dfu_sample_env.txt |    9 +++++++++
  include/configs/trats.h                 |    3 ++-
  include/configs/trats2.h                |    3 ++-
  3 files changed, 13 insertions(+), 2 deletions(-)

create mode 100644 board/samsung/common/dfu_sample_env.txt

board/samsung/common/dfu_sample_env.txt new file +9 -0
new file mode 100644
index 0000000..d6ee8a2
@@ -0,0 +1,9 @@
+mmcboot=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} ${rootfstype} rootwait ${console}; run loaduimage; bootm 0x40007FC0
+rootfstype=ext4
+loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage
+mmcdev=0
+mmcbootpart=2
+mmcrootpart=5
+console=console=ttySAC2,115200n8
+bootcmd=run mmcboot
+dfu_alt_info=u-boot mmc 80 800;params.bin mmc 0x38 0x8;uImage ext4 0 2
include/configs/trats.h +2 -1
index fdd8b46..d09f7c7 100644
@@ -147,7 +147,8 @@
  	""PARTS_BOOT" part 0 2;" \
  	""PARTS_ROOT" part 0 5;" \
  	""PARTS_DATA" part 0 6;" \
-	""PARTS_UMS" part 0 7\0"
+	""PARTS_UMS" part 0 7;" \
+	"params.bin mmc 0x38 0x8\0"
 
  #define CONFIG_ENV_OVERWRITE
  #define CONFIG_SYS_CONSOLE_INFO_QUIET
include/configs/trats2.h +0 -0
index 83633b0..31c52f1 100644

include/configs/trats2.h line 185

Quoted 9 lines
include/configs/trats2.h +2 -1
@@ -178,7 +178,8 @@
  	""PARTS_BOOT" part 0 2;" \
  	""PARTS_ROOT" part 0 5;" \
  	""PARTS_DATA" part 0 6;" \
-	""PARTS_UMS" part 0 7\0"
+	""PARTS_UMS" part 0 7;" \
+	"params.bin mmc 0x38 0x8\0"
 
  #define CONFIG_EXTRA_ENV_SETTINGS \
  	"bootk=" \

Thank you,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
#2 lore raw

PATCH 1/1 config: trats: trats2: extend dfu_alt_info by env update settings

Best Regards,
Jaehoon Chung

Quoted 77 lines · Przemyslaw Marczak

CC

Quoted 63 lines · Przemyslaw Marczak

This change allows updating environment stored on MMC by dfu or thor.

New setting:
- "params.bin mmc 0x38 0x8"

File params.bin can be generated by: tools/mkenvimage. e.g. ./mkenvimage -s 4096 -o params.bin <env_text_file>

Every new env variable in text file should start with a new line.

Sample env text file:
- board/samsung/common/dfu_sample_env.txt

Requirements:
- file name: "params.bin"
- file size: 4096 Bytes - the same as CONFIG_ENV_SIZE. Other size will cause CRC miscalculation at boot.

CC Piotr Wilczek <[email protected]>
CC Lukasz Majewski <[email protected]>
---
  board/samsung/common/dfu_sample_env.txt |    9 +++++++++
  include/configs/trats.h                 |    3 ++-
  include/configs/trats2.h                |    3 ++-
  3 files changed, 13 insertions(+), 2 deletions(-)

create mode 100644 board/samsung/common/dfu_sample_env.txt

board/samsung/common/dfu_sample_env.txt new file +9 -0
new file mode 100644
index 0000000..d6ee8a2
@@ -0,0 +1,9 @@
+mmcboot=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} ${rootfstype} rootwait ${console}; run loaduimage; bootm 0x40007FC0
+rootfstype=ext4
+loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage
+mmcdev=0
+mmcbootpart=2
+mmcrootpart=5
+console=console=ttySAC2,115200n8
+bootcmd=run mmcboot
+dfu_alt_info=u-boot mmc 80 800;params.bin mmc 0x38 0x8;uImage ext4 0 2
include/configs/trats.h +2 -1
index fdd8b46..d09f7c7 100644
@@ -147,7 +147,8 @@
      ""PARTS_BOOT" part 0 2;" \
      ""PARTS_ROOT" part 0 5;" \
      ""PARTS_DATA" part 0 6;" \
-    ""PARTS_UMS" part 0 7\0"
+    ""PARTS_UMS" part 0 7;" \
+    "params.bin mmc 0x38 0x8\0"
 
  #define CONFIG_ENV_OVERWRITE
  #define CONFIG_SYS_CONSOLE_INFO_QUIET
include/configs/trats2.h +0 -0
index 83633b0..31c52f1 100644

include/configs/trats2.h line 185

Quoted 9 lines
include/configs/trats2.h +2 -1
@@ -178,7 +178,8 @@
      ""PARTS_BOOT" part 0 2;" \
      ""PARTS_ROOT" part 0 5;" \
      ""PARTS_DATA" part 0 6;" \
-    ""PARTS_UMS" part 0 7\0"
+    ""PARTS_UMS" part 0 7;" \
+    "params.bin mmc 0x38 0x8\0"
 
  #define CONFIG_EXTRA_ENV_SETTINGS \
      "bootk=" \

Thank you,

#3 lore raw

PATCH 1/1 config: trats: trats2: extend dfu_alt_info by env update settings

In reply to Przemyslaw Marczak

Hi Przemyslaw,

Quoted 10 lines

This change allows updating environment stored on MMC by dfu or thor.

New setting:
- "params.bin mmc 0x38 0x8"

File params.bin can be generated by: tools/mkenvimage. e.g. ./mkenvimage -s 4096 -o params.bin <env_text_file>

Every new env variable in text file should start with a new line.

Quoted 8 lines

Sample env text file:
- board/samsung/common/dfu_sample_env.txt

Requirements:
- file name: "params.bin"
- file size: 4096 Bytes - the same as CONFIG_ENV_SIZE. Other size will cause CRC miscalculation at boot.

Quoted 53 lines
CC Piotr Wilczek <[email protected]>
CC Lukasz Majewski <[email protected]>
---
 board/samsung/common/dfu_sample_env.txt |    9 +++++++++
 include/configs/trats.h                 |    3 ++-
 include/configs/trats2.h                |    3 ++-
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 board/samsung/common/dfu_sample_env.txt
(quoted diff) +0 -0

b/board/samsung/common/dfu_sample_env.txt new file mode 100644 index 0000000..d6ee8a2

board/samsung/common/dfu_sample_env.txt new file +1 -0
@@ -0,0 +1,9 @@
+mmcboot=setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart}

${rootfstype} rootwait ${console}; run loaduimage; bootm 0x40007FC0 +rootfstype=ext4 +loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage +mmcdev=0

board/samsung/common/dfu_sample_env.txt new file +5 -0
+mmcbootpart=2
+mmcrootpart=5
+console=console=ttySAC2,115200n8
+bootcmd=run mmcboot
+dfu_alt_info=u-boot mmc 80 800;params.bin mmc 0x38 0x8;uImage ext4 0

2 diff --git a/include/configs/trats.h b/include/configs/trats.h index fdd8b46..d09f7c7 100644

include/configs/trats.h +2 -1
@@ -147,7 +147,8 @@
 	""PARTS_BOOT" part 0 2;" \
 	""PARTS_ROOT" part 0 5;" \
 	""PARTS_DATA" part 0 6;" \
-	""PARTS_UMS" part 0 7\0"
+	""PARTS_UMS" part 0 7;" \
+	"params.bin mmc 0x38 0x8\0"
 
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
include/configs/trats2.h +2 -1
index 83633b0..31c52f1 100644
@@ -178,7 +178,8 @@
 	""PARTS_BOOT" part 0 2;" \
 	""PARTS_ROOT" part 0 5;" \
 	""PARTS_DATA" part 0 6;" \
-	""PARTS_UMS" part 0 7\0"
+	""PARTS_UMS" part 0 7;" \
+	"params.bin mmc 0x38 0x8\0"
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"bootk=" \
Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#4 lore raw

PATCH 1/1 config: trats: trats2: extend dfu_alt_info by env update settings

In reply to Przemyslaw Marczak
Quoted 21 lines · Przemyslaw Marczak

This change allows updating environment stored on MMC by dfu or thor.

New setting:
- "params.bin mmc 0x38 0x8"

File params.bin can be generated by: tools/mkenvimage. e.g. ./mkenvimage -s 4096 -o params.bin <env_text_file>

Every new env variable in text file should start with a new line.

Sample env text file:
- board/samsung/common/dfu_sample_env.txt

Requirements:
- file name: "params.bin"
- file size: 4096 Bytes - the same as CONFIG_ENV_SIZE. Other size will cause CRC miscalculation at boot.

CC Piotr Wilczek <[email protected]>
CC Lukasz Majewski <[email protected]>
Quoted 7 lines
---
 board/samsung/common/dfu_sample_env.txt |    9 +++++++++
 include/configs/trats.h                 |    3 ++-
 include/configs/trats2.h                |    3 ++-
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 board/samsung/common/dfu_sample_env.txt

applied to u-boot-samsung.

Thanks,
Minkyu Kang.