OC-2G merge to osmo-bts

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Wed Oct 24 09:40:01 UTC 2018


Dear Osmocom team,

Omar has thankfully submitted patches for inclusion of OC-2G support
to gerrit, see https://gerrit.osmocom.org/#/c/osmo-bts/+/11447/ for the
bulk of the code.

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.

I've manually looked through each of the files and looked at the
differences between the oc2g and the lc15 counterpart.

== 100% identical to osmo-bts-sysmo or osmo-bts-lc15:

oml_router.c
oml_router.h
misc/oc2gbts_nl.c

== 99% identical to lc15 (just names changed)

hw_misc.h
hw_misc.c
l1_transp.h
l1_trans_hw.c
oc2gbts.c / lc15bts.c
oc2gbts_vty.c / lc15bts_vty.c
oml.c
tch.c
utils.c
utils.h
l1_if.h
misc/oc2gbts_bts.h
misc/oc2gbts_bid.h
misc/oc2gbts_clock.h
misc/oc2gbts_clock.c
misc/oc2gbts_led.c
misc/oc2gbts_swd.c
misc/oc2gbts_swd.h

== 80% identical to lc15 (some small changes)

l1_if.c
misc/oc2gbts_bts.c
misc/oc2gbts_mgr.c
misc/oc2gbts_mgr.h
misc/oc2gbts_mgr_nl.c
misc/oc2gbts_temp.c
misc/oc2gbts_temp.h

== more differences compared to lc15, possibly not intentional? / what to do?

misc/oc2gbts_temp.c
misc/oc2gbts_mgr_vty.c
misc/oc2gbts_misc.c
misc/oc2gbts_par.c
misc/oc2gbts_power.c
misc/oc2gbts_util.c


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.

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.

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.

In terms of process,
* we could first merge all the copies and then further unify the code, or
* we could first modify the existing core/lc15 code to be able to merge
  OC2G coe without introducing lots of copied code.

Any comments/suggestions/ideas?

Regards,
	Harald
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)



More information about the OpenBSC mailing list