Skip to content

Commit

Permalink
A little work to update dropbear/oscam
Browse files Browse the repository at this point in the history
- minisatip-1.0.2-axe2 (add only extra signal locking, credits to Jalle19)
- DROPBEAR=dropbear-2017.75 (generate ed25519 by default)
- OPENSSH=openssh-9.1p1 (only sftp-server, credits to Jalle19)
- OSCAM_REV=11693
- BINUTILS=binutils-2.39 (only addr2line, credits to Jalle19)

The minisatip has not been upgraded. The recent version do not work in my
environment and I do not have time to look for the issue. It seems
that the PID subscription is wrong. Call my tree as legacy now.
  • Loading branch information
perexg committed Jan 26, 2023
1 parent 20cb430 commit 71ce594
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 10 deletions.
63 changes: 59 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@ KMODULES = drivers/usb/serial/cp210x.ko \
drivers/usb/serial/oti6858.ko

MINISATIP_COMMIT=679b7cafc3d1dc9f710da91ed71a39b96cee7a8d
MINISATIP_VERSION=1.0.2-axe1
MINISATIP_VERSION=1.0.2-axe2
MINISATIP5_COMMIT=67e88c2d743d6df9c4a96aad772414169f61b764
MINISATIP7_COMMIT=d22ba0dfe3c706c3ab6ad86486d8a9e913080f7e
MINISATIP8_COMMIT=8e2362435cc8c5e0babc3e7ca67570c7f7dd03c5

BUSYBOX=busybox-1.26.2

DROPBEAR=dropbear-2017.75
DROPBEAR=dropbear-2022.83
DROPBEAR_SBIN_FILES=dropbear
DROPBEAR_BIN_FILES=dbclient dropbearconvert dropbearkey scp

OPENSSH=openssh-9.1p1

ETHTOOL=ethtool-3.18

MTD_UTILS_COMMIT=v1.5.1
Expand Down Expand Up @@ -82,7 +84,10 @@ SENDDSQ_PACKAGE_NAME=senddsq
TVHEADEND_COMMIT=master

# 10663 10937 11234 11398
OSCAM_REV=11546
OSCAM_REV=11693

BINUTILS=binutils-2.39
BINUTILS_BIN_FILES=addr2line

define GIT_CLONE
@mkdir -p apps/host
Expand Down Expand Up @@ -123,6 +128,7 @@ dist:
CPIO_SRCS = kernel-modules
CPIO_SRCS += busybox
CPIO_SRCS += dropbear
CPIO_SRCS += openssh
CPIO_SRCS += ethtool
CPIO_SRCS += minisatip
CPIO_SRCS += minisatip7
Expand All @@ -132,6 +138,7 @@ CPIO_SRCS += tools/axehelper
CPIO_SRCS += nfsutils
CPIO_SRCS += nano
CPIO_SRCS += mtd-utils
CPIO_SRCS += binutils

