Skip to content

Commit

Permalink
Revert "am335x: work with eeproms with . in them"
Browse files Browse the repository at this point in the history
This reverts commit 72d5d03.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed Jan 16, 2018
1 parent 72d5d03 commit aa19a2c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 51 deletions.
5 changes: 2 additions & 3 deletions build.sh
Expand Up @@ -437,9 +437,8 @@ build_u_boot () {
#r6: wandboard: fix build...
#r7: omap3_beagle: fix old Cx booting..
#r8: am43xx_evm: uname-r support
#r9: am335x_evm: work around cape with . in the name...
#r10: (pending)
RELEASE_VER="-r9" #bump on every change...
#r9: (pending)
RELEASE_VER="-r8" #bump on every change...
#halt_patching_uboot

case "${board}" in
Expand Down
39 changes: 15 additions & 24 deletions patches/next/0002-U-Boot-BeagleBone-Cape-Manager.patch
@@ -1,19 +1,19 @@
From 8d5070e8a2fabb0f91682a7be5568bec566c5c63 Mon Sep 17 00:00:00 2001
From f3dcb949112606b65d643708b07c73682b41113f Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 16 Jan 2018 15:02:29 -0600
Date: Tue, 9 Jan 2018 14:34:40 -0600
Subject: [PATCH 2/2] U-Boot: BeagleBone Cape Manager

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
arch/arm/mach-omap2/am33xx/clock_am33xx.c | 1 +
board/ti/am335x/board.c | 429 ++++++++++++++++++++++++++++++
board/ti/am335x/board.c | 420 ++++++++++++++++++++++++++++++
board/ti/am335x/board.h | 17 ++
board/ti/am335x/hash-string.h | 59 ++++
board/ti/am335x/hash-string.h | 59 +++++
board/ti/am335x/mux.c | 15 ++
include/configs/ti_armv7_common.h | 189 +++++++++++++
include/configs/ti_armv7_common.h | 189 ++++++++++++++
include/configs/ti_armv7_omap.h | 3 +
include/environment/ti/mmc.h | 15 ++
8 files changed, 728 insertions(+)
8 files changed, 719 insertions(+)
create mode 100644 board/ti/am335x/hash-string.h

diff --git a/arch/arm/mach-omap2/am33xx/clock_am33xx.c b/arch/arm/mach-omap2/am33xx/clock_am33xx.c
Expand All @@ -29,7 +29,7 @@ index 1780bbdb6f..a1ee457328 100644
&cmper->spi0clkctrl,
&cmrtc->rtcclkctrl,
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 8a41a03e7a..1df4b18054 100644
index 8a41a03e7a..ef22233161 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -39,6 +39,7 @@
Expand All @@ -40,7 +40,7 @@ index 8a41a03e7a..1df4b18054 100644

DECLARE_GLOBAL_DATA_PTR;

@@ -76,9 +77,429 @@ void do_board_detect(void)
@@ -76,9 +77,420 @@ void do_board_detect(void)
if (ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
CONFIG_EEPROM_CHIP_ADDRESS))
printf("ti_i2c_eeprom_init failed\n");
Expand Down Expand Up @@ -108,9 +108,9 @@ index 8a41a03e7a..1df4b18054 100644
+ /* /lib/firmware/BB-CAPE-DISP-CT4-00A0.dtbo */
+ /* 14 + 16 + 1 + 4 + 5 = 40 */
+ char cape_overlay[40];
+ char cape_header_verify[16];
+ char cape_header_offset=0;
+ char cape_overlay_pass_to_kernel[18];
+ const char s[2] = ".";
+ char *token;
+
+ //Don't forget about the BeagleBone Classic (White)
+ char base_dtb=UNK_BASE_DTB;
Expand Down Expand Up @@ -246,20 +246,11 @@ index 8a41a03e7a..1df4b18054 100644
+ if (cape_header->header == 0xEE3355AA) {
+ strlcpy(cape_overlay, "/lib/firmware/", 14 + 1);
+
+ strncat(cape_header_verify, cape_header->part_number, 16);
+ for ( int i=0; i<16; i++ ) {
+ if (cape_header_verify[i] == 0x00) {
+ cape_header_offset=i;
+ }
+ }
+
+ if (cape_header_offset == 0) {
+ cape_header_offset=16;
+ }
+
+ strncat(cape_overlay, cape_header->part_number, cape_header_offset);
+ /* cape_header->part_number stop at [.] */
+ token = strtok(cape_header->part_number, s);
+ strncat(cape_overlay, token, 16);
+
+ strncat(cape_overlay_pass_to_kernel, cape_header->part_number, cape_header_offset);
+ strncat(cape_overlay_pass_to_kernel, token, 16);
+ strncat(cape_overlay_pass_to_kernel, ",", 1);
+
+ strncat(cape_overlay, "-", 1);
Expand Down Expand Up @@ -470,7 +461,7 @@ index 8a41a03e7a..1df4b18054 100644
#ifndef CONFIG_DM_SERIAL
struct serial_device *default_serial_console(void)
{
@@ -813,6 +1234,14 @@ int board_late_init(void)
@@ -813,6 +1225,14 @@ int board_late_init(void)
}
#endif

Expand Down
39 changes: 15 additions & 24 deletions patches/v2018.01/0002-U-Boot-BeagleBone-Cape-Manager.patch
@@ -1,19 +1,19 @@
From 8d5070e8a2fabb0f91682a7be5568bec566c5c63 Mon Sep 17 00:00:00 2001
From f3dcb949112606b65d643708b07c73682b41113f Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 16 Jan 2018 15:02:29 -0600
Date: Tue, 9 Jan 2018 14:34:40 -0600
Subject: [PATCH 2/2] U-Boot: BeagleBone Cape Manager

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
arch/arm/mach-omap2/am33xx/clock_am33xx.c | 1 +
board/ti/am335x/board.c | 429 ++++++++++++++++++++++++++++++
board/ti/am335x/board.c | 420 ++++++++++++++++++++++++++++++
board/ti/am335x/board.h | 17 ++
board/ti/am335x/hash-string.h | 59 ++++
board/ti/am335x/hash-string.h | 59 +++++
board/ti/am335x/mux.c | 15 ++
include/configs/ti_armv7_common.h | 189 +++++++++++++
include/configs/ti_armv7_common.h | 189 ++++++++++++++
include/configs/ti_armv7_omap.h | 3 +
include/environment/ti/mmc.h | 15 ++
8 files changed, 728 insertions(+)
8 files changed, 719 insertions(+)
create mode 100644 board/ti/am335x/hash-string.h

diff --git a/arch/arm/mach-omap2/am33xx/clock_am33xx.c b/arch/arm/mach-omap2/am33xx/clock_am33xx.c
Expand All @@ -29,7 +29,7 @@ index 1780bbdb6f..a1ee457328 100644
&cmper->spi0clkctrl,
&cmrtc->rtcclkctrl,
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 8a41a03e7a..1df4b18054 100644
index 8a41a03e7a..ef22233161 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -39,6 +39,7 @@
Expand All @@ -40,7 +40,7 @@ index 8a41a03e7a..1df4b18054 100644

DECLARE_GLOBAL_DATA_PTR;

@@ -76,9 +77,429 @@ void do_board_detect(void)
@@ -76,9 +77,420 @@ void do_board_detect(void)
if (ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
CONFIG_EEPROM_CHIP_ADDRESS))
printf("ti_i2c_eeprom_init failed\n");
Expand Down Expand Up @@ -108,9 +108,9 @@ index 8a41a03e7a..1df4b18054 100644
+ /* /lib/firmware/BB-CAPE-DISP-CT4-00A0.dtbo */
+ /* 14 + 16 + 1 + 4 + 5 = 40 */
+ char cape_overlay[40];
+ char cape_header_verify[16];
+ char cape_header_offset=0;
+ char cape_overlay_pass_to_kernel[18];
+ const char s[2] = ".";
+ char *token;
+
+ //Don't forget about the BeagleBone Classic (White)
+ char base_dtb=UNK_BASE_DTB;
Expand Down Expand Up @@ -246,20 +246,11 @@ index 8a41a03e7a..1df4b18054 100644
+ if (cape_header->header == 0xEE3355AA) {
+ strlcpy(cape_overlay, "/lib/firmware/", 14 + 1);
+
+ strncat(cape_header_verify, cape_header->part_number, 16);
+ for ( int i=0; i<16; i++ ) {
+ if (cape_header_verify[i] == 0x00) {
+ cape_header_offset=i;
+ }
+ }
+
+ if (cape_header_offset == 0) {
+ cape_header_offset=16;
+ }
+
+ strncat(cape_overlay, cape_header->part_number, cape_header_offset);
+ /* cape_header->part_number stop at [.] */
+ token = strtok(cape_header->part_number, s);
+ strncat(cape_overlay, token, 16);
+
+ strncat(cape_overlay_pass_to_kernel, cape_header->part_number, cape_header_offset);
+ strncat(cape_overlay_pass_to_kernel, token, 16);
+ strncat(cape_overlay_pass_to_kernel, ",", 1);
+
+ strncat(cape_overlay, "-", 1);
Expand Down Expand Up @@ -470,7 +461,7 @@ index 8a41a03e7a..1df4b18054 100644
#ifndef CONFIG_DM_SERIAL
struct serial_device *default_serial_console(void)
{
@@ -813,6 +1234,14 @@ int board_late_init(void)
@@ -813,6 +1225,14 @@ int board_late_init(void)
}
#endif

Expand Down

0 comments on commit aa19a2c

Please sign in to comment.