From 1ea726f64026f8974887950e4911d19da5f36f57 Mon Sep 17 00:00:00 2001 From: Frans Meulenbroeks Date: Thu, 25 Feb 2010 21:28:50 +0100 Subject: u-boot git: updated calamari SRCREV, add new functionality Ths commit is for calamari (MPC8636DS) only. It moves to the head of the mpc85xx git I also added several patches. These provide additional functionality w.r.t. expression handling, As they are not calamari specific I've put them in the u-boot-git directory. I did not want to apply them right away as I am not sure if they apply to all the various SRCREVs that are build with this recipe and I did want to break someone else's u-boot. The patches are also submitted upstream Signed-off-by: Frans Meulenbroeks --- ...002-cmd_itest.c-fix-pointer-dereferencing.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch (limited to 'recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch') diff --git a/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch b/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch new file mode 100644 index 0000000000..1b423b9195 --- /dev/null +++ b/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch @@ -0,0 +1,40 @@ +Subject: [PATCH 2/2] cmd_itest.c: fix pointer dereferencing +Date: Mon, 22 Feb 2010 22:49:06 +0100 +Message-Id: <1266875346-17025-1-git-send-email-fransmeulenbroeks@gmail.com> +X-Mailer: git-send-email 1.6.4.2 + +fix pointer dereferencing +if the size is .b and .w an 8 or 16 bit access is done. + +Signed-off-by: Frans Meulenbroeks +--- + common/cmd_itest.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/common/cmd_itest.c b/common/cmd_itest.c +index 5b301bf..58c5e7b 100644 +--- a/common/cmd_itest.c ++++ b/common/cmd_itest.c +@@ -66,12 +66,17 @@ op_tbl_t op_table [] = { + + static long evalexp(char *s, int w) + { +- long l, *p; ++ long l = 0; ++ long *p; + + /* if the parameter starts with a * then assume is a pointer to the value we want */ + if (s[0] == '*') { + p = (long *)simple_strtoul(&s[1], NULL, 16); +- l = *p; ++ switch (w) { ++ case 1: return((long)(*(unsigned char *)p)); ++ case 2: return((long)(*(unsigned short *)p)); ++ case 4: return(*p); ++ } + } else { + l = simple_strtoul(s, NULL, 16); + } +-- +1.6.4.2 + -- cgit 1.2.3-korg