]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/ebsa285/v2_0/misc/STUBS_config
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / ebsa285 / v2_0 / misc / STUBS_config
1 #! /bin/sh
2 # Configure ARM/EBSA285 eCos to create GDB stubs
3 # Ensure that PATH include the directory where the ARM tools reside.
4 #
5 # Run from an empty temporary directory with one argument: the path to
6 # the packages directory (i.e., where pkgconf.tcl lives).
7 #
8 # Output will be ./stubrom.bin which is suitable for programming into flash.
9
10 if ( echo | tclsh ) 2>/dev/null ; then
11   TCL=tclsh
12 elif ( echo | cygtclsh80 ) 2>/dev/null ; then
13   TCL=cygtclsh80
14 else
15   echo Could not find TCL interpreter
16   exit 1
17 fi
18
19 $TCL $1/pkgconf.tcl                                                    \
20    --target=arm --platform=ebsa285 --startup=rom                       \
21    --disable CYGPKG_KERNEL --disable CYGPKG_UITRON                     \
22    --disable CYGPKG_LIBC --disable CYGPKG_LIBM                         \
23    --disable CYGPKG_ERROR --disable CYGPKG_IO                          \
24    --disable CYGPKG_IO_SERIAL --disable CYGPKG_DEVICES_WALLCLOCK       \
25    --disable CYGPKG_DEVICES_WATCHDOG
26
27 patch <<END_OF_PATCH -p0
28 --- pkgconf/hal.h.orig  Thu Feb 10 09:05:07 2000
29 +++ pkgconf/hal.h       Thu Feb 10 09:04:56 2000
30 @@ -122,7 +122,7 @@
31   }
32  
33   }}CFG_DATA */
34 -#define CYGFUN_HAL_COMMON_KERNEL_SUPPORT
35 +#undef  CYGFUN_HAL_COMMON_KERNEL_SUPPORT
36  #undef  CYGDBG_HAL_DIAG_DISABLE_GDB_PROTOCOL
37  
38  #ifdef CYGDBG_HAL_DIAG_DISABLE_GDB_PROTOCOL
39 @@ -243,7 +243,7 @@
40  #define CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
41  #define CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE 4096
42  #undef  CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING
43 -#define CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
44 +#undef  CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
45  #undef  CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
46  #undef  CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS
47  
48 @@ -272,7 +272,7 @@
49   }
50   
51   }}CFG_DATA */
52 -#define CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
53 +#undef  CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
54  
55  /* {{CFG_DATA
56  
57 @@ -423,10 +423,10 @@
58  
59     }}CFG_DATA */
60  
61 -#undef   CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
62 +#define  CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
63  #undef   CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
64 -#define  CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
65 -#define  CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
66 +#undef   CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
67 +#undef   CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
68  
69  /*
70   * NOTE:
71 @@ -522,7 +522,7 @@
72
73  
74  /* Enable this when configuring as a ROM monitor (i.e., stub) */
75 -#undef  CYGSEM_HAL_ROM_MONITOR
76 +#define CYGSEM_HAL_ROM_MONITOR
77  
78  #include CYGBLD_HAL_TARGET_H
79  #include CYGBLD_HAL_PLATFORM_H 
80 END_OF_PATCH
81
82 make
83 make -C hal/common/current/src/stubrom
84 arm-elf-objcopy -O binary hal/common/current/src/stubrom/stubrom stubrom.bin