2.20 Trouble Reports

Serial port 1 DMA allocation failure on ETRAX FS

Problem: When configuring serial port 1 to use DMA it fails with the message below when trying to use the serial port.

Failed to request DMA 5 for ser1, already allocated by ser1
Kernel panic - not syncing: request_dma error!

Solution: Apply the patch below:

Index: os/linux-2.6/drivers/serial/crisv32.c
===================================================================
RCS file: /usr/local/cvs/linux/os/linux-2.6/drivers/serial/crisv32.c,v
retrieving revision 1.97
diff -b -u -p -r1.97 crisv32.c
--- os/linux-2.6/drivers/serial/crisv32.c       21 Aug 2008 08:39:42 -0000     1.97
+++ os/linux-2.6/drivers/serial/crisv32.c       28 Apr 2009 14:20:09 -0000
@@ -1,4 +1,4 @@
-/* $Id: crisv32.c,v 1.97 2008-08-21 08:39:42 starvik Exp $
+/* $Id: crisv32.c,v 1.98 2008-10-09 17:19:24 johanny Exp $
  *
  * Serial port driver for the ETRAX FS chip
  *
@@ -1641,7 +1641,6 @@ static int serial_cris_startup(struct ua
                        panic("irq ser1rxdma");
                crisv32_request_dma(5, "ser1", DMA_PANIC_ON_ERROR, 0,
                                    dma_ser1);
-               crisv32_request_dma(ASYNC_SER1_RX_DMA_NBR, "ser1", DMA_PANIC_ON_ERROR, 0, dma_ser1);
 #endif
        } else if (port->line == 2) {
                if (request_irq(SER2_INTR_VECT, ser_interrupt,
@@ -2411,7 +2410,7 @@ static void cris_serial_port_init(struct
 static int __init serial_cris_init(void)
 {
        int ret, i;
-       printk(KERN_INFO "Serial: CRISv32 driver $Revision: 1.97 $ ");
+       printk(KERN_INFO "Serial: CRISv32 driver $Revision: 1.98 $ ");
 
        ret = uart_register_driver(&serial_cris_driver);
        if (ret)

Save the patch in a file, e.g. patch_file. Apply the patch from the root of your tree:

patch -p 0 < patch_file

rebuild the kernel:

make -C packages/os/linux-2.6 install

and build a new image:

make images

Jesper Bengtsson 2009/04/29 14:12


ETRAX FS: The serial port and the USB driver uses the same DMA channels

Problem: The USB driver uses two DMA channels, DMA 2/3 or DMA 4/5, just as serial ports 1 and 2 do. If trying to use a serial port configured to use the same DMA channels as the USB driver it will fail with a message like this:

Failed to request DMA 4 for ser1, already allocated by crisv32_hcd
Kernel panic - not syncing: request_dma error!

Solution: The USB driver has a parameter, dma_map, that select which DMA channels the driver will use. dma_map=0 will allocate DMA channels 2 and 3 while dma_map=1 will allocate DMA channels 4 and 5. The USB driver is allocating DMA channels 4 and 5 per default.

If you plan to use DMA channels on serial port 1 you should use dma_map=0 in the USB driver.

If you plan to use DMA channels on serial port 2 you should use dma_map=1 in the USB driver.

How do I pass a parameter on to the USB driver? Add the parameter in /etc/init.d/usb on your target system. It can look like this:

#!/bin/sh
insmod /lib/modules/`uname -r`/crisv32-usb-hcd.ko dma_map=1

If you want to add the dma_map parameter in the firmware image, add it in modules/usb/iop/cris-2.6/rc. It can look like this:

#!/bin/sh
insmod /lib/modules/`uname -r`/crisv32-usb-hcd.ko dma_map=1

Jesper Bengtsson 2009/04/29 16:22


It is not possible to configure the FLASH memory block size when using NOR FLASH

Problem: The AXIS build system is hard-coded to use a FLASH memory block size of 64 KByte when configured for NOR FLASH. This is not a problem unless your NOR FLASH has a differing erase block size, e.g. 128 KByte.

The FLASH memory block size is used when generating the JFFS2 file system images.

What will happen if the JFFS2 file system and the FLASH has differing block sizes? You will see a message like this when the kernel is mounting the file system:

/linuxrc: Mounting /mnt/flash... Empty flash at 0x0000a900 ends at 0x00010000
CLEANMARKER node found at 0x00010000, not first node in block (0x00000000)
done

You might also experience problems when writing to a JFFS2 file system with mismatching block size.

Solution: Enable the 'Flash memory block size' build system parameter for NOR FLASH. Apply the patch below:

Index: configure-files/common/AC_common
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/common/AC_common,v
retrieving revision 1.82.4.1
diff -b -u -p -r1.82.4.1 AC_common
--- configure-files/common/AC_common	17 Oct 2008 12:26:59 -0000	1.82.4.1
+++ configure-files/common/AC_common	26 May 2010 11:50:00 -0000
@@ -252,7 +252,6 @@ config BOOTLOADER_SIZE
 
 config MEDIA_BLOCKSIZE
 	hex "Flash memory block size (bytes)"
-	depends on NANDFLASH
 	default 0x4000
 	help
 	  Enter the block size of the flash memory used. See the data sheet
Index: configure-files/common/common
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/common/common,v
retrieving revision 1.626.2.10
diff -b -u -p -r1.626.2.10 common
--- configure-files/common/common	12 Dec 2008 13:00:59 -0000	1.626.2.10
+++ configure-files/common/common	26 May 2010 11:50:00 -0000
@@ -148,7 +148,8 @@ if [ "$AXIS_CONFIG_PARTITION_TABLE" = "y
     partition fstab  type="$AXIS_CONFIG_FS_TYPE_RWFS"   dev=/dev/part/rwfsblock \
                      mpoint=/mnt/flash mopts=noauto pass=2 \
               ptable             name=flash2 csum=no save=yes \
-                     size="$AXIS_CONFIG_PARTITION_TABLE_FLASH2_SIZE"
+                     size="$AXIS_CONFIG_PARTITION_TABLE_FLASH2_SIZE"\
+                     mbsize="$AXIS_CONFIG_MEDIA_BLOCKSIZE"
   fi
   partition   fstab  type=proc   dev=proc        mpoint=/proc
   if [ "$AXIS_CONFIG_PRODUCTION_TEST_FIRMWARE" = "y" ]; then
Index: configure-files/devboard/products/devboard_82/defconfig
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/devboard/products/devboard_82/defconfig,v
retrieving revision 1.5
diff -b -u -p -r1.5 defconfig
--- configure-files/devboard/products/devboard_82/defconfig	17 Oct 2008 14:09:31 -0000	1.5
+++ configure-files/devboard/products/devboard_82/defconfig	26 May 2010 11:50:00 -0000
@@ -31,6 +31,7 @@ AXIS_CONFIG_PROCESSOR_etrax_100lx=y
 # AXIS_CONFIG_PROCESSOR_artpecb is not set
 # AXIS_CONFIG_PROCESSOR_argus2 is not set
 AXIS_CONFIG_NUMBER_OF_PROCESSORS=1
+AXIS_CONFIG_MEDIA_BLOCKSIZE=0x10000
 AXIS_CONFIG_PARTITION_TABLE=y
 
 #
Index: configure-files/devboard/products/devboard_82+/defconfig
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/devboard/products/devboard_82+/defconfig,v
retrieving revision 1.17
diff -b -u -p -r1.17 defconfig
--- configure-files/devboard/products/devboard_82+/defconfig	17 Oct 2008 14:09:31 -0000	1.17
+++ configure-files/devboard/products/devboard_82+/defconfig	26 May 2010 11:50:00 -0000
@@ -31,6 +31,7 @@ AXIS_CONFIG_PROCESSOR_etrax_100lx=y
 # AXIS_CONFIG_PROCESSOR_artpecb is not set
 # AXIS_CONFIG_PROCESSOR_argus2 is not set
 AXIS_CONFIG_NUMBER_OF_PROCESSORS=1
+AXIS_CONFIG_MEDIA_BLOCKSIZE=0x10000
 AXIS_CONFIG_PARTITION_TABLE=y
 
 #
Index: configure-files/devboard/products/fox_416/defconfig
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/devboard/products/fox_416/defconfig,v
retrieving revision 1.6
diff -b -u -p -r1.6 defconfig
--- configure-files/devboard/products/fox_416/defconfig	5 Nov 2008 10:46:33 -0000	1.6
+++ configure-files/devboard/products/fox_416/defconfig	26 May 2010 11:50:00 -0000
@@ -31,6 +31,7 @@ AXIS_CONFIG_PROCESSOR_etrax_100lx=y
 # AXIS_CONFIG_PROCESSOR_artpecb is not set
 # AXIS_CONFIG_PROCESSOR_argus2 is not set
 AXIS_CONFIG_NUMBER_OF_PROCESSORS=1
+AXIS_CONFIG_MEDIA_BLOCKSIZE=0x10000
 AXIS_CONFIG_PARTITION_TABLE=y
 
 #
Index: configure-files/devboard/products/fox_832/defconfig
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/devboard/products/fox_832/defconfig,v
retrieving revision 1.6
diff -b -u -p -r1.6 defconfig
--- configure-files/devboard/products/fox_832/defconfig	5 Nov 2008 10:44:16 -0000	1.6
+++ configure-files/devboard/products/fox_832/defconfig	26 May 2010 11:50:00 -0000
@@ -31,6 +31,7 @@ AXIS_CONFIG_PROCESSOR_etrax_100lx=y
 # AXIS_CONFIG_PROCESSOR_artpecb is not set
 # AXIS_CONFIG_PROCESSOR_argus2 is not set
 AXIS_CONFIG_NUMBER_OF_PROCESSORS=1
+AXIS_CONFIG_MEDIA_BLOCKSIZE=0x10000
 AXIS_CONFIG_PARTITION_TABLE=y
 
 #
Index: configure-files/devboard/products/fs_nor/defconfig
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/devboard/products/fs_nor/defconfig,v
retrieving revision 1.4
diff -b -u -p -r1.4 defconfig
--- configure-files/devboard/products/fs_nor/defconfig	17 Oct 2008 14:09:32 -0000	1.4
+++ configure-files/devboard/products/fs_nor/defconfig	26 May 2010 11:50:00 -0000
@@ -32,6 +32,7 @@ AXIS_CONFIG_PROCESSOR_etrax_fs=y
 # AXIS_CONFIG_PROCESSOR_argus2 is not set
 AXIS_CONFIG_NUMBER_OF_PROCESSORS=1
 # AXIS_CONFIG_NANDFLASH is not set
+AXIS_CONFIG_MEDIA_BLOCKSIZE=0x10000
 AXIS_CONFIG_PARTITION_TABLE=y
 
 #
Index: configure-files/devboard/products/mcm4_16/defconfig
===================================================================
RCS file: /usr/local/cvs/linux/configure-files/devboard/products/mcm4_16/defconfig,v
retrieving revision 1.3
diff -b -u -p -r1.3 defconfig
--- configure-files/devboard/products/mcm4_16/defconfig	17 Oct 2008 14:09:32 -0000	1.3
+++ configure-files/devboard/products/mcm4_16/defconfig	26 May 2010 11:50:00 -0000
@@ -31,6 +31,7 @@ AXIS_CONFIG_PROCESSOR_etrax_100lx=y
 # AXIS_CONFIG_PROCESSOR_artpecb is not set
 # AXIS_CONFIG_PROCESSOR_argus2 is not set
 AXIS_CONFIG_NUMBER_OF_PROCESSORS=1
+AXIS_CONFIG_MEDIA_BLOCKSIZE=0x10000
 AXIS_CONFIG_PARTITION_TABLE=y
 
 #

Save the patch in a file, e.g. patch_file. Apply the patch from the root of your tree:

patch -p 0 < patch_file

Now, you can find the 'Flash memory block size' parameter in the 'Hardware Configuration —>' section of the build system configuration. Run 'make menuconfig' and verify that the FLASH memory block size matches the erase block size of your FLASH.

Build a new image:

make images

Jesper Bengtsson 2010/05/27 14:13

Error doing ./configure to SDK 2.20

Problem: When i tried to install 2.20 for Network camera, it showed this error, how i do find md5sum and which package, sorry my english Model ARTPEC-3

 * Fetching "packages/param/network/ftp" revision "R1_0_3"... failed!
 * Error in function called from file: configure-files/common/common <= ./configure:
	fetch: Failed to fetch "packages/param/network/ftp" revision "R1_0_3" from "http://developer.axis.com/download/distribution"!

Help

Solution: The 2.20 SDK is aimed for the AXIS developer boards and device servers only. It's not possible to build a firmware image for an AXIS video product using this SDK.

Jesper Bengtsson 2010/08/10 11:31


VLAN over ETRAX FS, mtu undersize problem?

Problem: We are trying to use Linux VLAN over ETRAX FS eth I/F with limited success. Large frames does not make it into the CPU.
This looks like the classical problem with too small MTU as VLAN adds 4 bytes to the frame.
However looking into the eth_v32.c(2.6.26) driver one can see that

	reg_eth_rw_rec_ctrl rec_ctrl = {
		.ma0 = regk_eth_no,       /* enable at open() */
		.broadcast = regk_eth_no,
