Project

General

Profile

Actions

Code-audit » History » Revision 3

« Previous | Revision 3/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
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
nuttx/arch/arm/src/calypso/Make.defs
nuttx/arch/arm/src/calypso/calypso_armio.c
nuttx/arch/arm/src/calypso/calypso_head.S
nuttx/arch/arm/src/calypso/calypso_heap.c
nuttx/arch/arm/src/calypso/calypso_irq.c
nuttx/arch/arm/src/calypso/calypso_keypad.c
nuttx/arch/arm/src/calypso/calypso_lowputc.S
nuttx/arch/arm/src/calypso/calypso_serial.c
nuttx/arch/arm/src/calypso/calypso_spi.c
nuttx/arch/arm/src/calypso/calypso_timer.c
nuttx/arch/arm/src/calypso/chip.h
nuttx/arch/arm/src/calypso/clock.c
nuttx/arch/arm/src/common/up_internal.h
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
nuttx/drivers/sercomm/Make.defs
nuttx/drivers/sercomm/console.c
nuttx/drivers/sercomm/loadwriter.py
nuttx/drivers/sercomm/uart.c
nuttx/drivers/sercomm/uart.h
nuttx/include/nuttx/spi.h
nuttx/include/sercomm/msgb.h
nuttx/include/sercomm/sercomm.h
nuttx/include/sercomm/sercomm_cons.h
70 files changed, 9221 insertions(+), 3 deletions(-)
}}}

We can safely assume that the config dir weren't took from osmocom-bb.

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);
}

}}} * 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);

}}}

Files (0)

Updated by gnutoo about 8 years ago · 3 revisions

Add picture from clipboard (Maximum size: 48.8 MB)