[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-60-g5af1ec9
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-02-14 21:54:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 5af1ec9198e4490702239acd340fe1f9c80220f3 (commit)
via 1ae190de599e01607904a2b54e0e124672c49c28 (commit)
from 49954ee73a93547fbdf0dbeb4f946fc4de0f0810 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5af1ec9198e4490702239acd340fe1f9c80220f3
Merge: 1ae190d 49954ee
Author: Eric Jarrige <eri...@ar...>
Date: Tue Feb 14 22:54:21 2012 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 1ae190de599e01607904a2b54e0e124672c49c28
Author: Eric Jarrige <eri...@ar...>
Date: Tue Feb 14 22:53:21 2012 +0100
[UBOOT] apf28: conde and config cleanup
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf28/apf28-u-boot-2011.12.h | 75 +++++---------------
patches/u-boot/2011.12/502-add-apf28.patch | 32 +++++++--
2 files changed, 46 insertions(+), 61 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf28/apf28-u-boot-2011.12.h b/buildroot/target/device/armadeus/apf28/apf28-u-boot-2011.12.h
index 2ea3539..a356c5d 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-u-boot-2011.12.h
+++ b/buildroot/target/device/armadeus/apf28/apf28-u-boot-2011.12.h
@@ -26,8 +26,8 @@
#include <asm/arch/regs-base.h>
#define CONFIG_VERSION_VARIABLE
-#define CONFIG_ENV_VERSION "0.3"
-#define CONFIG_IDENT_STRING " apf28 patch 0.5"
+#define CONFIG_ENV_VERSION "0.4"
+#define CONFIG_IDENT_STRING " apf28 patch 0.6"
/*
* SoC configurations
@@ -43,6 +43,7 @@
#define CONFIG_SYS_NO_FLASH
#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_BOARD_LATE_INIT
#define CONFIG_ARCH_CPU_INIT
#define CONFIG_ARCH_MISC_INIT
@@ -51,8 +52,8 @@
*/
#define CONFIG_SPL
#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
-#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mx28"
-#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"
+#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mx28"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"
#define CONFIG_SPL_LIBCOMMON_SUPPORT
#define CONFIG_SPL_LIBGENERIC_SUPPORT
@@ -65,12 +66,7 @@
#define CONFIG_BOOTP_BOOTPATH
#define CONFIG_BOOTP_BOOTFILESIZE
-/*
-#define CONFIG_BOOTP_DNS
-#define CONFIG_BOOTP_DNS2
-*/
-
-#define CONFIG_BOARD_NAME "apf28"
+#define CONFIG_BOARD_NAME apf28
#define CONFIG_HOSTNAME "apf28"
#define CONFIG_SRV_PATH ""
#define CONFIG_ROOTPATH "/tftpboot/apf28-root"
@@ -132,8 +128,10 @@
/*
* FLASH organization
*/
-#define CONFIG_SYS_MONITOR_OFFSET 0x00000000 /* offset in NAND */
-#define CONFIG_SYS_MONITOR_LEN 0x00300000 /* 3MB */
+/* First 1 MiB reservered for mx28 NAND BCBÂ tables */
+/* last 2 MiB reservered for 2 copies of U-Boot */
+#define CONFIG_SYS_MONITOR_OFFSET 0x00100000 /* offset in NAND */
+#define CONFIG_SYS_MONITOR_LEN 0x00100000 /* 2 x 1MB */
#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET 0x00300000 /* NAND offset */
#define CONFIG_ENV_SIZE 0x00020000 /* 128kB */
@@ -287,7 +285,7 @@
#define CONFIG_INITRD_TAG
#define CONFIG_BOOTDELAY -1
#define CONFIG_ZERO_BOOTDELAY_CHECK
-#define CONFIG_BOOTFILE "uImage"
+#define CONFIG_BOOTFILE MK_STR(CONFIG_BOARD_NAME) "-linux.bin"
#define CONFIG_BOOTARGS \
CONFIG_CONSOLE " root=/dev/mtdblock4 rootfstype=ubifs " MTDPARTS_DEFAULT
@@ -333,47 +331,12 @@
"mmcboot=setenv bootargs ${console} ${mtdparts};" \
"run addmmcargs addipargs; setenv autostart yes;" \
"nboot.jffs2 40800000 0 ${kernel_offset}\0" \
- "update_nand_full_filename=apf28-u-boot.bin\0" \
- "update_nand_firmware_filename=apf28-u-boot.sb\0" \
- "update_nand_firmware_maxsz=0x100000\0" \
- "update_nand_stride=0x40\0" /* MX28 datasheet ch. 12.12 */ \
- "update_nand_count=0x4\0" /* MX28 datasheet ch. 12.12 */ \
- "update_nand_get_fcb_size=" /* Get size of FCB blocks */ \
- "nand device 0 ; " \
- "nand info ; " \
- "setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \
- "setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \
- "update_nand_full=" /* Update FCB, DBBT and FW */ \
- "if tftp ${update_nand_full_filename} ; then " \
- "run update_nand_get_fcb_size ; " \
- "nand scrub -y 0x0 ${filesize} ; " \
- "nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; " \
- "setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \
- "setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \
- "if nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \
- "then echo Flashing of uboot succeed;" \
- "else echo Flashing of uboot failed;" \
- "fi;" \
- "fi; \0" \
- "update_nand_firmware=" /* Update only firmware */ \
- "if tftp ${update_nand_firmware_filename} ; then " \
- "run update_nand_get_fcb_size ; " \
- "setexpr fcb_sz ${update_nand_fcb} * 2 ; " /* FCB + DBBT */ \
- "setexpr fw_sz ${update_nand_firmware_maxsz} * 2 ; " \
- "setexpr fw_off ${fcb_sz} + ${update_nand_firmware_maxsz};" \
- "nand erase ${fcb_sz} ${fw_sz} ; " \
- "nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \
- "nand write ${loadaddr} ${fw_off} ${filesize} ; " \
- "fi\0" \
- "flash_uboot=nand unlock ${uboot_offset} ${uboot_len};" \
- "run update_nand_get_fcb_size ; " \
- "setexpr fcb_sz ${update_nand_fcb} * 2 ; " /* FCB + DBBT */ \
- "setexpr fw_sz ${update_nand_firmware_maxsz} * 2 ; " \
- "setexpr fw_off ${fcb_sz} + ${update_nand_firmware_maxsz};" \
- "if bcb write.nand ; then " \
- "nand erase ${fcb_sz} ${fw_sz} ; " \
- "nand write ${fileaddr} ${fw_off} ${filesize};" \
- "if nand write ${fileaddr} ${fcb_sz} ${filesize};" \
+ "flash_uboot=nand unlock;" \
+ "if bcb nand.write ; then " \
+ "nand erase ${uboot_offset} ${uboot_len} ; " \
+ "nand write ${fileaddr} ${uboot_offset} ${filesize};" \
+ "nand erase ${uboot2_offset} ${uboot_len};" \
+ "if nand write ${fileaddr} ${uboot2_offset} ${filesize};" \
"then nand lock; nand unlock ${env_offset};" \
"echo Flashing of uboot succeed;" \
"else echo Flashing of uboot failed;" \
@@ -384,7 +347,7 @@
"then echo Flashing of kernel succeed;" \
"else echo Flashing of kernel failed;" \
"fi\0" \
- "flash_rootfs=nand erase.part rootfs;" \
+ "flash_rootfs=nand erase.part rootfs;" \
"if nand write.jffs2 ${fileaddr} ${rootfs_offset} ${filesize};"\
"then echo Flashing of rootfs succeed;" \
"else echo Flashing of rootfs failed;" \
@@ -394,7 +357,7 @@
"download_uboot=tftpboot ${loadaddr} " \
" ${serverpath}${board_name}-u-boot.sb\0" \
"download_kernel=tftpboot ${loadaddr} " \
- " ${serverpath}${board_name}-linux.bin\0" \
+ " ${serverpath}${bootfile}\0" \
"download_rootfs=tftpboot ${loadaddr} " \
" ${serverpath}${board_name}-rootfs.ubi\0" \
"update_uboot=run download_uboot flash_uboot\0" \
diff --git a/patches/u-boot/2011.12/502-add-apf28.patch b/patches/u-boot/2011.12/502-add-apf28.patch
index 86a50dd..a8ac987 100644
--- a/patches/u-boot/2011.12/502-add-apf28.patch
+++ b/patches/u-boot/2011.12/502-add-apf28.patch
@@ -1,6 +1,6 @@
--- u-boot-2011.12/board/armadeus/apf28/apf28.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-2011.12/board/armadeus/apf28/apf28.c 2012-01-29 09:57:15.183543034 +0100
-@@ -0,0 +1,220 @@
+@@ -0,0 +1,236 @@
+/*
+ * APF28 motherboard based on DENX M28 module
+ *
@@ -176,6 +176,22 @@
+ return ret;
+}
+
++#ifdef CONFIG_BOARD_LATE_INIT
++int board_late_init(void)
++{
++ char *s;
++
++ /* detect compatibility issue of environment version */
++ s = getenv("env_version");
++ if ((NULL == s) || (0 != strcmp(s, CONFIG_ENV_VERSION))) {
++ printf("*** Warning - Environment version change suggests: "
++ "run flash_reset_env; reset\n");
++ }
++
++ return 0;
++}
++#endif
++
+#ifdef CONFIG_M28_FEC_MAC_IN_OCOTP
+
+#define MXS_OCOTP_MAX_TIMEOUT 1000000
@@ -553,8 +569,8 @@
+
+#########################################################################
--- u-boot-2011.12/board/armadeus/apf28/mx28_bcb.c 1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-2011.12/board/armadeus/apf28/mx28_bcb.c 2012-02-08 23:00:37.501763289 +0100
-@@ -0,0 +1,548 @@
++++ u-boot-2011.12/board/armadeus/apf28/mx28_bcb.c 2012-02-14 11:55:34.376435178 +0100
+@@ -0,0 +1,554 @@
+/*
+ * i.MX28 NAND Boot Control Blocks generator
+ *
@@ -1025,6 +1041,7 @@
+ nand_info_t *nand = &nand_info[0];
+ struct mx28_ocotp_regs *ocotp_regs =
+ (struct mx28_ocotp_regs *)MXS_OCOTP_BASE;
++ char buf [12];
+
+ stride_pages = ((readl(&ocotp_regs->hw_ocotp_rom1) >> 4) & 0x0f) * 64;
+ if (stride_pages < 64) stride_pages = 64;
@@ -1064,6 +1081,11 @@
+ goto err2;
+ }
+
++ sprintf(buf, "0x%08x", fcb->firmware1_starting_sector * nand->writesize);
++ setenv("uboot_offset", buf);
++ sprintf(buf, "0x%08x", fcb->firmware2_starting_sector * nand->writesize);
++ setenv("uboot2_offset", buf);
++
+ printf("NAND BCB tables updated\n");
+ ret = 0;
+
@@ -1083,7 +1105,7 @@
+ if (argc < 2 || argc > 3)
+ goto usage;
+
-+ if (strcmp(argv[1], "write.nand") == 0) {
++ if (strcmp(argv[1], "nand.write") == 0) {
+ if (argc == 3) {
+ arg = simple_strtoul(argv[2], NULL, 16);
+ }
@@ -1100,7 +1122,7 @@
+U_BOOT_CMD(
+ bcb, 2, 1, do_bcb,
+ "mx28 Boot Control Block sub system",
-+ "write.nand [Firmware max size] - Update NAND BCB tables\n"
++ "nand.write [Firmware max size] - Update NAND BCB tables\n"
+ " default firmware max size is 1MiB");
+
--- u-boot-2011.12/board/armadeus/apf28/spl_boot.c 1970-01-01 01:00:00.000000000 +0100
hooks/post-receive
--
armadeus
|