+msp430-libc (0.1~20100207-1tmi) hardy; urgency=low
+
+ * Update to oshan version 20100207.
+
+ -- TMI Packages <pkgs@titaniummirror.com> Thu, 20 May 2010 20:12:06 -0600
+
msp430-libc (0.0~cvs20080819-1tmi) hardy; urgency=low
* Initial release, combining knowledge from mspgcc and tinyos build scripts.
Priority: optional
Maintainer: TMI Packages <pkgs@titaniummirror.com>
Standards-Version: 3.7.2.0
-Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.13), bison, flex, gettext, texinfo, binutils (>= 2.9.5.0.12), gcc (>= 4:4.2.2), dejagnu (>= 1.4.2-1.1), dpatch, file, bzip2, lsb-release, msp430-binutils (>= 2.18), msp430-gcc (>= 3.2.3)
+Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.13), bison, flex, gettext, texinfo, binutils (>= 2.9.5.0.12), gcc (>= 4:4.2.2), dejagnu (>= 1.4.2-1.1), dpatch, file, bzip2, lsb-release, msp430-binutils (>= 2.20), msp430-gcc (>= 4.4.3)
Package: msp430-libc
Architecture: any
-Depends: msp430-binutils (>= 2.18), msp430-gcc (>= 3.2.3), ${shlibs:Depends}
+Depends: msp430-binutils (>= 2.20), msp430-gcc (>= 4.4.3), ${shlibs:Depends}
Suggests:
Priority: extra
Description: libc for msp430
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 001-builddir.dpatch by <pkgs@titaniummirror.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Allow building outside of source tree
-
-@DPATCH@
-
-diff -urN -x CVS msp430-libc-0.0~cvs20080819.orig/src/Makefile msp430-libc-0.0~cvs20080819/src/Makefile
---- msp430-libc-0.0~cvs20080819.orig/src/Makefile 2008-05-16 20:44:59.000000000 -0600
-+++ msp430-libc-0.0~cvs20080819/src/Makefile 2008-08-22 12:58:47.000000000 -0600
-@@ -93,7 +93,7 @@
-
- # match by name
-
--${crt_all_objs}: crt%.o: gcrt0.S
-+${crt_all_objs}: crt%.o: $(srcdir)/gcrt0.S
- ${AS} ${CPPFLAGS} -mmcu=msp$* ${ALL_ASFLAGS} -c $(ABSPATH)$< -o $@
-
- clean-crt:
-@@ -152,16 +152,16 @@
- mspdirs:
- mkdir -p msp1 msp2
-
--${libc_msp430_objs_1}: msp1/%.o: stdlib/%.c
-+${libc_msp430_objs_1}: msp1/%.o: $(srcdir)/stdlib/%.c
- ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
--${libc_msp430_objs_2}: msp2/%.o: stdlib/%.c
-+${libc_msp430_objs_2}: msp2/%.o: $(srcdir)/stdlib/%.c
- ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
--${libc_msp430_S_objs_1}: msp1/%.o: stdlib/%.S
-+${libc_msp430_S_objs_1}: msp1/%.o: $(srcdir)/stdlib/%.S
- ${AS} -D_GNU_ASSEMBLER_ -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
--${libc_msp430_S_objs_2}: msp2/%.o: stdlib/%.S
-+${libc_msp430_S_objs_2}: msp2/%.o: $(srcdir)/stdlib/%.S
- ${AS} -D_GNU_ASSEMBLER_ -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
- libc_msp430_cstr_objs_1 = ${libc_str_sources:%.c=%.o}
-@@ -171,10 +171,10 @@
- libc_msp430_str_objs_2 = $(addprefix msp2/, $(libc_msp430_cstr_objs_2))
-
-
--${libc_msp430_str_objs_1}: msp1/%.o: string/%.c
-+${libc_msp430_str_objs_1}: msp1/%.o: $(srcdir)/string/%.c
- ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
--${libc_msp430_str_objs_2}: msp2/%.o: string/%.c
-+${libc_msp430_str_objs_2}: msp2/%.o: $(srcdir)/string/%.c
- ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
-
-@@ -267,17 +267,17 @@
-
- build-libm: ${libm_libs}
-
--${libm_msp430_c_objs_1}: msp1/%.o: libm/%.c
-+${libm_msp430_c_objs_1}: msp1/%.o: $(srcdir)/libm/%.c
- ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp1 -c $(ABSPATH)$< -o $@
-
--${libm_msp430_c_objs_2}: msp2/%.o: libm/%.c
-+${libm_msp430_c_objs_2}: msp2/%.o: $(srcdir)/libm/%.c
- ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} -mmcu=msp2 -c $(ABSPATH)$< -o $@
-
-
--${libm_msp430_cf_objs_1}: msp1/%.o: libm/%.c
-+${libm_msp430_cf_objs_1}: msp1/%.o: $(srcdir)/libm/%.c
- ${CC} ${CPPFLAGS} -mmcu=msp1 ${ALL_CFLAGS} -c $(ABSPATH)$< -o $@
-
--${libm_msp430_cf_objs_2}: msp2/%.o: libm/%.c
-+${libm_msp430_cf_objs_2}: msp2/%.o: $(srcdir)/libm/%.c
- ${CC} ${CPPFLAGS} -mmcu=msp2 ${ALL_CFLAGS} -c $(ABSPATH)$< -o $@
-
-
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 001-adc12.dpatch by <pkgs@titaniummirror.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch for proper operation of adc12 peripheral
-
-@DPATCH@
-
-diff -urN -x CVS msp430-libc-0.0~cvs20080819.orig/include/msp430/adc12.h msp430-libc-0.0~cvs20080819/include/msp430/adc12.h
---- msp430-libc-0.0~cvs20080819.orig/include/msp430/adc12.h 2006-01-11 17:47:21.000000000 -0700
-+++ msp430-libc-0.0~cvs20080819/include/msp430/adc12.h 2008-08-22 12:00:32.000000000 -0600
-@@ -94,8 +94,12 @@
- #ifdef _GNU_ASSEMBLER_
- #define ADC12MEM ADC12MEM_ /* ADC12 Conversion Memory (for assembler) */
- #else
-+#ifdef SAFE_TINYOS
-+#define ADC12MEM TCAST(int* ONE, ADC12MEM_) /* ADC12 Conversion Memory (for C) */
-+#else
- #define ADC12MEM ((int*) ADC12MEM_) /* ADC12 Conversion Memory (for C) */
- #endif
-+#endif
- #define ADC12MEM0_ ADC12MEM_ /* ADC12 Conversion Memory 0 */
- sfrw(ADC12MEM0,ADC12MEM0_);
- #define ADC12MEM1_ 0x0142 /* ADC12 Conversion Memory 1 */
-@@ -133,8 +137,12 @@
- #ifdef _GNU_ASSEMBLER_
- #define ADC12MCTL ADC12MCTL_ /* ADC12 Memory Control (for assembler) */
- #else
-+#ifdef SAFE_TINYOS
-+#define ADC12MCTL TCAST(char * ONE, ADC12MCTL_)
-+#else
- #define ADC12MCTL ((char*) ADC12MCTL_) /* ADC12 Memory Control (for C) */
- #endif
-+#endif
- #define ADC12MCTL0_ ADC12MCTL_ /* ADC12 Memory Control 0 */
- sfrb(ADC12MCTL0,ADC12MCTL0_);
- #define ADC12MCTL1_ 0x0081 /* ADC12 Memory Control 1 */
-001-builddir.dpatch
-002-adc12.dpatch
+adc12-safe-tinyos
+makefile
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## adc12-safe-tinyos.dpatch by R. Steve McKown <rsmckown@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add support for deputy-tinyos (safe tinyos), if present at compile.
+
+@DPATCH@
+diff -urNad msp430-libc~/include/msp430/adc12.h msp430-libc/include/msp430/adc12.h
+--- msp430-libc~/include/msp430/adc12.h 2010-05-20 20:37:57.000000000 -0600
++++ msp430-libc/include/msp430/adc12.h 2010-05-20 20:38:46.000000000 -0600
+@@ -94,8 +94,12 @@
+ #ifdef __ASSEMBLER__
+ #define ADC12MEM ADC12MEM_ /* ADC12 Conversion Memory (for assembler) */
+ #else
++#ifdef SAFE_TINYOS
++#define ADC12MEM TCAST(int* ONE, ADC12MEM_) /* ADC12 Conversion Memory (for C) */
++#else
+ #define ADC12MEM ((int*) ADC12MEM_) /* ADC12 Conversion Memory (for C) */
+ #endif
++#endif
+ #define ADC12MEM0_ ADC12MEM_ /* ADC12 Conversion Memory 0 */
+ sfrw(ADC12MEM0,ADC12MEM0_);
+ #define ADC12MEM1_ 0x0142 /* ADC12 Conversion Memory 1 */
+@@ -133,8 +137,12 @@
+ #ifdef __ASSEMBLER__
+ #define ADC12MCTL ADC12MCTL_ /* ADC12 Memory Control (for assembler) */
+ #else
++#ifdef SAFE_TINYOS
++#define ADC12MCTL TCAST(char* ONE, ADC12MCTL_) /* ADC12 Memory Control (for C) */
++#else
+ #define ADC12MCTL ((char*) ADC12MCTL_) /* ADC12 Memory Control (for C) */
+ #endif
++#endif
+ #define ADC12MCTL0_ ADC12MCTL_ /* ADC12 Memory Control 0 */
+ sfrb(ADC12MCTL0,ADC12MCTL0_);
+ #define ADC12MCTL1_ 0x0081 /* ADC12 Memory Control 1 */
+diff -urNad msp430-libc~/include/msp430/adc12_plus.h msp430-libc/include/msp430/adc12_plus.h
+--- msp430-libc~/include/msp430/adc12_plus.h 2010-05-20 20:37:57.000000000 -0600
++++ msp430-libc/include/msp430/adc12_plus.h 2010-05-20 20:38:58.000000000 -0600
+@@ -161,8 +161,12 @@
+ #ifdef __ASM_HEADER__
+ #define ADC12MEM ADC12MEM0 /* ADC12 Conversion Memory (for assembler) */
+ #else
++#ifdef SAFE_TINYOS
++#define ADC12MEM TCAST(int* ONE, &ADC12MEM0) /* ADC12 Conversion Memory (for C) */
++#else
+ #define ADC12MEM ((int*) &ADC12MEM0) /* ADC12 Conversion Memory (for C) */
+ #endif
++#endif
+
+ #define ADC12MCTL0_ __MSP430_ADC12_PLUS_BASE__ + 0x10 /* ADC12 Memory Control 0 */
+ sfrb(ADC12MCTL0, ADC12MCTL0_);
+@@ -200,8 +204,12 @@
+ #ifdef __ASM_HEADER__
+ #define ADC12MCTL ADC12MCTL0 /* ADC12 Memory Control (for assembler) */
+ #else
++#ifdef SAFE_TINYOS
++#define ADC12MCTL TCAST(char* ONE, ADC12MCTL0) /* ADC12 Conversion Memory (for C) */
++#else
+ #define ADC12MCTL ((char*) ADC12MCTL0) /* ADC12 Memory Control (for C) */
+ #endif
++#endif
+
+ /* ADC12CTL0 Control Bits */
+ #define ADC12SC (0x001) /* ADC12 Start Conversion */
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## makefile.dpatch by R. Steve McKown <rsmckown@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't expect toolchain to be in install prefix.
+## DP: Ensure libdir is created.
+
+@DPATCH@
+diff -urNad msp430-libc~/src/Makefile msp430-libc/src/Makefile
+--- msp430-libc~/src/Makefile 2010-05-20 21:07:12.000000000 -0600
++++ msp430-libc/src/Makefile 2010-05-20 21:07:59.000000000 -0600
+@@ -13,7 +13,9 @@
+ target = msp430
+
+ prefix_target = $(PREFIX)/${target}
++ifndef bindir
+ bindir = $(PREFIX)/bin
++endif
+ includedir = ${prefix_target}/include
+ libdir = ${prefix_target}/lib
+
+@@ -133,7 +135,7 @@
+ ${INSTALL}
+
+ #--------------- directories ---------------
+-$(includedir) $(includedir)/sys $(includedir)/msp430:
++$(includedir) $(includedir)/sys $(includedir)/msp430 $(libdir):
+ $(MD)
+ #------------------------------------------------------------------------
+ #------------------------------------------------------------------------
configure-stamp: patch-stamp
$(checkdir)
- rm -rf configure-stamp builddir
- $(install_dir) builddir
+ rm -rf configure-stamp
touch $@
build: build-stamp
build-stamp: configure-stamp
$(checkdir)
- $(MAKE) -C builddir -f $$(pwd)/src/Makefile srcdir=$$(pwd)/src
+ : # Makefile creates ./Build directory
+ $(MAKE) -C src PREFIX=$$(pwd)/debian/tmp/usr bindir=/usr/bin
touch $@
$(checkdir)
rm -rf debian/tmp
$(install_dir) debian/tmp
- $(MAKE) -C builddir -f $$(pwd)/src/Makefile srcdir=$$(pwd)/src \
- prefix=$$(pwd)/debian/tmp/usr install
+ $(MAKE) -C src install PREFIX=$$(pwd)/debian/tmp/usr bindir=/usr/bin
ifeq ($(with_strip),yes)
find debian/tmp -type f | xargs file | grep "ELF.*executable" | \
cut -f 1 -d : | xargs $(STRIP)
clean: unpatch
$(checkdir)
- -rm -rf debian/tmp builddir
+ $(MAKE) -C src clean
+ -rm -rf debian/tmp
-rm -fr debian/patched debian/files* debian/substvars
-rm -f *-stamp