#ifdef CONFIG_ETRAX_NO_PHY
		.duplex = regk_eth_full,
#endif
		.max_size = regk_eth_size1522
	};

and

 #define MAX_MEDIA_DATA_SIZE 1522

are 4 bytes bigger than the standard 1518 bytes. Yet frames bigger than 1518 are ignored and the frame error counter is increased.

Solution: The >1518 bytes frame size problem is caused by an incorrect ETRAX FS Ethernet register definition. The patch below corrects the ETRAX FS Ethernet register definitions.
Download the patch patch-eth_defs.tgz and unpack it:

tar -xzf patch-eth_defs.tgz

Apply the patch from the root of your tree:

patch -p 0 < patch-eth_defs

rebuild the kernel and nandboot:

make -C packages/os/linux-2.6 install
make -C os/nandboot install

and build a new image:

make images

Jesper Bengtsson 2010/08/11 13:22


The compilation fails with a "previous declaration of 'getline' conflict" on Fedora 12

Problem: The compile process runs for a good length without problems but then it fails with a “previous declaration of 'getline' conflict”:

  CALL    scripts/checksyscalls.sh
  CC [M]  drivers/scsi/scsi_wait_scan.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: vmlinux: 'ktime_get_ts' exported twice. Previous export was in vmlinux
  CC      drivers/scsi/scsi_wait_scan.mod.o
  LD [M]  drivers/scsi/scsi_wait_scan.ko
