Project

General

Profile

Actions

Code-audit » History » Revision 22

« Previous | Revision 22/57 (diff) | Next »
gnutoo, 02/19/2016 10:49 PM


Introduction
This is an audit to verify that The headers are correct(for instance that the code wasn't took from osmocom-bb and then relicensed without permission under the BSD license with the authorship stripped).
With the code size of nuttx-bb the audit should be quick enough.

That will also permit us to look at the license of each files in order to aim for upstream inclusion in nuttx(nuttx only accept BSD licensed code)
Audit
Currently the following files were added or modified by nuttx-bb(on top of nuttx): {{{
apps/examples/calypsotest/Makefile
apps/examples/calypsotest/bounce_analyze.c
apps/examples/calypsotest/main.c
apps/examples/ostest/main.c
nuttx/arch/arm/include/calypso/armio.h OK,BSD only definitions of functions
nuttx/arch/arm/include/calypso/clock.h
nuttx/arch/arm/include/calypso/debug.h
nuttx/arch/arm/include/calypso/defines.h
nuttx/arch/arm/include/calypso/irq.h
nuttx/arch/arm/include/calypso/memory.h
nuttx/arch/arm/include/calypso/timer.h
nuttx/arch/arm/src/Makefile OK,BSD
nuttx/arch/arm/src/calypso/Make.defs OK,BSD
nuttx/arch/arm/src/calypso/calypso_armio.c BSD,copyright Stefan Richter, seem ok(grep found nothing in osmocom-bb)
nuttx/arch/arm/src/calypso/calypso_head.S no license, specific to nuttx
nuttx/arch/arm/src/calypso/calypso_heap.c problematic?, see below
nuttx/arch/arm/src/calypso/calypso_irq.c OK,GPL, copyright Harald Welte and Stefan Richter
nuttx/arch/arm/src/calypso/calypso_keypad.c OK,BSD, totally different from osmocom-bb's src/target/firmware/calypso/keypad.c
nuttx/arch/arm/src/calypso/calypso_lowputc.S OK,BSD, not found in osmocom-bb source
nuttx/arch/arm/src/calypso/calypso_serial.c OK,BSD, based on nuttx/arch/arm/src/c5471/c5471_serial.c from nuttx (verified with diff)
nuttx/arch/arm/src/calypso/calypso_spi.c OK,BSD, wrapper arround osmocombb's SPI, incomplete
nuttx/arch/arm/src/calypso/calypso_timer.c OK,GPL, copyright Harald Welte and Stefan Richter
nuttx/arch/arm/src/calypso/chip.h OK,BSD,based on nuttx/arch/arm/src/c5471/chip.h
nuttx/arch/arm/src/calypso/clock.c OK,GPL, copyright Harald Welte
nuttx/arch/arm/src/common/up_internal.h OK,BSD,trivial modification(part of nuttx)
nuttx/configs/compal_e88/calypsotest/Make.defs OK,BSD
nuttx/configs/compal_e88/calypsotest/appconfig OK,BSD
nuttx/configs/compal_e88/calypsotest/defconfig OK,BSD
nuttx/configs/compal_e88/calypsotest/setenv.sh OK,BSD
nuttx/configs/compal_e88/include/board.h OK,BSD
nuttx/configs/compal_e88/ld.script OK,BSD
nuttx/configs/compal_e88/nsh/Make.defs OK,BSD
nuttx/configs/compal_e88/nsh/appconfig OK,BSD
nuttx/configs/compal_e88/nsh/defconfig OK,BSD
nuttx/configs/compal_e88/nsh/ld.script OK,BSD
nuttx/configs/compal_e88/nsh/setenv.sh OK,BSD
nuttx/configs/compal_e88/ostest/Make.defs OK,BSD
nuttx/configs/compal_e88/ostest/appconfig OK,BSD
nuttx/configs/compal_e88/ostest/defconfig OK,BSD
nuttx/configs/compal_e88/ostest/setenv.sh OK,BSD
nuttx/configs/compal_e88/src/Make.dep OK,BSD
nuttx/configs/compal_e88/src/Makefile OK,BSD
nuttx/configs/compal_e88/src/dummy.c OK,BSD
nuttx/configs/compal_e99/calypsotest/Make.defs OK,BSD
nuttx/configs/compal_e99/calypsotest/appconfig OK,BSD
nuttx/configs/compal_e99/calypsotest/defconfig OK,BSD
nuttx/configs/compal_e99/calypsotest/setenv.sh OK,BSD
nuttx/configs/compal_e99/include/board.h OK,BSD
nuttx/configs/compal_e99/ld.script OK,BSD
nuttx/configs/compal_e99/nsh/Make.defs OK,BSD
nuttx/configs/compal_e99/nsh/appconfig OK,BSD
nuttx/configs/compal_e99/nsh/defconfig OK,BSD
nuttx/configs/compal_e99/nsh/ld.script OK,BSD
nuttx/configs/compal_e99/nsh/setenv.sh OK,BSD
nuttx/configs/compal_e99/ostest/Make.defs OK,BSD
nuttx/configs/compal_e99/ostest/appconfig OK,BSD
nuttx/configs/compal_e99/ostest/defconfig OK,BSD
nuttx/configs/compal_e99/ostest/setenv.sh OK,BSD
nuttx/configs/compal_e99/src/Makefile OK,BSD
nuttx/configs/compal_e99/src/dummy.c OK,BSD
nuttx/drivers/Makefile OK,BSD
nuttx/drivers/sercomm/Make.defs OK,BSD
nuttx/drivers/sercomm/console.c mostly OK, BSD
nuttx/drivers/sercomm/loadwriter.py no copyright at all, small enough
nuttx/drivers/sercomm/uart.c OK,GPL, copyright Harald Welte and Ingo Albrecht
nuttx/drivers/sercomm/uart.h no copyright at all
nuttx/include/nuttx/spi.h OK,BSD, only small change made
nuttx/include/sercomm/msgb.h OK,GPL,copyright Harald Welte
nuttx/include/sercomm/sercomm.h copy of src/target/firmware/include/comm/sercomm.h, no license in both.
nuttx/include/sercomm/sercomm_cons.h no license,interface only(only 2 definitions of functions inside)
70 files changed, 9221 insertions(+), 3 deletions(-)
}}}

We can safely assume that the config dir weren't took from osmocom-bb.
init.c and console.c === nuttx-bb === * Copyright Stefan Richter * BSD License * nuttx/drivers/sercomm/console.c {{{
/* XXX: initialize MODEMUART to be used for sercomm*/
uart_init(SERCOMM_UART_NR, 1);
uart_baudrate(SERCOMM_UART_NR, UART_115200);
}}} === osmocom-bb === * GPL * Copyright Harald Welte and Steve Markgraf * src/target/firmware/board/compal_e99/init.c {{{
/* initialize MODEM UART to be used for sercomm*/
uart_init(SERCOMM_UART_NR, 1);
uart_baudrate(SERCOMM_UART_NR, UART_115200);
}}}
init.c and calypso_heap.c === nuttx-bb === * Copyright Stefan Richter * BSD License * nuttx/arch/arm/src/calypso/calypso_heap.c {{{
void up_addregion(void) {
#ifdef CONFIG_ARCH_BOARD_COMPALE99
/* Disable watchdog in first non-common function /
wdog_enable(0);
#endif
// XXX: change to initialization of extern memory with save defaults
/
Configure memory interface */
calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS1, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS2, 5, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS3, 5, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_CS4, 0, CALYPSO_MEM_8bit, 1);
calypso_mem_cfg(CALYPSO_nCS6, 0, CALYPSO_MEM_32bit, 1);
calypso_mem_cfg(CALYPSO_nCS7, 0, CALYPSO_MEM_32bit, 0);

/* Set VTCXO_DIV2 = 1, configure PLL for 104 MHz and give ARM half of that */
calypso_clock_set(2, CALYPSO_PLL13_104_MHZ, ARM_MCLK_DIV_2);
/* Configure the RHEA bridge with some sane default values */
calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0);
}

}}} === Osmocom-bb === * GPL * Copyright Harald Welte and Steve Markgraf * src/target/firmware/board/compal_e99/init.c {{{
void board_init(void) {
/* Disable watchdog (compal loader leaves it enabled) */
wdog_enable(0);

/* Configure memory interface */
calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS1, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS2, 5, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS3, 5, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_CS4, 0, CALYPSO_MEM_8bit, 1);
calypso_mem_cfg(CALYPSO_nCS6, 0, CALYPSO_MEM_32bit, 1);
calypso_mem_cfg(CALYPSO_nCS7, 0, CALYPSO_MEM_32bit, 0);
/* Set VTCXO_DIV2 = 1, configure PLL for 104 MHz and give ARM half of that */
calypso_clock_set(2, CALYPSO_PLL13_104_MHZ, ARM_MCLK_DIV_2);
/* Configure the RHEA bridge with some sane default values */
calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0);

}}}

Updated by gnutoo almost 6 years ago · 22 revisions

Add picture from clipboard (Maximum size: 48.8 MB)