summaryrefslogtreecommitdiff
path: root/board/hymod
diff options
context:
space:
mode:
Diffstat (limited to 'board/hymod')
-rw-r--r--board/hymod/eeprom.c18
-rw-r--r--board/hymod/env.c4
-rw-r--r--board/hymod/global_env16
-rw-r--r--board/hymod/u-boot.lds3
-rw-r--r--board/hymod/u-boot.lds.debug2
5 files changed, 24 insertions, 19 deletions
diff --git a/board/hymod/eeprom.c b/board/hymod/eeprom.c
index 15eb48e..c9b9b18 100644
--- a/board/hymod/eeprom.c
+++ b/board/hymod/eeprom.c
@@ -58,7 +58,7 @@ hymod_eeprom_load (int which, hymod_eeprom_t *ep)
eeprom_read (dev_addr, offset, (uchar *)&crc, sizeof (ulong));
offset += sizeof (ulong);
- if (crc32 (crc32 (0, (char *)&hdr, sizeof hdr), data, len) != crc)
+ if (crc32 (crc32 (0, (uchar *)&hdr, sizeof hdr), data, len) != crc)
return (0);
ep->ver = hdr.ver;
@@ -260,7 +260,7 @@ uint_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp)
char *eval;
ulong lval;
- lval = simple_strtol (val, &eval, 10);
+ lval = simple_strtol ((char *)val, &eval, 10);
if ((uchar *)eval == val || *eval != '\0') {
printf ("%s rec (%s) is not a valid uint\n", rp->name, val);
@@ -315,12 +315,12 @@ static uchar *
date_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp)
{
hymod_date_t date;
- uchar *p = val;
+ char *p = (char *)val;
char *ep;
ulong lval;
lval = simple_strtol (p, &ep, 10);
- if ((uchar *)ep == p || *ep++ != '-') {
+ if (ep == p || *ep++ != '-') {
bad_date:
printf ("%s rec (%s) is not a valid date\n", rp->name, val);
return (NULL);
@@ -330,12 +330,12 @@ bad_date:
date.year = lval;
lval = simple_strtol (p = ep, &ep, 10);
- if ((uchar *)ep == p || *ep++ != '-' || lval == 0 || lval > 12)
+ if (ep == p || *ep++ != '-' || lval == 0 || lval > 12)
goto bad_date;
date.month = lval;
lval = simple_strtol (p = ep, &ep, 10);
- if ((uchar *)ep == p || *ep != '\0' || lval == 0 || lval > 31)
+ if (ep == p || *ep != '\0' || lval == 0 || lval > 31)
goto bad_date;
date.day = lval;
@@ -359,7 +359,7 @@ string_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp)
{
uint len;
- if ((len = strlen (val)) > rp->maxlen) {
+ if ((len = strlen ((char *)val)) > rp->maxlen) {
printf ("%s rec (%s) string is too long (%d>%d)\n",
rp->name, val, len, rp->maxlen);
return (NULL);
@@ -387,7 +387,7 @@ bytes_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp)
for (nbytes = 0, p = val; *p != '\0'; p = (uchar *)ep) {
ulong lval;
- lval = simple_strtol (p, &ep, 10);
+ lval = simple_strtol ((char *)p, &ep, 10);
if ((uchar *)ep == p || (*ep != '\0' && *ep != ',') || \
lval >= 256) {
printf ("%s rec (%s) byte array has invalid uint\n",
@@ -451,7 +451,7 @@ eerec_callback (uchar *name, uchar *val)
eerec_map_t *rp;
for (rp = eerec_map; rp < &eerec_map[neerecs]; rp++)
- if (strcmp (name, rp->name) == 0)
+ if (strcmp ((char *)name, rp->name) == 0)
break;
if (rp >= &eerec_map[neerecs])
diff --git a/board/hymod/env.c b/board/hymod/env.c
index f58aec2..f9e1421 100644
--- a/board/hymod/env.c
+++ b/board/hymod/env.c
@@ -38,7 +38,7 @@ env_callback (uchar *name, uchar *value)
char ov[CFG_CBSIZE], nv[CFG_CBSIZE], *p, *q, *nn, c, *curver, *newver;
int override = 1, append = 0, remove = 0, nnl, ovl, nvl;
- nn = name;
+ nn = (char *)name;
if (*nn == '-') {
override = 0;
@@ -68,7 +68,7 @@ env_callback (uchar *name, uchar *value)
return (0);
}
- p = value;
+ p = (char *)value;
q = nv;
while ((c = *p) == ' ' || c == '\t')
diff --git a/board/hymod/global_env b/board/hymod/global_env
index 43cab1d..f61d080 100644
--- a/board/hymod/global_env
+++ b/board/hymod/global_env
@@ -135,26 +135,26 @@ newboot=run fetchboot eraseboot copyboot cmpboot
fetchlinux=tftp 100000 /hymod/linux.bin
eraselinux=erase 1:2-4
-copylinux=cp.b 100000 40080000 $(filesize)
-cmplinux=cmp.b 100000 40080000 $(filesize)
+copylinux=cp.b 100000 40080000 ${filesize}
+cmplinux=cmp.b 100000 40080000 ${filesize}
newlinux=run fetchlinux eraselinux copylinux cmplinux
fetchaltlinux=tftp 100000 /hymod/altlinux.bin
erasealtlinux=erase 1:5-7
-copyaltlinux=cp.b 100000 40140000 $(filesize)
-cmpaltlinux=cmp.b 100000 40140000 $(filesize)
+copyaltlinux=cp.b 100000 40140000 ${filesize}
+cmpaltlinux=cmp.b 100000 40140000 ${filesize}
newaltlinux=run fetchaltlinux erasealtlinux copyaltlinux cmpaltlinux
fetchroot=tftp 100000 /hymod/root.bin
eraseroot=erase 1:8-47
-copyroot=cp.b 100000 40200000 $(filesize)
-cmproot=cmp.b 100000 40200000 $(filesize)
+copyroot=cp.b 100000 40200000 ${filesize}
+cmproot=cmp.b 100000 40200000 ${filesize}
newroot=run fetchroot eraseroot copyroot cmproot
fetchard=tftp 100000 /hymod/apprd.bin
eraseard=erase 1:48-63
-copyard=cp.b 100000 40c00000 $(filesize)
-cmpard=cmp.b 100000 40c00000 $(filesize)
+copyard=cp.b 100000 40c00000 ${filesize}
+cmpard=cmp.b 100000 40c00000 ${filesize}
newapprd=run fetchard eraseard copyard cmpard
# pass above map to linux mtd driver
diff --git a/board/hymod/u-boot.lds b/board/hymod/u-boot.lds
index 1e20425..337a395 100644
--- a/board/hymod/u-boot.lds
+++ b/board/hymod/u-boot.lds
@@ -79,6 +79,7 @@ SECTIONS
*(.rodata)
*(.rodata1)
*(.rodata.str1.4)
+ *(.eh_frame)
}
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
@@ -111,11 +112,13 @@ SECTIONS
_edata = .;
PROVIDE (edata = .);
+ . = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
+ . = .;
__start___ex_table = .;
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
diff --git a/board/hymod/u-boot.lds.debug b/board/hymod/u-boot.lds.debug
index c0ee849..ddd4678 100644
--- a/board/hymod/u-boot.lds.debug
+++ b/board/hymod/u-boot.lds.debug
@@ -74,6 +74,8 @@ SECTIONS
{
*(.rodata)
*(.rodata1)
+ *(.rodata.str1.4)
+ *(.eh_frame)
}
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }