Code-audit » History » Version 15
gnutoo, 02/19/2016 10:49 PM
1 | 1 | gnutoo | == Introduction == |
---|---|---|---|
2 | 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). |
||
3 | With the code size of nuttx-bb the audit should be quick enough. |
||
4 | |||
5 | 2 | gnutoo | 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) |
6 | 1 | gnutoo | == Audit == |
7 | Currently the following files were added or modified by nuttx-bb(on top of nuttx): |
||
8 | {{{ |
||
9 | apps/examples/calypsotest/Makefile |
||
10 | apps/examples/calypsotest/bounce_analyze.c |
||
11 | apps/examples/calypsotest/main.c |
||
12 | apps/examples/ostest/main.c |
||
13 | nuttx/arch/arm/include/calypso/armio.h |
||
14 | nuttx/arch/arm/include/calypso/clock.h |
||
15 | nuttx/arch/arm/include/calypso/debug.h |
||
16 | nuttx/arch/arm/include/calypso/defines.h |
||
17 | nuttx/arch/arm/include/calypso/irq.h |
||
18 | nuttx/arch/arm/include/calypso/memory.h |
||
19 | nuttx/arch/arm/include/calypso/timer.h |
||
20 | nuttx/arch/arm/src/Makefile |
||
21 | nuttx/arch/arm/src/calypso/Make.defs |
||
22 | nuttx/arch/arm/src/calypso/calypso_armio.c |
||
23 | nuttx/arch/arm/src/calypso/calypso_head.S |
||
24 | nuttx/arch/arm/src/calypso/calypso_heap.c |
||
25 | nuttx/arch/arm/src/calypso/calypso_irq.c |
||
26 | 13 | gnutoo | nuttx/arch/arm/src/calypso/calypso_keypad.c OK,BSD, totally different from osmocom-bb's src/target/firmware/calypso/keypad.c |
27 | 15 | gnutoo | nuttx/arch/arm/src/calypso/calypso_lowputc.S OK,BSD, not found in osmocom-bb source |
28 | 1 | gnutoo | nuttx/arch/arm/src/calypso/calypso_serial.c |
29 | nuttx/arch/arm/src/calypso/calypso_spi.c OK,BSD, wrapper arround osmocombb's SPI, incomplete |
||
30 | 14 | gnutoo | nuttx/arch/arm/src/calypso/calypso_timer.c OK,GPL, copyright Harald Welte and Stefan Richter |
31 | 1 | gnutoo | nuttx/arch/arm/src/calypso/chip.h |
32 | 14 | gnutoo | nuttx/arch/arm/src/calypso/clock.c OK,GPL, copyright Harald Welte |
33 | 1 | gnutoo | nuttx/arch/arm/src/common/up_internal.h |
34 | 3 | gnutoo | nuttx/configs/compal_e88/calypsotest/Make.defs OK,BSD |
35 | nuttx/configs/compal_e88/calypsotest/appconfig OK,BSD |
||
36 | nuttx/configs/compal_e88/calypsotest/defconfig OK,BSD |
||
37 | nuttx/configs/compal_e88/calypsotest/setenv.sh OK,BSD |
||
38 | nuttx/configs/compal_e88/include/board.h OK,BSD |
||
39 | nuttx/configs/compal_e88/ld.script OK,BSD |
||
40 | nuttx/configs/compal_e88/nsh/Make.defs OK,BSD |
||
41 | nuttx/configs/compal_e88/nsh/appconfig OK,BSD |
||
42 | nuttx/configs/compal_e88/nsh/defconfig OK,BSD |
||
43 | nuttx/configs/compal_e88/nsh/ld.script OK,BSD |
||
44 | nuttx/configs/compal_e88/nsh/setenv.sh OK,BSD |
||
45 | nuttx/configs/compal_e88/ostest/Make.defs OK,BSD |
||
46 | nuttx/configs/compal_e88/ostest/appconfig OK,BSD |
||
47 | nuttx/configs/compal_e88/ostest/defconfig OK,BSD |
||
48 | nuttx/configs/compal_e88/ostest/setenv.sh OK,BSD |
||
49 | nuttx/configs/compal_e88/src/Make.dep OK,BSD |
||
50 | nuttx/configs/compal_e88/src/Makefile OK,BSD |
||
51 | nuttx/configs/compal_e88/src/dummy.c OK,BSD |
||
52 | nuttx/configs/compal_e99/calypsotest/Make.defs OK,BSD |
||
53 | nuttx/configs/compal_e99/calypsotest/appconfig OK,BSD |
||
54 | nuttx/configs/compal_e99/calypsotest/defconfig OK,BSD |
||
55 | nuttx/configs/compal_e99/calypsotest/setenv.sh OK,BSD |
||
56 | nuttx/configs/compal_e99/include/board.h OK,BSD |
||
57 | nuttx/configs/compal_e99/ld.script OK,BSD |
||
58 | nuttx/configs/compal_e99/nsh/Make.defs OK,BSD |
||
59 | nuttx/configs/compal_e99/nsh/appconfig OK,BSD |
||
60 | nuttx/configs/compal_e99/nsh/defconfig OK,BSD |
||
61 | nuttx/configs/compal_e99/nsh/ld.script OK,BSD |
||
62 | nuttx/configs/compal_e99/nsh/setenv.sh OK,BSD |
||
63 | nuttx/configs/compal_e99/ostest/Make.defs OK,BSD |
||
64 | nuttx/configs/compal_e99/ostest/appconfig OK,BSD |
||
65 | nuttx/configs/compal_e99/ostest/defconfig OK,BSD |
||
66 | nuttx/configs/compal_e99/ostest/setenv.sh OK,BSD |
||
67 | nuttx/configs/compal_e99/src/Makefile OK,BSD |
||
68 | nuttx/configs/compal_e99/src/dummy.c OK,BSD |
||
69 | 9 | gnutoo | nuttx/drivers/Makefile OK,BSD |
70 | nuttx/drivers/sercomm/Make.defs OK,BSD |
||
71 | 12 | gnutoo | nuttx/drivers/sercomm/console.c mostly OK(see below), BSD |
72 | 5 | gnutoo | nuttx/drivers/sercomm/loadwriter.py no copyright at all, small enough |
73 | 4 | gnutoo | nuttx/drivers/sercomm/uart.c OK,GPL, copyright Harald Welte and Ingo Albrecht |
74 | nuttx/drivers/sercomm/uart.h no copyright at all |
||
75 | 5 | gnutoo | nuttx/include/nuttx/spi.h OK,BSD, only small change made |
76 | 8 | gnutoo | nuttx/include/sercomm/msgb.h OK,GPL,copyright Harald Welte |
77 | nuttx/include/sercomm/sercomm.h copy of src/target/firmware/include/comm/sercomm.h, no license in both. |
||
78 | 7 | gnutoo | nuttx/include/sercomm/sercomm_cons.h no license,interface only(only 2 definitions of functions inside) |
79 | 1 | gnutoo | 70 files changed, 9221 insertions(+), 3 deletions(-) |
80 | }}} |
||
81 | |||
82 | We can safely assume that the config dir weren't took from osmocom-bb. |
||
83 | 10 | gnutoo | == init.c and console.c == |
84 | === nuttx-bb === |
||
85 | * Copyright Stefan Richter |
||
86 | * BSD License |
||
87 | * nuttx/drivers/sercomm/console.c |
||
88 | {{{ |
||
89 | /* XXX: initialize MODEMUART to be used for sercomm*/ |
||
90 | uart_init(SERCOMM_UART_NR, 1); |
||
91 | uart_baudrate(SERCOMM_UART_NR, UART_115200); |
||
92 | }}} |
||
93 | 11 | gnutoo | === osmocom-bb === |
94 | 10 | gnutoo | * GPL |
95 | * Copyright Harald Welte and Steve Markgraf |
||
96 | * src/target/firmware/board/compal_e99/init.c |
||
97 | {{{ |
||
98 | /* initialize MODEM UART to be used for sercomm*/ |
||
99 | uart_init(SERCOMM_UART_NR, 1); |
||
100 | uart_baudrate(SERCOMM_UART_NR, UART_115200); |
||
101 | }}} |
||
102 | 1 | gnutoo | == init.c and calypso_heap.c == |
103 | === nuttx-bb === |
||
104 | * Copyright Stefan Richter |
||
105 | 10 | gnutoo | * BSD License |
106 | 1 | gnutoo | * nuttx/arch/arm/src/calypso/calypso_heap.c |
107 | {{{ |
||
108 | void up_addregion(void) |
||
109 | { |
||
110 | #ifdef CONFIG_ARCH_BOARD_COMPALE99 |
||
111 | /* Disable watchdog in first non-common function */ |
||
112 | wdog_enable(0); |
||
113 | #endif |
||
114 | // XXX: change to initialization of extern memory with save defaults |
||
115 | /* Configure memory interface */ |
||
116 | calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1); |
||
117 | calypso_mem_cfg(CALYPSO_nCS1, 3, CALYPSO_MEM_16bit, 1); |
||
118 | calypso_mem_cfg(CALYPSO_nCS2, 5, CALYPSO_MEM_16bit, 1); |
||
119 | calypso_mem_cfg(CALYPSO_nCS3, 5, CALYPSO_MEM_16bit, 1); |
||
120 | calypso_mem_cfg(CALYPSO_CS4, 0, CALYPSO_MEM_8bit, 1); |
||
121 | calypso_mem_cfg(CALYPSO_nCS6, 0, CALYPSO_MEM_32bit, 1); |
||
122 | calypso_mem_cfg(CALYPSO_nCS7, 0, CALYPSO_MEM_32bit, 0); |
||
123 | |||
124 | /* Set VTCXO_DIV2 = 1, configure PLL for 104 MHz and give ARM half of that */ |
||
125 | calypso_clock_set(2, CALYPSO_PLL13_104_MHZ, ARM_MCLK_DIV_2); |
||
126 | |||
127 | /* Configure the RHEA bridge with some sane default values */ |
||
128 | calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0); |
||
129 | } |
||
130 | |||
131 | }}} |
||
132 | 10 | gnutoo | === Osmocom-bb === |
133 | 1 | gnutoo | * GPL |
134 | * Copyright Harald Welte and Steve Markgraf |
||
135 | * src/target/firmware/board/compal_e99/init.c |
||
136 | {{{ |
||
137 | void board_init(void) |
||
138 | { |
||
139 | /* Disable watchdog (compal loader leaves it enabled) */ |
||
140 | wdog_enable(0); |
||
141 | |||
142 | /* Configure memory interface */ |
||
143 | calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1); |
||
144 | calypso_mem_cfg(CALYPSO_nCS1, 3, CALYPSO_MEM_16bit, 1); |
||
145 | calypso_mem_cfg(CALYPSO_nCS2, 5, CALYPSO_MEM_16bit, 1); |
||
146 | calypso_mem_cfg(CALYPSO_nCS3, 5, CALYPSO_MEM_16bit, 1); |
||
147 | calypso_mem_cfg(CALYPSO_CS4, 0, CALYPSO_MEM_8bit, 1); |
||
148 | calypso_mem_cfg(CALYPSO_nCS6, 0, CALYPSO_MEM_32bit, 1); |
||
149 | calypso_mem_cfg(CALYPSO_nCS7, 0, CALYPSO_MEM_32bit, 0); |
||
150 | |||
151 | /* Set VTCXO_DIV2 = 1, configure PLL for 104 MHz and give ARM half of that */ |
||
152 | calypso_clock_set(2, CALYPSO_PLL13_104_MHZ, ARM_MCLK_DIV_2); |
||
153 | |||
154 | /* Configure the RHEA bridge with some sane default values */ |
||
155 | calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0); |
||
156 | |||
157 | }}} |