Skip to contentSkip to conversation

at91bootstrap: workaround for compile problem

PATCH New [email protected] 1 participant 1 message May 15, 2011 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at91bootstrap: workaround for compile problem

From: Ulf Samuelsson <[email protected]>

---
 ...ap-fix-build-error-in-openembedded-due-to.patch |   49 ++++++++++++++
 ...ch-statements-to-if-statements-to-avoid-b.patch |   70 ++++++++++++++++++++
 recipes/at91bootstrap/at91bootstrap_3.0.bb         |    2 +
 3 files changed, 121 insertions(+), 0 deletions(-)
 create mode 100644 recipes/at91bootstrap/at91bootstrap-3.0/0017-at91bootstrap-fix-build-error-in-openembedded-due-to.patch
 create mode 100644 recipes/at91bootstrap/at91bootstrap-3.0/0018-Change-switch-statements-to-if-statements-to-avoid-b.patch
recipes/at91bootstrap/at91bootstrap-3.0/0017-at91bootstrap-fix-build-error-in-openembedded-due-to.patch new file +49 -0
new file mode 100644
index 0000000..8a60c61
@@ -0,0 +1,49 @@
+From 7487f5e8836f27806ca734e856cdced8a9edc2c3 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf@bulwark.(none)>
+Date: Sat, 16 Apr 2011 12:57:26 +0200
+Subject: [PATCH 1/2] at91bootstrap: fix build error in openembedded due to compiler error
+
+undefined reference to `__gnu_thumb1_case_uqi'
+when using unsigned char in a switch statement
+
+Signed-off-by: Ulf Samuelsson <[email protected]>
+---
+ driver/dma.c |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/driver/dma.c b/driver/dma.c
+index 1373525..33e8466 100644
+--- a/driver/dma.c
++++ b/driver/dma.c
+@@ -257,11 +257,11 @@ void DMA_SetSourceBufferMode(unsigned char channel,
+                              unsigned char addressingType)
+ {
+     unsigned int value;
+-
++    unsigned int mode = transferMode;
+     value = (*(volatile unsigned int *)
+              (AT91C_BASE_HDMA_CH_0 + channel * 40 + HDMA_CTRLB));
+     value &= ~(AT91C_SRC_DSCR | AT91C_SRC_INCR | 1 << 31);
+-    switch (transferMode) {
++    switch (mode) {
+     case DMA_TRANSFER_SINGLE:
+         value |= AT91C_SRC_DSCR | addressingType << 24;
+         break;
+@@ -308,12 +308,12 @@ void DMA_SetDestBufferMode(unsigned char channel,
+                            unsigned char addressingType)
+ {
+     unsigned int value;
+-
++    unsigned int mode = transferMode;
+     value = (*(volatile unsigned int *)
+              (AT91C_BASE_HDMA_CH_0 + channel * 40 + HDMA_CTRLB));
+     value &= ~(unsigned int)(AT91C_DST_DSCR | AT91C_DST_INCR);
+ 
+-    switch (transferMode) {
++    switch (mode) {
+     case DMA_TRANSFER_SINGLE:
+     case DMA_TRANSFER_RELOAD:
+     case DMA_TRANSFER_CONTIGUOUS:
+-- 
+1.6.3.3
+
recipes/at91bootstrap/at91bootstrap-3.0/0018-Change-switch-statements-to-if-statements-to-avoid-b.patch new file +70 -0

70 lines not on this page · raw message

recipes/at91bootstrap/at91bootstrap_3.0.bb +2 -0
index 82a91c6..6d16134 100644
@@ -25,6 +25,8 @@ SRC_URI_append = " \
 	file://0014-Add-support-for-alternate-jump-address.patch;apply=yes \
 	file://0015-Make-MAKENEW-useful.patch;apply=yes \
 	file://0016-Update-configs.patch;apply=yes \
+	file://0017-at91bootstrap-fix-build-error-in-openembedded-due-to.patch;apply=yes \
+	file://0018-Change-switch-statements-to-if-statements-to-avoid-b.patch;apply=yes \
 	"
 
 # S = "${WORKDIR}/${PN}-${PV}"
Signature · 1 line
1.7.4.1