make[3]: Leaving directory
`/home/jesper/devboard-R2_20/os/linux-2.6-tag--devboard-R2_20-5'
  MKDIR   usr/include
  INSTALL header files --> usr/include
scripts/unifdef.c:209: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: note: previous declaration of ‘getline’ was here
make[4]: *** [scripts/unifdef] Error 1
make[3]: *** [headers_install] Error 2
ln: creating symbolic link
`/home/jesper/devboard-R2_20/os/linux-2.6/usr/include/asm/arch':
No such file or directory
make[2]: *** [headers_install] Error 1
make[2]: Leaving directory
`/home/jesper/devboard-R2_20/packages/os/linux-2.6-R1_5_0'
make[1]: *** [do-install-recurse] Error 1
make[1]: Leaving directory `/home/jesper/devboard-R2_20'
make: *** [everything] Error 2

Solution: The libC on your PC exports a getline() which conflicts with the local getline() in os/linux-2.6/scripts/unifdef.c.

The local getline() in scripts/unifdef.c is has changed name to get_line() or parseline() in more recent kernels (2.6.29/2.6.33).

Renaming the local getline() solves this problem.

Jesper Bengtsson 2010/09/28 10:17


The compilation fails with "mixed implicit and normal rules." on Fedora 14

Problem: The compile process fails with a “mixed implicit and normal rules.”:

