<p style="white-space: pre-wrap; word-wrap: break-word;">An initial review showed there are *many* parts that are identical to osmo-bts-litecell15, and we generally don't like "copy+paste" programming.  In the end we have multiple compies of essentially the same source files, becoming a maintenance problem over time, when fixes are applied to one copy, but not the other.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I've manually looked through each of the files and looked at the differences between the oc2g and the lc15 counterpart.</p><p style="white-space: pre-wrap; word-wrap: break-word;">== 100% identical to osmo-bts-sysmo or osmo-bts-lc15:</p><p style="white-space: pre-wrap; word-wrap: break-word;">oml_router.c<br>oml_router.h<br>misc/oc2gbts_nl.c</p><p style="white-space: pre-wrap; word-wrap: break-word;">== 99% identical to lc15 (just names changed)</p><p style="white-space: pre-wrap; word-wrap: break-word;">hw_misc.h<br>hw_misc.c<br>l1_transp.h<br>l1_trans_hw.c<br>oc2gbts.c / lc15bts.c<br>oc2gbts_vty.c / lc15bts_vty.c<br>oml.c<br>tch.c<br>utils.c<br>utils.h<br>l1_if.h<br>misc/oc2gbts_bts.h<br>misc/oc2gbts_bid.h<br>misc/oc2gbts_clock.h<br>misc/oc2gbts_clock.c<br>misc/oc2gbts_led.c<br>misc/oc2gbts_swd.c<br>misc/oc2gbts_swd.h</p><p style="white-space: pre-wrap; word-wrap: break-word;">== 80% identical to lc15 (some small changes)</p><p style="white-space: pre-wrap; word-wrap: break-word;">l1_if.c<br>misc/oc2gbts_bts.c<br>misc/oc2gbts_mgr.c<br>misc/oc2gbts_mgr.h<br>misc/oc2gbts_mgr_nl.c<br>misc/oc2gbts_temp.c<br>misc/oc2gbts_temp.h</p><p style="white-space: pre-wrap; word-wrap: break-word;">== more differences compared to lc15, possibly not intentional? / what to do?</p><p style="white-space: pre-wrap; word-wrap: break-word;">misc/oc2gbts_temp.c<br>misc/oc2gbts_mgr_vty.c<br>misc/oc2gbts_misc.c<br>misc/oc2gbts_par.c<br>misc/oc2gbts_power.c<br>misc/oc2gbts_util.c</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>So we have to discuss how to go about this.  The 100% identical files are easy, one can simply lik the existing implementation.  We could also introduce a "src/nuran-common" directory for common code between the different models.</p><p style="white-space: pre-wrap; word-wrap: break-word;">For those parts with less similarity, this may require some refactoring, so that common/shared code goes to common/shared files and really only those bits that differ are handled in the respective implementations.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Given that osmo-bts-litecell15 also started as copy of osmo-bts-sysmo, there may be room for further unification, but let's not conflate those two discussions.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I think gerrit is not the best location to discuss this, so I'll start a mailing list thread.</p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/11447">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11447">change 11447</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11447"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35 </div>
<div style="display:none"> Gerrit-Change-Number: 11447 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Omar Ramadan <omar.ramadan93@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 24 Oct 2018 09:37:42 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>