Re: LIBBSD Build Error
Sorry, should be fixed now: https://git.rtems.org/rtems-libbsd/commit/?id=9db59c71ad8bc1f1852838d147a29467a1cd6e3d -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
LIBBSD Build Error
I have rebased my tools via RSB to the latest and have successfully compiled RTEMS with a custom lpc32xx BSP. When compiling LIBBSD, I am getting the following error when compiling "freebsd/lib/libc/inet/nsap_addr.c " /tmp/ccWucPca.s: Assembler messages: /tmp/ccWucPca.s:474: Error: symbol `inet_nsap_addr' is already defined /tmp/ccWucPca.s:476: Error: symbol `inet_nsap_ntoa' is already defined I assume this is related to pushing network headers into newlib. There are weak aliases in the file as follows: /* * Weak aliases for applications that use certain private entry points, * and fail to include . */ #undef inet_nsap_addr __weak_reference(__inet_nsap_addr, inet_nsap_addr); #undef inet_nsap_ntoa __weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa); Before digging into this, does anyone have an explanation? Kevin Kirspel Electrical Engineer - Sr. Staff Idexx Roswell 235 Hembree Park Drive Roswell GA 30076 Tel: (770)-510- ext. 81642 Direct: (770)-688-1642 Fax: (770)-510-4445 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Change RTEMS License to Two Paragraph BSD
Hi There have been discussions for almost two years about changing the current license to the Two Paragraph BSD license. Unfortunately, I think most of them were in chat and forums like the Flight Software Workshop. The core developers have done a lot of homework and soul searching to come to this decision. We really believe this is the right thing and will be less confusing and more appealing to new users in the long run. I have filed a ticket about this which has a lot of details but if anyone has questions, feel free to ask. https://devel.rtems.org/ticket/3053#ticket --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 10/10] psxstat/test.c: Avoid potential string overflow
--- testsuites/psxtests/psxstat/test.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testsuites/psxtests/psxstat/test.c b/testsuites/psxtests/psxstat/test.c index e489180..b616f55 100644 --- a/testsuites/psxtests/psxstat/test.c +++ b/testsuites/psxtests/psxstat/test.c @@ -512,16 +512,19 @@ void make_many_symlinks( char name2[5]; char *link_file; + /* limit the link_count to ensure filename buffer doesn't overflow */ + rtems_test_assert( link_count < 1000 ); + link_file = real_file; for (i=1; i < link_count; i++) { -sprintf( name1, "%d", i ); +sprintf( name1, "%04d", i ); make_a_symlink( link_file, name1 ); strcpy( name2, name1 ); link_file = name2; } for (i=1; i < link_count; i++) { -sprintf( name1, "%d", i ); +sprintf( name1, "%04d", i ); stat_a_file( name1 ); lstat_a_file( name1 ); } -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 09/10] psximfs02/init.c: Avoid potential string overflow
--- testsuites/psxtests/psximfs02/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuites/psxtests/psximfs02/init.c b/testsuites/psxtests/psximfs02/init.c index 2316eb5..d9bb4db 100644 --- a/testsuites/psxtests/psximfs02/init.c +++ b/testsuites/psxtests/psximfs02/init.c @@ -74,8 +74,8 @@ rtems_task Init( rtems_test_assert( status == 0 ); for( i = 1 ; ; ++i ) { -sprintf( linkname_p, "dir01-link%d", i-1 ); -sprintf( linkname_n, "dir01-link%d", i ); +sprintf( linkname_p, "dir01-link%04d", i-1 ); +sprintf( linkname_n, "dir01-link%04d", i ); printf( "\nCreating link %s for %s\n", linkname_n, linkname_p ); status = link( linkname_p, linkname_n ); if( status != 0 ) { -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 08/10] dl03/dl-cache.c: Fix duplicate const warning
--- testsuites/libtests/dl03/dl-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuites/libtests/dl03/dl-cache.c b/testsuites/libtests/dl03/dl-cache.c index a2eb071..e11c6b1 100644 --- a/testsuites/libtests/dl03/dl-cache.c +++ b/testsuites/libtests/dl03/dl-cache.c @@ -30,7 +30,7 @@ static uint8_t* contents; -static const char const* filename = "/dl-test"; +static const char *const filename = "/dl-test"; static void dl_cache_create_file(void) { -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 07/10] sys/utsname.h: Increase buffer to avoid overflow
--- cpukit/libcsupport/include/sys/utsname.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/libcsupport/include/sys/utsname.h b/cpukit/libcsupport/include/sys/utsname.h index 95dc2c1..ddeb0e9 100644 --- a/cpukit/libcsupport/include/sys/utsname.h +++ b/cpukit/libcsupport/include/sys/utsname.h @@ -39,11 +39,11 @@ extern "C" { */ #ifdef _KERNEL -#define SYS_NMLN32 /* uname(2) for the FreeBSD 1.1 ABI. */ +#define SYS_NMLN48 /* uname(2) for the FreeBSD 1.1 ABI. */ #endif #ifndef SYS_NMLN -#define SYS_NMLN32 /* User can override. */ +#define SYS_NMLN48 /* User can override. */ #endif struct utsname { -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 06/10] i386/shared/comm/i386-stub-glue.c: Fix duplicate const warning
--- c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c b/c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c index d47d057..b11d960 100644 --- a/c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c +++ b/c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c @@ -71,7 +71,7 @@ __asm__ ("movl i386_gdb_uart_isr_regsav, %eax"); /* Restore eax */ __asm__ ("iret");/* Done */ static int gdb_hello_index; -static const char const* gdb_hello = "+"; +static const char *const gdb_hello = "+"; static inline uint8_t BSP_i8259a_irq_in_service_reg(uint32_t ioport) { -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 04/10] malloctest/init.c: Disable check maximum size warning to allow error test case
--- testsuites/libtests/malloctest/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index fb22e4d..6be6c1c 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -1260,7 +1260,10 @@ rtems_task Init( /* * Verify case where block is too large to calloc. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Walloc-size-larger-than=N" p1 = calloc( 1, SIZE_MAX ); +#pragma GCC diagnostic pop if (p1) { printf("ERROR on attempt to calloc SIZE_MAX block expected failure."); free( p1 ); -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 05/10] lpc176x/misc/restart.c: Fix duplicate const warning
--- c/src/lib/libbsp/arm/lpc176x/misc/restart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/arm/lpc176x/misc/restart.c b/c/src/lib/libbsp/arm/lpc176x/misc/restart.c index d3851dd..d6e5783 100644 --- a/c/src/lib/libbsp/arm/lpc176x/misc/restart.c +++ b/c/src/lib/libbsp/arm/lpc176x/misc/restart.c @@ -23,7 +23,7 @@ #include #include -void bsp_restart( const void const *addr ) +void bsp_restart( const void *const addr ) { rtems_interrupt_level level; -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 00/10] Warning Fixes
Hi This is a series of patches to fix warnings that showed up with the recent update to gcc 7. I filed tickets on issues which required more insight from the original author to resolve. --joel Joel Sherrill (10): rbheap01/init.c: Fix PAGE_SIZE redefined warning top/task1.c: Fix sprintf() buffer overflow capture/rtems-trace-buffer-vars.c: Fix duplicate const warning malloctest/init.c: Disable check maximum size warning to allow error test case lpc176x/misc/restart.c: Fix duplicate const warning i386/shared/comm/i386-stub-glue.c: Fix duplicate const warning sys/utsname.h: Increase buffer to avoid overflow dl03/dl-cache.c: Fix duplicate const warning psximfs02/init.c: Avoid potential string overflow psxstat/test.c: Avoid potential string overflow c/src/lib/libbsp/arm/lpc176x/misc/restart.c| 2 +- c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c | 2 +- cpukit/libcsupport/include/sys/utsname.h | 4 +- cpukit/libmisc/capture/rtems-trace-buffer-vars.c | 2 +- testsuites/libtests/dl03/dl-cache.c| 2 +- testsuites/libtests/malloctest/init.c | 3 + testsuites/libtests/rbheap01/init.c| 74 +++--- testsuites/libtests/top/task1.c| 2 +- testsuites/psxtests/psximfs02/init.c | 4 +- testsuites/psxtests/psxstat/test.c | 7 +- 10 files changed, 54 insertions(+), 48 deletions(-) -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 02/10] top/task1.c: Fix sprintf() buffer overflow
--- testsuites/libtests/top/task1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuites/libtests/top/task1.c b/testsuites/libtests/top/task1.c index fc81f51..c9e62df 100644 --- a/testsuites/libtests/top/task1.c +++ b/testsuites/libtests/top/task1.c @@ -28,7 +28,7 @@ static void create_and_start( uint32_t i ) { rtems_status_code status; char str[30]; - char name[5]; + char name[6]; sprintf(name, "TA%02" PRId32 " ", i); -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 03/10] capture/rtems-trace-buffer-vars.c: Fix duplicate const warning
--- cpukit/libmisc/capture/rtems-trace-buffer-vars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libmisc/capture/rtems-trace-buffer-vars.c b/cpukit/libmisc/capture/rtems-trace-buffer-vars.c index 3d31115..b0f7070 100644 --- a/cpukit/libmisc/capture/rtems-trace-buffer-vars.c +++ b/cpukit/libmisc/capture/rtems-trace-buffer-vars.c @@ -19,7 +19,7 @@ * Trace linker data. */ uint32_t __rtld_trace_names_size __attribute__ ((weak)); -const char const* __rtld_trace_names[1] __attribute__ ((weak)); +const char *const __rtld_trace_names[1] __attribute__ ((weak)); uint32_t __rtld_trace_enables_size __attribute__ ((weak)); const uint32_t __rtld_trace_enables[1] __attribute__ ((weak)); uint32_t __rtld_trace_triggers_size __attribute__ ((weak)); -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 01/10] rbheap01/init.c: Fix PAGE_SIZE redefined warning
--- testsuites/libtests/rbheap01/init.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/testsuites/libtests/rbheap01/init.c b/testsuites/libtests/rbheap01/init.c index bc16d0a..a85d107 100644 --- a/testsuites/libtests/rbheap01/init.c +++ b/testsuites/libtests/rbheap01/init.c @@ -28,13 +28,13 @@ const char rtems_test_name[] = "RBHEAP 1"; /* forward declarations to avoid warnings */ static rtems_task Init(rtems_task_argument argument); -#define PAGE_SIZE 1024 +#define TEST_PAGE_SIZE 1024 -#define PAGE_COUNT 8 +#define TEST_PAGE_COUNT 8 -static char area [PAGE_SIZE * PAGE_COUNT + PAGE_SIZE - 1]; +static char area [TEST_PAGE_SIZE * TEST_PAGE_COUNT + TEST_PAGE_SIZE - 1]; -static rtems_rbheap_chunk chunks [PAGE_COUNT]; +static rtems_rbheap_chunk chunks [TEST_PAGE_COUNT]; static void extend_descriptors(rtems_rbheap_control *control) { @@ -49,7 +49,7 @@ static void extend_descriptors(rtems_rbheap_control *control) rtems_chain_initialize( chain, chunks, -PAGE_COUNT, +TEST_PAGE_COUNT, sizeof(chunks [0]) ); } @@ -57,13 +57,13 @@ static void extend_descriptors(rtems_rbheap_control *control) static uintptr_t idx(const rtems_rbheap_chunk *chunk) { uintptr_t base = (uintptr_t) area; - uintptr_t excess = base % PAGE_SIZE; + uintptr_t excess = base % TEST_PAGE_SIZE; if (excess > 0) { -base += PAGE_SIZE - excess; +base += TEST_PAGE_SIZE - excess; } - return (chunk->begin - base) / PAGE_SIZE; + return (chunk->begin - base) / TEST_PAGE_SIZE; } typedef struct { @@ -102,9 +102,9 @@ static void test_init_begin_greater_than_end(void) sc = rtems_rbheap_initialize( &control, -(void *) PAGE_SIZE, -(uintptr_t) -PAGE_SIZE, -PAGE_SIZE, +(void *) TEST_PAGE_SIZE, +(uintptr_t) -TEST_PAGE_SIZE, +TEST_PAGE_SIZE, extend_descriptors, NULL ); @@ -118,9 +118,9 @@ static void test_init_begin_greater_than_aligned_begin(void) sc = rtems_rbheap_initialize( &control, -(void *) -(PAGE_SIZE / 2), -PAGE_SIZE, -PAGE_SIZE, +(void *) -(TEST_PAGE_SIZE / 2), +TEST_PAGE_SIZE, +TEST_PAGE_SIZE, extend_descriptors, NULL ); @@ -134,9 +134,9 @@ static void test_init_aligned_begin_greater_than_aligned_end(void) sc = rtems_rbheap_initialize( &control, -(void *) PAGE_SIZE, -PAGE_SIZE / 2, -PAGE_SIZE, +(void *) TEST_PAGE_SIZE, +TEST_PAGE_SIZE / 2, +TEST_PAGE_SIZE, extend_descriptors, NULL ); @@ -150,9 +150,9 @@ static void test_init_empty_descriptors(void) sc = rtems_rbheap_initialize( &control, -(void *) PAGE_SIZE, -PAGE_SIZE, -PAGE_SIZE, +(void *) TEST_PAGE_SIZE, +TEST_PAGE_SIZE, +TEST_PAGE_SIZE, rtems_rbheap_extend_descriptors_never, NULL ); @@ -172,7 +172,7 @@ static void test_chunk_tree( rtems_test_assert( rtems_chain_node_count_unprotected(&control->spare_descriptor_chain) - == PAGE_COUNT - chunk_count + == TEST_PAGE_COUNT - chunk_count ); _RBTree_Iterate( @@ -201,7 +201,7 @@ static void test_init_successful(rtems_rbheap_control *control) control, area, sizeof(area), -PAGE_SIZE, +TEST_PAGE_SIZE, extend_descriptors, NULL ); @@ -214,7 +214,7 @@ static void test_alloc_and_free_one(void) { static const chunk_descriptor chunks_0 [] = { { 0, true }, -{ PAGE_COUNT - 1, false } +{ TEST_PAGE_COUNT - 1, false } }; static const chunk_descriptor chunks_1 [] = { { 0, true } @@ -226,7 +226,7 @@ static void test_alloc_and_free_one(void) test_init_successful(&control); - ptr = rtems_rbheap_allocate(&control, PAGE_SIZE); + ptr = rtems_rbheap_allocate(&control, TEST_PAGE_SIZE); rtems_test_assert(ptr != NULL); TEST_PAGE_TREE(&control, chunks_0); @@ -265,7 +265,7 @@ static void test_alloc_huge_chunk(void) test_init_successful(&control); - ptr = rtems_rbheap_allocate(&control, (PAGE_COUNT + 1) * PAGE_SIZE); + ptr = rtems_rbheap_allocate(&control, (TEST_PAGE_COUNT + 1) * TEST_PAGE_SIZE); rtems_test_assert(ptr == NULL); TEST_PAGE_TREE(&control, chunks); @@ -286,7 +286,7 @@ static void test_alloc_one_chunk(void) test_init_successful(&control); - ptr = rtems_rbheap_allocate(&control, PAGE_COUNT * PAGE_SIZE); + ptr = rtems_rbheap_allocate(&control, TEST_PAGE_COUNT * TEST_PAGE_SIZE); rtems_test_assert(ptr != NULL); TEST_PAGE_TREE(&control, chunks_0); @@ -315,25 +315,25 @@ static void test_alloc_many_chunks(void) rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_rbheap_control control; - void *ptr [PAGE_COUNT]; + void *ptr [TEST_PAGE_COUNT]; void *null = NULL; int i = 0; test_init_successful(&control); - for (i = 0; i < PAGE_COUNT; ++i) { -ptr [i] = rtems_rbheap_allocate(&control, PAGE_SIZE); + for (i = 0; i < TEST_PAGE_COUNT; ++i) { +ptr [i] = rtems_rbheap_allocate(&control, TEST_PAGE_SIZE);
Re: RTEMS-libbsd copyright question
Ok, i got it. Thanks all. Best Regards Sichen Zhao > Hi Sichen > > On Wed, Jun 21, 2017 at 11:05 AM, Sebastian Huber > wrote: >> On 19/06/17 15:45, Sichen Zhao wrote: >> >>> Ok, so i think most of my ported file shouldn't add copyright. >>> But some file in the rtemsbsd folder , i think i modified some new >>> code. The link is below: >>> >>> https://github.com/hahchenchen/rtems-libbsd/blob/usb2.0/rtemsbsd/include/bsp/nexus-devices.h#L49 >>> >>> >>> https://github.com/hahchenchen/rtems-libbsd/blob/usb2.0/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h#L260 >> >> It would be easier to look at patches, so that you can see what is actually >> changed. >> >> In general, changes in the "freebsd" subdirectory should be as small and >> mechanical as possible. There should be simply nothing to do that deserves a >> copyright. >> >> >> -- >> Sebastian Huber, embedded brains GmbH >> >> Address : Dornierstr. 4, D-82178 Puchheim, Germany >> Phone : +49 89 189 47 41-16 >> Fax : +49 89 189 47 41-09 >> E-Mail : sebastian.hu...@embedded-brains.de >> PGP : Public key available on request. >> >> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. >> > Don't add copy right as of now. You can always show off your commits > if someone ask you to show your work. Any way once it is merged with > rtems , it will be represented as green dot ;) ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RTEMS-libbsd copyright question
Hi Sichen On Wed, Jun 21, 2017 at 11:05 AM, Sebastian Huber wrote: > On 19/06/17 15:45, Sichen Zhao wrote: > >> Ok, so i think most of my ported file shouldn't add copyright. >> But some file in the rtemsbsd folder , i think i modified some new >> code. The link is below: >> >> https://github.com/hahchenchen/rtems-libbsd/blob/usb2.0/rtemsbsd/include/bsp/nexus-devices.h#L49 >> >> >> https://github.com/hahchenchen/rtems-libbsd/blob/usb2.0/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h#L260 > > > It would be easier to look at patches, so that you can see what is actually > changed. > > In general, changes in the "freebsd" subdirectory should be as small and > mechanical as possible. There should be simply nothing to do that deserves a > copyright. > > > -- > Sebastian Huber, embedded brains GmbH > > Address : Dornierstr. 4, D-82178 Puchheim, Germany > Phone : +49 89 189 47 41-16 > Fax : +49 89 189 47 41-09 > E-Mail : sebastian.hu...@embedded-brains.de > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > Don't add copy right as of now. You can always show off your commits if someone ask you to show your work. Any way once it is merged with rtems , it will be represented as green dot ;) ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel