From e243c30f04c18722dc65effe6d4f275a3f35de46 Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Tue, 4 Nov 2014 11:51:34 -0600 Subject: initial commit of mLinux layer --- COPYING.MIT | 17 + LICENSE | 9 + README | 38 + classes/mlinux-image.bbclass | 33 + classes/mlinux_metadata_scm.bbclass | 14 + conf/distro/java.inc | 9 + conf/distro/mlinux.conf | 62 ++ conf/layer.conf | 10 + contrib/env-oe.sh | 16 + contrib/local.conf | 51 + contrib/user-layer.conf | 10 + .../hostapd/hostap-daemon-1.0/default | 2 + .../hostapd/hostap-daemon-1.0/init | 43 + .../hostapd/hostap-daemon_1.0.bbappend | 8 + recipes-connectivity/openssh/openssh/ssh.default | 2 + .../openssh/openssh_6.5p1.bbappend | 21 + ...01-ppp-Fix-compilation-errors-in-Makefile.patch | 75 ++ recipes-connectivity/ppp/ppp-2.4.7/08setupdns | 12 + recipes-connectivity/ppp/ppp-2.4.7/92removedns | 5 + .../ppp/ppp-2.4.7/cifdefroute.patch | 292 ++++++ recipes-connectivity/ppp/ppp-2.4.7/copts.patch | 21 + recipes-connectivity/ppp/ppp-2.4.7/init | 50 + recipes-connectivity/ppp/ppp-2.4.7/ip-down | 43 + recipes-connectivity/ppp/ppp-2.4.7/ip-up | 44 + .../makefile-remove-hard-usr-reference.patch | 37 + recipes-connectivity/ppp/ppp-2.4.7/makefile.patch | 95 ++ recipes-connectivity/ppp/ppp-2.4.7/pap | 22 + recipes-connectivity/ppp/ppp-2.4.7/poff | 26 + recipes-connectivity/ppp/ppp-2.4.7/pon | 9 + recipes-connectivity/ppp/ppp-2.4.7/ppp_on_boot | 21 + .../ppp/ppp-2.4.7/pppd-resolv-varrun.patch | 45 + recipes-connectivity/ppp/ppp-2.4.7/provider | 35 + recipes-connectivity/ppp/ppp_2.4.7.bb | 88 ++ .../usb-gadget-mode/files/usb-gadget | 69 ++ .../usb-gadget-mode/files/usb-gadget.conf | 3 + .../usb-gadget-mode/files/usb-gadget.init | 16 + .../usb-gadget-mode/usb-gadget-mode.bb | 42 + recipes-core/base-files/base-files/mlinux/issue | 7 + .../base-files/base-files/mlinux/issue.net | 7 + recipes-core/base-files/base-files/mtcdt/fstab | 12 + recipes-core/base-files/base-files_3.0.14.bbappend | 4 + recipes-core/busybox/busybox-1.22.1/defconfig | 1020 ++++++++++++++++++++ recipes-core/busybox/busybox_1.22.1.bbappend | 8 + recipes-core/busybox/files/udhcpd.conf.example | 6 + recipes-core/images/mlinux-base-image.bb | 57 ++ recipes-core/images/mlinux-factory-image.bb | 61 ++ recipes-core/images/mlinux-minimal-image.bb | 40 + recipes-core/images/mlinux-mono-image.bb | 3 + recipes-core/initscripts/initscripts-1.0/umountfs | 158 +++ recipes-core/initscripts/initscripts_1.0.bbappend | 4 + recipes-core/multitech/config/config.init | 105 ++ recipes-core/multitech/config/network/interfaces | 29 + recipes-core/multitech/config/ppp/chap-secrets | 3 + recipes-core/multitech/config/ppp/options | 22 + recipes-core/multitech/config/ppp/pap-secrets | 3 + recipes-core/multitech/config/ppp/peers/cdma | 9 + recipes-core/multitech/config/ppp/peers/cdma_chat | 18 + recipes-core/multitech/config/ppp/peers/gsm | 11 + recipes-core/multitech/config/ppp/peers/gsm_chat | 26 + recipes-core/multitech/config_1.0.bb | 40 + recipes-core/multitech/mlinux-version.bb | 22 + .../multitech/reset-handler/reset-handler.default | 2 + .../multitech/reset-handler/reset-handler.init | 30 + .../multitech/reset-handler/reset-handler.sh | 72 ++ recipes-core/multitech/reset-handler_1.0.bb | 29 + recipes-core/multitech/upgrade-reboot_1.0.0.bb | 17 + recipes-core/ocg-scripts/ocg-scripts-1.0.inc | 18 + .../ocg-scripts/ocg-scripts-1.0/ocg-cell-router | 147 +++ recipes-core/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd | 65 ++ .../ocg-scripts/ocg-scripts-1.0/ocg-set-apn | 40 + .../ocg-scripts/ocg-scripts-1.0/ocg-wifi-ap | 165 ++++ recipes-core/ocg-scripts/ocg-scripts_1.0.bb | 7 + .../sysvinit/sysvinit-inittab_2.88dsf.bbappend | 2 + recipes-core/udev/udev-182/cellular_radios.rules | 47 + recipes-core/udev/udev-182/init | 138 +++ recipes-core/udev/udev-182/mtcdt/mtcdt.rules | 12 + recipes-core/udev/udev-extraconf/automount.rules | 24 + recipes-core/udev/udev-extraconf_1.0.bbappend | 2 + recipes-core/udev/udev_182.bbappend | 11 + recipes-devtools/mtd/mtd-utils-static_git.bb | 17 + ...uiltin-define-to-denote-hard-abi-when-in-.patch | 60 ++ recipes-devtools/nodejs/nodejs_0.8.27.bb | 56 ++ .../multitech/helloworld-autotools_1.0.0.bb | 14 + recipes-extended/autossh/autossh_1.4c.bb | 21 + recipes-extended/bash/bash-4.2/build-tests.patch | 48 + recipes-extended/bash/bash-4.2/execute_cmd.patch | 17 + .../bash/bash-4.2/mkbuiltins_have_stringize.patch | 26 + recipes-extended/bash/bash-4.2/run-ptest | 2 + recipes-extended/bash/bash-4.2/test-output.patch | 25 + recipes-extended/bash/bash.inc | 50 + recipes-extended/bash/bash_4.2.bb | 173 ++++ recipes-extended/lighttpd/lighttpd_1.4.33.bbappend | 5 + recipes-extended/mii-diag/mii-diag-2.11/libmii.c | 630 ++++++++++++ recipes-extended/mii-diag/mii-diag-2.11/mii-diag.c | 648 +++++++++++++ recipes-extended/mii-diag/mii-diag_2.11.bb | 25 + recipes-extended/multitech/sms-utils.inc | 22 + recipes-extended/multitech/sms-utils_0.0.5.bb | 3 + recipes-extended/multitech/venus-gps_0.1.0.bb | 14 + .../stressapptest/stressapptest_svn.bb | 13 + recipes-extended/uvccapture/files/makefile.patch | 29 + .../files/uvccapture_use_videodev2.patch | 24 + recipes-extended/uvccapture/uvccapture_0.5.bb | 15 + recipes-java/openjdk/openjdk-7/jvm.cfg | 43 + .../openjdk/openjdk-7_25b30-2.3.12.bbappend | 6 + recipes-java/v4l4j/v4l4j-0.9.1/makefile.patch | 13 + recipes-java/v4l4j/v4l4j_0.9.1.bb | 38 + .../ruby-serialport/ruby-serialport_1.1.0.bb | 31 + recipes-ruby/ruby-sqlite3/ruby-sqlite3_1.3.7.bb | 28 + recipes-ruby/ruby/ruby_1.9.3-p429.bbappend | 4 + recipes-support/jsoncpp/jsoncpp-0.5.0/Makefile | 46 + .../jsoncpp/jsoncpp-0.5.0/jsoncpp-0.5.0-p1.patch | 13 + recipes-support/jsoncpp/jsoncpp_0.5.0.bb | 32 + recipes-support/libesmtp/libesmtp_1.0.6.bb | 25 + 113 files changed, 6114 insertions(+) create mode 100644 COPYING.MIT create mode 100644 LICENSE create mode 100644 README create mode 100644 classes/mlinux-image.bbclass create mode 100644 classes/mlinux_metadata_scm.bbclass create mode 100644 conf/distro/java.inc create mode 100644 conf/distro/mlinux.conf create mode 100644 conf/layer.conf create mode 100644 contrib/env-oe.sh create mode 100644 contrib/local.conf create mode 100644 contrib/user-layer.conf create mode 100644 recipes-connectivity/hostapd/hostap-daemon-1.0/default create mode 100644 recipes-connectivity/hostapd/hostap-daemon-1.0/init create mode 100644 recipes-connectivity/hostapd/hostap-daemon_1.0.bbappend create mode 100644 recipes-connectivity/openssh/openssh/ssh.default create mode 100644 recipes-connectivity/openssh/openssh_6.5p1.bbappend create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/0001-ppp-Fix-compilation-errors-in-Makefile.patch create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/08setupdns create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/92removedns create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/cifdefroute.patch create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/copts.patch create mode 100755 recipes-connectivity/ppp/ppp-2.4.7/init create mode 100755 recipes-connectivity/ppp/ppp-2.4.7/ip-down create mode 100755 recipes-connectivity/ppp/ppp-2.4.7/ip-up create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/makefile-remove-hard-usr-reference.patch create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/makefile.patch create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/pap create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/poff create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/pon create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/ppp_on_boot create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/pppd-resolv-varrun.patch create mode 100644 recipes-connectivity/ppp/ppp-2.4.7/provider create mode 100644 recipes-connectivity/ppp/ppp_2.4.7.bb create mode 100755 recipes-connectivity/usb-gadget-mode/files/usb-gadget create mode 100644 recipes-connectivity/usb-gadget-mode/files/usb-gadget.conf create mode 100755 recipes-connectivity/usb-gadget-mode/files/usb-gadget.init create mode 100644 recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb create mode 100644 recipes-core/base-files/base-files/mlinux/issue create mode 100644 recipes-core/base-files/base-files/mlinux/issue.net create mode 100644 recipes-core/base-files/base-files/mtcdt/fstab create mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend create mode 100644 recipes-core/busybox/busybox-1.22.1/defconfig create mode 100644 recipes-core/busybox/busybox_1.22.1.bbappend create mode 100644 recipes-core/busybox/files/udhcpd.conf.example create mode 100644 recipes-core/images/mlinux-base-image.bb create mode 100644 recipes-core/images/mlinux-factory-image.bb create mode 100644 recipes-core/images/mlinux-minimal-image.bb create mode 100644 recipes-core/images/mlinux-mono-image.bb create mode 100644 recipes-core/initscripts/initscripts-1.0/umountfs create mode 100644 recipes-core/initscripts/initscripts_1.0.bbappend create mode 100644 recipes-core/multitech/config/config.init create mode 100644 recipes-core/multitech/config/network/interfaces create mode 100644 recipes-core/multitech/config/ppp/chap-secrets create mode 100644 recipes-core/multitech/config/ppp/options create mode 100644 recipes-core/multitech/config/ppp/pap-secrets create mode 100644 recipes-core/multitech/config/ppp/peers/cdma create mode 100644 recipes-core/multitech/config/ppp/peers/cdma_chat create mode 100644 recipes-core/multitech/config/ppp/peers/gsm create mode 100644 recipes-core/multitech/config/ppp/peers/gsm_chat create mode 100644 recipes-core/multitech/config_1.0.bb create mode 100644 recipes-core/multitech/mlinux-version.bb create mode 100644 recipes-core/multitech/reset-handler/reset-handler.default create mode 100644 recipes-core/multitech/reset-handler/reset-handler.init create mode 100755 recipes-core/multitech/reset-handler/reset-handler.sh create mode 100644 recipes-core/multitech/reset-handler_1.0.bb create mode 100644 recipes-core/multitech/upgrade-reboot_1.0.0.bb create mode 100644 recipes-core/ocg-scripts/ocg-scripts-1.0.inc create mode 100755 recipes-core/ocg-scripts/ocg-scripts-1.0/ocg-cell-router create mode 100755 recipes-core/ocg-scripts/ocg-scripts-1.0/ocg-dhcpd create mode 100755 recipes-core/ocg-scripts/ocg-scripts-1.0/ocg-set-apn create mode 100755 recipes-core/ocg-scripts/ocg-scripts-1.0/ocg-wifi-ap create mode 100644 recipes-core/ocg-scripts/ocg-scripts_1.0.bb create mode 100644 recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend create mode 100644 recipes-core/udev/udev-182/cellular_radios.rules create mode 100644 recipes-core/udev/udev-182/init create mode 100644 recipes-core/udev/udev-182/mtcdt/mtcdt.rules create mode 100644 recipes-core/udev/udev-extraconf/automount.rules create mode 100644 recipes-core/udev/udev-extraconf_1.0.bbappend create mode 100644 recipes-core/udev/udev_182.bbappend create mode 100644 recipes-devtools/mtd/mtd-utils-static_git.bb create mode 100644 recipes-devtools/nodejs/nodejs/0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch create mode 100644 recipes-devtools/nodejs/nodejs_0.8.27.bb create mode 100644 recipes-examples/multitech/helloworld-autotools_1.0.0.bb create mode 100644 recipes-extended/autossh/autossh_1.4c.bb create mode 100644 recipes-extended/bash/bash-4.2/build-tests.patch create mode 100644 recipes-extended/bash/bash-4.2/execute_cmd.patch create mode 100644 recipes-extended/bash/bash-4.2/mkbuiltins_have_stringize.patch create mode 100644 recipes-extended/bash/bash-4.2/run-ptest create mode 100644 recipes-extended/bash/bash-4.2/test-output.patch create mode 100644 recipes-extended/bash/bash.inc create mode 100644 recipes-extended/bash/bash_4.2.bb create mode 100644 recipes-extended/lighttpd/lighttpd_1.4.33.bbappend create mode 100644 recipes-extended/mii-diag/mii-diag-2.11/libmii.c create mode 100644 recipes-extended/mii-diag/mii-diag-2.11/mii-diag.c create mode 100644 recipes-extended/mii-diag/mii-diag_2.11.bb create mode 100644 recipes-extended/multitech/sms-utils.inc create mode 100644 recipes-extended/multitech/sms-utils_0.0.5.bb create mode 100644 recipes-extended/multitech/venus-gps_0.1.0.bb create mode 100644 recipes-extended/stressapptest/stressapptest_svn.bb create mode 100644 recipes-extended/uvccapture/files/makefile.patch create mode 100644 recipes-extended/uvccapture/files/uvccapture_use_videodev2.patch create mode 100644 recipes-extended/uvccapture/uvccapture_0.5.bb create mode 100644 recipes-java/openjdk/openjdk-7/jvm.cfg create mode 100644 recipes-java/openjdk/openjdk-7_25b30-2.3.12.bbappend create mode 100644 recipes-java/v4l4j/v4l4j-0.9.1/makefile.patch create mode 100644 recipes-java/v4l4j/v4l4j_0.9.1.bb create mode 100644 recipes-ruby/ruby-serialport/ruby-serialport_1.1.0.bb create mode 100644 recipes-ruby/ruby-sqlite3/ruby-sqlite3_1.3.7.bb create mode 100644 recipes-ruby/ruby/ruby_1.9.3-p429.bbappend create mode 100644 recipes-support/jsoncpp/jsoncpp-0.5.0/Makefile create mode 100644 recipes-support/jsoncpp/jsoncpp-0.5.0/jsoncpp-0.5.0-p1.patch create mode 100644 recipes-support/jsoncpp/jsoncpp_0.5.0.bb create mode 100644 recipes-support/libesmtp/libesmtp_1.0.6.bb diff --git a/COPYING.MIT b/COPYING.MIT new file mode 100644 index 0000000..fb950dc --- /dev/null +++ b/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5caf3b6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +All MultiTech-copyrighted software contained in mLinux is covered by +GPL (GNU General Public License) version 2, unless provided under a different license. + +All bitbake metadata is MIT licensed unless otherwise stated. Source code +included in tree for individual recipes is under the LICENSE stated in +the associated recipe (.bb file) unless otherwise stated. + +License information for any other files is either explicitly stated +or defaults to GPL version 2. diff --git a/README b/README new file mode 100644 index 0000000..3753058 --- /dev/null +++ b/README @@ -0,0 +1,38 @@ +MultiTech mLinux distribution OpenEmbedded layer + +This layer depends on: + +URI: git://git.openembedded.org/openembedded-core +branch: daisy +revision: HEAD + +Numerous layers in: +URI: git://git.openembedded.org/meta-openembedded +branch: daisy +revision: HEAD + +MultiTech hardware layer: +URI: git://git.multitech.net/meta-multitech +branch: daisy +revision: HEAD + +URI: git://github.com/woglinde/meta-java.git +branch: master +revision: f4c4649 + +URI: git://git.yoctoproject.org/meta-mono +branch: daisy +revision: HEAD + +URI: git://github.com/imyller/meta-nodejs.git +branch: master +revision: HEAD + +------------ + BUILDING +------------ + +mLinux should be built using the mlinux integration repo at git://git.multitech.net/mlinux +or using the downloadable tarball. See http://www.multitech.net for instructions and +downloads. + diff --git a/classes/mlinux-image.bbclass b/classes/mlinux-image.bbclass new file mode 100644 index 0000000..8da5e97 --- /dev/null +++ b/classes/mlinux-image.bbclass @@ -0,0 +1,33 @@ +# set specified root password in image using ROOT_PASSWORD_HASH +mlinux_set_root_password () { + if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then + sed -i "s%^root:[^:]*:%root:${ROOT_PASSWORD_HASH}:%" ${IMAGE_ROOTFS}/etc/shadow + elif [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then + sed -i "s%^root:[^:]*:%root:${ROOT_PASSWORD_HASH}:%" ${IMAGE_ROOTFS}/etc/passwd + fi +} +ROOTFS_POSTPROCESS_COMMAND += "mlinux_set_root_password;" + +# make links to images in TFTPBOOT_DIR for ease of development +do_tftpboot_links() { + TFTPBOOT_CLEAN="oe_bootstrap.bin oe_bootstrap_pmecc_padded.bin \ + oe_u-boot.bin oe_uImage.bin oe_rootfs.jffs2 oe_images" + + if [ -n "${TFTPBOOT_DIR}" ]; then + install -d ${DEPLOY_DIR_IMAGE} + + for f in ${TFTPBOOT_CLEAN}; do + rm -f ${TFTPBOOT_DIR}/$f + done + + ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap.bin ${TFTPBOOT_DIR}/oe_bootstrap.bin + if [ -f ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ]; then + ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ${TFTPBOOT_DIR}/oe_bootstrap_pmecc_padded.bin + fi + ln -nfs ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin ${TFTPBOOT_DIR}/oe_u-boot.bin + ln -nfs ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin ${TFTPBOOT_DIR}/oe_uImage.bin + ln -nfs ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.jffs2 ${TFTPBOOT_DIR}/oe_rootfs.jffs2 + ln -nfs ${DEPLOY_DIR_IMAGE} ${TFTPBOOT_DIR}/oe_images + fi +} +addtask tftpboot_links after do_rootfs before do_build diff --git a/classes/mlinux_metadata_scm.bbclass b/classes/mlinux_metadata_scm.bbclass new file mode 100644 index 0000000..e394910 --- /dev/null +++ b/classes/mlinux_metadata_scm.bbclass @@ -0,0 +1,14 @@ +MLINUX_METADATA_REVISION = "${@base_get_metadata_git_revision("${OETREE}",None)}" +MLINUX_METADATA_BRANCH = "${@base_get_metadata_git_branch("${OETREE}",None).strip()}" +MLINUX_LAYERS = "${@mlinux_layers(bb,d)}" + +def mlinux_layers(bb, d): + layers = (bb.data.getVar("BBLAYERS", d, 1) or "").split() + layer_revs = "" + + for layer in layers: + branch = base_get_metadata_git_branch(layer, d).strip() + rev = base_get_metadata_git_revision(layer, d) + layer_revs += "%-20s = %s:%s\n" % (os.path.basename(layer), branch, rev) + + return layer_revs diff --git a/conf/distro/java.inc b/conf/distro/java.inc new file mode 100644 index 0000000..ff620d8 --- /dev/null +++ b/conf/distro/java.inc @@ -0,0 +1,9 @@ +PREFERRED_PROVIDER_virtual/java-initial = "cacao-initial" + +PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" +PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native" + +PREFERRED_VERSION_openjdk-7-jre = "25b30-2.3.12" +PREFERRED_VERSION_icedtea7-native = "2.1.3" + +PREFERRED_PROVIDER_openjdk-7-jre = "openjdk-7-jre" diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf new file mode 100644 index 0000000..0b1c18e --- /dev/null +++ b/conf/distro/mlinux.conf @@ -0,0 +1,62 @@ +DISTRO = "mlinux" +DISTRO_NAME = "mLinux" +DISTRO_VERSION = "3.0" +DISTRO_CODENAME = "" +SDK_VENDOR = "-mlinux" +SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" +SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" + +MAINTAINER = "MultiTech Systems " + +TARGET_VENDOR = "-mlinux" + +LOCALCONF_VERSION = "1" +LAYER_CONF_VERSION ?= "6" + +DISTRO_FEATURES_MLINUX = "argp largefile xattr \ + ipv6 ipsec ppp \ + bluetooth irda usbgadget usbhost wifi \ + cramfs ext2 smbfs nfs \ + libc-crypt pam \ + sysvinit x11" +DISTRO_FEATURES ?= "${DISTRO_FEATURES_LIBC} ${DISTRO_FEATURES_MLINUX}" + +# disable pulseaudio +DISTRO_FEATURES_BACKFILL_CONSIDERED = "pulseaudio" + +# extra packages to add to images +DISTRO_EXTRA_RDEPENDS += "mlinux-version" + +EXTRAOPKGCONFIG = "" + +# don't append to tmpdir +TCLIBCAPPEND = "" + +IPKG_VARIANT = "opkg" +DEFAULT_TIMEZONE = "America/Chicago" + +# default root password +ROOT_PASSWORD_HASH ?= "e97PZLy9l09O6" + +SANITY_TESTED_DISTROS ?= " \ + Ubuntu-12.04 \n \ + Ubuntu-13.10 \n \ + Ubuntu-14.04 \n \ + Fedora-19 \n \ + Fedora-20 \n \ + CentOS-6.4 \n \ + CentOS-6.5 \n \ + Debian-7.0 \n \ + Debian-7.1 \n \ + Debian-7.2 \n \ + Debian-7.3 \n \ + Debian-7.4 \n \ + SUSE-LINUX-12.2 \n \ + openSUSE-project-12.3 \n \ + openSUSE-project-13.1 \n \ + " + +PREFERRED_PROVIDER_jpeg = "jpeg" +PREFERRED_PROVIDER_jpeg-native = "jpeg-native" +require java.inc diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..719bdf9 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,10 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "mlinux" +BBFILE_PATTERN_mlinux = "^${LAYERDIR}/" +BBFILE_PRIORITY_mlinux = "10" diff --git a/contrib/env-oe.sh b/contrib/env-oe.sh new file mode 100644 index 0000000..53a3297 --- /dev/null +++ b/contrib/env-oe.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +export OETREE=$(pwd) + +OECORE="${OETREE}/layers/openembedded-core" + +if [[ ! "${PATH}" =~ ${OETREE}/bitbake/bin ]]; then + export PATH="${OECORE}/scripts:${OETREE}/bitbake/bin:${PATH}" +fi + +# define if you wish to create soft links to the image in the tftpboot dir +#export TFTPBOOT_DIR=/tftpboot + +export BUILDDIR="${OETREE}" +export BBPATH="${OETREE}:${OECORE}/meta" +export BB_ENV_EXTRAWHITE="MACHINE DISTRO OETREE TFTPBOOT_DIR TCLIBC TCMODE GIT_PROXY_COMMAND http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS" diff --git a/contrib/local.conf b/contrib/local.conf new file mode 100644 index 0000000..66a1312 --- /dev/null +++ b/contrib/local.conf @@ -0,0 +1,51 @@ +# CONF_VERSION is increased each time build/conf/ changes incompatibly +CONF_VERSION = "1" + +# Use MultiTech mLinux distribution +DISTRO = "mlinux" +MACHINE ?= "mtcdt" + +# Where to store downloaded sources +DL_DIR = "${TOPDIR}/downloads" + +# Where to save shared state +SSTATE_DIR = "${TOPDIR}/build/sstate-cache" +# bitbake cache location +PERSISTENT_DIR = "${TOPDIR}/build/cache" +# build output +TMPDIR = "${TOPDIR}/build/tmp" + +# Which files do we want to parse: +BBFILES ?= "${TOPDIR}/layers/openembedded-core/meta/recipes-*/*/*.bb" + +# Go through the Firewall +#HTTP_PROXY = "http://:/" + +# Uncomment this to remove unpacked source and intermediate work +# after successfully building a package. +# Saves a LOT of disk space, but leaving work around is useful for debugging. +INHERIT += "rm_work" + +# skip parsing of masked files +BBMASK = "" + +# Make use of SMP: +# PARALLEL_MAKE specifies how many concurrent compiler threads are spawned per bitbake process +# BB_NUMBER_THREADS specifies how many concurrent bitbake tasks will be run +PARALLEL_MAKE = "-j4" +BB_NUMBER_THREADS = "4" + +# Don't generate the mirror tarball for SCM repos, the snapshot is enough +BB_GENERATE_MIRROR_TARBALLS = "0" + +# Disable build time patch resolution. This would lauch a devshell +# and wait for manual intervention. We disable it. +PATCHRESOLVE = "noop" + +# enable local PR server +PRSERV_HOST = "localhost:0" + +# enable buildhistory for images +INHERIT += "buildhistory" +BUILDHISTORY_COMMIT = "0" +BUILDHISTORY_FEATURES = "image" diff --git a/contrib/user-layer.conf b/contrib/user-layer.conf new file mode 100644 index 0000000..609f95b --- /dev/null +++ b/contrib/user-layer.conf @@ -0,0 +1,10 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "user" +BBFILE_PATTERN_user = "^${LAYERDIR}/" +BBFILE_PRIORITY_user = "99" diff --git a/recipes-connectivity/hostapd/hostap-daemon-1.0/default b/recipes-connectivity/hostapd/hostap-daemon-1.0/default new file mode 100644 index 0000000..0923a8c --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon-1.0/default @@ -0,0 +1,2 @@ +# set to "yes" to start hostapd on boot +START_ON_BOOT="no" diff --git a/recipes-connectivity/hostapd/hostap-daemon-1.0/init b/recipes-connectivity/hostapd/hostap-daemon-1.0/init new file mode 100644 index 0000000..a8d622f --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon-1.0/init @@ -0,0 +1,43 @@ +#!/bin/sh +DAEMON=/usr/sbin/hostapd +NAME=hostapd +DESC="HOSTAP Daemon" +ARGS="/etc/hostapd.conf -B" + +test -f $DAEMON || exit 0 + +[ -f /etc/default/$NAME ] && . /etc/default/$NAME + +if [ "$START_ON_BOOT" != "yes" ]; then + exit 0 +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon -S -x $DAEMON -- $ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x $DAEMON + echo "$NAME." + ;; + restart) + $0 stop + $0 start + ;; + reload) + echo -n "Reloading $DESC: " + killall -HUP $(basename ${DAEMON}) + echo "$NAME." + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-connectivity/hostapd/hostap-daemon_1.0.bbappend b/recipes-connectivity/hostapd/hostap-daemon_1.0.bbappend new file mode 100644 index 0000000..48af903 --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon_1.0.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" + +SRC_URI += "file://default" + +do_install_append() { + mkdir -p ${D}${sysconfdir}/default + install -m 644 ${WORKDIR}/default ${D}${sysconfdir}/default/hostapd +} diff --git a/recipes-connectivity/openssh/openssh/ssh.default b/recipes-connectivity/openssh/openssh/ssh.default new file mode 100644 index 0000000..d5c0507 --- /dev/null +++ b/recipes-connectivity/openssh/openssh/ssh.default @@ -0,0 +1,2 @@ +# put keys here +SYSCONFDIR=/var/config/ssh diff --git a/recipes-connectivity/openssh/openssh_6.5p1.bbappend b/recipes-connectivity/openssh/openssh_6.5p1.bbappend new file mode 100644 index 0000000..87891c8 --- /dev/null +++ b/recipes-connectivity/openssh/openssh_6.5p1.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://ssh.default" + +KEYFILES = "ssh_host_dsa_key \ +ssh_host_dsa_key.pub \ +ssh_host_ecdsa_key \ +ssh_host_ecdsa_key.pub \ +ssh_host_rsa_key \ +ssh_host_rsa_key.pub \ +ssh_host_ed25519_key \ +ssh_host_ed25519_key.pub \ +" + +do_install_append() { + install -d ${D}${sysconfdir}/default + install -m 644 ${WORKDIR}/ssh.default ${D}${sysconfdir}/default/ssh + for f in ${KEYFILES}; do + ln -sf /var/config/ssh/$f ${D}${sysconfdir}/ssh/$f + done +} diff --git a/recipes-connectivity/ppp/ppp-2.4.7/0001-ppp-Fix-compilation-errors-in-Makefile.patch b/recipes-connectivity/ppp/ppp-2.4.7/0001-ppp-Fix-compilation-errors-in-Makefile.patch new file mode 100644 index 0000000..8aa2d2e --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/0001-ppp-Fix-compilation-errors-in-Makefile.patch @@ -0,0 +1,75 @@ +From ba0f6058d1f25b2b60fc31ab2656bf12a71ffdab Mon Sep 17 00:00:00 2001 +From: Lu Chong +Date: Tue, 5 Nov 2013 17:32:56 +0800 +Subject: [PATCH] ppp: Fix compilation errors in Makefile + +This patch fixes below issues: + +1. Make can't exit while compilation error occurs in subdir for plugins building. + +2. If build ppp with newer kernel (3.10.10), it will pick 'if_pppox.h' from sysroot-dir and + 'if_pppol2tp.h' from its own source dir, this cause below build errors: + + bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:84:26: + error: field 'pppol2tp' has incomplete type + struct pppol2tpin6_addr pppol2tp; + ^ + bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:99:28: + error: field 'pppol2tp' has incomplete type + struct pppol2tpv3in6_addr pppol2tp; + ^ + +The 'sysroot-dir/if_pppox.h' enabled ipv6 support but the 'source-dir/if_pppol2tp.h' lost +related structure definitions, we should use both header files from sysroots to fix this +build failure. + +Upstream-Status: Pending + +Signed-off-by: Lu Chong +--- + pppd/plugins/Makefile.linux | 2 +- + pppd/plugins/pppol2tp/Makefile.linux | 2 +- + pppd/plugins/rp-pppoe/Makefile.linux | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux +index 0a7ec7b..2a2c15a 100644 +--- a/pppd/plugins/Makefile.linux ++++ b/pppd/plugins/Makefile.linux +@@ -20,7 +20,7 @@ include .depend + endif + + all: $(PLUGINS) +- for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done ++ for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all || exit 1; done + + %.so: %.c + $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ +diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux +index 19eff67..feb2f52 100644 +--- a/pppd/plugins/pppol2tp/Makefile.linux ++++ b/pppd/plugins/pppol2tp/Makefile.linux +@@ -1,6 +1,6 @@ + #CC = gcc + COPTS = -O2 -g +-CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC ++CFLAGS = $(COPTS) -I. -I../.. -fPIC + LDFLAGS = -shared + INSTALL = install + +diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux +index f078991..15b9118 100644 +--- a/pppd/plugins/rp-pppoe/Makefile.linux ++++ b/pppd/plugins/rp-pppoe/Makefile.linux +@@ -26,7 +26,7 @@ INSTALL = install + RP_VERSION=3.8p + + COPTS=-O2 -g +-CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"' ++CFLAGS=$(COPTS) '-DRP_VERSION="$(RP_VERSION)"' + all: rp-pppoe.so pppoe-discovery + + pppoe-discovery: pppoe-discovery.o debug.o +-- +1.7.9.5 + diff --git a/recipes-connectivity/ppp/ppp-2.4.7/08setupdns b/recipes-connectivity/ppp/ppp-2.4.7/08setupdns new file mode 100644 index 0000000..998219d --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/08setupdns @@ -0,0 +1,12 @@ +#!/bin/sh +ACTUALCONF=/var/run/resolv.conf +PPPCONF=/var/run/ppp/resolv.conf +if [ -f $PPPCONF ] ; then + if [ -f $ACTUALCONF ] ; then + if [ ! -h $ACTUALCONF -o ! "`readlink $ACTUALCONF 2>&1`" = "$PPPCONF" ] ; then + mv $ACTUALCONF $ACTUALCONF.ppporig + fi + fi + + ln -sf $PPPCONF $ACTUALCONF +fi diff --git a/recipes-connectivity/ppp/ppp-2.4.7/92removedns b/recipes-connectivity/ppp/ppp-2.4.7/92removedns new file mode 100644 index 0000000..2eadec6 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/92removedns @@ -0,0 +1,5 @@ +#!/bin/sh +ACTUALCONF=/var/run/resolv.conf +if [ -f $ACTUALCONF.ppporig ] ; then + mv $ACTUALCONF.ppporig $ACTUALCONF +fi diff --git a/recipes-connectivity/ppp/ppp-2.4.7/cifdefroute.patch b/recipes-connectivity/ppp/ppp-2.4.7/cifdefroute.patch new file mode 100644 index 0000000..db4dbc2 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/cifdefroute.patch @@ -0,0 +1,292 @@ +This patch comes from OpenEmbedded. +The original patch is from Debian / SuSE to implement replacedefaultroute +Rebased it to fit ppp-2.4.5. Dongxiao Xu + +Upstream-Status: Inappropriate [debian/suse patches] + +diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c +--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800 ++++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800 +@@ -198,6 +198,16 @@ + "disable defaultroute option", OPT_ALIAS | OPT_A2CLR, + &ipcp_wantoptions[0].default_route }, + ++#ifdef __linux__ ++ { "replacedefaultroute", o_bool, ++ &ipcp_wantoptions[0].replace_default_route, ++ "Replace default route", 1 ++ }, ++ { "noreplacedefaultroute", o_bool, ++ &ipcp_allowoptions[0].replace_default_route, ++ "Never replace default route", OPT_A2COPY, ++ &ipcp_wantoptions[0].replace_default_route }, ++#endif + { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, + "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, + { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, +@@ -271,7 +281,7 @@ + ip_active_pkt + }; + +-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t)); ++static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool)); + static void ipcp_script __P((char *, int)); /* Run an up/down script */ + static void ipcp_script_done __P((void *)); + +@@ -1742,7 +1752,12 @@ + if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE)) + return 0; + if (wo->default_route) ++#ifndef __linux__ + if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr)) ++#else ++ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr, ++ wo->replace_default_route)) ++#endif + default_route_set[u] = 1; + if (wo->proxy_arp) + if (sifproxyarp(u, wo->hisaddr)) +@@ -1830,7 +1845,8 @@ + */ + if (demand) { + if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { +- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr); ++ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr, ++ wo->replace_default_route); + if (go->ouraddr != wo->ouraddr) { + warn("Local IP address changed to %I", go->ouraddr); + script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); +@@ -1855,7 +1871,12 @@ + + /* assign a default route through the interface if required */ + if (ipcp_wantoptions[f->unit].default_route) ++#ifndef __linux__ + if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr)) ++#else ++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr, ++ wo->replace_default_route)) ++#endif + default_route_set[f->unit] = 1; + + /* Make a proxy ARP entry if requested. */ +@@ -1905,7 +1926,12 @@ + + /* assign a default route through the interface if required */ + if (ipcp_wantoptions[f->unit].default_route) ++#ifndef __linux__ + if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr)) ++#else ++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr, ++ wo->replace_default_route)) ++#endif + default_route_set[f->unit] = 1; + + /* Make a proxy ARP entry if requested. */ +@@ -1983,7 +2009,7 @@ + sifnpmode(f->unit, PPP_IP, NPMODE_DROP); + sifdown(f->unit); + ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr, +- ipcp_hisoptions[f->unit].hisaddr); ++ ipcp_hisoptions[f->unit].hisaddr, 0); + } + + /* Execute the ip-down script */ +@@ -1999,12 +2025,21 @@ + * proxy arp entries, etc. + */ + static void +-ipcp_clear_addrs(unit, ouraddr, hisaddr) ++ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute) + int unit; + u_int32_t ouraddr; /* local address */ + u_int32_t hisaddr; /* remote address */ ++ bool replacedefaultroute; + { +- if (proxy_arp_set[unit]) { ++ /* If replacedefaultroute, sifdefaultroute will be called soon ++ * with replacedefaultroute set and that will overwrite the current ++ * default route. This is the case only when doing demand, otherwise ++ * during demand, this cifdefaultroute would restore the old default ++ * route which is not what we want in this case. In the non-demand ++ * case, we'll delete the default route and restore the old if there ++ * is one saved by an sifdefaultroute with replacedefaultroute. ++ */ ++ if (!replacedefaultroute && default_route_set[unit]) { + cifproxyarp(unit, hisaddr); + proxy_arp_set[unit] = 0; + } +diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h +--- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800 ++++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800 +@@ -70,6 +70,7 @@ + bool old_addrs; /* Use old (IP-Addresses) option? */ + bool req_addr; /* Ask peer to send IP address? */ + bool default_route; /* Assign default route through interface? */ ++ bool replace_default_route; /* Replace default route through interface? */ + bool proxy_arp; /* Make proxy ARP entry for peer? */ + bool neg_vj; /* Van Jacobson Compression? */ + bool old_vj; /* use old (short) form of VJ option? */ +diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8 +--- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800 ++++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800 +@@ -121,6 +121,13 @@ + This entry is removed when the PPP connection is broken. This option + is privileged if the \fInodefaultroute\fR option has been specified. + .TP ++.B replacedefaultroute ++This option is a flag to the defaultroute option. If defaultroute is ++set and this flag is also set, pppd replaces an existing default route ++with the new default route. ++ ++ ++.TP + .B disconnect \fIscript + Execute the command specified by \fIscript\fR, by passing it to a + shell, after +@@ -717,7 +724,12 @@ + .TP + .B nodefaultroute + Disable the \fIdefaultroute\fR option. The system administrator who +-wishes to prevent users from creating default routes with pppd ++wishes to prevent users from adding a default route with pppd ++can do so by placing this option in the /etc/ppp/options file. ++.TP ++.B noreplacedefaultroute ++Disable the \fIreplacedefaultroute\fR option. The system administrator who ++wishes to prevent users from replacing a default route with pppd + can do so by placing this option in the /etc/ppp/options file. + .TP + .B nodeflate +diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h +--- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800 ++++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800 +@@ -643,7 +643,11 @@ + int cif6addr __P((int, eui64_t, eui64_t)); + /* Remove an IPv6 address from i/f */ + #endif ++#ifndef __linux__ + int sifdefaultroute __P((int, u_int32_t, u_int32_t)); ++#else ++int sifdefaultroute __P((int, u_int32_t, u_int32_t, bool replace_default_rt)); ++#endif + /* Create default route through i/f */ + int cifdefaultroute __P((int, u_int32_t, u_int32_t)); + /* Delete default route through i/f */ +diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c +--- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800 ++++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800 +@@ -206,6 +206,8 @@ + + static int if_is_up; /* Interface has been marked up */ + static int have_default_route; /* Gateway for default route added */ ++static struct rtentry old_def_rt; /* Old default route */ ++static int default_rt_repl_rest; /* replace and restore old default rt */ + static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */ + static char proxy_arp_dev[16]; /* Device for proxy arp entry */ + static u_int32_t our_old_addr; /* for detecting address changes */ +@@ -1537,6 +1539,9 @@ + p = NULL; + } + ++ SET_SA_FAMILY (rt->rt_dst, AF_INET); ++ SET_SA_FAMILY (rt->rt_gateway, AF_INET); ++ + SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16); + SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16); + SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16); +@@ -1606,20 +1611,51 @@ + /******************************************************************** + * + * sifdefaultroute - assign a default route through the address given. +- */ +- +-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway) +-{ +- struct rtentry rt; +- +- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) { +- if (rt.rt_flags & RTF_GATEWAY) +- error("not replacing existing default route via %I", +- SIN_ADDR(rt.rt_gateway)); +- else +- error("not replacing existing default route through %s", +- rt.rt_dev); +- return 0; ++ * ++ * If the global default_rt_repl_rest flag is set, then this function ++ * already replaced the original system defaultroute with some other ++ * route and it should just replace the current defaultroute with ++ * another one, without saving the current route. Use: demand mode, ++ * when pppd sets first a defaultroute it it's temporary ppp0 addresses ++ * and then changes the temporary addresses to the addresses for the real ++ * ppp connection when it has come up. ++ */ ++ ++int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace) ++{ ++ struct rtentry rt, tmp_rt; ++ struct rtentry *del_rt = NULL; ++ ++ if (default_rt_repl_rest) { ++ /* We have already reclaced the original defaultroute, if we ++ * are called again, we will delete the current default route ++ * and set the new default route in this function. ++ * - this is normally only the case the doing demand: */ ++ if (defaultroute_exists( &tmp_rt )) ++ del_rt = &tmp_rt; ++ } else if ( defaultroute_exists( &old_def_rt ) && ++ strcmp( old_def_rt.rt_dev, ifname ) != 0) { ++ /* We did not yet replace an existing default route, let's ++ * check if we should save and replace a default route: ++ */ ++ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway); ++ if (old_gateway != gateway) { ++ if (!replace) { ++ error("not replacing default route to %s [%I]", ++ old_def_rt.rt_dev, old_gateway); ++ return 0; ++ } else { ++ // we need to copy rt_dev because we need it permanent too: ++ char * tmp_dev = malloc(strlen(old_def_rt.rt_dev)+1); ++ strcpy(tmp_dev, old_def_rt.rt_dev); ++ old_def_rt.rt_dev = tmp_dev; ++ ++ notice("replacing old default route to %s [%I]", ++ old_def_rt.rt_dev, old_gateway); ++ default_rt_repl_rest = 1; ++ del_rt = &old_def_rt; ++ } ++ } + } + + memset (&rt, 0, sizeof (rt)); +@@ -1638,6 +1674,12 @@ + error("default route ioctl(SIOCADDRT): %m"); + return 0; + } ++ if (default_rt_repl_rest && del_rt) ++ if (ioctl(sock_fd, SIOCDELRT, del_rt) < 0) { ++ if ( ! ok_error ( errno )) ++ error("del old default route ioctl(SIOCDELRT): %m(%d)", errno); ++ return 0; ++ } + + have_default_route = 1; + return 1; +@@ -1673,6 +1715,16 @@ + return 0; + } + } ++ if (default_rt_repl_rest) { ++ notice("restoring old default route to %s [%I]", ++ old_def_rt.rt_dev, SIN_ADDR(old_def_rt.rt_gateway)); ++ if (ioctl(sock_fd, SIOCADDRT, &old_def_rt) < 0) { ++ if ( ! ok_error ( errno )) ++ error("restore default route ioctl(SIOCADDRT): %m(%d)", errno); ++ return 0; ++ } ++ default_rt_repl_rest = 0; ++ } + + return 1; + } diff --git a/recipes-connectivity/ppp/ppp-2.4.7/copts.patch b/recipes-connectivity/ppp/ppp-2.4.7/copts.patch new file mode 100644 index 0000000..53ff06e --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/copts.patch @@ -0,0 +1,21 @@ +ppp: use build system CFLAGS when compiling + +Upstream-Status: Pending + +Override the hard-coded COPTS make variables with +CFLAGS. Add COPTS into one Makefile that did not +use it. + +Signed-off-by: Joe Slater + +--- a/pppd/plugins/radius/Makefile.linux ++++ b/pppd/plugins/radius/Makefile.linux +@@ -12,7 +12,7 @@ VERSION = $(shell awk -F '"' '/VERSION/ + INSTALL = install + + PLUGIN=radius.so radattr.so radrealms.so +-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON ++CFLAGS=-I. -I../.. -I../../../include $(COPTS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON + + # Uncomment the next line to include support for Microsoft's + # MS-CHAP authentication protocol. diff --git a/recipes-connectivity/ppp/ppp-2.4.7/init b/recipes-connectivity/ppp/ppp-2.4.7/init new file mode 100755 index 0000000..5b3b7ab --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/init @@ -0,0 +1,50 @@ +#!/bin/sh +# +# /etc/init.d/ppp: start or stop PPP link. +# +# If you want PPP started on boot time (most dialup systems won't need it) +# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and +# follow the instructions in the comments in that file. + +test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0 +if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi + +case "$1" in + start) + echo -n "Starting up PPP link: pppd" + if [ "$RUNFILE" = "1" ]; then + /etc/ppp/ppp_on_boot + else + pppd call provider + fi + echo "." + ;; + stop) + echo -n "Shutting down PPP link: pppd" + if [ "$RUNFILE" = "1" ]; then + poff + else + poff provider + fi + echo "." + ;; + restart|force-reload) + echo -n "Restarting PPP link: pppd" + if [ "$RUNFILE" = "1" ]; then + poff + sleep 5 + /etc/ppp/ppp_on_boot + else + poff provider + sleep 5 + pppd call provider + fi + echo "." + ;; + *) + echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-connectivity/ppp/ppp-2.4.7/ip-down b/recipes-connectivity/ppp/ppp-2.4.7/ip-down new file mode 100755 index 0000000..06d3548 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/ip-down @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $Id: ip-down,v 1.2 1998/02/10 21:21:55 phil Exp $ +# +# This script is run by the pppd _after_ the link is brought down. +# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete +# routes, unset IP addresses etc. you should create script(s) there. +# +# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named +# after that package), so choose local script names with that in mind. +# +# This script is called with the following arguments: +# Arg Name Example +# $1 Interface name ppp0 +# $2 The tty ttyS1 +# $3 The link speed 38400 +# $4 Local IP number 12.34.56.78 +# $5 Peer IP number 12.34.56.99 +# $6 Optional ``ipparam'' value foo + +# The environment is cleared before executing this script +# so the path must be reset +PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin +export PATH +# These variables are for the use of the scripts run by run-parts +PPP_IFACE="$1" +PPP_TTY="$2" +PPP_SPEED="$3" +PPP_LOCAL="$4" +PPP_REMOTE="$5" +PPP_IPPARAM="$6" +export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM + +# as an additional convenience, $PPP_TTYNAME is set to the tty name, +# stripped of /dev/ (if present) for easier matching. +PPP_TTYNAME=`/usr/bin/basename "$2"` +export PPP_TTYNAME + +# Main Script starts here + +run-parts /etc/ppp/ip-down.d + +# last line diff --git a/recipes-connectivity/ppp/ppp-2.4.7/ip-up b/recipes-connectivity/ppp/ppp-2.4.7/ip-up new file mode 100755 index 0000000..fc2fae9 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/ip-up @@ -0,0 +1,44 @@ +#!/bin/sh +# +# $Id: ip-up,v 1.2 1998/02/10 21:25:34 phil Exp $ +# +# This script is run by the pppd after the link is established. +# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes, +# set IP address, run the mailq etc. you should create script(s) there. +# +# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named +# after that package), so choose local script names with that in mind. +# +# This script is called with the following arguments: +# Arg Name Example +# $1 Interface name ppp0 +# $2 The tty ttyS1 +# $3 The link speed 38400 +# $4 Local IP number 12.34.56.78 +# $5 Peer IP number 12.34.56.99 +# $6 Optional ``ipparam'' value foo + +# The environment is cleared before executing this script +# so the path must be reset +PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin +export PATH +# These variables are for the use of the scripts run by run-parts +PPP_IFACE="$1" +PPP_TTY="$2" +PPP_SPEED="$3" +PPP_LOCAL="$4" +PPP_REMOTE="$5" +PPP_IPPARAM="$6" +export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM + + +# as an additional convenience, $PPP_TTYNAME is set to the tty name, +# stripped of /dev/ (if present) for easier matching. +PPP_TTYNAME=`/usr/bin/basename "$2"` +export PPP_TTYNAME + +# Main Script starts here + +run-parts /etc/ppp/ip-up.d + +# last line diff --git a/recipes-connectivity/ppp/ppp-2.4.7/makefile-remove-hard-usr-reference.patch b/recipes-connectivity/ppp/ppp-2.4.7/makefile-remove-hard-usr-reference.patch new file mode 100644 index 0000000..d59717e --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/makefile-remove-hard-usr-reference.patch @@ -0,0 +1,37 @@ +The patch comes from OpenEmbedded. +Rebased for ppp-2.4.5. Dongxiao Xu + +Updated from OE-Classic to include the pcap hunk. +Signed-off-by: Andreas Oberritter + +Upstream-Status: Inappropriate [configuration] + +diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux +--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800 ++++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800 +@@ -117,10 +117,10 @@ + #LIBS += -lshadow $(LIBS) + endif + +-ifneq ($(wildcard /usr/include/crypt.h),) ++#ifneq ($(wildcard /usr/include/crypt.h),) + CFLAGS += -DHAVE_CRYPT_H=1 + LIBS += -lcrypt +-endif ++#endif + + ifdef NEEDDES + ifndef USE_CRYPT +@@ -169,10 +169,10 @@ + endif + + ifdef FILTER +-ifneq ($(wildcard /usr/include/pcap-bpf.h),) ++#ifneq ($(wildcard /usr/include/pcap-bpf.h),) + LIBS += -lpcap + CFLAGS += -DPPP_FILTER +-endif ++#endif + endif + + ifdef HAVE_INET6 diff --git a/recipes-connectivity/ppp/ppp-2.4.7/makefile.patch b/recipes-connectivity/ppp/ppp-2.4.7/makefile.patch new file mode 100644 index 0000000..2d09baf --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/makefile.patch @@ -0,0 +1,95 @@ +The patch comes from OpenEmbedded +Rebased for ppp-2.4.5. Dongxiao Xu + +Upstream-Status: Inappropriate [configuration] + +diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux +--- ppp-2.4.5-orig/chat/Makefile.linux 2010-06-30 15:51:12.050166398 +0800 ++++ ppp-2.4.5/chat/Makefile.linux 2010-06-30 15:51:30.450118446 +0800 +@@ -25,7 +25,7 @@ + + install: chat + mkdir -p $(BINDIR) $(MANDIR) +- $(INSTALL) -s -c chat $(BINDIR) ++ $(INSTALL) -c chat $(BINDIR) + $(INSTALL) -c -m 644 chat.8 $(MANDIR) + + clean: +diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux +--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800 ++++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 15:52:11.214170607 +0800 +@@ -99,7 +99,7 @@ + CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include + LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto + TARGETS += srp-entry +-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry ++EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry + MANPAGES += srp-entry.8 + EXTRACLEAN += srp-entry.o + NEEDDES=y +@@ -200,7 +200,7 @@ + install: pppd + mkdir -p $(BINDIR) $(MANDIR) + $(EXTRAINSTALL) +- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd ++ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd + if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \ + chmod o-rx,u+s $(BINDIR)/pppd; fi + $(INSTALL) -c -m 444 pppd.8 $(MANDIR) +diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugins/radius/Makefile.linux +--- ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux 2010-06-30 15:51:12.047676187 +0800 ++++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2010-06-30 15:53:47.750182267 +0800 +@@ -36,11 +36,11 @@ + + install: all + $(INSTALL) -d -m 755 $(LIBDIR) +- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR) +- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR) +- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR) +- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR) +- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR) ++ $(INSTALL) -c -m 755 radius.so $(LIBDIR) ++ $(INSTALL) -c -m 755 radattr.so $(LIBDIR) ++ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR) ++ $(INSTALL) -m 444 pppd-radius.8 $(MANDIR) ++ $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR) + + radius.so: radius.o libradiusclient.a + $(CC) -o radius.so -shared radius.o libradiusclient.a +diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux +--- ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:51:12.047676187 +0800 ++++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:53:15.454486877 +0800 +@@ -43,9 +43,9 @@ + + install: all + $(INSTALL) -d -m 755 $(LIBDIR) +- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR) ++ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR) + $(INSTALL) -d -m 755 $(BINDIR) +- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR) ++ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR) + + clean: + rm -f *.o *.so pppoe-discovery +diff -ruN ppp-2.4.5-orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux +--- ppp-2.4.5-orig/pppdump/Makefile.linux 2010-06-30 15:51:12.058183383 +0800 ++++ ppp-2.4.5/pppdump/Makefile.linux 2010-06-30 15:52:25.762183537 +0800 +@@ -17,5 +17,5 @@ + + install: + mkdir -p $(BINDIR) $(MANDIR) +- $(INSTALL) -s -c pppdump $(BINDIR) ++ $(INSTALL) -c pppdump $(BINDIR) + $(INSTALL) -c -m 444 pppdump.8 $(MANDIR) +diff -ruN ppp-2.4.5-orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux +--- ppp-2.4.5-orig/pppstats/Makefile.linux 2010-06-30 15:51:12.058183383 +0800 ++++ ppp-2.4.5/pppstats/Makefile.linux 2010-06-30 15:52:42.486341081 +0800 +@@ -22,7 +22,7 @@ + + install: pppstats + -mkdir -p $(MANDIR) +- $(INSTALL) -s -c pppstats $(BINDIR) ++ $(INSTALL) -c pppstats $(BINDIR) + $(INSTALL) -c -m 444 pppstats.8 $(MANDIR) + + pppstats: $(PPPSTATSRCS) diff --git a/recipes-connectivity/ppp/ppp-2.4.7/pap b/recipes-connectivity/ppp/ppp-2.4.7/pap new file mode 100644 index 0000000..093c326 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/pap @@ -0,0 +1,22 @@ +# You can use this script unmodified to connect to sites which allow +# authentication via PAP, CHAP and similar protocols. +# This script can be shared among different pppd peer configurations. +# To use it, add something like this to your /etc/ppp/peers/ file: +# +# connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T PHONE-NUMBER" +# user YOUR-USERNAME-IN-PAP-SECRETS +# noauth + +# Uncomment the following line to see the connect speed. +# It will be logged to stderr or to the file specified with the -r chat option. +#REPORT CONNECT + +ABORT BUSY +ABORT VOICE +ABORT "NO CARRIER" +ABORT "NO DIALTONE" +ABORT "NO DIAL TONE" +"" ATZ +OK ATDT\T +CONNECT "" + diff --git a/recipes-connectivity/ppp/ppp-2.4.7/poff b/recipes-connectivity/ppp/ppp-2.4.7/poff new file mode 100644 index 0000000..0521a94 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/poff @@ -0,0 +1,26 @@ +#!/bin/sh + +# Lets see how many pppds are running.... +set -- `cat /var/run/ppp*.pid 2>/dev/null` + +case $# in + 0) # pppd only creates a pid file once ppp is up, so let's try killing pppd + # on the assumption that we've not got that far yet. + killall pppd + ;; + 1) # If only one was running then it can be killed (apparently killall + # caused problems for some, so lets try killing the pid from the file) + kill $1 + ;; + *) # More than one! Aieehh.. Dont know which one to kill. + echo "More than one pppd running. None stopped" + exit 1 + ;; +esac + +if [ -r /var/run/ppp-quick ] +then + rm -f /var/run/ppp-quick +fi + +exit 0 diff --git a/recipes-connectivity/ppp/ppp-2.4.7/pon b/recipes-connectivity/ppp/ppp-2.4.7/pon new file mode 100644 index 0000000..91c0595 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/pon @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$1" = "quick" ] +then + touch /var/run/ppp-quick + shift +fi + +/usr/sbin/pppd call ${1:-provider} diff --git a/recipes-connectivity/ppp/ppp-2.4.7/ppp_on_boot b/recipes-connectivity/ppp/ppp-2.4.7/ppp_on_boot new file mode 100644 index 0000000..9793761 --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/ppp_on_boot @@ -0,0 +1,21 @@ +###!/bin/sh +# +# Rename this file to ppp_on_boot and pppd will be fired up as +# soon as the system comes up, connecting to `provider'. +# +# If you also make this file executable, and replace the first line +# with just "#!/bin/sh", the commands below will be executed instead. +# + +# The location of the ppp daemon itself (shouldn't need to be changed) +PPPD=/usr/sbin/pppd + +# The default provider to connect to +$PPPD call provider + +# Additional connections, which would just use settings from +# /etc/ppp/options. +#$PPPD ttyS0 +#$PPPD ttyS1 +#$PPPD ttyS2 +#$PPPD ttyS3 diff --git a/recipes-connectivity/ppp/ppp-2.4.7/pppd-resolv-varrun.patch b/recipes-connectivity/ppp/ppp-2.4.7/pppd-resolv-varrun.patch new file mode 100644 index 0000000..a72414f --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/pppd-resolv-varrun.patch @@ -0,0 +1,45 @@ +The patch comes from OpenEmbedded +Rebased for ppp-2.4.5. Dongxiao Xu + +Upstream-Status: Inappropriate [embedded specific] + +diff -ruN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c +--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800 ++++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 17:02:33.930393283 +0800 +@@ -55,6 +55,8 @@ + #include + #include + #include ++#include ++#include + + #include "pppd.h" + #include "fsm.h" +@@ -2095,6 +2097,14 @@ + u_int32_t peerdns1, peerdns2; + { + FILE *f; ++ struct stat dirinfo; ++ ++ if(stat(_PATH_OUTDIR, &dirinfo)) { ++ if(mkdir(_PATH_OUTDIR, 0775)) { ++ error("Failed to create directory %s: %m", _PATH_OUTDIR); ++ return; ++ } ++ } + + f = fopen(_PATH_RESOLV, "w"); + if (f == NULL) { +diff -ruN ppp-2.4.5-orig/pppd/pathnames.h ppp-2.4.5/pppd/pathnames.h +--- ppp-2.4.5-orig/pppd/pathnames.h 2010-06-30 15:51:12.043682063 +0800 ++++ ppp-2.4.5/pppd/pathnames.h 2010-06-30 17:03:20.594371055 +0800 +@@ -30,7 +30,8 @@ + #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." + #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" + #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" +-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf" ++#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp" ++#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf" + + #define _PATH_USEROPT ".ppprc" + #define _PATH_PSEUDONYM ".ppp_pseudonym" diff --git a/recipes-connectivity/ppp/ppp-2.4.7/provider b/recipes-connectivity/ppp/ppp-2.4.7/provider new file mode 100644 index 0000000..e74d71a --- /dev/null +++ b/recipes-connectivity/ppp/ppp-2.4.7/provider @@ -0,0 +1,35 @@ +# example configuration for a dialup connection authenticated with PAP or CHAP +# +# This is the default configuration used by pon(1) and poff(1). +# See the manual page pppd(8) for information on all the options. + +# MUST CHANGE: replace myusername@realm with the PPP login name given to +# your by your provider. +# There should be a matching entry with the password in /etc/ppp/pap-secrets +# and/or /etc/ppp/chap-secrets. +user "myusername@realm" + +# MUST CHANGE: replace ******** with the phone number of your provider. +# The /etc/chatscripts/pap chat script may be modified to change the +# modem initialization string. +connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T ********" + +# Serial device to which the modem is connected. +/dev/modem + +# Speed of the serial line. +115200 + +# Assumes that your IP address is allocated dynamically by the ISP. +noipdefault +# Try to get the name server addresses from the ISP. +usepeerdns +# Use this connection as the default route. +defaultroute + +# Makes pppd "dial again" when the connection is lost. +persist + +# Do not ask the remote to authenticate. +noauth + diff --git a/recipes-connectivity/ppp/ppp_2.4.7.bb b/recipes-connectivity/ppp/ppp_2.4.7.bb new file mode 100644 index 0000000..a106442 --- /dev/null +++ b/recipes-connectivity/ppp/ppp_2.4.7.bb @@ -0,0 +1,88 @@ +SUMMARY = "Point-to-Point Protocol (PPP) support" +DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \ +the Point-to-Point Protocol (PPP) on Linux and Solaris systems." +SECTION = "console/network" +HOMEPAGE = "http://samba.org/ppp/" +BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs" +DEPENDS = "libpcap" +LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD" +LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \ + file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \ + file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \ + file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2" +PR = "r6" + +SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \ + file://makefile.patch \ + file://cifdefroute.patch \ + file://pppd-resolv-varrun.patch \ + file://makefile-remove-hard-usr-reference.patch \ + file://pon \ + file://poff \ + file://init \ + file://ip-up \ + file://ip-down \ + file://08setupdns \ + file://92removedns \ + file://copts.patch \ + file://pap \ + file://ppp_on_boot \ + file://provider \ + file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \ +" + +SRC_URI[md5sum] = "78818f40e6d33a1d1de68a1551f6595a" +SRC_URI[sha256sum] = "02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30" + +inherit autotools + +TARGET_CC_ARCH += " ${LDFLAGS}" +EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}" +EXTRA_OECONF = "--disable-strip" + +# Package Makefile computes CFLAGS, referencing COPTS. +# Typically hard-coded to '-O2 -g' in the Makefile's. +# +EXTRA_OEMAKE += ' COPTS="${CFLAGS}"' + +do_install_append () { + make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp + mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d + mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/ + mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/ + install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon + install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp + install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/ + install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/ + install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/ + install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/ + mkdir -p ${D}${sysconfdir}/chatscripts + mkdir -p ${D}${sysconfdir}/ppp/peers + install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts + install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot + install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider + rm -rf ${D}/${mandir}/man8/man8 + chmod u+s ${D}${sbindir}/pppd +} + +CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options" +PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools" +FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd" +FILES_${PN}-dbg += "${libdir}/pppd/${PV}/.debug" +FILES_${PN}-oa