fs.cpio: $(CPIO_SRCS)
fakeroot tools/do_min_fs.py \
Expand All @@ -149,6 +156,7 @@ fs.cpio: $(CPIO_SRCS)
-e "apps/$(BUSYBOX)/busybox:bin/busybox" \
$(foreach f,$(DROPBEAR_SBIN_FILES), -e "apps/$(DROPBEAR)/$(f):sbin/$(f)") \
$(foreach f,$(DROPBEAR_BIN_FILES), -e "apps/$(DROPBEAR)/$(f):usr/bin/$(f)") \
-e "apps/$(OPENSSH)/sftp-server:usr/libexec/sftp-server" \
-e "apps/$(ETHTOOL)/ethtool:sbin/ethtool" \
$(foreach f,$(RPCBIND_SBIN_FILES), -e "apps/$(RPCBIND)/$(f):usr/sbin/$(f)") \
$(foreach f,$(NFSUTILS_SBIN_FILES), -e "apps/$(NFSUTILS)/$(f):usr/sbin/$(notdir $(f))") \
Expand All @@ -160,7 +168,8 @@ fs.cpio: $(CPIO_SRCS)
$(foreach f,$(notdir $(wildcard apps/minisatip8/html/*)), -e "apps/minisatip8/html/$f:usr/share/minisatip8/html/$f") \
-e "apps/$(NANO)/src/nano:usr/bin/nano" \
-e "apps/mtd-utils/nandwrite:usr/sbin/nandwrite2" \
-e "apps/oscam-svn/Distribution/oscam-1.20_svn$(OSCAM_REV)-sh4-linux:sbin/oscamd"
-e "apps/oscam-svn/Distribution/oscam-1.20_svn$(OSCAM_REV)-sh4-linux:sbin/oscamd" \
$(foreach f,$(BINUTILS_BIN_FILES), -e "apps/$(BINUTILS)/binutils/$(f):usr/bin/$(f)")

.PHONY: fs-list
fs-list:
Expand Down Expand Up @@ -456,6 +465,25 @@ apps/$(DROPBEAR)/dropbear: apps/$(DROPBEAR)/configure
.PHONY: dropbear
dropbear: apps/$(DROPBEAR)/dropbear

#
# openssh (for sftp-server)
#

apps/$(OPENSSH)/configure:
$(call WGET,https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/${OPENSSH}.tar.gz,apps/${OPENSSH}.tar.gz)
tar -C apps -xzf apps/$(OPENSSH).tar.gz

apps/$(OPENSSH)/sftp-server: apps/$(OPENSSH)/configure
cd apps/$(OPENSSH) && \
CC=$(TOOLCHAIN)/bin/sh4-linux-gcc \
./configure \
--host=sh4-linux \
--prefix=/
make -C apps/$(OPENSSH) -j $(CPUS) sftp-server

.PHONY: openssh
openssh: apps/$(OPENSSH)/sftp-server

#
# ethtool
#
Expand Down Expand Up @@ -566,6 +594,33 @@ apps/$(NFSUTILS)/utils/exportfs/exportfs: apps/$(RPCBIND)/rpcbind apps/$(NFSUTIL
.PHONY: nfsutils
nfsutils: apps/$(NFSUTILS)/utils/exportfs/exportfs

#
# binutils (mainly for addr2line)
#
apps/$(BINUTILS)/binutils/configure:
$(call WGET,https://ftp.gnu.org/gnu/binutils/$(BINUTILS).tar.gz,apps/$(BINUTILS).tar.gz)
tar -C apps -xf apps/$(BINUTILS).tar.gz

# disable as much as possible during configuring, since we only really want one binary...
apps/$(BINUTILS)/binutils/addr2line: apps/$(BINUTILS)/binutils/configure
cd apps/$(BINUTILS) && \
AR=$(TOOLCHAIN)/bin/sh4-linux-ar \
CC=$(TOOLCHAIN)/bin/sh4-linux-gcc \
CFLAGS="-O2" \
./configure \
--host=sh4-linux \
--prefix=/ \
--disable-gold \
--disable-ld \
--disable-gprofng \
--disable-libquadmath \
--disable-libada \
--disable-libssp
make -C apps/$(BINUTILS) -j $(CPUS)

.PHONY: binutils
binutils: apps/$(BINUTILS)/binutils/addr2line

#
# oscam
#
Expand Down
11 changes: 11 additions & 0 deletions dist/README
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ Bugs:
History:
--------

satip-axe-202301261921-16 - Thu Jan 26 2023
- a little work to update dropbear/oscam
- minisatip-1.0.2-axe2 (add only extra signal locking, credits to Jalle19)
- DROPBEAR=dropbear-2017.75 (generate ed25519 by default)
- OPENSSH=openssh-9.1p1 (only sftp-server, credits to Jalle19)
- OSCAM_REV=11693
- BINUTILS=binutils-2.39 (only addr2line, credits to Jalle19)
- The minisatip has not been upgraded. The recent version do not work in my
environment and I do not have time to look for the issue. It seems
that the PID subscription is wrong. Call my tree as legacy now.

satip-axe-201810211549-15 - Sun Oct 21 2018
- moved the releases (firmware files) to github
- added minisatip8
Expand Down
15 changes: 9 additions & 6 deletions fs-add/etc/init.d/dropbear
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ fi

if ! test -r /etc/dropbear/dropbear_rsa_host_key; then
mkdir -p /etc/dropbear
if test -r /etc/sysconfig/dropbear_rsa_host_key; then
cp /etc/sysconfig/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key
else
dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
cp /etc/dropbear/dropbear_rsa_host_key /etc/sysconfig/dropbear_rsa_host_key
fi
fi
if test -r /etc/sysconfig/dropbear_ed25519_host_key; then
cp /etc/sysconfig/dropbear_ed25519_host_key /etc/dropbear/dropbear_ed25519_host_key
else
dropbearkey -t ed25519 -f /etc/dropbear/dropbear_ed25519_host_key
cp /etc/dropbear/dropbear_ed25519_host_key /etc/sysconfig/dropbear_ed25519_host_key
fi
if test -r /etc/sysconfig/dropbear_rsa_host_key; then
cp /etc/sysconfig/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key
fi
if test -r /etc/sysconfig/dropbear_dss_host_key; then
cp /etc/sysconfig/dropbear_dss_host_key /etc/dropbear/dropbear_dss_host_key
Expand Down
48 changes: 48 additions & 0 deletions patches/minisatip-axe.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
diff --git a/src/axe.c b/src/axe.c
index 2822d9b..cba50ac 100644
--- a/src/axe.c
+++ b/src/axe.c
@@ -774,6 +774,7 @@ void axe_get_signal(adapter *ad)
tmp = 0;
snr = tmp;
// keep the assignment at the end for the signal thread to get the right values as no locking is done on the adapter
+ adapter_lock(ad->id);
ad->snr = snr;
ad->strength = strength;
ad->status = status;
@@ -781,10 +782,9 @@ void axe_get_signal(adapter *ad)

if (ad->status == 0 && ((ad->tp.diseqc_param.switch_type == SWITCH_JESS) || (ad->tp.diseqc_param.switch_type == SWITCH_UNICABLE)))
{
- adapter_lock(ad->id);
axe_setup_switch(ad);
- adapter_unlock(ad->id);
}
+ adapter_unlock(ad->id);
}

void axe_commit(adapter *a)
diff --git a/src/dvb.c b/src/dvb.c
index 2da97f2..4f018ac 100644
--- a/src/dvb.c
+++ b/src/dvb.c
@@ -1565,6 +1565,7 @@ void dvb_get_signal(adapter *ad)
snr = 255;

// keep the assignment at the end for the signal thread to get the right values as no locking is done on the adapter
+ adapter_lock(ad->id);
ad->snr = snr;
ad->strength = strength;
ad->status = status;
@@ -1572,10 +1573,9 @@ void dvb_get_signal(adapter *ad)

if (ad->status == 0 && ((ad->tp.diseqc_param.switch_type == SWITCH_JESS) || (ad->tp.diseqc_param.switch_type == SWITCH_UNICABLE)))
{
- adapter_lock(ad->id);
setup_switch(ad);
- adapter_unlock(ad->id);
}
+ adapter_unlock(ad->id);
}

void dvb_commit(adapter *a)
diff --git a/src/minisatip.h b/src/minisatip.h
index 0bc83c9..80d8351 100644
--- a/src/minisatip.h
Expand Down

0 comments on commit 71ce594

Please sign in to comment.