Gentoo Linux now supports Network from Scratch in 5 easy steps. We're using jolly's branches for the live ebuilds. (ETA on when we can ship master?)
Network from Scratch on Gentoo ==============================
1. Add these to packages.keywords (in /etc/portage):
=net-wireless/openbsc-9999 ** =net-wireless/osmobts-9999 ** =net-wireless/osmotrx-9999 ** =net-libs/libosmo-abis-9999 **
2. Make sure your portage tree is up to date, and emerge the right packages:
$ sudo emerge --sync $ sudo emerge openbsc osmobts osmotrx
3. Download configuration templates:
$ mkdir ~/.osmocom $ wget -O ~/.osmocom/open-bsc.cfg http://bpaste.net/raw/236987/ $ wget -O ~/.osmocom/osmo-bts.cfg http://bpaste.net/raw/237000/
4. Edit configuration templates to work on spectrum you have a license for:
$ vim ~/.osmocom/*.cfg
5. Start these babies up, in separate shells:
shell1 $ osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM
shell2 $ osmobts-trx -c ~/.osmocom/osmo-bts.cfg
shell3 $ osmo-trx
FWIW, here's a simple little start-up script to get a nice looking tmux session with everything running.
#!/bin/sh
config_dir="$(readlink -f "$(dirname "$0")")" openbsc_config="$config_dir/open-bsc.cfg" osmobts_config="$config_dir/osmo-bts.cfg" hlr_db="$config_dir/hlr.sqlite3" window_title="GSM"
tmux new-session -s "$window_title" -n close-me -d
tmux new-window -n OpenBSC -t "$window_title" tmux send-keys -t OpenBSC "osmo-nitb -c '$openbsc_config' -l '$hlr_db' \ -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM" Enter
tmux new-window -n OsmoBTS -t "$window_title" tmux send-keys "osmobts-trx -c '$osmobts_config'" Enter
tmux new-window -n OsmoTRX -t "$window_title" tmux send-keys "osmo-trx" Enter
tmux new-window -n BSC-Control -t "$window_title" tmux send-keys -t BSC-Control "telnet localhost 4242" enter
tmux new-window -n BTS-Control -t "$window_title" tmux send-keys -t BTS-Control "telnet localhost 4241" enter
tmux set-option -t "$window_title" status on tmux kill-window -t close-me tmux select-window -t OpenBSC tmux attach -t "$window_title"
On Tue, Apr 29, 2014 at 02:31:10AM +0200, Jason A. Donenfeld wrote:
any reason not to participate under the Osmocom umbrella?
I agree with Holger. Would be great to have this nicely documented in the official Osmocom wiki and have the code in the official repo.
Please excuse typos. Written with a touchscreen keyboard.
-- Regards, Alexander Chemeris CEO Fairwaves, Inc. https://fairwaves.co 29 апр. 2014 г. 10:54 пользователь "Holger Hans Peter Freyther" < holger@freyther.de> написал:
On Tue, Apr 29, 2014 at 02:31:10AM +0200, Jason A. Donenfeld wrote:
any reason not to participate under the Osmocom umbrella?
Jason A. Donenfeld wrote:
Gentoo Linux now supports Network from Scratch in 5 easy steps.
Looks like you're off to a good start with this.
using jolly's branches for the live ebuilds.
I think the ebuilds needs to use master by default, but I think it would be lovely to be able to opt for a different branch. One easy way would be a USE flag, but that's perhaps not the best way. Ideas?
(ETA on when we can ship master?)
The ETA likely depends on the reason that the branch hasn't been merged. Maybe you can help with that?
Make sure your portage tree is up to date, and emerge the right packages:
$ sudo emerge --sync $ sudo emerge openbsc osmobts osmotrx
openbsc should indeed not depend on osmobts but I think osmobts should have a USE flag to make it DEPEND & RDEPEND on osmotrx Thoughts?
Download configuration templates:
$ wget -O ~/.osmocom/open-bsc.cfg http://bpaste.net/raw/236987/ $ wget -O ~/.osmocom/osmo-bts.cfg http://bpaste.net/raw/237000/
Please add config examples in files/ and install them into /usr/share/doc/{openbsc,osmobts}-9999/examples/ or so.
$ mkdir ~/.osmocom
What do you think about hooking into emerge --config for copying the installed example configuration files to the user's home?
One snag is that --config is rather for system-wide configuration.
Edit configuration templates to work on spectrum you have a license for:
$ vim ~/.osmocom/*.cfg
Start these babies up, in separate shells:
shell1 $ osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM shell2 $ osmobts-trx -c ~/.osmocom/osmo-bts.cfg shell3 $ osmo-trx
I think the tmux startup file {c,sh}ould also go into files/ along with the example configs. :)
Maybe things in your git repo can go to either osmocom or gentoo repos?
//Peter