Merge commit '121196bbd418e173ddc0c2a220d1efc0ba919990' into dora
This commit is contained in:
commit
835d09b4b3
|
@ -1,7 +1,7 @@
|
||||||
TARGET_ARCH = "arm"
|
TARGET_ARCH = "arm"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-sysmocom"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-sysmocom"
|
||||||
PREFERRED_VERSION_linux-sysmocom = "${@ dict([('1.7', '3.10.50+git%'), ('1.5','3.10.50+git%'), ('1.5.1','3.10.50+git%'), ('1.5.2','3.10.50+git%'), ('1.5.3','3.10.50+git%'), ('1.1.2','')])[d.getVar('DISTRO_VERSION', True)]}"
|
PREFERRED_VERSION_linux-sysmocom = "${@ dict([('1.7', '3.10.50+git%'), ('1.5','3.10.50+git%'), ('1.1.2','')])[d.getVar('DISTRO_VERSION', True)[0:3]]}"
|
||||||
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
|
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
|
||||||
|
|
||||||
PREFERRED_VERSION_u-boot = "git"
|
PREFERRED_VERSION_u-boot = "git"
|
||||||
|
@ -22,7 +22,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\
|
||||||
busybox-ifplugd \
|
busybox-ifplugd \
|
||||||
${@['watchdog', ''][d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd']} \
|
${@['watchdog', ''][d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd']} \
|
||||||
kernel \
|
kernel \
|
||||||
kernel-module-davinci-wdt \
|
|
||||||
kernel-module-dspdl \
|
kernel-module-dspdl \
|
||||||
kernel-module-dspdl-dm644x \
|
kernel-module-dspdl-dm644x \
|
||||||
kernel-module-fpgadl \
|
kernel-module-fpgadl \
|
||||||
|
|
|
@ -34,4 +34,4 @@ GLIBC_EXTRA_OECONF = "--with-tls"
|
||||||
|
|
||||||
#MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
|
#MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
|
||||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\
|
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\
|
||||||
busybox-ifplugd "
|
busybox-ifplugd linux-firmware-rtl-nic "
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=UDHCPD
|
Description=UDHCPD
|
||||||
|
Requires=sys-subsystem-net-devices-eth1.device
|
||||||
|
After=sys-subsystem-net-devices-eth1.device
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
|
@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = " \
|
||||||
SRC_URI = "file://udhcpd.conf \
|
SRC_URI = "file://udhcpd.conf \
|
||||||
file://udhcpd.service \
|
file://udhcpd.service \
|
||||||
"
|
"
|
||||||
PR = "r5"
|
PR = "r0"
|
||||||
|
|
||||||
CONFFILES_${PN} = "${sysconfdir}/udhcpd.conf"
|
CONFFILES_${PN} = "${sysconfdir}/udhcpd.conf"
|
||||||
FILES_${PN} += "${systemd_unitdir}"
|
FILES_${PN} += "${systemd_unitdir}"
|
|
@ -1287,7 +1287,7 @@ CONFIG_WATCHDOG=y
|
||||||
#
|
#
|
||||||
# CONFIG_SOFT_WATCHDOG is not set
|
# CONFIG_SOFT_WATCHDOG is not set
|
||||||
# CONFIG_DW_WATCHDOG is not set
|
# CONFIG_DW_WATCHDOG is not set
|
||||||
CONFIG_DAVINCI_WATCHDOG=m
|
CONFIG_DAVINCI_WATCHDOG=y
|
||||||
# CONFIG_MAX63XX_WATCHDOG is not set
|
# CONFIG_MAX63XX_WATCHDOG is not set
|
||||||
CONFIG_SSB_POSSIBLE=y
|
CONFIG_SSB_POSSIBLE=y
|
||||||
|
|
||||||
|
|
|
@ -1300,7 +1300,7 @@ CONFIG_WATCHDOG=y
|
||||||
#
|
#
|
||||||
# CONFIG_SOFT_WATCHDOG is not set
|
# CONFIG_SOFT_WATCHDOG is not set
|
||||||
# CONFIG_DW_WATCHDOG is not set
|
# CONFIG_DW_WATCHDOG is not set
|
||||||
CONFIG_DAVINCI_WATCHDOG=m
|
CONFIG_DAVINCI_WATCHDOG=y
|
||||||
# CONFIG_MAX63XX_WATCHDOG is not set
|
# CONFIG_MAX63XX_WATCHDOG is not set
|
||||||
CONFIG_SSB_POSSIBLE=y
|
CONFIG_SSB_POSSIBLE=y
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#
|
#
|
||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/x86 3.10.40 Kernel Configuration
|
# Linux/x86 3.10.50 Kernel Configuration
|
||||||
#
|
#
|
||||||
# CONFIG_64BIT is not set
|
# CONFIG_64BIT is not set
|
||||||
CONFIG_X86_32=y
|
CONFIG_X86_32=y
|
||||||
|
@ -270,6 +270,7 @@ CONFIG_DEFAULT_CFQ=y
|
||||||
# CONFIG_DEFAULT_NOOP is not set
|
# CONFIG_DEFAULT_NOOP is not set
|
||||||
CONFIG_DEFAULT_IOSCHED="cfq"
|
CONFIG_DEFAULT_IOSCHED="cfq"
|
||||||
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||||
|
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
||||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||||
CONFIG_FREEZER=y
|
CONFIG_FREEZER=y
|
||||||
|
|
||||||
|
@ -1433,7 +1434,7 @@ CONFIG_NET_VENDOR_QLOGIC=y
|
||||||
CONFIG_NET_VENDOR_REALTEK=y
|
CONFIG_NET_VENDOR_REALTEK=y
|
||||||
# CONFIG_8139CP is not set
|
# CONFIG_8139CP is not set
|
||||||
# CONFIG_8139TOO is not set
|
# CONFIG_8139TOO is not set
|
||||||
# CONFIG_R8169 is not set
|
CONFIG_R8169=y
|
||||||
CONFIG_NET_VENDOR_RDC=y
|
CONFIG_NET_VENDOR_RDC=y
|
||||||
# CONFIG_R6040 is not set
|
# CONFIG_R6040 is not set
|
||||||
CONFIG_NET_VENDOR_SEEQ=y
|
CONFIG_NET_VENDOR_SEEQ=y
|
||||||
|
|
|
@ -15,11 +15,11 @@ SRCREV = "bcc4fa827be7f59486ff305d664b42a142025f9b"
|
||||||
|
|
||||||
# odu handling.
|
# odu handling.
|
||||||
BRANCH="v3.2"
|
BRANCH="v3.2"
|
||||||
SRCREV_sysmocom-odu = "aadf22be50ac2abb2a9437b9ad3bba4ccdca540b"
|
SRCREV_sysmocom-odu = "20547dac08c962e43a64ef5d4f182b20b2edd172"
|
||||||
BRANCH_sysmocom-odu = "sob-odu/linux-3.2.63"
|
BRANCH_sysmocom-odu = "sob-odu/linux-3.2.63"
|
||||||
LINUX_VERSION_sysmocom-odu = "3.2.63"
|
LINUX_VERSION_sysmocom-odu = "3.2.63"
|
||||||
|
|
||||||
PR = "r37"
|
PR = "r38"
|
||||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||||
|
|
||||||
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=${BRANCH} \
|
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=${BRANCH} \
|
||||||
|
@ -42,7 +42,6 @@ do_configure() {
|
||||||
|
|
||||||
# autoload defaults (alphabetically sorted)
|
# autoload defaults (alphabetically sorted)
|
||||||
module_autoload_davinci_mmc = "davinci_mmc"
|
module_autoload_davinci_mmc = "davinci_mmc"
|
||||||
module_autoload_davinci_wdt = "davinci_wdt"
|
|
||||||
module_autoload_dspdl_dm644x = "dspdl_dm644x"
|
module_autoload_dspdl_dm644x = "dspdl_dm644x"
|
||||||
module_autoload_fpgadl_par = "fpgadl_par"
|
module_autoload_fpgadl_par = "fpgadl_par"
|
||||||
module_autoload_leds-gpio = "leds-gpio"
|
module_autoload_leds-gpio = "leds-gpio"
|
||||||
|
|
|
@ -15,7 +15,7 @@ BTS_FIRMWARE_NAME_sysmobts-v2 = "sysmobts-v2"
|
||||||
|
|
||||||
SRCREV = "9610e792ffde7fb2599d19ca6d2a03230f2043c6"
|
SRCREV = "9610e792ffde7fb2599d19ca6d2a03230f2043c6"
|
||||||
|
|
||||||
PR = "r37"
|
PR = "r38"
|
||||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||||
|
|
||||||
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=linux-3.10.50 \
|
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=linux-3.10.50 \
|
||||||
|
@ -41,7 +41,6 @@ do_configure() {
|
||||||
|
|
||||||
# autoload defaults (alphabetically sorted)
|
# autoload defaults (alphabetically sorted)
|
||||||
module_autoload_davinci_mmc = "davinci_mmc"
|
module_autoload_davinci_mmc = "davinci_mmc"
|
||||||
module_autoload_davinci_wdt = "davinci_wdt"
|
|
||||||
module_autoload_dspdl_dm644x = "dspdl_dm644x"
|
module_autoload_dspdl_dm644x = "dspdl_dm644x"
|
||||||
module_autoload_fpgadl_par = "fpgadl_par"
|
module_autoload_fpgadl_par = "fpgadl_par"
|
||||||
module_autoload_leds-gpio = "leds-gpio"
|
module_autoload_leds-gpio = "leds-gpio"
|
||||||
|
@ -49,7 +48,7 @@ module_autoload_mmc_block = "mmc_block"
|
||||||
module_autoload_msgqueue = "msgqueue"
|
module_autoload_msgqueue = "msgqueue"
|
||||||
module_autoload_rtfifo = "rtfifo"
|
module_autoload_rtfifo = "rtfifo"
|
||||||
|
|
||||||
KERNEL_MODULE_PROBECONF_append = "davinci_mmc davinci_wdt dspdl_dm644x fpgadl_par leds-gpio mmc_block msgqueue rtfifo"
|
KERNEL_MODULE_PROBECONF_append = "davinci_mmc dspdl_dm644x fpgadl_par leds-gpio mmc_block msgqueue rtfifo"
|
||||||
|
|
||||||
# module configs (alphabetically sorted)
|
# module configs (alphabetically sorted)
|
||||||
module_conf_dspdl_dm644x = "options dspdl_dm644x fw_name=${BTS_FIRMWARE_NAME}.out debug=0"
|
module_conf_dspdl_dm644x = "options dspdl_dm644x fw_name=${BTS_FIRMWARE_NAME}.out debug=0"
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
# do not edit this file, it will be overwritten on update
|
||||||
|
|
||||||
|
ACTION=="remove", GOTO="odu_persistent_serial_end"
|
||||||
|
SUBSYSTEM!="tty", GOTO="odu_persistent_serial_end"
|
||||||
|
KERNEL!="ttyACM[0-9]*", GOTO="odu_persistent_serial_end"
|
||||||
|
|
||||||
|
KERNELS=="1-1.2:1.0", SYMLINK+="ttyModemScan0"
|
||||||
|
KERNELS=="1-1.2:1.2", SYMLINK+="ttyModemScan1"
|
||||||
|
KERNELS=="1-1.2:1.4", SYMLINK+="ttyModemScan2"
|
||||||
|
KERNELS=="1-1.2:1.6", SYMLINK+="ttyModemScan3"
|
||||||
|
KERNELS=="1-1.2:1.8", SYMLINK+="ttyModemScan4"
|
||||||
|
KERNELS=="1-1.2:1.10", SYMLINK+="ttyModemScan5"
|
||||||
|
KERNELS=="1-1.2:1.12", SYMLINK+="ttyModemScan6"
|
||||||
|
|
||||||
|
KERNELS=="1-1.3:1.0", SYMLINK+="ttyModemUplink0"
|
||||||
|
KERNELS=="1-1.3:1.2", SYMLINK+="ttyModemUplink1"
|
||||||
|
KERNELS=="1-1.3:1.4", SYMLINK+="ttyModemUplink2"
|
||||||
|
KERNELS=="1-1.3:1.6", SYMLINK+="ttyModemUplink3"
|
||||||
|
KERNELS=="1-1.3:1.8", SYMLINK+="ttyModemUplink4"
|
||||||
|
KERNELS=="1-1.3:1.10", SYMLINK+="ttyModemUplink5"
|
||||||
|
KERNELS=="1-1.3:1.12", SYMLINK+="ttyModemUplink6"
|
||||||
|
|
||||||
|
LABEL="odu_persistent_serial_end"
|
|
@ -0,0 +1,14 @@
|
||||||
|
DESCRIPTION = "Udev helper script for static device names on the sysmocom odu"
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||||
|
|
||||||
|
SRC_URI = "file://odu-persistens-serial.rules"
|
||||||
|
|
||||||
|
PACKAGES = "${PN}"
|
||||||
|
FILES_${PN} = "${BASELIB}/udev/rules.d/*"
|
||||||
|
RDPEPENDS_${PN} = "udev"
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}/${BASELIB}/udev/rules.d
|
||||||
|
install -m 0644 ${WORKDIR}/odu-persistens-serial.rules ${D}/${BASELIB}/udev/rules.d/70-odu-persistens-serial.rules
|
||||||
|
}
|
|
@ -1,5 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# in more recent kernels the kernel is itself taking care of exporting
|
||||||
|
# the right GPIOs and setting their direction and level. We can detect
|
||||||
|
# this by checking for the below sysfs path
|
||||||
|
if [ -d /sys/devices/platform/sob-odu.0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
cd /sys/class/gpio
|
cd /sys/class/gpio
|
||||||
|
|
||||||
# !mdm1_pwr_ind
|
# !mdm1_pwr_ind
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
USB2514=/usr/bin/usb2514
|
||||||
|
GPIODIR=/sys/devices/platform/sob-odu.0
|
||||||
|
|
||||||
|
DEBUG=0
|
||||||
|
DRYRUN=0
|
||||||
|
|
||||||
|
test -x ${USB2514}
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
echo "ERROR - ${USB2514} does not exist or is not exeutable"
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $DRYRUN -ne 0 ] || [ $DEBUG -ne 0 ]; then
|
||||||
|
echo "DEBUG=$DEBUG\nDRYRUN=$DRYRUN\n"
|
||||||
|
fi;
|
||||||
|
|
||||||
|
### helper
|
||||||
|
echodeb() {
|
||||||
|
if [ $DEBUG -ne 0 ]; then
|
||||||
|
echo "DEBUG - $*"
|
||||||
|
fi;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpioecho() {
|
||||||
|
echodeb "echo ${1} > ${2}"
|
||||||
|
if [ $DRYRUN -eq 0 ]; then
|
||||||
|
echo ${1} > ${2}
|
||||||
|
fi;
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 gpio $2 direction
|
||||||
|
init_pin() {
|
||||||
|
echodeb init_pin $1 $2
|
||||||
|
gpioecho ${1} "${GPIODIR}/export"
|
||||||
|
gpioecho ${2} "${GPIODIR}/gpio$_{1}/direction"
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 gpio $2 value
|
||||||
|
set_pin() {
|
||||||
|
echodeb set_pin $1 $2
|
||||||
|
gpioecho ${2} "${GPIODIR}/gpio_${1}/value"
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 pin $2 tempvalue $3 endvalue
|
||||||
|
toggle_pin() {
|
||||||
|
set_pin ${1} ${2}
|
||||||
|
sleep 1
|
||||||
|
set_pin ${1} ${3}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
reset_modem1() {
|
||||||
|
toggle_pin mdm1_rst 1 0
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_modem2() {
|
||||||
|
toggle_pin mdm2_rst 1 0
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_gnss() {
|
||||||
|
toggle_pin gnss_rst 1 0
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_adsb() {
|
||||||
|
toggle_pin adsb_rst 1 0
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_ais() {
|
||||||
|
toggle_pin ais_off 1 0
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_usb() {
|
||||||
|
# usb2514 now has internal code to assert/de-assert !hub_reset
|
||||||
|
${USB2514} 1
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_all() {
|
||||||
|
reset_modem1
|
||||||
|
reset_modem2
|
||||||
|
reset_gnss
|
||||||
|
reset_adsb
|
||||||
|
reset_ais
|
||||||
|
reset_usb
|
||||||
|
}
|
||||||
|
|
||||||
|
print_help() {
|
||||||
|
echo $0 v0.2
|
||||||
|
echo
|
||||||
|
echo "help - this text"
|
||||||
|
echo "reset [device] - reset all/one device(s)"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
;;
|
||||||
|
reset)
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
reset_${2}
|
||||||
|
else
|
||||||
|
reset_all
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
${0} reset
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
print_help
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
|
|
||||||
#define USB2514_SLAVE_ADDR 0x2C
|
#define USB2514_SLAVE_ADDR 0x2C
|
||||||
|
|
||||||
|
#define BOARD_VER_PATH "/sys/devices/platform/sob-odu.0/board_version"
|
||||||
|
#define RESET_PATH "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value"
|
||||||
|
#define RESET_PATH_OLD "/sys/class/gpio/gpio62/value"
|
||||||
|
|
||||||
/* Default configuration as per data sheet */
|
/* Default configuration as per data sheet */
|
||||||
static const uint8_t usb2514_default[256] = {
|
static const uint8_t usb2514_default[256] = {
|
||||||
0x24, 0x04, 0x14, 0x25, 0xB3, 0x0B, 0x9B, 0x20, /* 0x00 */
|
0x24, 0x04, 0x14, 0x25, 0xB3, 0x0B, 0x9B, 0x20, /* 0x00 */
|
||||||
|
@ -70,7 +74,7 @@ static const uint8_t usb2514_default[256] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Default configuration as per data sheet */
|
/* Default configuration as per data sheet */
|
||||||
static const uint8_t usb2514_odu[256] = {
|
static uint8_t usb2514_odu[256] = {
|
||||||
0x24, 0x04, 0x14, 0x25, 0xB3, 0x0B, 0x9B, 0x20, /* 0x00 */
|
0x24, 0x04, 0x14, 0x25, 0xB3, 0x0B, 0x9B, 0x20, /* 0x00 */
|
||||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x32, 0x01, 0x32, /* 0x08 */
|
0x02, 0x00, 0x00, 0x00, 0x01, 0x32, 0x01, 0x32, /* 0x08 */
|
||||||
0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10 */
|
0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10 */
|
||||||
|
@ -140,9 +144,61 @@ static int write_regs(const uint8_t *regs)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* attempt to obtain the board version from sysfs */
|
||||||
|
static int get_board_version(void)
|
||||||
|
{
|
||||||
|
FILE *f;
|
||||||
|
unsigned int ver;
|
||||||
|
|
||||||
|
f = fopen(BOARD_VER_PATH, "r");
|
||||||
|
if (!f)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (fscanf(f, "%u", &ver) != 1) {
|
||||||
|
fclose(f);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
return ver;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* attempt to reset the hub via sysfs */
|
||||||
|
static int reset_hub(void)
|
||||||
|
{
|
||||||
|
FILE *f;
|
||||||
|
int invert_logic = 0;
|
||||||
|
|
||||||
|
f = fopen(RESET_PATH, "w");
|
||||||
|
if (!f) {
|
||||||
|
f = fopen(RESET_PATH_OLD, "w");
|
||||||
|
if (!f)
|
||||||
|
return -1;
|
||||||
|
invert_logic = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invert_logic)
|
||||||
|
fputs("0", f);
|
||||||
|
else
|
||||||
|
fputs("1", f);
|
||||||
|
|
||||||
|
usleep(10000);
|
||||||
|
rewind(f);
|
||||||
|
|
||||||
|
if (invert_logic)
|
||||||
|
fputs("1", f);
|
||||||
|
else
|
||||||
|
fputs("0", f);
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
int board_version;
|
||||||
int adapter_nr;
|
int adapter_nr;
|
||||||
long slave_addr = USB2514_SLAVE_ADDR;
|
long slave_addr = USB2514_SLAVE_ADDR;
|
||||||
char filename[PATH_MAX];
|
char filename[PATH_MAX];
|
||||||
|
@ -164,12 +220,35 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
get_support();
|
get_support();
|
||||||
|
|
||||||
|
board_version = get_board_version();
|
||||||
|
if (board_version >= 3) {
|
||||||
|
/* on board version 3 and later we don't need to swap
|
||||||
|
* USB downlink port 1 */
|
||||||
|
printf("Detected board >= v3, not swapping DN1\n");
|
||||||
|
usb2514_odu[0xFA] = 0x0C;
|
||||||
|
} else if (board_version == 1) {
|
||||||
|
/* ports are still swapped in hardware */
|
||||||
|
printf("Detected board v1, not swapping any ports\n");
|
||||||
|
usb2514_odu[0xFA] = 0x00;
|
||||||
|
} else if (board_version == 2) {
|
||||||
|
printf("Detected board v2, swapping DN1, DN2 and DN3\n");
|
||||||
|
/* default */
|
||||||
|
} else {
|
||||||
|
printf("Assuming board v2, swapping DN1, DN2 and DN3\n");
|
||||||
|
/* default */
|
||||||
|
}
|
||||||
|
|
||||||
rc = ioctl(g_fd, I2C_SLAVE, slave_addr);
|
rc = ioctl(g_fd, I2C_SLAVE, slave_addr);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
fprintf(stderr, "Error setting slave addr: %d\n", rc);
|
fprintf(stderr, "Error setting slave addr: %d\n", rc);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* First reset the USB hub before loading data into it */
|
||||||
|
if (reset_hub() < 0) {
|
||||||
|
fprintf(stderr, "Couldn't reset the USB hub!\n");
|
||||||
|
}
|
||||||
|
|
||||||
rc = write_regs(usb2514_odu);
|
rc = write_regs(usb2514_odu);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
fprintf(stderr, "Error writing default regs: %d\n", rc);
|
fprintf(stderr, "Error writing default regs: %d\n", rc);
|
||||||
|
|
|
@ -4,10 +4,11 @@ LICENSE = "GPLv2+"
|
||||||
LIC_FILES_CHKSUM = "file://${WORKDIR}/usb2514.c;beginline=1;endline=18;md5=3b8421a1c05d21add65cc20fccfa29cd"
|
LIC_FILES_CHKSUM = "file://${WORKDIR}/usb2514.c;beginline=1;endline=18;md5=3b8421a1c05d21add65cc20fccfa29cd"
|
||||||
DEPENDS += "lmsensors-apps"
|
DEPENDS += "lmsensors-apps"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r3"
|
||||||
|
|
||||||
SRC_URI = "file://usb2514.c \
|
SRC_URI = "file://usb2514.c \
|
||||||
file://gpio_usb2514 \
|
file://gpio_usb2514 \
|
||||||
|
file://odu-gpiotool \
|
||||||
file://i2c-dev.h \
|
file://i2c-dev.h \
|
||||||
file://usb2514.service \
|
file://usb2514.service \
|
||||||
"
|
"
|
||||||
|
@ -23,6 +24,7 @@ do_install() {
|
||||||
install -d ${D}${bindir}/
|
install -d ${D}${bindir}/
|
||||||
install -m 0755 ${WORKDIR}/usb2514 ${D}${bindir}/
|
install -m 0755 ${WORKDIR}/usb2514 ${D}${bindir}/
|
||||||
install -m 0755 ${WORKDIR}/gpio_usb2514 ${D}${bindir}/
|
install -m 0755 ${WORKDIR}/gpio_usb2514 ${D}${bindir}/
|
||||||
|
install -m 0755 ${WORKDIR}/odu-gpiotool ${D}${bindir}/
|
||||||
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
||||||
install -m 0644 /${WORKDIR}/usb2514.service ${D}${systemd_unitdir}/system/
|
install -m 0644 /${WORKDIR}/usb2514.service ${D}${systemd_unitdir}/system/
|
||||||
ln -sf ../usb2514.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
ln -sf ../usb2514.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
From 9d51027c228dafd7db2d0cffca1f0fc695e950fd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Otavio Salvador <otavio@ossystems.com.br>
|
||||||
|
Date: Mon, 2 Dec 2013 11:33:26 -0200
|
||||||
|
Subject: [PATCH] geos-config: Add includedir variable
|
||||||
|
|
||||||
|
This fixes cross-compile as it is easier to mangle the includedir
|
||||||
|
during sysroot generation.
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||||
|
---
|
||||||
|
tools/geos-config.in | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/geos-config.in b/tools/geos-config.in
|
||||||
|
index 9b45b5f..1749892 100644
|
||||||
|
--- a/tools/geos-config.in
|
||||||
|
+++ b/tools/geos-config.in
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
+includedir=@includedir@
|
||||||
|
libdir=@libdir@
|
||||||
|
|
||||||
|
usage()
|
||||||
|
@@ -38,7 +39,7 @@ case $1 in
|
||||||
|
echo @VERSION@
|
||||||
|
;;
|
||||||
|
--cflags)
|
||||||
|
- echo -I${prefix}/include
|
||||||
|
+ echo -I${includedir}
|
||||||
|
;;
|
||||||
|
--libs)
|
||||||
|
# TODO: make an alias for --clibs
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
DESCRIPTION = "GEOS - Geometry Engine, Open Source"
|
||||||
|
HOMEPAGE = "http://trac.osgeo.org/geos/"
|
||||||
|
SECTION = "libs"
|
||||||
|
|
||||||
|
LICENSE = "LGPLv2.1+"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
|
||||||
|
|
||||||
|
SRC_URI = "http://download.osgeo.org/geos/geos-${PV}.tar.bz2"
|
||||||
|
|
||||||
|
inherit autotools pkgconfig binconfig
|
||||||
|
|
||||||
|
PACKAGES =+ "geoslib ${PN}-c1"
|
||||||
|
|
||||||
|
DESCRIPTION_${PN}lib = "Geometry engine for Geographic Information Systems - C++ Library"
|
||||||
|
FILES_${PN}lib += "${libdir}/libgeos-${PV}.so"
|
||||||
|
|
||||||
|
DESCRIPTION_${PN}-c1 = "Geometry engine for Geographic Information Systems - C Library"
|
||||||
|
FILES_${PN}-c1 += "${libdir}/libgeos_c.so.*"
|
||||||
|
|
||||||
|
ALLOW_EMPTY_${PN} = "1"
|
||||||
|
RDEPENDS_${PN} += "geoslib ${PN}-c1"
|
|
@ -0,0 +1,6 @@
|
||||||
|
require geos.inc
|
||||||
|
|
||||||
|
SRC_URI += "file://geos-config-Add-includedir-variable.patch"
|
||||||
|
|
||||||
|
SRC_URI[md5sum] = "fc5df2d926eb7e67f988a43a92683bae"
|
||||||
|
SRC_URI[sha256sum] = "15e8bfdf7e29087a957b56ac543ea9a80321481cef4d4f63a7b268953ad26c53"
|
|
@ -0,0 +1,13 @@
|
||||||
|
Index: libspatialite-4.2.0/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- libspatialite-4.2.0.orig/configure.ac
|
||||||
|
+++ libspatialite-4.2.0/configure.ac
|
||||||
|
@@ -260,7 +260,7 @@ if test x"$enable_geos" != "xno"; then
|
||||||
|
fi
|
||||||
|
# Extract the linker and include flags
|
||||||
|
GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
|
||||||
|
- GEOS_CFLAGS=-I`$GEOSCONFIG --includes`
|
||||||
|
+ GEOS_CFLAGS=`$GEOSCONFIG --cflags`
|
||||||
|
AC_SUBST([GEOS_LDFLAGS])
|
||||||
|
AC_SUBST([GEOS_CFLAGS])
|
||||||
|
# Ensure that we can parse geos_c.h
|
|
@ -0,0 +1,21 @@
|
||||||
|
DESCRIPTION = "Library extending the SQLite core to support fully fledged Spatial SQL capabilities"
|
||||||
|
HOMEPAGE = "https://www.gaia-gis.it/fossil/libspatialite/"
|
||||||
|
SECTION = "libs"
|
||||||
|
DEPENDS = "proj geos sqlite3 libxml2 zlib"
|
||||||
|
|
||||||
|
INC_PR = "r0"
|
||||||
|
|
||||||
|
LICENSE = "MPLv1.1 GPLv2+ LGPLv2.1+"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=0e92e1a36cc384b60f5b31dde0bdd39e"
|
||||||
|
|
||||||
|
SRC_URI = "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${PV}.tar.gz"
|
||||||
|
|
||||||
|
inherit autotools pkgconfig
|
||||||
|
|
||||||
|
EXTRA_OECONF = "--enable-freexl=no"
|
||||||
|
|
||||||
|
|
||||||
|
# A plugins for SQLite3
|
||||||
|
PACKAGES += "${PN}-plugin"
|
||||||
|
INSANE_SKIP_${PN}-plugin = "dev-so"
|
||||||
|
FILES_${PN}-plugin += "${libdir}/mod_*"
|
|
@ -0,0 +1,8 @@
|
||||||
|
require libspatialite.inc
|
||||||
|
|
||||||
|
PR = "${INC_PR}.0"
|
||||||
|
|
||||||
|
SRC_URI[md5sum] = "83305ed694a77152120d1f74c5151779"
|
||||||
|
SRC_URI[sha256sum] = "9f138a6854740c7827fdee53845eb1485fce3e805a7aa9fc9151f8046ebd312d"
|
||||||
|
|
||||||
|
SRC_URI += "file://geos-config.patch"
|
|
@ -0,0 +1,40 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This systemd generator creates dependency symlinks that make all OpenVPN
|
||||||
|
# tunnels listed in /etc/default/openvpn's AUTOSTART be started/stopped/reloaded
|
||||||
|
# when openvpn.service is started/stopped/reloaded.
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
GENDIR="$1"
|
||||||
|
WANTDIR="$1/openvpn.service.wants"
|
||||||
|
SERVICEFILE="/lib/systemd/system/openvpn@.service"
|
||||||
|
AUTOSTART="all"
|
||||||
|
CONFIG_DIR=/etc/openvpn
|
||||||
|
|
||||||
|
mkdir -p "$WANTDIR"
|
||||||
|
|
||||||
|
if test -e /etc/default/openvpn ; then
|
||||||
|
. /etc/default/openvpn
|
||||||
|
fi
|
||||||
|
|
||||||
|
# No VPNs automatically started
|
||||||
|
if test "x$AUTOSTART" = "xnone" ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$AUTOSTART" = "xall" -o -z "$AUTOSTART" ; then
|
||||||
|
for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
|
||||||
|
NAME=${CONFIG%%.conf}
|
||||||
|
ln -s "$SERVICEFILE" "$WANTDIR/openvpn@$NAME.service"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for NAME in $AUTOSTART ; do
|
||||||
|
if test -e $CONFIG_DIR/$NAME.conf ; then
|
||||||
|
ln -s "$SERVICEFILE" "$WANTDIR/openvpn@$NAME.service"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# This service is actually a systemd target,
|
||||||
|
# but we are using a service since targets cannot be reloaded.
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=OpenVPN service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/bin/true
|
||||||
|
ExecReload=/bin/true
|
||||||
|
WorkingDirectory=/etc/openvpn
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=OpenVPN connection to %i
|
||||||
|
PartOf=openvpn.service
|
||||||
|
ReloadPropagatedFrom=openvpn.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn.%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
WorkingDirectory=/etc/openvpn
|
||||||
|
Restart=always
|
||||||
|
RestartSec=2
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
SUMMARY = "A full-featured SSL VPN solution via tun device."
|
||||||
|
HOMEPAGE = "http://openvpn.sourceforge.net"
|
||||||
|
SECTION = "console/network"
|
||||||
|
LICENSE = "GPLv2"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c"
|
||||||
|
DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
||||||
|
|
||||||
|
inherit autotools
|
||||||
|
|
||||||
|
PR = "r3"
|
||||||
|
|
||||||
|
SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \
|
||||||
|
file://openvpn \
|
||||||
|
file://openvpn-generator \
|
||||||
|
file://openvpn@.service \
|
||||||
|
file://openvpn.service"
|
||||||
|
|
||||||
|
SRC_URI[md5sum] = "6ca03fe0fd093e0d01601abee808835c"
|
||||||
|
SRC_URI[sha256sum] = "7baed2ff39c12e1a1a289ec0b46fcc49ff094ca58b8d8d5f29b36ac649ee5b26"
|
||||||
|
|
||||||
|
CFLAGS += "-fno-inline"
|
||||||
|
|
||||||
|
# I want openvpn to be able to read password from file (hrw)
|
||||||
|
EXTRA_OECONF += "--enable-password-save --enable-iproute2"
|
||||||
|
EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
|
||||||
|
|
||||||
|
# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
|
||||||
|
EXTRA_OECONF += "IPROUTE=/sbin/ip"
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
install -d ${D}/${sysconfdir}/init.d
|
||||||
|
install -d ${D}/${sysconfdir}/openvpn
|
||||||
|
install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
|
||||||
|
|
||||||
|
# systemd files
|
||||||
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
install -d ${D}${systemd_unitdir}/system-generators
|
||||||
|
install -m 0644 ${WORKDIR}/openvpn.service ${D}${systemd_unitdir}/system
|
||||||
|
install -m 0644 ${WORKDIR}/openvpn@.service ${D}${systemd_unitdir}/system
|
||||||
|
install -m 0755 ${WORKDIR}/openvpn-generator ${D}${systemd_unitdir}/system-generators
|
||||||
|
}
|
||||||
|
|
||||||
|
RDEPENDS_${PN} += "update-rc.d"
|
||||||
|
RRECOMMENDS_${PN} = "kernel-module-tun"
|
||||||
|
|
||||||
|
FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
|
||||||
|
|
||||||
|
# Don't go through the systemd.bbclass as we do not want magic to happen
|
||||||
|
# during install and upgrade. Simply ship the files.
|
||||||
|
FILES_${PN} += "${systemd_unitdir}"
|
||||||
|
|
||||||
|
pkg_postinst_${PN} () {
|
||||||
|
if [ "x$D" != "x" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -L /etc/rc2.d/S*openvpn ]; then
|
||||||
|
update-rc.d -f openvpn remove
|
||||||
|
if [ ! -L /etc/systemd/system/multi-user.target.wants/openvpn.service ]; then
|
||||||
|
ln -s '/lib/systemd/system/openvpn.service' '/etc/systemd/system/multi-user.target.wants/openvpn.service'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# We need to test opkg upgrade of OpenVPN through the OpenVPN first
|
||||||
|
DEFAULT_PREFERENCE = "-1"
|
|
@ -0,0 +1,14 @@
|
||||||
|
SUMMARY = "PROJ.4 - Cartographic Projections library"
|
||||||
|
HOMEPAGE = "http://trac.osgeo.org/proj/"
|
||||||
|
SECTION = "libs"
|
||||||
|
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=74d9aaec5fa0cd734341e8c4dc91b608"
|
||||||
|
|
||||||
|
SRC_URI = "http://download.osgeo.org/proj/proj-${PV}.tar.gz"
|
||||||
|
SRC_URI[md5sum] = "d815838c92a29179298c126effbb1537"
|
||||||
|
SRC_URI[sha256sum] = "2db2dbf0fece8d9880679154e0d6d1ce7c694dd8e08b4d091028093d87a9d1b5"
|
||||||
|
|
||||||
|
inherit autotools pkgconfig lib_package
|
||||||
|
|
||||||
|
FILES_${PN} += "${datadir}/proj"
|
|
@ -1,5 +1,5 @@
|
||||||
SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master"
|
SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master"
|
||||||
SRCREV = "de2b004a2511c4aaeed64d0a9f5bf14d184d1560"
|
SRCREV = "03773b872987fb16725f2eba6536cc87f000eb4d"
|
||||||
PR = "r2"
|
PR = "r2"
|
||||||
|
|
||||||
DEPENDS = "${PN}-mlo"
|
DEPENDS = "${PN}-mlo"
|
||||||
|
@ -13,7 +13,7 @@ BAREBOX_IMAGE_SYMLINK ?= "barebox-${MACHINE}.img"
|
||||||
require barebox.inc
|
require barebox.inc
|
||||||
|
|
||||||
do_pre_configure() {
|
do_pre_configure() {
|
||||||
cp ${S}/arch/arm/configs/am335x_defconfig_odu ${S}/.config
|
cp ${S}/arch/arm/configs/am335x_odu_defconfig ${S}/.config
|
||||||
oe_runmake oldconfig
|
oe_runmake oldconfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
PACKAGES_prepend = "${PN}-rtl-nic "
|
||||||
|
|
||||||
|
RDEPENDS_${PN}-rtl-nic += "${PN}-rtl-license"
|
||||||
|
|
||||||
|
FILES_${PN}-rtl-nic = "/lib/firmware/rtl_nic/*.fw"
|
Loading…
Reference in New Issue