[vmplanet@fedora devboard-R2_20]$ make
make init_env
make[1]: Entering directory `/home/vmplanet/devboard_88-2/devboard-R2_20'
Creating init_env... done
Source it to export environment variables.
make[1]: Leaving directory `/home/vmplanet/devboard_88-2/devboard-R2_20'
make tools
make[1]: Entering directory `/home/vmplanet/devboard_88-2/devboard-R2_20'
make -C tools/build install
make[2]: Entering directory
`/home/vmplanet/devboard_88-2/devboard-R2_20/tools/build-tag--devboard-R2_20-3'
make -C ccdv install
BINDIR="/home/vmplanet/devboard_88-2/devboard-R2_20/tools/build-tag--devboard-R2_20-3/bin"
LIBDIR="/home/vmplanet/devboard_88-2/devboard-R2_20/tools/build-tag--devboard-R2_20-3/lib"
make[3]: Entering directory
`/home/vmplanet/devboard_88-2/devboard-R2_20/tools/build-tag--devboard-R2_20-3/ccdv'
/home/vmplanet/devboard_88-2/devboard-R2_20/tools/build/rules/recurse.mak:26:
*** mixed implicit and normal rules.  Stop.
make[3]: Leaving directory
`/home/vmplanet/devboard_88-2/devboard-R2_20/tools/build-tag--devboard-R2_20-3/ccdv'
make[2]: *** [ccdv] Error 2
make[2]: Leaving directory
`/home/vmplanet/devboard_88-2/devboard-R2_20/tools/build-tag--devboard-R2_20-3'
make[1]: *** [tools] Error 2
make[1]: Leaving directory `/home/vmplanet/devboard_88-2/devboard-R2_20'
make: *** [everything] Error 2
[vmplanet@fedora devboard-R2_20]$

