Help regarding contributing to RTEMS
Hello !! My name is Sri Vathsa. I am sophomore at IIT Roorkee, India, pursuing my B.Tech in Electronics and Communication. I am new to open source and would like to contribute to RTEMS . I have been using python for the last couple of years and C for the past few months. Can anyone help me out with where I can start for contributing and any other prerequisites you think are necessary ? Thanks ! Regards, Sri Vathsa ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 1/3] Provide for glibc compatibility
Update #2803. --- cpukit/Makefile.am | 1 + cpukit/include/endian.h | 1 + cpukit/preinstall.am| 4 3 files changed, 6 insertions(+) create mode 100644 cpukit/include/endian.h diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am index 9a3a696..cb46f20 100644 --- a/cpukit/Makefile.am +++ b/cpukit/Makefile.am @@ -36,6 +36,7 @@ preinstall-stamp: CLEANFILES = preinstall-stamp include_HEADERS = +include_HEADERS += include/endian.h include_rtemsdir = $(includedir)/rtems include_rtems_HEADERS = diff --git a/cpukit/include/endian.h b/cpukit/include/endian.h new file mode 100644 index 000..65e2930 --- /dev/null +++ b/cpukit/include/endian.h @@ -0,0 +1 @@ +#include diff --git a/cpukit/preinstall.am b/cpukit/preinstall.am index 030f00d..a6a5879 100644 --- a/cpukit/preinstall.am +++ b/cpukit/preinstall.am @@ -18,6 +18,10 @@ $(PROJECT_INCLUDE)/$(dirstamp): @: > $(PROJECT_INCLUDE)/$(dirstamp) PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) +$(PROJECT_INCLUDE)/endian.h: include/endian.h $(PROJECT_INCLUDE)/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/endian.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/endian.h + $(PROJECT_INCLUDE)/rtems/$(dirstamp): @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems @: > $(PROJECT_INCLUDE)/rtems/$(dirstamp) -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 3/3] Remove CPU_BIG_ENDIAN and CPU_LITTLE_ENDIAN
Use de-facto standard BYTE_ORDER instead. Close #2803. --- cpukit/score/cpu/arm/rtems/score/cpu.h | 10 cpukit/score/cpu/bfin/rtems/score/cpu.h | 40 - cpukit/score/cpu/epiphany/rtems/score/cpu.h | 2 -- cpukit/score/cpu/i386/rtems/score/cpu.h | 8 -- cpukit/score/cpu/lm32/rtems/score/cpu.h | 40 - cpukit/score/cpu/m32c/rtems/score/cpu.h | 40 - cpukit/score/cpu/m68k/rtems/score/cpu.h | 8 -- cpukit/score/cpu/mips/rtems/score/cpu.h | 16 cpukit/score/cpu/moxie/rtems/score/cpu.h| 7 - cpukit/score/cpu/nios2/rtems/score/cpu.h| 4 --- cpukit/score/cpu/no_cpu/rtems/score/cpu.h | 40 - cpukit/score/cpu/or1k/rtems/score/cpu.h | 2 -- cpukit/score/cpu/powerpc/rtems/score/cpu.h | 13 -- cpukit/score/cpu/sh/rtems/score/cpu.h | 16 cpukit/score/cpu/sparc/rtems/score/cpu.h| 16 cpukit/score/cpu/sparc64/rtems/score/cpu.h | 8 -- cpukit/score/cpu/v850/rtems/score/cpu.h | 40 - 17 files changed, 310 deletions(-) diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h index 0a9ca26..cdffc9c 100644 --- a/cpukit/score/cpu/arm/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h @@ -97,16 +97,6 @@ */ /**@{**/ -#if defined(__ARMEL__) - #define CPU_BIG_ENDIAN FALSE - #define CPU_LITTLE_ENDIAN TRUE -#elif defined(__ARMEB__) - #define CPU_BIG_ENDIAN TRUE - #define CPU_LITTLE_ENDIAN FALSE -#else - #error "unknown endianness" -#endif - /* * The ARM uses the PIC interrupt model. */ diff --git a/cpukit/score/cpu/bfin/rtems/score/cpu.h b/cpukit/score/cpu/bfin/rtems/score/cpu.h index 9b54d6c..cdefedf 100644 --- a/cpukit/score/cpu/bfin/rtems/score/cpu.h +++ b/cpukit/score/cpu/bfin/rtems/score/cpu.h @@ -280,46 +280,6 @@ extern "C" { #define CPU_STRUCTURE_ALIGNMENT /** - * @defgroup CPUEndian Processor Dependent Endianness Support - * - * This group assists in issues related to processor endianness. - * - */ -/**@{**/ - -/** - * Define what is required to specify how the network to host conversion - * routines are handled. - * - * @note @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the - * same values. - * - * @see CPU_LITTLE_ENDIAN - * - * Port Specific Information: - * - * XXX document implementation including references if appropriate - */ -#define CPU_BIG_ENDIAN FALSE - -/** - * Define what is required to specify how the network to host conversion - * routines are handled. - * - * @note @ref CPU_BIG_ENDIAN and @ref CPU_LITTLE_ENDIAN should NOT have the - * same values. - * - * @see CPU_BIG_ENDIAN - * - * Port Specific Information: - * - * XXX document implementation including references if appropriate - */ -#define CPU_LITTLE_ENDIANTRUE - -/** @} */ - -/** * @ingroup CPUInterrupt * The following defines the number of bits actually used in the * interrupt field of the task mode. How those bits map to the diff --git a/cpukit/score/cpu/epiphany/rtems/score/cpu.h b/cpukit/score/cpu/epiphany/rtems/score/cpu.h index 4319203..55faefa 100644 --- a/cpukit/score/cpu/epiphany/rtems/score/cpu.h +++ b/cpukit/score/cpu/epiphany/rtems/score/cpu.h @@ -261,8 +261,6 @@ extern "C" { */ #define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE -#define CPU_BIG_ENDIAN FALSE -#define CPU_LITTLE_ENDIANTRUE /* * The following defines the number of bits actually used in the diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h index c45d914..052e53f 100644 --- a/cpukit/score/cpu/i386/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/rtems/score/cpu.h @@ -114,14 +114,6 @@ extern "C" { #define CPU_PROVIDES_IDLE_THREAD_BODYFALSE -/* - * Define what is required to specify how the network to host conversion - * routines are handled. - */ - -#define CPU_BIG_ENDIAN FALSE -#define CPU_LITTLE_ENDIANTRUE - #define CPU_MAXIMUM_PROCESSORS 32 #define I386_CONTEXT_CONTROL_EFLAGS_OFFSET 0 diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h index e6f6c51..87cfd9e 100644 --- a/cpukit/score/cpu/lm32/rtems/score/cpu.h +++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h @@ -274,46 +274,6 @@ extern "C" { #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES ) /** - * @defgroup CPUEndian Processor Dependent Endianness Support - * - * This group assists in issues related to processor endianness. - * - */ -/**@{**/ - -/** - * Define what is required to specify how the network to host conversion - * routines are handled. - * - * NOTE: @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the - * same values. - * - * @see CPU_LITTLE_ENDIAN - * - * Port
[PATCH 2/3] Use
Update #2803. --- c/src/libchip/ide/ata_internal.h | 16 +--- cpukit/libblock/include/rtems/ide_part_table.h | 18 +- cpukit/libfs/src/dosfs/fat.h | 18 +- cpukit/libmisc/shell/main_pci.c| 4 ++-- 4 files changed, 17 insertions(+), 39 deletions(-) diff --git a/c/src/libchip/ide/ata_internal.h b/c/src/libchip/ide/ata_internal.h index 887199d..985b6f5 100644 --- a/c/src/libchip/ide/ata_internal.h +++ b/c/src/libchip/ide/ata_internal.h @@ -16,6 +16,7 @@ #define __ATA_INTERNAL_H__ #include +#include #include #include #include @@ -34,17 +35,10 @@ extern "C" { * Naming: Ca_b_c, where a: F = from, T = to, b: LE = little-endian, * BE = big-endian, c: W = word (16 bits), L = longword (32 bits) */ -#if (CPU_BIG_ENDIAN == TRUE) -#define CF_LE_W(v) CPU_swap_u16(v) -#define CF_LE_L(v) CPU_swap_u32(v) -#define CT_LE_W(v) CPU_swap_u16(v) -#define CT_LE_L(v) CPU_swap_u32(v) -#else -#define CF_LE_W(v) (v) -#define CF_LE_L(v) (v) -#define CT_LE_W(v) (v) -#define CT_LE_L(v) (v) -#endif +#define CF_LE_W(v) le16toh(v) +#define CF_LE_L(v) le32toh(v) +#define CT_LE_W(v) htole16(v) +#define CT_LE_L(v) htole32(v) #define ATA_UNDEFINED_VALUE (-1) diff --git a/cpukit/libblock/include/rtems/ide_part_table.h b/cpukit/libblock/include/rtems/ide_part_table.h index c638e28..316ff61 100644 --- a/cpukit/libblock/include/rtems/ide_part_table.h +++ b/cpukit/libblock/include/rtems/ide_part_table.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -57,19 +58,10 @@ /* * Conversion from and to little-endian byte order. (no-op on i386/i486) */ - -#if (CPU_BIG_ENDIAN == TRUE) -# define LE_TO_CPU_U16(v) CPU_swap_u16(v) -# define LE_TO_CPU_U32(v) CPU_swap_u32(v) -# define CPU_TO_LE_U16(v) CPU_swap_u16(v) -# define CPU_TO_LE_U32(v) CPU_swap_u32(v) -#else -# define LE_TO_CPU_U16(v) (v) -# define LE_TO_CPU_U32(v) (v) -# define CPU_TO_LE_U16(v) (v) -# define CPU_TO_LE_U32(v) (v) -#endif - +#define CF_LE_W(v) le16toh(v) +#define CF_LE_L(v) le32toh(v) +#define CT_LE_W(v) htole16(v) +#define CT_LE_L(v) htole32(v) /* * sector_data_t -- diff --git a/cpukit/libfs/src/dosfs/fat.h b/cpukit/libfs/src/dosfs/fat.h index 6b86679..8fcd17f 100644 --- a/cpukit/libfs/src/dosfs/fat.h +++ b/cpukit/libfs/src/dosfs/fat.h @@ -23,11 +23,11 @@ #define __DOSFS_FAT_H__ #include +#include #include #include -#include #include #include @@ -56,18 +56,10 @@ extern "C" { * Naming: Ca_b_c, where a: F = from, T = to, b: LE = little-endian, * BE = big-endian, c: W = word (16 bits), L = longword (32 bits) */ - -#if (CPU_BIG_ENDIAN == TRUE) -#define CF_LE_W(v) CPU_swap_u16((uint16_t)(v)) -#define CF_LE_L(v) CPU_swap_u32((uint32_t)(v)) -#define CT_LE_W(v) CPU_swap_u16((uint16_t)(v)) -#define CT_LE_L(v) CPU_swap_u32((uint32_t)(v)) -#else -#define CF_LE_W(v) (v) -#define CF_LE_L(v) (v) -#define CT_LE_W(v) (v) -#define CT_LE_L(v) (v) -#endif +#define CF_LE_W(v) le16toh(v) +#define CF_LE_L(v) le32toh(v) +#define CT_LE_W(v) htole16(v) +#define CT_LE_L(v) htole32(v) #define FAT_HASH_SIZE 2 #define FAT_HASH_MODULE FAT_HASH_SIZE diff --git a/cpukit/libmisc/shell/main_pci.c b/cpukit/libmisc/shell/main_pci.c index c1d9535..a71b3fd 100644 --- a/cpukit/libmisc/shell/main_pci.c +++ b/cpukit/libmisc/shell/main_pci.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include /* For PCI endianness config */ #include @@ -416,7 +416,7 @@ static int pci_summary(void) printf(" CFG LIBRARY: %s\n", cfglib_strs[pci_config_lib_type]); printf(" NO. PCI BUSES: %d buses\n", pci_bus_count()); printf(" PCI ENDIAN:%s\n", pci_endian ? "Big" : "Little"); -#if (CPU_LITTLE_ENDIAN == TRUE) +#if BYTE_ORDER == LITTLE_ENDIAN puts(" MACHINE ENDIAN:Little"); #else puts(" MACHINE ENDIAN:Big"); -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel