summaryrefslogtreecommitdiffstats
path: root/patches/CanFestival-3-20081204-1
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-11-01 15:31:08 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-11-01 15:31:08 +0100
commitb081c4dad12b1ccea61e87e9cd087aba729e93c7 (patch)
treeb22b62afb0375f647b0eb2e0c0d398e8a2e1e926 /patches/CanFestival-3-20081204-1
parent73bdaaa15eb447b6111c06a5728c10015d53c92f (diff)
downloadptxdist-b081c4dad12b1ccea61e87e9cd087aba729e93c7.tar.gz
ptxdist-b081c4dad12b1ccea61e87e9cd087aba729e93c7.tar.xz
canfestival: clean up patches
Based on a patch by Robert Schwebel <r.schwebel@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/CanFestival-3-20081204-1')
-rw-r--r--patches/CanFestival-3-20081204-1/0001-add-DESTDIR-to-Makefile.in.patch (renamed from patches/CanFestival-3-20081204-1/fix-destdir.diff)161
-rw-r--r--patches/CanFestival-3-20081204-1/0002-fix-for-ldconfig-crash-on-make-install.patch24
-rw-r--r--patches/CanFestival-3-20081204-1/0003-install-networkedit.ico.patch (renamed from patches/CanFestival-3-20081204-1/install-networkedit_ico.diff)17
-rw-r--r--patches/CanFestival-3-20081204-1/0004-fix-for-CAN-ID-byteorder.patch (renamed from patches/CanFestival-3-20081204-1/byteorder.diff)243
-rw-r--r--patches/CanFestival-3-20081204-1/fix-ldconfig.diff24
-rw-r--r--patches/CanFestival-3-20081204-1/series11
6 files changed, 253 insertions, 227 deletions
diff --git a/patches/CanFestival-3-20081204-1/fix-destdir.diff b/patches/CanFestival-3-20081204-1/0001-add-DESTDIR-to-Makefile.in.patch
index 0b4acf9e9..2d0c57330 100644
--- a/patches/CanFestival-3-20081204-1/fix-destdir.diff
+++ b/patches/CanFestival-3-20081204-1/0001-add-DESTDIR-to-Makefile.in.patch
@@ -1,33 +1,27 @@
-Subject: add $(DESTDIR) to Makefile.in
From: Markus Messmer <mme@pengutronix.de>
+Date: Sat, 29 Oct 2011 18:32:03 +0200
+Subject: [PATCH] add $(DESTDIR) to Makefile.in
Makefile is not $(DESTDIR) aware, this patch adds some $(DESTDIR)s.
Signed-off-by: Markus Messmer <mme@pengutronix.de>
-
---
# 20081216 mme: ready for upstream, should be posted
-Index: CanFestival-3-20080926/drivers/timers_unix/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/drivers/timers_unix/Makefile.in 2008-09-26 12:22:50.000000000 +0200
-+++ CanFestival-3-20080926/drivers/timers_unix/Makefile.in 2008-09-26 12:22:53.000000000 +0200
-@@ -48,8 +48,8 @@
- $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
-
- install:
-- mkdir -p $(PREFIX)/include/canfestival
-- cp $(SRC_HFILES) $(PREFIX)/include/canfestival
-+ mkdir -p $(DESTDIR)$(PREFIX)/include/canfestival
-+ cp $(SRC_HFILES) $(DESTDIR)$(PREFIX)/include/canfestival
-
- uninstall:
- rm -f $(TARGET_HFILES)
-Index: CanFestival-3-20080926/drivers/can_socket/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/drivers/can_socket/Makefile.in 2008-09-26 12:22:50.000000000 +0200
-+++ CanFestival-3-20080926/drivers/can_socket/Makefile.in 2008-09-26 12:22:53.000000000 +0200
-@@ -56,8 +56,8 @@
+ drivers/can_socket/Makefile.in | 4 ++--
+ drivers/timers_unix/Makefile.in | 4 ++--
+ drivers/unix/Makefile.in | 8 ++++----
+ examples/TestMasterMicroMod/Makefile.in | 4 ++--
+ examples/TestMasterSlave/Makefile.in | 4 ++--
+ objdictgen/Makefile.in | 22 +++++++++++-----------
+ src/Makefile.in | 12 ++++++------
+ 7 files changed, 29 insertions(+), 29 deletions(-)
+
+diff --git a/drivers/can_socket/Makefile.in b/drivers/can_socket/Makefile.in
+index 2c94b8c..34ecf1a 100644
+--- a/drivers/can_socket/Makefile.in
++++ b/drivers/can_socket/Makefile.in
+@@ -56,8 +56,8 @@ libcanfestival_$(CAN_DRIVER).so: $(OBJS)
$(CC) -shared -Wl,-soname,libcanfestival_$(CAN_DRIVER).so $(CAN_DLL_CFLAGS) -o $@ $<
install: libcanfestival_$(CAN_DRIVER).so
@@ -38,90 +32,75 @@ Index: CanFestival-3-20080926/drivers/can_socket/Makefile.in
uninstall:
rm -f $(TARGET_SOFILES)
-Index: CanFestival-3-20080926/drivers/unix/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/drivers/unix/Makefile.in 2008-09-26 12:22:50.000000000 +0200
-+++ CanFestival-3-20080926/drivers/unix/Makefile.in 2008-09-26 12:22:53.000000000 +0200
-@@ -97,10 +97,10 @@
- $(BINUTILS_PREFIX)ranlib $@
+diff --git a/drivers/timers_unix/Makefile.in b/drivers/timers_unix/Makefile.in
+index d2bc080..a5c141d 100644
+--- a/drivers/timers_unix/Makefile.in
++++ b/drivers/timers_unix/Makefile.in
+@@ -48,8 +48,8 @@ driver: $(OBJS)
+ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
- install: libcanfestival_$(TARGET).a
-- mkdir -p $(PREFIX)/lib/
+ install:
- mkdir -p $(PREFIX)/include/canfestival
-- cp libcanfestival_$(TARGET).a $(PREFIX)/lib/
- cp $(SRC_HFILES) $(PREFIX)/include/canfestival
-+ mkdir -p $(DESTDIR)$(PREFIX)/lib/
+ mkdir -p $(DESTDIR)$(PREFIX)/include/canfestival
-+ cp libcanfestival_$(TARGET).a $(DESTDIR)$(PREFIX)/lib/
+ cp $(SRC_HFILES) $(DESTDIR)$(PREFIX)/include/canfestival
uninstall:
- rm -f $(PREFIX)/lib/libcanfestival_$(TARGET).a
-Index: CanFestival-3-20080926/src/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/src/Makefile.in 2008-09-26 12:22:50.000000000 +0200
-+++ CanFestival-3-20080926/src/Makefile.in 2008-09-26 12:22:53.000000000 +0200
-@@ -87,8 +87,8 @@
-
- install:
- $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules_install
-- mkdir -p $(PREFIX)/include/canfestival
-- cp ../include/*.h $(PREFIX)/include/canfestival
-+ mkdir -p $(DESTDIR)$(PREFIX)/include/canfestival
-+ cp ../include/*.h $(DESTDIR)$(PREFIX)/include/canfestival
-
- uninstall:
- rm -rf $(PREFIX)/include/canfestival
-@@ -114,10 +114,10 @@
- $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
+ rm -f $(TARGET_HFILES)
+diff --git a/drivers/unix/Makefile.in b/drivers/unix/Makefile.in
+index 9c92293..f8cc854 100644
+--- a/drivers/unix/Makefile.in
++++ b/drivers/unix/Makefile.in
+@@ -97,10 +97,10 @@ libcanfestival_$(TARGET).a: $(OBJS)
+ $(BINUTILS_PREFIX)ranlib $@
- install: libcanfestival.a
+ install: libcanfestival_$(TARGET).a
- mkdir -p $(PREFIX)/lib/
- mkdir -p $(PREFIX)/include/canfestival
-- cp libcanfestival.a $(PREFIX)/lib/
-- cp ../include/*.h $(PREFIX)/include/canfestival
+- cp libcanfestival_$(TARGET).a $(PREFIX)/lib/
+- cp $(SRC_HFILES) $(PREFIX)/include/canfestival
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/
+ mkdir -p $(DESTDIR)$(PREFIX)/include/canfestival
-+ cp libcanfestival.a $(DESTDIR)$(PREFIX)/lib/
-+ cp ../include/*.h $(DESTDIR)$(PREFIX)/include/canfestival
++ cp libcanfestival_$(TARGET).a $(DESTDIR)$(PREFIX)/lib/
++ cp $(SRC_HFILES) $(DESTDIR)$(PREFIX)/include/canfestival
uninstall:
- rm -f $(PREFIX)/lib/libcanfestival.a
-Index: CanFestival-3-20080926/examples/TestMasterSlave/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/examples/TestMasterSlave/Makefile.in 2008-09-26 12:22:50.000000000 +0200
-+++ CanFestival-3-20080926/examples/TestMasterSlave/Makefile.in 2008-09-26 12:22:53.000000000 +0200
-@@ -87,8 +87,8 @@
+ rm -f $(PREFIX)/lib/libcanfestival_$(TARGET).a
+diff --git a/examples/TestMasterMicroMod/Makefile.in b/examples/TestMasterMicroMod/Makefile.in
+index bb15b55..97c3357 100644
+--- a/examples/TestMasterMicroMod/Makefile.in
++++ b/examples/TestMasterMicroMod/Makefile.in
+@@ -74,8 +74,8 @@ mrproper: clean
rm -f TestMaster.c
- install: TestMasterSlave
+ install: TestMasterMicroMod
- mkdir -p $(PREFIX)/bin/
- cp $< $(PREFIX)/bin/
+ mkdir -p $(DESTDIR)$(PREFIX)/bin/
+ cp $< $(DESTDIR)$(PREFIX)/bin/
uninstall:
- rm -f $(PREFIX)/bin/TestMasterSlave
-Index: CanFestival-3-20080926/examples/TestMasterMicroMod/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/examples/TestMasterMicroMod/Makefile.in 2008-09-26 12:22:50.000000000 +0200
-+++ CanFestival-3-20080926/examples/TestMasterMicroMod/Makefile.in 2008-09-26 12:22:53.000000000 +0200
-@@ -74,8 +74,8 @@
+ rm -f $(PREFIX)/bin/TestMasterMicroMod
+diff --git a/examples/TestMasterSlave/Makefile.in b/examples/TestMasterSlave/Makefile.in
+index 862ee35..b8ffd2f 100644
+--- a/examples/TestMasterSlave/Makefile.in
++++ b/examples/TestMasterSlave/Makefile.in
+@@ -87,8 +87,8 @@ mrproper: clean
rm -f TestMaster.c
- install: TestMasterMicroMod
+ install: TestMasterSlave
- mkdir -p $(PREFIX)/bin/
- cp $< $(PREFIX)/bin/
+ mkdir -p $(DESTDIR)$(PREFIX)/bin/
+ cp $< $(DESTDIR)$(PREFIX)/bin/
uninstall:
- rm -f $(PREFIX)/bin/TestMasterMicroMod
-Index: CanFestival-3-20080926/objdictgen/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/objdictgen/Makefile.in 2008-09-26 12:22:50.000000000 +0200
-+++ CanFestival-3-20080926/objdictgen/Makefile.in 2008-09-26 12:24:52.000000000 +0200
-@@ -35,19 +35,19 @@
+ rm -f $(PREFIX)/bin/TestMasterSlave
+diff --git a/objdictgen/Makefile.in b/objdictgen/Makefile.in
+index bd9db22..16a0f67 100644
+--- a/objdictgen/Makefile.in
++++ b/objdictgen/Makefile.in
+@@ -35,19 +35,19 @@ gnosis/version.py:
rm -rf gnosis_extract
install: gnosis
@@ -152,3 +131,33 @@ Index: CanFestival-3-20080926/objdictgen/Makefile.in
clean:
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 3613b92..2212908 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -87,8 +87,8 @@ clean:
+
+ install:
+ $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules_install
+- mkdir -p $(PREFIX)/include/canfestival
+- cp ../include/*.h $(PREFIX)/include/canfestival
++ mkdir -p $(DESTDIR)$(PREFIX)/include/canfestival
++ cp ../include/*.h $(DESTDIR)$(PREFIX)/include/canfestival
+
+ uninstall:
+ rm -rf $(PREFIX)/include/canfestival
+@@ -114,10 +114,10 @@ $(TARGET)_%o: %c
+ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $<
+
+ install: libcanfestival.a
+- mkdir -p $(PREFIX)/lib/
+- mkdir -p $(PREFIX)/include/canfestival
+- cp libcanfestival.a $(PREFIX)/lib/
+- cp ../include/*.h $(PREFIX)/include/canfestival
++ mkdir -p $(DESTDIR)$(PREFIX)/lib/
++ mkdir -p $(DESTDIR)$(PREFIX)/include/canfestival
++ cp libcanfestival.a $(DESTDIR)$(PREFIX)/lib/
++ cp ../include/*.h $(DESTDIR)$(PREFIX)/include/canfestival
+
+ uninstall:
+ rm -f $(PREFIX)/lib/libcanfestival.a
diff --git a/patches/CanFestival-3-20081204-1/0002-fix-for-ldconfig-crash-on-make-install.patch b/patches/CanFestival-3-20081204-1/0002-fix-for-ldconfig-crash-on-make-install.patch
new file mode 100644
index 000000000..0c491223f
--- /dev/null
+++ b/patches/CanFestival-3-20081204-1/0002-fix-for-ldconfig-crash-on-make-install.patch
@@ -0,0 +1,24 @@
+From: Markus Messmer <mme@pengutronix.de>
+Date: Sat, 29 Oct 2011 18:32:03 +0200
+Subject: [PATCH] fix for ldconfig crash on make install
+
+Installing fails due to ldconfig failure when running as non root user.
+
+Signed-off-by: Markus Messmer <mme@pengutronix.de>
+---
+ Makefile.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 957281e..bdfff24 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,7 +46,7 @@ install: canfestival driver
+ $(MAKE) -C src $@
+ $(MAKE) -C examples $@
+ $(MAKE) -C objdictgen $@
+- ldconfig
++ -ldconfig
+
+ uninstall:
+ $(MAKE) -C drivers $@
diff --git a/patches/CanFestival-3-20081204-1/install-networkedit_ico.diff b/patches/CanFestival-3-20081204-1/0003-install-networkedit.ico.patch
index 5111fd36f..180e8bfa1 100644
--- a/patches/CanFestival-3-20081204-1/install-networkedit_ico.diff
+++ b/patches/CanFestival-3-20081204-1/0003-install-networkedit.ico.patch
@@ -1,17 +1,20 @@
-Subject: install networkedit.ico
From: Markus Messmer <mme@pengutronix.de>
+Date: Sat, 29 Oct 2011 18:32:03 +0200
+Subject: [PATCH] install networkedit.ico
networkedit.ico does not get installed by default, objdictedit complains about
it. This patch adds it to the installed files.
Signed-off-by: Markus Messmer <mme@pengutronix.de>
-
---
-Index: CanFestival-3-20080926/objdictgen/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/objdictgen/Makefile.in 2008-09-26 12:26:30.000000000 +0200
-+++ CanFestival-3-20080926/objdictgen/Makefile.in 2008-09-26 12:27:58.000000000 +0200
-@@ -36,7 +36,7 @@
+ objdictgen/Makefile.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/objdictgen/Makefile.in b/objdictgen/Makefile.in
+index 16a0f67..edeac27 100644
+--- a/objdictgen/Makefile.in
++++ b/objdictgen/Makefile.in
+@@ -36,7 +36,7 @@ gnosis/version.py:
install: gnosis
mkdir -p $(DESTDIR)$(PREFIX)/objdictgen
diff --git a/patches/CanFestival-3-20081204-1/byteorder.diff b/patches/CanFestival-3-20081204-1/0004-fix-for-CAN-ID-byteorder.patch
index d6bdaddde..41a2a3c63 100644
--- a/patches/CanFestival-3-20081204-1/byteorder.diff
+++ b/patches/CanFestival-3-20081204-1/0004-fix-for-CAN-ID-byteorder.patch
@@ -1,5 +1,6 @@
-Subject: fix for CAN ID byteorder
From: Markus Messmer <mme@pengutronix.de>
+Date: Sat, 29 Oct 2011 18:32:03 +0200
+Subject: [PATCH] fix for CAN ID byteorder
The can identifier does not need to get switched when compiling for big endian
machines.
@@ -7,27 +8,60 @@ machines.
FIXME rsc: needs to be made architecture independend.
Signed-off-by: Markus Messmer <mme@pengutronix.de>
-
---
-# datum: 16.12.08 mme: vielleicht auch nur ein hack der hier funktioniert
-Index: CanFestival-3-20080926/src/nmtMaster.c
-===================================================================
---- CanFestival-3-20080926.orig/src/nmtMaster.c 2008-01-25 19:01:58.000000000 +0100
-+++ CanFestival-3-20080926/src/nmtMaster.c 2008-09-30 16:07:54.000000000 +0200
-@@ -74,7 +74,7 @@
+ include/objdictdef.h | 4 ++--
+ src/emcy.c | 4 ++--
+ src/lifegrd.c | 4 ++--
+ src/lss.c | 4 ++--
+ src/nmtMaster.c | 2 +-
+ src/nmtSlave.c | 2 +-
+ src/pdo.c | 20 ++++++++++----------
+ src/sdo.c | 10 +++++-----
+ src/states.c | 2 +-
+ src/sync.c | 2 +-
+ 10 files changed, 27 insertions(+), 27 deletions(-)
+
+diff --git a/include/objdictdef.h b/include/objdictdef.h
+index 8361ee6..40ee460 100644
+--- a/include/objdictdef.h
++++ b/include/objdictdef.h
+@@ -118,7 +118,7 @@ typedef const indextable * (*scanIndexOD_t)(UNS16 wIndex, UNS32 * errorCode, ODC
+ /************************** MACROS *********************************/
- /* message configuration */
- UNS16 tmp = nodeId | (NODE_GUARD << 7);
-- m.cob_id = UNS16_LE(tmp);
-+ m.cob_id = tmp;
- m.rtr = REQUEST;
- m.len = 1;
+ /* CANopen usefull helpers */
+-#define GET_NODE_ID(m) (UNS16_LE(m.cob_id) & 0x7f)
+-#define GET_FUNCTION_CODE(m) (UNS16_LE(m.cob_id) >> 7)
++#define GET_NODE_ID(m) (m.cob_id & 0x7f)
++#define GET_FUNCTION_CODE(m) (m.cob_id >> 7)
-Index: CanFestival-3-20080926/src/lifegrd.c
-===================================================================
---- CanFestival-3-20080926.orig/src/lifegrd.c 2008-09-30 16:09:57.000000000 +0200
-+++ CanFestival-3-20080926/src/lifegrd.c 2008-09-30 16:10:14.000000000 +0200
-@@ -103,7 +103,7 @@
+ #endif /* __objdictdef_h__ */
+diff --git a/src/emcy.c b/src/emcy.c
+index 272442a..0a3ca92 100644
+--- a/src/emcy.c
++++ b/src/emcy.c
+@@ -101,7 +101,7 @@ UNS8 sendEMCY(CO_Data* d, UNS16 errCode, UNS8 errRegister)
+
+ MSG_WAR(0x3051, "sendEMCY", 0);
+
+- m.cob_id = UNS16_LE(*(UNS32*)d->error_cobid);
++ m.cob_id = *(UNS32*)d->error_cobid;
+ m.rtr = NOT_A_REQUEST;
+ m.len = 8;
+ m.data[0] = errCode & 0xFF; /* LSB */
+@@ -239,7 +239,7 @@ void proceedEMCY(CO_Data* d, Message* m)
+ }
+
+ /* post the received EMCY */
+- nodeID = UNS16_LE(m->cob_id) & 0x7F;
++ nodeID = m->cob_id & 0x7F;
+ errCode = m->data[0] | ((UNS16)m->data[1] << 8);
+ errReg = m->data[2];
+ (*d->post_emcy)(d, nodeID, errCode, errReg);
+diff --git a/src/lifegrd.c b/src/lifegrd.c
+index 54b14f3..3a6530b 100644
+--- a/src/lifegrd.c
++++ b/src/lifegrd.c
+@@ -103,7 +103,7 @@ void proceedNODE_GUARD(CO_Data* d, Message* m )
{
Message msg;
UNS16 tmp = *d->bDeviceNodeId + 0x700;
@@ -36,7 +70,7 @@ Index: CanFestival-3-20080926/src/lifegrd.c
msg.len = (UNS8)0x01;
msg.rtr = 0;
msg.data[0] = d->nodeState;
-@@ -180,7 +180,7 @@
+@@ -180,7 +180,7 @@ void ProducerHearbeatAlarm(CO_Data* d, UNS32 id)
** the node-id of this device.
*/
UNS16 tmp = *d->bDeviceNodeId + 0x700;
@@ -45,11 +79,46 @@ Index: CanFestival-3-20080926/src/lifegrd.c
msg.len = (UNS8)0x01;
msg.rtr = 0;
msg.data[0] = d->nodeState; /* No toggle for heartbeat !*/
-Index: CanFestival-3-20080926/src/nmtSlave.c
-===================================================================
---- CanFestival-3-20080926.orig/src/nmtSlave.c 2008-09-30 16:12:04.000000000 +0200
-+++ CanFestival-3-20080926/src/nmtSlave.c 2008-09-30 16:12:13.000000000 +0200
-@@ -128,7 +128,7 @@
+diff --git a/src/lss.c b/src/lss.c
+index 2febb62..d244d36 100644
+--- a/src/lss.c
++++ b/src/lss.c
+@@ -330,7 +330,7 @@ UNS8 sendSlaveLSSMessage(CO_Data* d, UNS8 command,void *dat1,void *dat2)
+ m.len = 8;
+ m.rtr = NOT_A_REQUEST;
+ m.data[0]=command;
+- m.cob_id=UNS16_LE(SLSS_ADRESS);
++ m.cob_id=SLSS_ADRESS;
+
+ /* Tha data sent with the msg depends on the command */
+ switch(command){
+@@ -397,7 +397,7 @@ UNS8 sendMasterLSSMessage(CO_Data* d, UNS8 command,void *dat1,void *dat2)
+ m.len = 8;
+ m.rtr = NOT_A_REQUEST;
+ m.data[0]=command;
+- m.cob_id=UNS16_LE(MLSS_ADRESS);
++ m.cob_id=MLSS_ADRESS;
+
+ /* Tha data sent with the msg depends on the command */
+ switch(command){
+diff --git a/src/nmtMaster.c b/src/nmtMaster.c
+index 22b11c8..9e3a80f 100644
+--- a/src/nmtMaster.c
++++ b/src/nmtMaster.c
+@@ -74,7 +74,7 @@ UNS8 masterSendNMTnodeguard(CO_Data* d, UNS8 nodeId)
+
+ /* message configuration */
+ UNS16 tmp = nodeId | (NODE_GUARD << 7);
+- m.cob_id = UNS16_LE(tmp);
++ m.cob_id = tmp;
+ m.rtr = REQUEST;
+ m.len = 1;
+
+diff --git a/src/nmtSlave.c b/src/nmtSlave.c
+index 0ff2eba..ee6efee 100644
+--- a/src/nmtSlave.c
++++ b/src/nmtSlave.c
+@@ -128,7 +128,7 @@ UNS8 slaveSendBootUp(CO_Data* d)
/* message configuration */
{
UNS16 tmp = NODE_GUARD << 7 | *d->bDeviceNodeId;
@@ -58,11 +127,11 @@ Index: CanFestival-3-20080926/src/nmtSlave.c
}
m.rtr = NOT_A_REQUEST;
m.len = 1;
-Index: CanFestival-3-20080926/src/pdo.c
-===================================================================
---- CanFestival-3-20080926.orig/src/pdo.c 2008-09-30 16:10:42.000000000 +0200
-+++ CanFestival-3-20080926/src/pdo.c 2008-09-30 16:17:34.000000000 +0200
-@@ -57,7 +57,7 @@
+diff --git a/src/pdo.c b/src/pdo.c
+index 457c495..c435d7a 100644
+--- a/src/pdo.c
++++ b/src/pdo.c
+@@ -55,7 +55,7 @@ UNS8 buildPDO (CO_Data * d, UNS8 numPdo, Message * pdo)
UNS8 offset = 0x00;
const UNS8 *pMappingCount = (UNS8 *) TPDO_map->pSubindex[0].pObject;
@@ -71,7 +140,7 @@ Index: CanFestival-3-20080926/src/pdo.c
pdo->rtr = NOT_A_REQUEST;
MSG_WAR (0x3009, " PDO CobId is : ",
-@@ -143,7 +143,7 @@
+@@ -141,7 +141,7 @@ sendPDOrequest (CO_Data * d, UNS16 RPDOIndex)
MSG_WAR (0x3930, "sendPDOrequest cobId is : ", *pwCobId);
{
Message pdo;
@@ -80,7 +149,7 @@ Index: CanFestival-3-20080926/src/pdo.c
pdo.rtr = REQUEST;
pdo.len = 0;
return canSend (d->canHandle, &pdo);
-@@ -186,7 +186,7 @@
+@@ -184,7 +184,7 @@ proceedPDO (CO_Data * d, Message * m)
status = state2;
@@ -89,7 +158,7 @@ Index: CanFestival-3-20080926/src/pdo.c
offset = 0x00;
numPdo = 0;
numMap = 0;
-@@ -213,7 +213,7 @@
+@@ -211,7 +211,7 @@ proceedPDO (CO_Data * d, Message * m)
/* check the CobId coherance */
/*pwCobId is the cobId read in the dictionary at the state 3
*/
@@ -98,7 +167,7 @@ Index: CanFestival-3-20080926/src/pdo.c
{
/* The cobId is recognized */
status = state4;
-@@ -291,7 +291,7 @@
+@@ -289,7 +289,7 @@ proceedPDO (CO_Data * d, Message * m)
MSG_WAR (0x3942,
"Variable updated by PDO cobid : ",
@@ -107,7 +176,7 @@ Index: CanFestival-3-20080926/src/pdo.c
MSG_WAR (0x3943, " Mapped at index : ",
(*pMappingParameter) >> 16);
MSG_WAR (0x3944, " subindex : ",
-@@ -308,7 +308,7 @@
+@@ -306,7 +306,7 @@ proceedPDO (CO_Data * d, Message * m)
} /* end if Donnees */
else if ((*m).rtr == REQUEST)
{
@@ -116,7 +185,7 @@ Index: CanFestival-3-20080926/src/pdo.c
status = state1;
offsetObjdict = d->firstIndex->PDO_TRS;
lastIndex = d->lastIndex->PDO_TRS;
-@@ -326,7 +326,7 @@
+@@ -324,7 +324,7 @@ proceedPDO (CO_Data * d, Message * m)
pwCobId =
(d->objdict +
offsetObjdict)->pSubindex[1].pObject;
@@ -125,7 +194,7 @@ Index: CanFestival-3-20080926/src/pdo.c
{
status = state4;
break;
-@@ -366,7 +366,7 @@
+@@ -364,7 +364,7 @@ proceedPDO (CO_Data * d, Message * m)
/* DS301 do not tell what to do in such a case... */
MSG_ERR (0x1947,
"Not ready RTR_SYNC TPDO send current data : ",
@@ -134,7 +203,7 @@ Index: CanFestival-3-20080926/src/pdo.c
status = state5;
}
break;
-@@ -391,7 +391,7 @@
+@@ -389,7 +389,7 @@ proceedPDO (CO_Data * d, Message * m)
/* The requested PDO is not to send on request. So, does
nothing. */
MSG_WAR (0x2947, "PDO is not to send on request : ",
@@ -143,7 +212,7 @@ Index: CanFestival-3-20080926/src/pdo.c
return 0xFF;
}
-@@ -692,7 +692,7 @@
+@@ -690,7 +690,7 @@ _sendPDOevent (CO_Data * d, UNS8 isSyncEvent)
case state5: /*Send the pdo */
/*store_as_last_message */
d->PDO_status[pdoNum].last_message = pdo;
@@ -152,11 +221,11 @@ Index: CanFestival-3-20080926/src/pdo.c
MSG_WAR (0x396E, " Nb octets : ", pdo.len);
canSend (d->canHandle, &pdo);
-Index: CanFestival-3-20080926/src/sdo.c
-===================================================================
---- CanFestival-3-20080926.orig/src/sdo.c 2008-09-30 16:10:20.000000000 +0200
-+++ CanFestival-3-20080926/src/sdo.c 2008-09-30 16:13:29.000000000 +0200
-@@ -547,7 +547,7 @@
+diff --git a/src/sdo.c b/src/sdo.c
+index 4e26652..1262cf9 100644
+--- a/src/sdo.c
++++ b/src/sdo.c
+@@ -547,7 +547,7 @@ UNS8 sendSDO (CO_Data* d, UNS8 whoami, s_SDO sdo)
pwCobId = (UNS32*) d->objdict[offset].pSubindex[1].pObject;
}
/* message copy for sending */
@@ -165,7 +234,7 @@ Index: CanFestival-3-20080926/src/sdo.c
m.rtr = NOT_A_REQUEST;
/* the length of SDO must be 8 */
m.len = 8;
-@@ -640,7 +640,7 @@
+@@ -640,7 +640,7 @@ UNS8 proceedSDO (CO_Data* d, Message *m)
return 0xFF;
}
pCobId = (UNS32*) d->objdict[offset].pSubindex[1].pObject;
@@ -174,7 +243,7 @@ Index: CanFestival-3-20080926/src/sdo.c
whoami = SDO_SERVER;
MSG_WAR(0x3A62, "proceedSDO. I am server. index : ", 0x1200 + j);
/* In case of server, the node id of the client may be unknown. So we put the index minus offset */
-@@ -663,7 +663,7 @@
+@@ -663,7 +663,7 @@ UNS8 proceedSDO (CO_Data* d, Message *m)
}
/* a) Looking for the cobid received. */
pCobId = (UNS32*) d->objdict[offset].pSubindex[2].pObject;
@@ -183,7 +252,7 @@ Index: CanFestival-3-20080926/src/sdo.c
/* b) cobid found, so reading the node id of the server. */
pNodeId = (UNS8*) d->objdict[offset].pSubindex[3].pObject;
whoami = SDO_CLIENT;
-@@ -682,7 +682,7 @@
+@@ -682,7 +682,7 @@ UNS8 proceedSDO (CO_Data* d, Message *m)
/* Test if the size of the SDO is ok */
if ( (*m).len != 8) {
@@ -192,7 +261,7 @@ Index: CanFestival-3-20080926/src/sdo.c
failedSDO(d, nodeId, whoami, 0, 0, SDOABT_GENERAL_ERROR);
return 0xFF;
}
-@@ -691,7 +691,7 @@
+@@ -691,7 +691,7 @@ UNS8 proceedSDO (CO_Data* d, Message *m)
MSG_WAR(0x3A68, "I am CLIENT. Received SDO from nodeId : ", nodeId);
}
else {
@@ -201,11 +270,11 @@ Index: CanFestival-3-20080926/src/sdo.c
}
/* Testing the command specifier */
-Index: CanFestival-3-20080926/src/states.c
-===================================================================
---- CanFestival-3-20080926.orig/src/states.c 2008-09-30 16:11:21.000000000 +0200
-+++ CanFestival-3-20080926/src/states.c 2008-09-30 16:11:56.000000000 +0200
-@@ -62,7 +62,7 @@
+diff --git a/src/states.c b/src/states.c
+index c7d5df7..208dcc9 100644
+--- a/src/states.c
++++ b/src/states.c
+@@ -62,7 +62,7 @@ e_nodeState getState(CO_Data* d)
**/
void canDispatch(CO_Data* d, Message *m)
{
@@ -214,11 +283,11 @@ Index: CanFestival-3-20080926/src/states.c
switch(cob_id >> 7)
{
case SYNC: /* can be a SYNC or a EMCY message */
-Index: CanFestival-3-20080926/src/sync.c
-===================================================================
---- CanFestival-3-20080926.orig/src/sync.c 2008-09-30 16:11:08.000000000 +0200
-+++ CanFestival-3-20080926/src/sync.c 2008-09-30 16:11:16.000000000 +0200
-@@ -131,7 +131,7 @@
+diff --git a/src/sync.c b/src/sync.c
+index bae1925..7ff65f2 100644
+--- a/src/sync.c
++++ b/src/sync.c
+@@ -131,7 +131,7 @@ UNS8 sendSYNCMessage(CO_Data* d)
MSG_WAR(0x3001, "sendSYNC ", 0);
@@ -227,61 +296,3 @@ Index: CanFestival-3-20080926/src/sync.c
m.rtr = NOT_A_REQUEST;
m.len = 0;
-Index: CanFestival-3-20080926/src/emcy.c
-===================================================================
---- CanFestival-3-20080926.orig/src/emcy.c 2008-09-30 16:15:26.000000000 +0200
-+++ CanFestival-3-20080926/src/emcy.c 2008-09-30 16:16:00.000000000 +0200
-@@ -101,7 +101,7 @@
-
- MSG_WAR(0x3051, "sendEMCY", 0);
-
-- m.cob_id = UNS16_LE(*(UNS32*)d->error_cobid);
-+ m.cob_id = *(UNS32*)d->error_cobid;
- m.rtr = NOT_A_REQUEST;
- m.len = 8;
- m.data[0] = errCode & 0xFF; /* LSB */
-@@ -239,7 +239,7 @@
- }
-
- /* post the received EMCY */
-- nodeID = UNS16_LE(m->cob_id) & 0x7F;
-+ nodeID = m->cob_id & 0x7F;
- errCode = m->data[0] | ((UNS16)m->data[1] << 8);
- errReg = m->data[2];
- (*d->post_emcy)(d, nodeID, errCode, errReg);
-Index: CanFestival-3-20080926/src/lss.c
-===================================================================
---- CanFestival-3-20080926.orig/src/lss.c 2008-09-30 16:16:12.000000000 +0200
-+++ CanFestival-3-20080926/src/lss.c 2008-09-30 16:16:34.000000000 +0200
-@@ -330,7 +330,7 @@
- m.len = 8;
- m.rtr = NOT_A_REQUEST;
- m.data[0]=command;
-- m.cob_id=UNS16_LE(SLSS_ADRESS);
-+ m.cob_id=SLSS_ADRESS;
-
- /* Tha data sent with the msg depends on the command */
- switch(command){
-@@ -397,7 +397,7 @@
- m.len = 8;
- m.rtr = NOT_A_REQUEST;
- m.data[0]=command;
-- m.cob_id=UNS16_LE(MLSS_ADRESS);
-+ m.cob_id=MLSS_ADRESS;
-
- /* Tha data sent with the msg depends on the command */
- switch(command){
-Index: CanFestival-3-20080926/include/objdictdef.h
-===================================================================
---- CanFestival-3-20080926.orig/include/objdictdef.h 2008-09-30 16:17:53.000000000 +0200
-+++ CanFestival-3-20080926/include/objdictdef.h 2008-09-30 16:18:09.000000000 +0200
-@@ -118,7 +118,7 @@
- /************************** MACROS *********************************/
-
- /* CANopen usefull helpers */
--#define GET_NODE_ID(m) (UNS16_LE(m.cob_id) & 0x7f)
--#define GET_FUNCTION_CODE(m) (UNS16_LE(m.cob_id) >> 7)
-+#define GET_NODE_ID(m) (m.cob_id & 0x7f)
-+#define GET_FUNCTION_CODE(m) (m.cob_id >> 7)
-
- #endif /* __objdictdef_h__ */
diff --git a/patches/CanFestival-3-20081204-1/fix-ldconfig.diff b/patches/CanFestival-3-20081204-1/fix-ldconfig.diff
deleted file mode 100644
index bdb6d166e..000000000
--- a/patches/CanFestival-3-20081204-1/fix-ldconfig.diff
+++ /dev/null
@@ -1,24 +0,0 @@
-Subject: fix for ldconfig crash on make install
-From: Markus Messmer <mme@pengutronix.de>
-
-Installing fails due to ldconfig failure when running as non root user.
-
-Signed-off-by: Markus Messmer <mme@pengutronix.de>
-
----
-
-# 20081216 mme: this is only a hack, not for upstream
-
-Index: CanFestival-3-20080926/Makefile.in
-===================================================================
---- CanFestival-3-20080926.orig/Makefile.in 2008-09-26 11:39:51.000000000 +0200
-+++ CanFestival-3-20080926/Makefile.in 2008-09-26 11:39:59.000000000 +0200
-@@ -46,7 +46,7 @@
- $(MAKE) -C src $@
- $(MAKE) -C examples $@
- $(MAKE) -C objdictgen $@
-- ldconfig
-+ -ldconfig
-
- uninstall:
- $(MAKE) -C drivers $@
diff --git a/patches/CanFestival-3-20081204-1/series b/patches/CanFestival-3-20081204-1/series
index 5f5db88d1..76b0f7f36 100644
--- a/patches/CanFestival-3-20081204-1/series
+++ b/patches/CanFestival-3-20081204-1/series
@@ -1,4 +1,7 @@
-fix-destdir.diff
-fix-ldconfig.diff
-install-networkedit_ico.diff
-byteorder.diff
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-add-DESTDIR-to-Makefile.in.patch
+0002-fix-for-ldconfig-crash-on-make-install.patch
+0003-install-networkedit.ico.patch
+0004-fix-for-CAN-ID-byteorder.patch
+# 300a53b22ce7aaa43c2339025fc49312 - git-ptx-patches magic