Solution: GNU make 3.82 (included in Fedora 14) doesn't accept mixed implicit and normal rules.

There are two solutions:

  • Install and use GNU make 3.81 on your PC.
  • Split the mixed rules into two rules in the affected Makefiles.

This patch is an example of how to split the mixed rules. If you run into additional mixed rules, split them in the same way as in this example.

diff -bup -r devboard_88-2/devboard-R2_20/apps/busybox/busybox/Makefile devboard_88/devboard-R2_20/apps/busybox/busybox/Makefile
--- devboard_88-2/devboard-R2_20/apps/busybox/busybox/Makefile	2008-06-30 09:08:44.000000000 -0500
+++ devboard_88/devboard-R2_20/apps/busybox/busybox/Makefile	2011-05-16 07:12:27.282291998 -0500
@@ -402,7 +402,11 @@ ifeq ($(config-targets),1)
 -include $(srctree)/arch/$(ARCH)/Makefile
 export KBUILD_DEFCONFIG
 
-config %config: scripts_basic outputmakefile FORCE
+config: scripts_basic outputmakefile FORCE
+	$(Q)mkdir -p include
+	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+	$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
+%config: scripts_basic outputmakefile FORCE
 	$(Q)mkdir -p include
 	$(Q)$(MAKE) $(build)=scripts/kconfig $@
 	$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
@@ -1245,7 +1249,10 @@ endif
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 
 # Modules
