mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-04 14:13:29 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33445944de | ||
|
|
1d4117faf4 | ||
|
|
a0e1b20939 | ||
|
|
0d155a130f | ||
|
|
8a71a7dd5d | ||
|
|
3642b5956c |
@@ -28,7 +28,7 @@ std::vector<std::string> comma_delimited_to_vector(const char* opt)
|
|||||||
{
|
{
|
||||||
std::string substr;
|
std::string substr;
|
||||||
getline(ss, substr, ',');
|
getline(ss, substr, ',');
|
||||||
result.push_back(substr);
|
result.push_back(std::move(substr));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -781,17 +781,6 @@ DEFUN(show_trx, show_trx_cmd,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int trx_vty_is_config_node(struct vty *vty, int node)
|
|
||||||
{
|
|
||||||
switch (node) {
|
|
||||||
case TRX_NODE:
|
|
||||||
case CHAN_NODE:
|
|
||||||
return 1;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int trx_vty_go_parent(struct vty *vty)
|
static int trx_vty_go_parent(struct vty *vty)
|
||||||
{
|
{
|
||||||
switch (vty->node) {
|
switch (vty->node) {
|
||||||
@@ -829,7 +818,6 @@ struct vty_app_info g_vty_info = {
|
|||||||
.version = PACKAGE_VERSION,
|
.version = PACKAGE_VERSION,
|
||||||
.copyright = trx_copyright,
|
.copyright = trx_copyright,
|
||||||
.go_parent_cb = trx_vty_go_parent,
|
.go_parent_cb = trx_vty_go_parent,
|
||||||
.is_config_node = trx_vty_is_config_node,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct trx_ctx *vty_trx_ctx_alloc(void *talloc_ctx)
|
struct trx_ctx *vty_trx_ctx_alloc(void *talloc_ctx)
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static void lms_log_callback(int lvl, const char *msg)
|
|||||||
{
|
{
|
||||||
/* map lime specific log levels */
|
/* map lime specific log levels */
|
||||||
static const int lvl_map[5] = {
|
static const int lvl_map[5] = {
|
||||||
[0] = LOGL_FATAL,
|
[LMS_LOG_CRITICAL] = LOGL_FATAL,
|
||||||
[LMS_LOG_ERROR] = LOGL_ERROR,
|
[LMS_LOG_ERROR] = LOGL_ERROR,
|
||||||
[LMS_LOG_WARNING] = LOGL_NOTICE,
|
[LMS_LOG_WARNING] = LOGL_NOTICE,
|
||||||
[LMS_LOG_INFO] = LOGL_INFO,
|
[LMS_LOG_INFO] = LOGL_INFO,
|
||||||
|
|||||||
@@ -75,18 +75,19 @@ USRPDevice::USRPDevice(InterfaceType iface, const struct trx_cfg *cfg) : RadioDe
|
|||||||
* split sample rate Tx/Rx - 4/1 sps we need to need to
|
* split sample rate Tx/Rx - 4/1 sps we need to need to
|
||||||
* compensate for advance rather than delay.
|
* compensate for advance rather than delay.
|
||||||
*/
|
*/
|
||||||
if (tx_sps == 1)
|
|
||||||
pingOffset = 272;
|
pingOffset = 272;
|
||||||
else if (tx_sps == 4)
|
|
||||||
pingOffset = 269 - 7500;
|
/* Split SPS (4/1) unsupported on USRP1
|
||||||
else
|
* if(tx_sps == 4 && rx_sps == 1)
|
||||||
pingOffset = 0;
|
* pingOffset = 269 - 7500;
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef SWLOOPBACK
|
#ifdef SWLOOPBACK
|
||||||
samplePeriod = 1.0e6/actualSampleRate;
|
samplePeriod = 1.0e6/actualSampleRate;
|
||||||
loopbackBufferSize = 0;
|
loopbackBufferSize = 0;
|
||||||
gettimeofday(&lastReadTime,NULL);
|
gettimeofday(&lastReadTime,NULL);
|
||||||
firstRead = false;
|
firstRead = false;
|
||||||
|
pingOffset = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +102,7 @@ int USRPDevice::open()
|
|||||||
m_uRx.reset();
|
m_uRx.reset();
|
||||||
try {
|
try {
|
||||||
m_uRx = usrp_standard_rx_sptr(usrp_standard_rx::make(
|
m_uRx = usrp_standard_rx_sptr(usrp_standard_rx::make(
|
||||||
0, decimRate * tx_sps, 1, -1,
|
0, decimRate, 1, -1,
|
||||||
usrp_standard_rx::FPGA_MODE_NORMAL,
|
usrp_standard_rx::FPGA_MODE_NORMAL,
|
||||||
1024, 16 * 8, rbf));
|
1024, 16 * 8, rbf));
|
||||||
m_uRx->set_fpga_master_clock_freq(masterClockRate);
|
m_uRx->set_fpga_master_clock_freq(masterClockRate);
|
||||||
|
|||||||
@@ -9,60 +9,19 @@
|
|||||||
#
|
#
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
substr() { [ -z "${2##*$1*}" ]; }
|
case "$INSTR" in
|
||||||
|
"--with-neon"*)
|
||||||
#apt-get install qemu qemu-user-static qemu-system-arm debootstrap fakeroot proot
|
case "$(arch)" in
|
||||||
mychroot_nocwd() {
|
arm*)
|
||||||
# LC_ALL + LANGUAGE set to avoid lots of print errors due to locale not being set inside container
|
;;
|
||||||
# PATH is needed to be able to reach binaries like ldconfig without logging in to root, which adds the paths to PATH.
|
*)
|
||||||
# PROOT_NO_SECCOMP is required due to proot bug #106
|
set +x
|
||||||
LC_ALL=C LANGUAGE=C PATH="$PATH:/usr/sbin:/sbin" PROOT_NO_SECCOMP=1 proot -r "$ROOTFS" -w / -b /proc --root-id -q qemu-arm-static "$@"
|
echo "ERROR: trying to build with INSTR=$INSTR but not running on a 32-bit arm machine! (arch=$(arch))"
|
||||||
}
|
exit 1
|
||||||
|
;;
|
||||||
mychroot() {
|
esac
|
||||||
mychroot_nocwd -w / "$@"
|
;;
|
||||||
}
|
esac
|
||||||
|
|
||||||
if [ -z "${INSIDE_CHROOT}" ]; then
|
|
||||||
|
|
||||||
# Only use ARM chroot if host is not ARM and the target is ARM:
|
|
||||||
if ! $(substr "arm" "$(uname -m)") && [ "x${INSTR}" = "x--with-neon" -o "x${INSTR}" = "x--with-neon-vfpv4" ]; then
|
|
||||||
|
|
||||||
OSMOTRX_DIR="$PWD" # we assume we are called as contrib/jenkins.sh
|
|
||||||
ROOTFS_PREFIX="${ROOTFS_PREFIX:-$HOME}"
|
|
||||||
ROOTFS="${ROOTFS_PREFIX}/qemu-img"
|
|
||||||
mkdir -p "${ROOTFS_PREFIX}"
|
|
||||||
|
|
||||||
# Prepare chroot:
|
|
||||||
if [ ! -d "$ROOTFS" ]; then
|
|
||||||
mkdir -p "$ROOTFS"
|
|
||||||
if [ "x${USE_DEBOOTSTRAP}" = "x1" ]; then
|
|
||||||
fakeroot qemu-debootstrap --foreign --include="linux-image-armmp-lpae" --arch=armhf stretch "$ROOTFS" http://ftp.de.debian.org/debian/
|
|
||||||
# Hack to avoid debootstrap trying to mount /proc, as it will fail with "no permissions" and anyway proot takes care of it:
|
|
||||||
sed -i "s/setup_proc//g" "$ROOTFS/debootstrap/suite-script"
|
|
||||||
mychroot /debootstrap/debootstrap --second-stage --verbose http://ftp.de.debian.org/debian/
|
|
||||||
else
|
|
||||||
YESTERDAY=$(python -c 'import datetime ; print((datetime.datetime.now() - datetime.timedelta(days=1)).strftime("%Y%m%d"))')
|
|
||||||
wget -nc -q "https://uk.images.linuxcontainers.org/images/debian/stretch/armhf/default/${YESTERDAY}_22:42/rootfs.tar.xz"
|
|
||||||
tar -xf rootfs.tar.xz -C "$ROOTFS/" || true
|
|
||||||
echo "nameserver 8.8.8.8" > "$ROOTFS/etc/resolv.conf"
|
|
||||||
fi
|
|
||||||
mychroot -b /dev apt-get update
|
|
||||||
mychroot apt-get -y install build-essential dh-autoreconf pkg-config libuhd-dev libusb-1.0-0-dev libusb-dev git libtalloc-dev libgnutls28-dev stow
|
|
||||||
fi
|
|
||||||
# Run jenkins.sh inside the chroot:
|
|
||||||
INSIDE_CHROOT=1 mychroot_nocwd \
|
|
||||||
-w /osmo-trx \
|
|
||||||
-b "$OSMOTRX_DIR:/osmo-trx" \
|
|
||||||
-b "$(which osmo-clean-workspace.sh):/usr/bin/osmo-clean-workspace.sh" \
|
|
||||||
-b "$(which osmo-build-dep.sh):/usr/bin/osmo-build-dep.sh" \
|
|
||||||
-b "$(which osmo-deps.sh):/usr/bin/osmo-deps.sh" \
|
|
||||||
./contrib/jenkins.sh
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then
|
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then
|
||||||
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
|
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
|
||||||
|
|||||||
10
debian/changelog
vendored
10
debian/changelog
vendored
@@ -1,3 +1,13 @@
|
|||||||
|
osmo-trx (1.7.1) unstable; urgency=medium
|
||||||
|
|
||||||
|
[ Oliver Smith ]
|
||||||
|
* contrib/jenkins: remove broken chroot + qemu code
|
||||||
|
|
||||||
|
[ Neels Hofmeyr ]
|
||||||
|
* comma_delimited_to_vector() optimization CID#465430
|
||||||
|
|
||||||
|
-- Oliver Smith <osmith@sysmocom.de> Wed, 12 Feb 2025 12:43:24 +0100
|
||||||
|
|
||||||
osmo-trx (1.7.0) unstable; urgency=medium
|
osmo-trx (1.7.0) unstable; urgency=medium
|
||||||
|
|
||||||
[ Eric ]
|
[ Eric ]
|
||||||
|
|||||||
Reference in New Issue
Block a user