-/ %/: prepare scripts FORCE
+/: prepare scripts FORCE
+	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+	$(build)=$(build-dir)
+%/: prepare scripts FORCE
 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
 	$(build)=$(build-dir)
 %.ko: prepare scripts FORCE
diff -bup -r devboard_88-2/devboard-R2_20/os/linux-2.6/Makefile devboard_88/devboard-R2_20/os/linux-2.6/Makefile
--- devboard_88-2/devboard-R2_20/os/linux-2.6/Makefile	2008-08-21 03:35:33.000000000 -0500
+++ devboard_88/devboard-R2_20/os/linux-2.6/Makefile	2011-05-16 00:34:28.959404998 -0500
@@ -468,7 +468,10 @@ ifeq ($(config-targets),1)
 include $(srctree)/arch/$(SRCARCH)/Makefile
 export KBUILD_DEFCONFIG
 
-config %config: scripts_basic outputmakefile FORCE
+config: scripts_basic outputmakefile FORCE
+	$(Q)mkdir -p include/linux include/config
+	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+%config: scripts_basic outputmakefile FORCE
 	$(Q)mkdir -p include/linux include/config
 	$(Q)$(MAKE) $(build)=scripts/kconfig $@
 
@@ -1584,7 +1587,11 @@ endif
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 
 # Modules
-/ %/: prepare scripts FORCE
+/: prepare scripts FORCE
+	$(cmd_crmodverdir)
+	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+	$(build)=$(build-dir)
+%/: prepare scripts FORCE
 	$(cmd_crmodverdir)
 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
 	$(build)=$(build-dir)
diff -bup -r devboard_88-2/devboard-R2_20/tools/build/rules/recurse.mak devboard_88/devboard-R2_20/tools/build/rules/recurse.mak
--- devboard_88-2/devboard-R2_20/tools/build/rules/recurse.mak	2008-04-29
02:59:24.000000000 -0500
+++ devboard_88/devboard-R2_20/tools/build/rules/recurse.mak	2011-05-16
08:58:42.140292012 -0500
@@ -23,7 +23,25 @@ AXIS_RECURSIVE_VERBOSE ?= echo

 $(foreach target, $(AXIS_RECURSIVE_TARGETS), $(eval $(call
recurse_template,$(target))))

-$(patsubst %, do-%-recurse, $(AXIS_RECURSIVE_TARGETS))  do-opt-%-recurse:
+$(patsubst %, do-%-recurse, $(AXIS_RECURSIVE_TARGETS)) :
+# The next line is just to keep this rule from being empty if # 
+NO_SUBDIR_RECURSION is set, since make does not consider empty implicit 
+# rules as targets...
+	@
+ifneq ($(NO_SUBDIR_RECURSION),1)
+	@subdirs="$(SUBDIRS)"; \
+	for subdir in $$subdirs; do \
+	  if [ -d "$$subdir" ]; then \
+	    target=`echo $@ | sed 's/^do-\(.*\)-recurse/\1/'`; \
+	    $(AXIS_RECURSIVE_VERBOSE) "Making $$target in $$subdir for
$(AXIS_BUILDTYPE)"; \
+	    $(MAKE) -C "$$subdir" $$target || [ "$$target" = "check" ] || exit 1; \
+	  else \
+	    echo "The directory '$$subdir' does not exist or is not a
directory!"; \
+	    exit 1; \
+	  fi; \
+	done
+endif
+do-opt-%-recurse:
 # The next line is just to keep this rule from being empty if  # NO_SUBDIR_RECURSION is set, since make does not consider empty implicit  # rules as targets...

Jesper Bengtsson 2011/05/16 15:58


Problem compiling for Etrax FS on a 64 bit machine

Problem: We are getting this error while trying to cross-compile some software (sqlite) for devboard 89 on a 64 bit machine:

“Error: bignum invalid”

On a 32 bit machine all works fine.

We are using cris-dist-1.64. Is there any new version to solve this issue?

make -C ./sqlite3-3.7.6.2
make[1]: Entering directory `/tmp/sqlite3_build_problem/sqlite3/sqlite3-3.7.6.2'
if /bin/sh ./libtool --tag=CC --mode=compile gcc_cris  -mlinux -march=v32 -muclibc=/datos/borja/proyectos/devboard/lince/target/crisv32-axis-linux-gnuuclibc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.6.2\" -DPACKAGE_STRING=\"sqlite\ 3.7.6.2\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.6.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DSTRERROR_R_CHAR_P=1 -I. -I.    -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -Wall -Wshadow -O2 -g3   -MT sqlite3.lo -MD -MP -MF ".deps/sqlite3.Tpo" -c -o sqlite3.lo sqlite3.c; \
	then mv -f ".deps/sqlite3.Tpo" ".deps/sqlite3.Plo"; else rm -f ".deps/sqlite3.Tpo"; exit 1; fi
 gcc_cris -mlinux -march=v32 -muclibc=/datos/borja/proyectos/devboard/lince/target/crisv32-axis-linux-gnuuclibc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.6.2\" "-DPACKAGE_STRING=\"sqlite 3.7.6.2\"" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.6.2\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DSTRERROR_R_CHAR_P=1 -I. -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -Wall -Wshadow -O2 -g3 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c  -fPIC -DPIC -o .libs/sqlite3.o
sqlite3.c: In function `ChooseLeaf':
sqlite3.c:123527: warning: `iBest' might be used uninitialized in this function
sqlite3.c:123529: warning: `fMinGrowth' might be used uninitialized in this function
sqlite3.c:123530: warning: `fMinArea' might be used uninitialized in this function
sqlite3.c: In fun
sqlite3.c: In function `splitNodeStartree':
sqlite3.c:123961: warning: `iBestDim' might be used uninitialized in this function
sqlite3.c:123962: warning: `iBestSplit' might be used uninitialized in this function
sqlite3.c:123963: warning: `fBestMargin' might be used uninitialized in this function
sqlite3.c:123985: warning: `fBestOverlap' might be used uninitialized in this function
sqlite3.c:123986: warning: `fBestArea' might be used uninitialized in this function
sqlite3.c:123987: warning: `iBestLeft' might be used uninitialized in this function[[jesper@axis.com|
sqlite3.c: In function `removeNode':
sqlite3.c:124302: warning: `pParent' might be used uninitialized in this function
sqlite3.c: In function `rtreeUpdate':
sqlite3.c:124608: warning: `iDelete' might be used uninitialized in this function
/tmp/ccmLZqsj.s: Assembler messages:
/tmp/ccmLZqsj.s:83772: Error: bignum invalid
make[1]: *** [sqlite3.lo] Error 1
make[1]: Leaving directory `/tmp/sqlite3_build_problem/sqlite3/sqlite3-3.7.6.2'
make: *** [build] Error 2

Solution: There is a bug in cris-dist-1.64 which is causing the “Error: bignum invalid” problem.

Here's a workaround for this problem:

  • sqlite 3.7.6.2:
    Locate the doubleToInt64()-function in sqlite3.c.
    Remove 'static' from the two constants, maxInt and minInt.
    Save and rebuild.
  • In case you run into this problem with some other source code, try this:
    Add a line like this: 'CC_FLAGS += -save-temps' to the top level Makefile (top level of the source code in question), after the 'include $(AXIS_TOP_DIR)/tools/build/Rules.axis' line.
    'make clean'
    'make'
    This way you can examine the generated assembly (.s) file and find what C-code triggered the compiler bug.

Jesper Bengtsson 2011/06/27 11:02


 
2.20_trouble_reports.txt · Last modified: 2011/06/27 11:03 by jesper
 
All text is available under the terms of the GNU Free Documentation License (see Copyrights for details).