missed from initial commit.

This commit is contained in:
Buzz 2017-07-28 17:33:50 +10:00
parent ead20ebce7
commit 90263939c8
188 changed files with 43561 additions and 0 deletions

202
meta-3dr/LICENSE-APACHE Normal file
View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

21
meta-3dr/README.md Normal file
View File

@ -0,0 +1,21 @@
WARNING - WORK IN PROGRESS
```
This code is known to be broken and/or incomplete. IT DOES NOT WORK.
We are actively working on fixing it, and we really, really do not recommend you download it just yet.
We will remove this warning from the repository when it is no longer required.
```
# meta-3dr
This project contains the build definition of the whole i.MX6 Yocto image.
The image is built using Yocto's [BitBake](https://www.yoctoproject.org/tools-resources/projects/bitbake) build engine. The build definition consists of a large set of "Bitbake recipes" for the different included software (including ShotManager, SoloLink, and numerous other tools).
This readme does not attempt to fully describe the project as this requires an in-depth knowledge of Bitbake.
A good place to get started is the [Bitbake User Manual](http://www.yoctoproject.org/docs/2.0/bitbake-user-manual/bitbake-user-manual.html).
**Note:** This release is published as a starting point for opening the Solo codebase. Many of the URLs in the recipes will have to be updated to point at the newly-opened code.

2
meta-3dr/SOURCE Normal file
View File

@ -0,0 +1,2 @@
This source code was released by 3DR in the file: meta-3dr_2.4.2_47388536.tar.gz
The version of meta-3dr published here corresponds to the 2.4.2 release of the solo firmware

View File

@ -0,0 +1,209 @@
inherit image_types
IMAGE_BOOTLOADER ?= "u-boot"
# Handle u-boot suffixes
UBOOT_SUFFIX ?= "bin"
UBOOT_PADDING ?= "0"
UBOOT_SUFFIX_SDCARD ?= "${UBOOT_SUFFIX}"
#
# Handles i.MX mxs bootstream generation
#
# IMX Bootlets Linux bootstream
IMAGE_DEPENDS_linux.sb = "elftosb-native imx-bootlets virtual/kernel"
IMAGE_LINK_NAME_linux.sb = ""
IMAGE_CMD_linux.sb () {
kernel_bin="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
kernel_dtb="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.dtb || true`"
linux_bd_file=imx-bootlets-linux.bd-${MACHINE}
if [ `basename $kernel_bin .bin` = `basename $kernel_dtb .dtb` ]; then
# When using device tree we build a zImage with the dtb
# appended on the end of the image
linux_bd_file=imx-bootlets-linux.bd-dtb-${MACHINE}
cat $kernel_bin $kernel_dtb \
> $kernel_bin-dtb
rm -f ${KERNEL_IMAGETYPE}-${MACHINE}.bin-dtb
ln -s $kernel_bin-dtb ${KERNEL_IMAGETYPE}-${MACHINE}.bin-dtb
fi
# Ensure the file is generated
rm -f ${IMAGE_NAME}.linux.sb
elftosb -z -c $linux_bd_file -o ${IMAGE_NAME}.linux.sb
# Remove the appended file as it is only used here
rm -f $kernel_bin-dtb
}
# IMX Bootlets barebox bootstream
IMAGE_DEPENDS_barebox.mxsboot-sdcard = "elftosb-native u-boot-mxsboot-native imx-bootlets barebox"
IMAGE_CMD_barebox.mxsboot-sdcard () {
barebox_bd_file=imx-bootlets-barebox_ivt.bd-${MACHINE}
# Ensure the files are generated
rm -f ${IMAGE_NAME}.barebox.sb ${IMAGE_NAME}.barebox.mxsboot-sdcard
elftosb -f mx28 -z -c $barebox_bd_file -o ${IMAGE_NAME}.barebox.sb
mxsboot sd ${IMAGE_NAME}.barebox.sb ${IMAGE_NAME}.barebox.mxsboot-sdcard
}
# U-Boot mxsboot generation to SD-Card
UBOOT_SUFFIX_SDCARD_mxs ?= "mxsboot-sdcard"
IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-native u-boot"
IMAGE_CMD_uboot.mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \
${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard"
# Boot partition volume id
GOLDEN_VOLUME_ID ?= "GOLDEN"
# Boot partition size [in KiB]
BOOT_SPACE = "90000"
# Barebox environment size [in KiB]
BAREBOX_ENV_SPACE ?= "512"
# Set alignment to 4MB [in KiB]
IMAGE_ROOTFS_ALIGNMENT = "4096"
IMAGE_DEPENDS_sdcard = "parted-native dosfstools-native mtools-native \
virtual/kernel ${IMAGE_BOOTLOADER}"
SDCARD = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sdcard"
SDCARD_GENERATION_COMMAND_mx6 = "generate_imx_sdcard"
#
# Create an image that can by written onto a SD card using dd for use
# with i.MX SoC family
#
# External variables needed:
# ${SDCARD_ROOTFS} - the rootfs image to incorporate
# ${IMAGE_BOOTLOADER} - bootloader to use {u-boot, barebox}
#
# The disk layout used is:
#
# 0 -> IMAGE_ROOTFS_ALIGNMENT - reserved to bootloader (not partitioned)
# IMAGE_ROOTFS_ALIGNMENT -> BOOT_SPACE - kernel, dtb, squashfs
# 4MiB 96MiB
# <-----------------------> <------------>
# ------------------------ ------------ ------------------------ -------------------------------
# | IMAGE_ROOTFS_ALIGNMENT | GOLDEN_SPACE | EMPTY |
# ------------------------ ------------ ------------------------ -------------------------------
# ^ ^ ^
# | | |
# 0 4096 4MiB + 96MiB
generate_imx_sdcard () {
# Create partition table
parted -s ${SDCARD} mklabel msdos
parted -s ${SDCARD} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${GOLDEN_SPACE_ALIGNED})
parted ${SDCARD} print
# Burn bootloader
case "${IMAGE_BOOTLOADER}" in
imx-bootlets)
bberror "The imx-bootlets is not supported for i.MX based machines"
exit 1
;;
u-boot)
dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=2 skip=${UBOOT_PADDING} bs=512
;;
barebox)
dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 skip=1 bs=512
dd if=${DEPLOY_DIR_IMAGE}/bareboxenv-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 bs=512k
;;
"")
;;
*)
bberror "Unkown IMAGE_BOOTLOADER value"
exit 1
;;
esac
# Create golden partition image
GOLDEN_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
| awk '/ 1 / { print substr($4, 1, length($4 -1)) / 1024 }')
mkfs.vfat -n "${GOLDEN_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $GOLDEN_BLOCKS
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-initramfs-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
# Copy boot scripts
for item in ${BOOT_SCRIPTS}; do
src=`echo $item | awk -F':' '{ print $1 }'`
dst=`echo $item | awk -F':' '{ print $2 }'`
mcopy -i ${WORKDIR}/boot.img -s $src ::/$dst
done
# Copy device tree file
if test -n "${KERNEL_DEVICETREE}"; then
for DTS_FILE in ${KERNEL_DEVICETREE}; do
DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
if [ -e "${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
kernel_bin="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
kernel_bin_for_dtb="`readlink ${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`"
if [ $kernel_bin = $kernel_bin_for_dtb ]; then
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
fi
fi
done
fi
#Copy the squashfs
if [ -e ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ]; then
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ::/${IMAGE_BASENAME}-${MACHINE}.squashfs
else
bberror "Error, no squashfs file ${IMAGE_NAME}.rootfs.squashfs found"
exit 1
fi
#Copy the u-boot.imx
if [ -e ${DEPLOY_DIR_IMAGE}/u-boot.imx ]; then
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.imx ::/u-boot.imx
else
bberror "Error, no u-boot.imx file found"
exit 1
fi
# Burn Partition
dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
# Create the update tarball
cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ${WORKDIR}/${DTS_BASE_NAME}.dtb
cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-initramfs-${MACHINE}.bin ${WORKDIR}/${KERNEL_IMAGETYPE}
cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${WORKDIR}/${IMAGE_BASENAME}-${MACHINE}.squashfs
cp ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} ${WORKDIR}/u-boot.imx
cd ${WORKDIR}
tar -pczf ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${DATETIME}.tar.gz \
${DTS_BASE_NAME}.dtb \
${KERNEL_IMAGETYPE} \
${IMAGE_BASENAME}-${MACHINE}.squashfs \
u-boot.imx
#tarball md5sum
cd ${DEPLOY_DIR_IMAGE}
md5sum ${IMAGE_BASENAME}-${DATETIME}.tar.gz > ${IMAGE_BASENAME}-${DATETIME}.tar.gz.md5
cd ${WORKDIR}
#symlinks
ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${DATETIME}.tar.gz \
${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}.tar.gz
ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${DATETIME}.tar.gz.md5 \
${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}.tar.gz.md5
}
IMAGE_CMD_sdcard () {
if [ -z "${SDCARD_ROOTFS}" ]; then
bberror "SDCARD_ROOTFS is undefined. To use sdcard image from Freescale's BSP it needs to be defined."
exit 1
fi
# Align boot partition and calculate total SD card image size
GOLDEN_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
GOLDEN_SPACE_ALIGNED=$(expr ${GOLDEN_SPACE_ALIGNED} - ${GOLDEN_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
SDCARD_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${GOLDEN_SPACE_ALIGNED} + 1)
# Initialize a sparse file
dd if=/dev/zero of=${SDCARD} bs=1 count=0 seek=$(expr 1024 \* ${SDCARD_SIZE})
${SDCARD_GENERATION_COMMAND}
}

View File

@ -0,0 +1,18 @@
DISTRO = "3dr"
DISTRO_NAME = "3DR Poky (based on Yocto Project Reference Distro)"
DISTRO_VERSION = "1.5.1"
LOCALCONF_VERSION = "1"
LAYER_CONF_VERSION ?= "6"
include conf/distro/poky/poky.conf
#
# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
# an incompatible way. Such changes should usually be detailed in the commit
# that breaks the format and have been previously discussed on the mailing list
# with general agreement from the core team.
#
OELAYOUT_ABI = "8"
DISTRO_FEATURES_remove = " pulseaudio alsa bluetooth irda pcmcia nfs zeroconf 3g nfc x11 opengl wayland"

10
meta-3dr/conf/layer.conf Normal file
View File

@ -0,0 +1,10 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have a packages directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "3dr"
BBFILE_PATTERN_3dr := "^${LAYERDIR}/"
BBFILE_PRIORITY_3dr = "6"

View File

@ -0,0 +1,28 @@
#@TYPE: Machine
#@NAME: 3DR HDTC
#@SOC: i.MX6S
#@DESCRIPTION: Machine configuration for 3DR HDTC with 16-bit video bus
require conf/machine/include/imx6sabresd-common.inc
SOC_FAMILY = "mx6:mx6s"
MACHINE_FEATURES = "pci wifi usbgadget usbhost vfat serial"
FSL_KERNEL_DEFCONFIG = "imx6solo_solo_defconfig"
KERNEL_DEVICETREE = "imx6solo-3dr-1080p.dtb"
PREFERRED_PROVIDER_u-boot = "u-boot-imx"
UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG[sd] = "3dr_hdtc_1080p_config,sdcard"
INITRAMFS_FSTYPES ?= "cpio.gz"
KERNEL_IMAGETYPE ?= "uImage"
INITRAMFS_IMAGE_BUNDLE = "1"
USE_VT = "0"
SERIAL_CONSOLES = ""
SOLOLINK_CONFIG_DIR = "/etc"

View File

@ -0,0 +1,28 @@
#@TYPE: Machine
#@NAME: 3DR HDTC
#@SOC: i.MX6S
#@DESCRIPTION: Machine configuration for 3DR HDTC
require conf/machine/include/imx6sabresd-common.inc
SOC_FAMILY = "mx6:mx6s"
MACHINE_FEATURES = "pci wifi usbgadget usbhost vfat serial"
FSL_KERNEL_DEFCONFIG = "imx6solo_artoo_defconfig"
KERNEL_DEVICETREE = "imx6solo-3dr-artoo.dtb"
PREFERRED_PROVIDER_u-boot = "u-boot-imx"
UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG[sd] = "3dr_hdtc_artoo_config,sdcard"
INITRAMFS_FSTYPES ?= "cpio.gz"
KERNEL_IMAGETYPE ?= "uImage"
INITRAMFS_IMAGE_BUNDLE = "1"
USE_VT = "0"
SERIAL_CONSOLES = ""
SOLOLINK_CONFIG_DIR = "/etc"

View File

@ -0,0 +1,8 @@
SRC_URI = "git://git@github.com/OpenSolo/imx6-uboot.git;protocol=ssh"
SRCREV = "solo_v1.0.0"
# save UBOOT_CONFIG as separate names
do_deploy_append() {
install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}_${UBOOT_CONFIG}
}

View File

@ -0,0 +1,39 @@
DESCRIPTION = "Wireless Central Regulatory Domain Agent"
HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
DEPENDS = "python-m2crypto-native python-native libgcrypt libnl"
SRC_URI = "https://www.kernel.org/pub/software/network/crda/${BP}.tar.bz2;name=crda \
https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2013.01.11.tar.bz2;name=bin \
"
SRC_URI[crda.md5sum] = "29579185e06a75675507527243d28e5c"
SRC_URI[crda.sha256sum] = "aa8a7fe92f0765986c421a5b6768a185375ac210393df0605ee132f6754825f0"
SRC_URI[bin.md5sum] = "f137585abd5e07454932ea555b826149"
SRC_URI[bin.sha256sum] = "6eb469555eb547b22738ce7bf59ebba42138560f128085a5e238eb6c8075792e"
inherit python-dir pythonnative
# Recursive make problem
EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D}"
do_compile() {
oe_runmake all_noverify
}
do_install() {
oe_runmake install
install -d ${D}${libdir}/crda/
install -m 0644 ${WORKDIR}/wireless-regdb-2013.01.11/regulatory.bin ${D}${libdir}/crda/regulatory.bin
}
RDEPENDS_${PN} = "udev"
FILES_${PN} += "${libdir}crda/regulatory.bin \
${base_libdir}/udev/rules.d/85-regulatory.rules \
"

View File

@ -0,0 +1,23 @@
--- hostapd-2.4/src/ap/acs.c
+++ hostapd-2.4/src/ap/acs.c
@@ -661,7 +661,7 @@ acs_find_ideal_chan(struct hostapd_iface *iface)
chan->chan);
continue;
}
-
+#if 0
/* 2.4 GHz has overlapping 20 MHz channels. Include adjacent
* channel interference factor. */
if (is_24ghz_mode(iface->current_mode->mode)) {
@@ -716,7 +716,7 @@ acs_find_ideal_chan(struct hostapd_iface *iface)
tmp_bias.bias = ACS_24GHZ_PREFER_1_6_11;
bias = &tmp_bias;
}
-
+#endif
if (bias) {
factor *= bias->bias;
wpa_printf(MSG_DEBUG,
--
1.9.1

View File

@ -0,0 +1,316 @@
# Example hostapd build time configuration
#
# This file lists the configuration options that are used when building the
# hostapd binary. All lines starting with # are ignored. Configuration option
# lines must be commented out complete, if they are not to be included, i.e.,
# just setting VARIABLE=n is not disabling that variable.
#
# This file is included in Makefile, so variables like CFLAGS and LIBS can also
# be modified from here. In most cass, these lines should use += in order not
# to override previous values of the variables.
# Driver interface for Host AP driver
CONFIG_DRIVER_HOSTAP=y
# Driver interface for wired authenticator
#CONFIG_DRIVER_WIRED=y
# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
#
#CFLAGS += -I$<path to libnl include files>
#LIBS += -L$<path to libnl library files>
# Use libnl v2.0 (or 3.0) libraries.
#CONFIG_LIBNL20=y
# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CFLAGS += -I/usr/local/include
#LIBS += -L/usr/local/lib
#LIBS_p += -L/usr/local/lib
#LIBS_c += -L/usr/local/lib
# Driver interface for no driver (e.g., RADIUS server only)
#CONFIG_DRIVER_NONE=y
# IEEE 802.11F/IAPP
CONFIG_IAPP=y
# WPA2/IEEE 802.11i RSN pre-authentication
CONFIG_RSN_PREAUTH=y
# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS)
CONFIG_PEERKEY=y
# IEEE 802.11w (management frame protection)
CONFIG_IEEE80211W=y
# Integrated EAP server
CONFIG_EAP=y
# EAP Re-authentication Protocol (ERP) in integrated EAP server
CONFIG_ERP=y
# EAP-MD5 for the integrated EAP server
CONFIG_EAP_MD5=y
# EAP-TLS for the integrated EAP server
CONFIG_EAP_TLS=y
# EAP-MSCHAPv2 for the integrated EAP server
CONFIG_EAP_MSCHAPV2=y
# EAP-PEAP for the integrated EAP server
CONFIG_EAP_PEAP=y
# EAP-GTC for the integrated EAP server
CONFIG_EAP_GTC=y
# EAP-TTLS for the integrated EAP server
CONFIG_EAP_TTLS=y
# EAP-SIM for the integrated EAP server
#CONFIG_EAP_SIM=y
# EAP-AKA for the integrated EAP server
#CONFIG_EAP_AKA=y
# EAP-AKA' for the integrated EAP server
# This requires CONFIG_EAP_AKA to be enabled, too.
#CONFIG_EAP_AKA_PRIME=y
# EAP-PAX for the integrated EAP server
#CONFIG_EAP_PAX=y
# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK)
#CONFIG_EAP_PSK=y
# EAP-pwd for the integrated EAP server (secure authentication with a password)
#CONFIG_EAP_PWD=y
# EAP-SAKE for the integrated EAP server
#CONFIG_EAP_SAKE=y
# EAP-GPSK for the integrated EAP server
#CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
#CONFIG_EAP_GPSK_SHA256=y
# EAP-FAST for the integrated EAP server
# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed
# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g.,
# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions.
#CONFIG_EAP_FAST=y
# Wi-Fi Protected Setup (WPS)
CONFIG_WPS=y
# Enable UPnP support for external WPS Registrars
CONFIG_WPS_UPNP=y
# Enable WPS support with NFC config method
#CONFIG_WPS_NFC=y
# EAP-IKEv2
#CONFIG_EAP_IKEV2=y
# Trusted Network Connect (EAP-TNC)
#CONFIG_EAP_TNC=y
# EAP-EKE for the integrated EAP server
#CONFIG_EAP_EKE=y
# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y
# RADIUS authentication server. This provides access to the integrated EAP
# server from external hosts using RADIUS.
#CONFIG_RADIUS_SERVER=y
# Build IPv6 support for RADIUS operations
CONFIG_IPV6=y
# IEEE Std 802.11r-2008 (Fast BSS Transition)
#CONFIG_IEEE80211R=y
# Use the hostapd's IEEE 802.11 authentication (ACL), but without
# the IEEE 802.11 Management capability (e.g., FreeBSD/net80211)
#CONFIG_DRIVER_RADIUS_ACL=y
# IEEE 802.11n (High Throughput) support
CONFIG_IEEE80211N=y
# Wireless Network Management (IEEE Std 802.11v-2011)
# Note: This is experimental and not complete implementation.
#CONFIG_WNM=y
# IEEE 802.11ac (Very High Throughput) support
#CONFIG_IEEE80211AC=y
# Remove debugging code that is printing out debug messages to stdout.
# This can be used to reduce the size of the hostapd considerably if debugging
# code is not needed.
#CONFIG_NO_STDOUT_DEBUG=y
# Add support for writing debug log to a file: -f /tmp/hostapd.log
# Disabled by default.
#CONFIG_DEBUG_FILE=y
# Add support for sending all debug messages (regardless of debug verbosity)
# to the Linux kernel tracing facility. This helps debug the entire stack by
# making it easy to record everything happening from the driver up into the
# same file, e.g., using trace-cmd.
#CONFIG_DEBUG_LINUX_TRACING=y
# Remove support for RADIUS accounting
#CONFIG_NO_ACCOUNTING=y
# Remove support for RADIUS
#CONFIG_NO_RADIUS=y
# Remove support for VLANs
#CONFIG_NO_VLAN=y
# Enable support for fully dynamic VLANs. This enables hostapd to
# automatically create bridge and VLAN interfaces if necessary.
#CONFIG_FULL_DYNAMIC_VLAN=y
# Use netlink-based kernel API for VLAN operations instead of ioctl()
# Note: This requires libnl 3.1 or newer.
#CONFIG_VLAN_NETLINK=y
# Remove support for dumping internal state through control interface commands
# This can be used to reduce binary size at the cost of disabling a debugging
# option.
#CONFIG_NO_DUMP_STATE=y
# Enable tracing code for developer debugging
# This tracks use of memory allocations and other registrations and reports
# incorrect use with a backtrace of call (or allocation) location.
#CONFIG_WPA_TRACE=y
# For BSD, comment out these.
#LIBS += -lexecinfo
#LIBS_p += -lexecinfo
#LIBS_c += -lexecinfo
# Use libbfd to get more details for developer debugging
# This enables use of libbfd to get more detailed symbols for the backtraces
# generated by CONFIG_WPA_TRACE=y.
#CONFIG_WPA_TRACE_BFD=y
# For BSD, comment out these.
#LIBS += -lbfd -liberty -lz
#LIBS_p += -lbfd -liberty -lz
#LIBS_c += -lbfd -liberty -lz
# hostapd depends on strong random number generation being available from the
# operating system. os_get_random() function is used to fetch random data when
# needed, e.g., for key generation. On Linux and BSD systems, this works by
# reading /dev/urandom. It should be noted that the OS entropy pool needs to be
# properly initialized before hostapd is started. This is important especially
# on embedded devices that do not have a hardware random number generator and
# may by default start up with minimal entropy available for random number
# generation.
#
# As a safety net, hostapd is by default trying to internally collect
# additional entropy for generating random data to mix in with the data
# fetched from the OS. This by itself is not considered to be very strong, but
# it may help in cases where the system pool is not initialized properly.
# However, it is very strongly recommended that the system pool is initialized
# with enough entropy either by using hardware assisted random number
# generator or by storing state over device reboots.
#
# hostapd can be configured to maintain its own entropy store over restarts to
# enhance random number generation. This is not perfect, but it is much more
# secure than using the same sequence of random numbers after every reboot.
# This can be enabled with -e<entropy file> command line option. The specified
# file needs to be readable and writable by hostapd.
#
# If the os_get_random() is known to provide strong random data (e.g., on
# Linux/BSD, the board in question is known to have reliable source of random
# data from /dev/urandom), the internal hostapd random pool can be disabled.
# This will save some in binary size and CPU use. However, this should only be
# considered for builds that are known to be used on devices that meet the
# requirements described above.
#CONFIG_NO_RANDOM_POOL=y
# Select TLS implementation
# openssl = OpenSSL (default)
# gnutls = GnuTLS
# internal = Internal TLSv1 implementation (experimental)
# none = Empty template
#CONFIG_TLS=openssl
# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
# can be enabled to get a stronger construction of messages when block ciphers
# are used.
#CONFIG_TLSV11=y
# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2)
# can be enabled to enable use of stronger crypto algorithms.
#CONFIG_TLSV12=y
# If CONFIG_TLS=internal is used, additional library and include paths are
# needed for LibTomMath. Alternatively, an integrated, minimal version of
# LibTomMath can be used. See beginning of libtommath.c for details on benefits
# and drawbacks of this option.
#CONFIG_INTERNAL_LIBTOMMATH=y
#ifndef CONFIG_INTERNAL_LIBTOMMATH
#LTM_PATH=/usr/src/libtommath-0.39
#CFLAGS += -I$(LTM_PATH)
#LIBS += -L$(LTM_PATH)
#LIBS_p += -L$(LTM_PATH)
#endif
# At the cost of about 4 kB of additional binary size, the internal LibTomMath
# can be configured to include faster routines for exptmod, sqr, and div to
# speed up DH and RSA calculation considerably
#CONFIG_INTERNAL_LIBTOMMATH_FAST=y
# Interworking (IEEE 802.11u)
# This can be used to enable functionality to improve interworking with
# external networks.
#CONFIG_INTERWORKING=y
# Hotspot 2.0
#CONFIG_HS20=y
# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file
#CONFIG_SQLITE=y
# Testing options
# This can be used to enable some testing options (see also the example
# configuration file) that are really useful only for testing clients that
# connect to this hostapd. These options allow, for example, to drop a
# certain percentage of probe requests or auth/(re)assoc frames.
#
#CONFIG_TESTING_OPTIONS=y
# Automatic Channel Selection
# This will allow hostapd to pick the channel automatically when channel is set
# to "acs_survey" or "0". Eventually, other ACS algorithms can be added in
# similar way.
#
# Automatic selection is currently only done through initialization, later on
# we hope to do background checks to keep us moving to more ideal channels as
# time goes by. ACS is currently only supported through the nl80211 driver and
# your driver must have survey dump capability that is filled by the driver
# during scanning.
#
# You can customize the ACS survey algorithm with the hostapd.conf variable
# acs_num_scans.
#
# Supported ACS drivers:
# * ath9k
# * ath5k
# * ath10k
#
# For more details refer to:
# http://wireless.kernel.org/en/users/Documentation/acs
#
CONFIG_ACS=y

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
#!/bin/sh
DAEMON=/usr/sbin/hostapd
NAME=hostapd
DESC="HOSTAP Daemon"
ARGS="/etc/hostapd.conf -B"
test -f $DAEMON || exit 0
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

View File

@ -0,0 +1,53 @@
From 03182a61d51cf0d2458932c449e75c5a31976011 Mon Sep 17 00:00:00 2001
From: Allan Matthew <amatthew@3dr.com>
Date: Thu, 19 Nov 2015 13:45:27 -0800
Subject: [PATCH] Use solo's mac for disassoc checking
---
src/ap/drv_callbacks.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index a0adc67..5bcf3b7 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -418,14 +418,35 @@ void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr)
ap_free_sta(hapd, sta);
}
-
void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr)
{
+ char buf[20];
+ char addr_str[20];
+
struct sta_info *sta = ap_get_sta(hapd, addr);
if (!sta || !hapd->conf->disassoc_low_ack)
return;
+ /* Try and read the /log/3dr-pairing.conf file */
+ FILE *fd = fopen("/log/3dr-pairing.conf","r");
+ if(fd) {
+ if( fgets(buf, sizeof(buf) - 1, fd) == buf ) {
+ /* This should be in the form [88:dc:96:33:f0:67], so
+ * get rid of the first and last characters when doing any
+ * comparison */
+ memset(addr_str, 0, sizeof(addr_str));
+ sprintf(addr_str, MACSTR, MAC2STR(addr));
+ if(!strncmp((const char*)(buf+1), (const char*)addr_str, 17)) {
+ hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
+ HOSTAPD_LEVEL_INFO, "Would disassoc but solo addr");
+ fclose(fd);
+ return;
+ }
+ }
+ fclose(fd);
+ }
+
hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "disconnected due to excessive "
"missing ACKs");
--
2.1.2

View File

@ -0,0 +1,46 @@
HOMEPAGE = "http://hostap.epitest.fi"
SECTION = "kernel/userland"
LICENSE = "GPLv2 | BSD"
LIC_FILES_CHKSUM = "file://README;md5=4d53178f44d4b38418a4fa8de365e11c"
DEPENDS = "libnl openssl"
DESCRIPTION = "User space daemon for extended IEEE 802.11 management"
inherit update-rc.d
INITSCRIPT_NAME = "hostapd"
DEFAULT_PREFERENCE = "-1"
SRC_URI = " \
http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
file://defconfig \
file://init \
file://hostapd.conf \
file://0001-Disable-overlapping-channel-interference-factor-calc.patch;patchdir=.. \
file://solo_mac.patch;patchdir=.. \
"
S = "${WORKDIR}/hostapd-${PV}/hostapd"
do_configure() {
install -m 0644 ${WORKDIR}/defconfig ${S}/.config
}
do_compile() {
export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3"
make
}
do_install() {
install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/hostapd.conf ${D}${sysconfdir}
install -m 0755 ${S}/hostapd ${D}${sbindir}
install -m 0755 ${S}/hostapd_cli ${D}${sbindir}
install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
}
CONFFILES_${PN} += "${sysconfdir}/hostapd.conf"
SRC_URI[md5sum] = "04578f3f2c3eb1bec1adf30473813912"
SRC_URI[sha256sum] = "6fe0eb6bd1c9cbd24952ece8586b6f7bd14ab358edfda99794e79b9b9dbd657f"

View File

@ -0,0 +1,22 @@
SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
wireless devices. It supports almost all new drivers that have been added \
to the kernel recently. "
HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
SECTION = "base"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
DEPENDS = "libnl pkgconfig"
SRC_URI = "http://www.kernel.org/pub/software/network/iw/${P}.tar.gz \
"
SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7"
SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9c8f33d"
EXTRA_OEMAKE = ""
do_install() {
oe_runmake DESTDIR=${D} install
}

View File

@ -0,0 +1,87 @@
DESCRIPTION = "A Client for Wi-Fi Protected Access (WPA)."
HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/"
BUGTRACKER = "http://hostap.epitest.fi/bugz/"
SECTION = "network"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=36b27801447e0662ee0138d17fe93880 \
file://README;md5=7f393579f8b109fe91f3b9765d26c7d3 "
DEPENDS = "gnutls dbus libnl"
RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli"
inherit systemd
SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
SYSTEMD_AUTO_ENABLE = "disable"
SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
file://defconfig \
file://wpa-supplicant.sh \
file://wpa_supplicant.conf \
file://99_wpa_supplicant "
S = "${WORKDIR}/wpa_supplicant-${PV}"
PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
FILES_${PN} += "${datadir}/dbus-1/system-services/*"
CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
do_configure () {
install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
}
export EXTRA_CFLAGS = "${CFLAGS}"
export BINDIR = "${sbindir}"
do_compile () {
unset CFLAGS CPPFLAGS CXXFLAGS
sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules
oe_runmake -C wpa_supplicant
}
do_install () {
install -d ${D}${sbindir}
install -m 755 wpa_supplicant/wpa_supplicant ${D}${sbindir}
install -m 755 wpa_supplicant/wpa_cli ${D}${sbindir}
install -d ${D}${bindir}
install -m 755 wpa_supplicant/wpa_passphrase ${D}${bindir}
install -d ${D}${docdir}/wpa_supplicant
install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant
install -d ${D}${sysconfdir}
install -m 600 ${WORKDIR}/wpa_supplicant.conf ${D}${sysconfdir}/wpa_supplicant.conf
install -d ${D}${sysconfdir}/network/if-pre-up.d/
install -d ${D}${sysconfdir}/network/if-post-down.d/
install -d ${D}${sysconfdir}/network/if-down.d/
install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant
cd ${D}${sysconfdir}/network/ && \
ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant
install -d ${D}/${sysconfdir}/dbus-1/system.d
install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d
install -d ${D}/${datadir}/dbus-1/system-services
install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services
if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}/${systemd_unitdir}/system
install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_unitdir}/system
fi
install -d ${D}/etc/default/volatiles
install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
}
pkg_postinst_wpa-supplicant () {
# If we're offline, we don't need to do this.
if [ "x$D" != "x" ]; then
exit 0
fi
killall -q -HUP dbus-daemon || true
}

View File

@ -0,0 +1 @@
d root root 0700 /var/run/wpa_supplicant none

View File

@ -0,0 +1,497 @@
# Example wpa_supplicant build time configuration
#
# This file lists the configuration options that are used when building the
# hostapd binary. All lines starting with # are ignored. Configuration option
# lines must be commented out complete, if they are not to be included, i.e.,
# just setting VARIABLE=n is not disabling that variable.
#
# This file is included in Makefile, so variables like CFLAGS and LIBS can also
# be modified from here. In most cases, these lines should use += in order not
# to override previous values of the variables.
# Uncomment following two lines and fix the paths if you have installed OpenSSL
# or GnuTLS in non-default location
#CFLAGS += -I/usr/local/openssl/include
#LIBS += -L/usr/local/openssl/lib
# Some Red Hat versions seem to include kerberos header files from OpenSSL, but
# the kerberos files are not in the default include path. Following line can be
# used to fix build issues on such systems (krb5.h not found).
#CFLAGS += -I/usr/include/kerberos
# Driver interface for generic Linux wireless extensions
# Note: WEXT is deprecated in the current Linux kernel version and no new
# functionality is added to it. nl80211-based interface is the new
# replacement for WEXT and its use allows wpa_supplicant to properly control
# the driver to improve existing functionality like roaming and to support new
# functionality.
CONFIG_DRIVER_WEXT=y
# Driver interface for Linux drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
#
#CFLAGS += -I$<path to libnl include files>
#LIBS += -L$<path to libnl library files>
# Use libnl v2.0 (or 3.0) libraries.
#CONFIG_LIBNL20=y
# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CFLAGS += -I/usr/local/include
#LIBS += -L/usr/local/lib
#LIBS_p += -L/usr/local/lib
#LIBS_c += -L/usr/local/lib
# Driver interface for Windows NDIS
#CONFIG_DRIVER_NDIS=y
#CFLAGS += -I/usr/include/w32api/ddk
#LIBS += -L/usr/local/lib
# For native build using mingw
#CONFIG_NATIVE_WINDOWS=y
# Additional directories for cross-compilation on Linux host for mingw target
#CFLAGS += -I/opt/mingw/mingw32/include/ddk
#LIBS += -L/opt/mingw/mingw32/lib
#CC=mingw32-gcc
# By default, driver_ndis uses WinPcap for low-level operations. This can be
# replaced with the following option which replaces WinPcap calls with NDISUIO.
# However, this requires that WZC is disabled (net stop wzcsvc) before starting
# wpa_supplicant.
# CONFIG_USE_NDISUIO=y
# Driver interface for wired Ethernet drivers
CONFIG_DRIVER_WIRED=y
# Driver interface for the Broadcom RoboSwitch family
#CONFIG_DRIVER_ROBOSWITCH=y
# Driver interface for no driver (e.g., WPS ER only)
#CONFIG_DRIVER_NONE=y
# Solaris libraries
#LIBS += -lsocket -ldlpi -lnsl
#LIBS_c += -lsocket
# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is
# included)
CONFIG_IEEE8021X_EAPOL=y
# EAP-MD5
CONFIG_EAP_MD5=y
# EAP-MSCHAPv2
CONFIG_EAP_MSCHAPV2=y
# EAP-TLS
CONFIG_EAP_TLS=y
# EAL-PEAP
CONFIG_EAP_PEAP=y
# EAP-TTLS
CONFIG_EAP_TTLS=y
# EAP-FAST
# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed
# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g.,
# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions.
#CONFIG_EAP_FAST=y
# EAP-GTC
CONFIG_EAP_GTC=y
# EAP-OTP
CONFIG_EAP_OTP=y
# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
#CONFIG_EAP_SIM=y
# EAP-PSK (experimental; this is _not_ needed for WPA-PSK)
#CONFIG_EAP_PSK=y
# EAP-pwd (secure authentication using only a password)
#CONFIG_EAP_PWD=y
# EAP-PAX
#CONFIG_EAP_PAX=y
# LEAP
CONFIG_EAP_LEAP=y
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
#CONFIG_EAP_AKA=y
# EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used).
# This requires CONFIG_EAP_AKA to be enabled, too.
#CONFIG_EAP_AKA_PRIME=y
# Enable USIM simulator (Milenage) for EAP-AKA
#CONFIG_USIM_SIMULATOR=y
# EAP-SAKE
#CONFIG_EAP_SAKE=y
# EAP-GPSK
#CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
#CONFIG_EAP_GPSK_SHA256=y
# EAP-TNC and related Trusted Network Connect support (experimental)
#CONFIG_EAP_TNC=y
# Wi-Fi Protected Setup (WPS)
CONFIG_WPS=y
# Enable WPS external registrar functionality
#CONFIG_WPS_ER=y
# Disable credentials for an open network by default when acting as a WPS
# registrar.
#CONFIG_WPS_REG_DISABLE_OPEN=y
# Enable WPS support with NFC config method
#CONFIG_WPS_NFC=y
# EAP-IKEv2
#CONFIG_EAP_IKEV2=y
# EAP-EKE
#CONFIG_EAP_EKE=y
# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y
# Smartcard support (i.e., private key on a smartcard), e.g., with openssl
# engine.
CONFIG_SMARTCARD=y
# PC/SC interface for smartcards (USIM, GSM SIM)
# Enable this if EAP-SIM or EAP-AKA is included
#CONFIG_PCSC=y
# Support HT overrides (disable HT/HT40, mask MCS rates, etc.)
#CONFIG_HT_OVERRIDES=y
# Support VHT overrides (disable VHT, mask MCS rates, etc.)
#CONFIG_VHT_OVERRIDES=y
# Development testing
#CONFIG_EAPOL_TEST=y
# Select control interface backend for external programs, e.g, wpa_cli:
# unix = UNIX domain sockets (default for Linux/*BSD)
# udp = UDP sockets using localhost (127.0.0.1)
# udp6 = UDP IPv6 sockets using localhost (::1)
# named_pipe = Windows Named Pipe (default for Windows)
# udp-remote = UDP sockets with remote access (only for tests systems/purpose)
# udp6-remote = UDP IPv6 sockets with remote access (only for tests purpose)
# y = use default (backwards compatibility)
# If this option is commented out, control interface is not included in the
# build.
CONFIG_CTRL_IFACE=y
# Include support for GNU Readline and History Libraries in wpa_cli.
# When building a wpa_cli binary for distribution, please note that these
# libraries are licensed under GPL and as such, BSD license may not apply for
# the resulting binary.
#CONFIG_READLINE=y
# Include internal line edit mode in wpa_cli. This can be used as a replacement
# for GNU Readline to provide limited command line editing and history support.
#CONFIG_WPA_CLI_EDIT=y
# Remove debugging code that is printing out debug message to stdout.
# This can be used to reduce the size of the wpa_supplicant considerably
# if debugging code is not needed. The size reduction can be around 35%
# (e.g., 90 kB).
#CONFIG_NO_STDOUT_DEBUG=y
# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save
# 35-50 kB in code size.
#CONFIG_NO_WPA=y
# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support
# This option can be used to reduce code size by removing support for
# converting ASCII passphrases into PSK. If this functionality is removed, the
# PSK can only be configured as the 64-octet hexstring (e.g., from
# wpa_passphrase). This saves about 0.5 kB in code size.
#CONFIG_NO_WPA_PASSPHRASE=y
# Disable scan result processing (ap_mode=1) to save code size by about 1 kB.
# This can be used if ap_scan=1 mode is never enabled.
#CONFIG_NO_SCAN_PROCESSING=y
# Select configuration backend:
# file = text file (e.g., wpa_supplicant.conf; note: the configuration file
# path is given on command line, not here; this option is just used to
# select the backend that allows configuration files to be used)
# winreg = Windows registry (see win_example.reg for an example)
CONFIG_BACKEND=file
# Remove configuration write functionality (i.e., to allow the configuration
# file to be updated based on runtime configuration changes). The runtime
# configuration can still be changed, the changes are just not going to be
# persistent over restarts. This option can be used to reduce code size by
# about 3.5 kB.
#CONFIG_NO_CONFIG_WRITE=y
# Remove support for configuration blobs to reduce code size by about 1.5 kB.
#CONFIG_NO_CONFIG_BLOBS=y
# Select program entry point implementation:
# main = UNIX/POSIX like main() function (default)
# main_winsvc = Windows service (read parameters from registry)
# main_none = Very basic example (development use only)
#CONFIG_MAIN=main
# Select wrapper for operating system and C library specific functions
# unix = UNIX/POSIX like systems (default)
# win32 = Windows systems
# none = Empty template
#CONFIG_OS=unix
# Select event loop implementation
# eloop = select() loop (default)
# eloop_win = Windows events and WaitForMultipleObject() loop
#CONFIG_ELOOP=eloop
# Should we use poll instead of select? Select is used by default.
#CONFIG_ELOOP_POLL=y
# Should we use epoll instead of select? Select is used by default.
#CONFIG_ELOOP_EPOLL=y
# Select layer 2 packet implementation
# linux = Linux packet socket (default)
# pcap = libpcap/libdnet/WinPcap
# freebsd = FreeBSD libpcap
# winpcap = WinPcap with receive thread
# ndis = Windows NDISUIO (note: requires CONFIG_USE_NDISUIO=y)
# none = Empty template
#CONFIG_L2_PACKET=linux
# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS)
CONFIG_PEERKEY=y
# IEEE 802.11w (management frame protection), also known as PMF
# Driver support is also needed for IEEE 802.11w.
#CONFIG_IEEE80211W=y
# Select TLS implementation
# openssl = OpenSSL (default)
# gnutls = GnuTLS
# internal = Internal TLSv1 implementation (experimental)
# none = Empty template
#CONFIG_TLS=openssl
# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
# can be enabled to get a stronger construction of messages when block ciphers
# are used. It should be noted that some existing TLS v1.0 -based
# implementation may not be compatible with TLS v1.1 message (ClientHello is
# sent prior to negotiating which version will be used)
#CONFIG_TLSV11=y
# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2)
# can be enabled to enable use of stronger crypto algorithms. It should be
# noted that some existing TLS v1.0 -based implementation may not be compatible
# with TLS v1.2 message (ClientHello is sent prior to negotiating which version
# will be used)
#CONFIG_TLSV12=y
# If CONFIG_TLS=internal is used, additional library and include paths are
# needed for LibTomMath. Alternatively, an integrated, minimal version of
# LibTomMath can be used. See beginning of libtommath.c for details on benefits
# and drawbacks of this option.
#CONFIG_INTERNAL_LIBTOMMATH=y
#ifndef CONFIG_INTERNAL_LIBTOMMATH
#LTM_PATH=/usr/src/libtommath-0.39
#CFLAGS += -I$(LTM_PATH)
#LIBS += -L$(LTM_PATH)
#LIBS_p += -L$(LTM_PATH)
#endif
# At the cost of about 4 kB of additional binary size, the internal LibTomMath
# can be configured to include faster routines for exptmod, sqr, and div to
# speed up DH and RSA calculation considerably
#CONFIG_INTERNAL_LIBTOMMATH_FAST=y
# Include NDIS event processing through WMI into wpa_supplicant/wpasvc.
# This is only for Windows builds and requires WMI-related header files and
# WbemUuid.Lib from Platform SDK even when building with MinGW.
#CONFIG_NDIS_EVENTS_INTEGRATED=y
#PLATFORMSDKLIB="/opt/Program Files/Microsoft Platform SDK/Lib"
# Add support for old DBus control interface
# (fi.epitest.hostap.WPASupplicant)
#CONFIG_CTRL_IFACE_DBUS=y
# Add support for new DBus control interface
# (fi.w1.hostap.wpa_supplicant1)
#CONFIG_CTRL_IFACE_DBUS_NEW=y
# Add introspection support for new DBus control interface
#CONFIG_CTRL_IFACE_DBUS_INTRO=y
# Add support for loading EAP methods dynamically as shared libraries.
# When this option is enabled, each EAP method can be either included
# statically (CONFIG_EAP_<method>=y) or dynamically (CONFIG_EAP_<method>=dyn).
# Dynamic EAP methods are build as shared objects (eap_*.so) and they need to
# be loaded in the beginning of the wpa_supplicant configuration file
# (see load_dynamic_eap parameter in the example file) before being used in
# the network blocks.
#
# Note that some shared parts of EAP methods are included in the main program
# and in order to be able to use dynamic EAP methods using these parts, the
# main program must have been build with the EAP method enabled (=y or =dyn).
# This means that EAP-TLS/PEAP/TTLS/FAST cannot be added as dynamic libraries
# unless at least one of them was included in the main build to force inclusion
# of the shared code. Similarly, at least one of EAP-SIM/AKA must be included
# in the main build to be able to load these methods dynamically.
#
# Please also note that using dynamic libraries will increase the total binary
# size. Thus, it may not be the best option for targets that have limited
# amount of memory/flash.
#CONFIG_DYNAMIC_EAP_METHODS=y
# IEEE Std 802.11r-2008 (Fast BSS Transition)
#CONFIG_IEEE80211R=y
# Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt)
#CONFIG_DEBUG_FILE=y
# Send debug messages to syslog instead of stdout
#CONFIG_DEBUG_SYSLOG=y
# Set syslog facility for debug messages
#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
# Add support for sending all debug messages (regardless of debug verbosity)
# to the Linux kernel tracing facility. This helps debug the entire stack by
# making it easy to record everything happening from the driver up into the
# same file, e.g., using trace-cmd.
#CONFIG_DEBUG_LINUX_TRACING=y
# Add support for writing debug log to Android logcat instead of standard
# output
#CONFIG_ANDROID_LOG=y
# Enable privilege separation (see README 'Privilege separation' for details)
#CONFIG_PRIVSEP=y
# Enable mitigation against certain attacks against TKIP by delaying Michael
# MIC error reports by a random amount of time between 0 and 60 seconds
#CONFIG_DELAYED_MIC_ERROR_REPORT=y
# Enable tracing code for developer debugging
# This tracks use of memory allocations and other registrations and reports
# incorrect use with a backtrace of call (or allocation) location.
#CONFIG_WPA_TRACE=y
# For BSD, uncomment these.
#LIBS += -lexecinfo
#LIBS_p += -lexecinfo
#LIBS_c += -lexecinfo
# Use libbfd to get more details for developer debugging
# This enables use of libbfd to get more detailed symbols for the backtraces
# generated by CONFIG_WPA_TRACE=y.
#CONFIG_WPA_TRACE_BFD=y
# For BSD, uncomment these.
#LIBS += -lbfd -liberty -lz
#LIBS_p += -lbfd -liberty -lz
#LIBS_c += -lbfd -liberty -lz
# wpa_supplicant depends on strong random number generation being available
# from the operating system. os_get_random() function is used to fetch random
# data when needed, e.g., for key generation. On Linux and BSD systems, this
# works by reading /dev/urandom. It should be noted that the OS entropy pool
# needs to be properly initialized before wpa_supplicant is started. This is
# important especially on embedded devices that do not have a hardware random
# number generator and may by default start up with minimal entropy available
# for random number generation.
#
# As a safety net, wpa_supplicant is by default trying to internally collect
# additional entropy for generating random data to mix in with the data fetched
# from the OS. This by itself is not considered to be very strong, but it may
# help in cases where the system pool is not initialized properly. However, it
# is very strongly recommended that the system pool is initialized with enough
# entropy either by using hardware assisted random number generator or by
# storing state over device reboots.
#
# wpa_supplicant can be configured to maintain its own entropy store over
# restarts to enhance random number generation. This is not perfect, but it is
# much more secure than using the same sequence of random numbers after every
# reboot. This can be enabled with -e<entropy file> command line option. The
# specified file needs to be readable and writable by wpa_supplicant.
#
# If the os_get_random() is known to provide strong random data (e.g., on
# Linux/BSD, the board in question is known to have reliable source of random
# data from /dev/urandom), the internal wpa_supplicant random pool can be
# disabled. This will save some in binary size and CPU use. However, this
# should only be considered for builds that are known to be used on devices
# that meet the requirements described above.
#CONFIG_NO_RANDOM_POOL=y
# IEEE 802.11n (High Throughput) support (mainly for AP mode)
CONFIG_IEEE80211N=y
# IEEE 802.11ac (Very High Throughput) support (mainly for AP mode)
# (depends on CONFIG_IEEE80211N)
#CONFIG_IEEE80211AC=y
# Wireless Network Management (IEEE Std 802.11v-2011)
# Note: This is experimental and not complete implementation.
#CONFIG_WNM=y
# Interworking (IEEE 802.11u)
# This can be used to enable functionality to improve interworking with
# external networks (GAS/ANQP to learn more about the networks and network
# selection based on available credentials).
#CONFIG_INTERWORKING=y
# Hotspot 2.0
#CONFIG_HS20=y
# Disable roaming in wpa_supplicant
#CONFIG_NO_ROAMING=y
# AP mode operations with wpa_supplicant
# This can be used for controlling AP mode operations with wpa_supplicant. It
# should be noted that this is mainly aimed at simple cases like
# WPA2-Personal while more complex configurations like WPA2-Enterprise with an
# external RADIUS server can be supported with hostapd.
#CONFIG_AP=y
# P2P (Wi-Fi Direct)
# This can be used to enable P2P support in wpa_supplicant. See README-P2P for
# more information on P2P operations.
#CONFIG_P2P=y
# Enable TDLS support
#CONFIG_TDLS=y
# Wi-Fi Direct
# This can be used to enable Wi-Fi Direct extensions for P2P using an external
# program to control the additional information exchanges in the messages.
#CONFIG_WIFI_DISPLAY=y
# Autoscan
# This can be used to enable automatic scan support in wpa_supplicant.
# See wpa_supplicant.conf for more information on autoscan usage.
#
# Enabling directly a module will enable autoscan support.
# For exponential module:
#CONFIG_AUTOSCAN_EXPONENTIAL=y
# For periodic module:
#CONFIG_AUTOSCAN_PERIODIC=y
# Password (and passphrase, etc.) backend for external storage
# These optional mechanisms can be used to add support for storing passwords
# and other secrets in external (to wpa_supplicant) location. This allows, for
# example, operating system specific key storage to be used
#
# External password backend for testing purposes (developer use)
#CONFIG_EXT_PASSWORD_TEST=y

View File

@ -0,0 +1,85 @@
#!/bin/sh
WPA_SUP_BIN="/usr/sbin/wpa_supplicant"
WPA_SUP_PNAME="wpa_supplicant"
WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$IFACE.pid"
WPA_SUP_OPTIONS="-B -P $WPA_SUP_PIDFILE -i $IFACE"
VERBOSITY=0
if [ -s "$IF_WPA_CONF" ]; then
WPA_SUP_CONF="-c $IF_WPA_CONF"
else
exit 0
fi
if [ ! -x "$WPA_SUP_BIN" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: binaries not executable or missing from $WPA_SUP_BIN"
fi
exit 1
fi
if [ "$MODE" = "start" ] ; then
# driver type of interface, defaults to wext when undefined
if [ -s "/etc/wpa_supplicant/driver.$IFACE" ]; then
IF_WPA_DRIVER=$(cat "/etc/wpa_supplicant/driver.$IFACE")
elif [ -z "$IF_WPA_DRIVER" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: wpa-driver not provided, using \"wext\""
fi
IF_WPA_DRIVER="wext"
fi
# if we have passed the criteria, start wpa_supplicant
if [ -n "$WPA_SUP_CONF" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: $WPA_SUP_BIN $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER"
fi
start-stop-daemon --start --quiet \
--name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \
-- $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER
fi
# if the interface socket exists, then wpa_supplicant was invoked successfully
if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: ctrl_interface socket located at $WPA_COMMON_CTRL_IFACE/$IFACE"
fi
exit 0
fi
elif [ "$MODE" = "stop" ]; then
if [ -f "$WPA_SUP_PIDFILE" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: terminating $WPA_SUP_PNAME daemon"
fi
start-stop-daemon --stop --quiet \
--name $WPA_SUP_PNAME --pidfile $WPA_SUP_PIDFILE
if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
rm -f $WPA_COMMON_CTRL_IFACE/$IFACE
fi
if [ -f "$WPA_SUP_PIDFILE" ]; then
rm -f $WPA_SUP_PIDFILE
fi
fi
fi
exit 0

View File

@ -0,0 +1,6 @@
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
device_name=Solo
manufacturer=3D Robotics
model_name=Solo

View File

@ -0,0 +1,6 @@
require wpa-supplicant-2.4.inc
PR = "r1"
SRC_URI[md5sum] = "f0037dbe03897dcaf2ad2722e659095d"
SRC_URI[sha256sum] = "058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122"

View File

@ -0,0 +1,12 @@
SUMMARY = "3DR Logo"
LICENSE = "CLOSED"
SRC_URI = "file://3dr.fb.gz"
FILES_${PN} = "/"
do_install () {
install -d ${D}/
gzip -c ${WORKDIR}/3dr.fb > ${WORKDIR}/3dr.fb.gz
install -m 0644 ${WORKDIR}/3dr.fb.gz ${D}/
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://defconfig \
"

View File

@ -0,0 +1,130 @@
include recipes-core/images/core-image-base.bb
# created from image_types_fsl; creates additional logging partition
inherit image_types_3dr
PV = "0.0.0-test"
do_rootfs[depends] += "virtual/kernel:do_bundle_initramfs"
IMAGE_FEATURES += " \
debug-tweaks \
package-management \
"
# Add extra image features
EXTRA_IMAGE_FEATURES += " \
ssh-server-openssh \
"
IMAGE_INSTALL += " \
fsl-rc-local \
gst-fsl-plugin \
gst-plugins-base \
gst-plugins-base-app \
gst-plugins-good-udp \
gst-plugins-good-rtp \
gst-plugins-bad-mpegtsdemux \
libudev \
python-enum34 \
python-subprocess \
python-datetime \
python-json \
python-pip \
python-numpy \
python-posix-ipc \
python-monotonic \
openssh \
iptables \
iw \
wireless-tools \
hostap-daemon \
dnsmasq \
sololink \
sololink-python \
rpm \
util-linux \
artoo-firmware \
e2fsprogs-e2fsck \
dosfstools \
nano \
vim \
openssh-sftp-server \
3dr-splash \
persist-logs \
rsync \
stm32loader \
compat-wireless-all \
"
update_config_files() {
# update /etc/network/interfaces
mv ${IMAGE_ROOTFS}/etc/network/interfaces-controller \
${IMAGE_ROOTFS}/etc/network/interfaces
rm ${IMAGE_ROOTFS}/etc/network/interfaces-solo
# AP disabled by default, Station enabled
sed -i 's/^ApEnable=.*/ApEnable=True/' ${IMAGE_ROOTFS}/etc/sololink.orig
sed -i 's/^StationEnable=.*/StationEnable=False/' ${IMAGE_ROOTFS}/etc/sololink.orig
# Create golden config files
mv ${IMAGE_ROOTFS}/etc/hostapd.conf ${IMAGE_ROOTFS}/etc/hostapd.orig
mv ${IMAGE_ROOTFS}/etc/wpa_supplicant.conf ${IMAGE_ROOTFS}/etc/wpa_supplicant.orig
# Change hostname so solo and controller are different
echo "3dr_controller" > ${IMAGE_ROOTFS}/etc/hostname
#Filesystem available over USB OTG port
echo "g_acm_ms file=/dev/mmcblk0p4" >> ${IMAGE_ROOTFS}/etc/modules
#Clear out the leases file on boot
sed -i '/test \-d \/var\/lib\/misc\/.*/a \ rm -f \/var\/lib\/misc\/dnsmasq\.leases' ${IMAGE_ROOTFS}/etc/init.d/dnsmasq
# Mount logging partition
mkdir ${IMAGE_ROOTFS}/log
echo "/dev/mmcblk0p4 /log auto defaults 0 2" >> ${IMAGE_ROOTFS}/etc/fstab
# Blacklist the Golden partition from udev
echo "/dev/mmcblk0p1" >> ${IMAGE_ROOTFS}/etc/udev/mount.blacklist
# Put a "Version" file in the root partition
echo "${PV}" >> ${IMAGE_ROOTFS}/VERSION
echo ${IMAGE_NAME} >> ${IMAGE_ROOTFS}/VERSION
#Check the artoo version at boot and update if necessary
#Always run this; it is what clears the "updating system" screen
echo "#!/bin/sh" > ${IMAGE_ROOTFS}/etc/rcS.d/S60updateArtoo.sh
echo "/usr/bin/checkArtooAndUpdate.py" >> ${IMAGE_ROOTFS}/etc/rcS.d/S60updateArtoo.sh
chmod +x ${IMAGE_ROOTFS}/etc/rcS.d/S60updateArtoo.sh
#1MB max rx socket buffer for video
echo "net.core.rmem_max=1048576" >> ${IMAGE_ROOTFS}/etc/sysctl.conf
#Password is TjSDBkAu
sed 's%^root:[^:]*:%root:I8hkLIWAASD4Q:%' \
< ${IMAGE_ROOTFS}/etc/shadow \
> ${IMAGE_ROOTFS}/etc/shadow.new;
mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow ;
#pubkey for updater
mkdir -p ${IMAGE_ROOTFS}/home/root/.ssh
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDW+YxPnz9h+qMXWh52H2DwvUwbm4u7LiPcEGp0DtfdEmciCQJDzklNvY0tQgy+xv1C66O4SKUQiNbcWDvW2+5+RsQT2FtzjD9jxnLwZf/O1dK4p8G9sW773/1/z+UnTKDRjuVvuFXcu7a6UjQZ7AYaQZhFRoelJtK5ztmZG7/cv8CYzxBX4EDIY1iah3R3pLNksOVbG+UaOnHPqlHewuAXwkdVzBjb8vuFdXsAaDAD6doECSVhqoaOHysjjrQov+AqKKcMmfZCDbyd6Zl9G8g7q6M7lCNqwUaIA3rK6K3t4pyS0t4oUeiI/mxFjf8S4nLOmWCaYcNCAvWE1uQeniS3" >> ${IMAGE_ROOTFS}/home/root/.ssh/authorized_keys
#syslog is started in rcS (sololink.bb); the rc6.d entry is left as-is
rm ${IMAGE_ROOTFS}/etc/rc[0-5].d/[SK]*syslog
#this was started as S41 (sololink.bb)
rm ${IMAGE_ROOTFS}/etc/rcS.d/S40networking
# pick controller's syslog.conf
rm ${IMAGE_ROOTFS}/etc/syslog.conf.busybox.solo
mv ${IMAGE_ROOTFS}/etc/syslog.conf.busybox.controller \
${IMAGE_ROOTFS}/etc/syslog.conf.busybox
# pick controller's logrotate-sololink.conf
rm ${IMAGE_ROOTFS}/etc/logrotate-sololink.conf.solo
mv ${IMAGE_ROOTFS}/etc/logrotate-sololink.conf.controller \
${IMAGE_ROOTFS}/etc/logrotate-sololink.conf
# the private key corresponding to this public key is added to solo root's ~/.ssh directory in 3dr-solo.bb
# this is used by dataFlashMAVLink-to-artoo.py (sololink.bb)
MAV_DF_RSA_PUB_KEY="
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs1jMmFt8YXua73/trYpRPBmyqABEsSWGlH2qdYEMG6A/8jzgnbV2ECfYUBWQ+Q/qNjkOLV6VpR6WRN/u0bTAdAC+Zwtt3Qxhuby4gXyMPP/6BUkjgCv4ryI9E4QaFzfVHg2wYxhaEIXGfeF4yTqS0M/MpttewQl9ho6ZIe1giaFYCFayX18MBKbeWv88wfiViDvkaANdX/aClY2/YdxDXY+CXXzxcWFqG+8GCOQKfDwYtqcdAnc0DohnBjjf3VpXhNylay91gb23AVSsUaA+6eynufmkdJutbqbNn/uHTq+aidc6bDuLZKYz4ulRYgeqp6aH/7gZPdHZQPHb//Bed root@3dr_solo
"
echo "$MAV_DF_RSA_PUB_KEY" >>${IMAGE_ROOTFS}/home/root/.ssh/authorized_keys
}
ROOTFS_POSTPROCESS_COMMAND += "update_config_files"
IMAGE_FSTYPES = "squashfs sdcard"
export IMAGE_BASENAME = "3dr-controller"

View File

@ -0,0 +1,30 @@
include recipes-core/images/core-image-base.bb
IMAGE_FEATURES += "debug-tweaks"
SOC_EXTRA_IMAGE_FEATURES ?= "package-management"
# Add extra image features
EXTRA_IMAGE_FEATURES += " \
${SOC_EXTRA_IMAGE_FEATURES} \
ssh-server-openssh \
"
IMAGE_INSTALL += " \
packagegroup-fsl-gstreamer \
crda \
python-pip \
openssh \
hostap-daemon \
iw \
wireless-tools \
opkg \
i2c-tools \
pciutils \
dpkg \
dhcp-server \
sololink \
"
export IMAGE_BASENAME = "3dr-image"

View File

@ -0,0 +1,7 @@
require recipes-core/images/core-image-minimal.bb
IMAGE_INSTALL += "3dr-initscript parted mtd-utils mtd-utils-ubifs e2fsprogs-mke2fs util-linux dosfstools e2fsprogs-e2fsck"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
export IMAGE_BASENAME = "3dr-initramfs"

View File

@ -0,0 +1,157 @@
include recipes-core/images/core-image-base.bb
# created from image_types_fsl; creates additional logging partition
inherit image_types_3dr
PV = "0.0.0-test"
do_rootfs[depends] += "virtual/kernel:do_bundle_initramfs"
IMAGE_FEATURES += " \
debug-tweaks \
package-management \
"
# Add extra image features
EXTRA_IMAGE_FEATURES += " \
ssh-server-openssh \
"
IMAGE_INSTALL += " \
fsl-rc-local \
gst-fsl-plugin \
gst-plugins-base \
gst-plugins-base-app \
gst-plugins-good-udp \
gst-plugins-good-rtp \
gst-plugins-bad-mpegtsmux \
libudev \
python-enum34 \
python-subprocess \
python-datetime \
python-json \
python-pip \
python-numpy \
python-posix-ipc \
python-monotonic \
openssh \
iptables \
iw \
wireless-tools \
hostap-daemon \
dnsmasq \
sololink \
sololink-python \
shotmanager \
rpm \
util-linux \
pixhawk-firmware \
gimbal-firmware \
e2fsprogs-e2fsck \
dosfstools \
nano \
vim \
openssh-sftp-server \
persist-logs \
rsync \
compat-wireless-all \
"
update_config_files() {
# update /etc/network/interfaces
mv ${IMAGE_ROOTFS}/etc/network/interfaces-solo \
${IMAGE_ROOTFS}/etc/network/interfaces
rm ${IMAGE_ROOTFS}/etc/network/interfaces-controller
# AP disabled by default, Station enabled
sed -i 's/^ApEnable=.*/ApEnable=False/' ${IMAGE_ROOTFS}/etc/sololink.orig
sed -i 's/^StationEnable=.*/StationEnable=True/' ${IMAGE_ROOTFS}/etc/sololink.orig
# Create golden config files
mv ${IMAGE_ROOTFS}/etc/hostapd.conf ${IMAGE_ROOTFS}/etc/hostapd.orig
mv ${IMAGE_ROOTFS}/etc/wpa_supplicant.conf ${IMAGE_ROOTFS}/etc/wpa_supplicant.orig
# Solo-specific startup
ln -s ../init.d/pixhawk ${IMAGE_ROOTFS}/etc/rcS.d/S60pixhawk
ln -s ../init.d/updateGimbal.sh ${IMAGE_ROOTFS}/etc/rcS.d/S62updateGimbal.sh
# Change hostname so solo and controller are different
echo "3dr_solo" > ${IMAGE_ROOTFS}/etc/hostname
#Filesystem available over USB OTG port
echo "g_acm_ms file=/dev/mmcblk0p4" >> ${IMAGE_ROOTFS}/etc/modules
# Mount logging partition
mkdir ${IMAGE_ROOTFS}/log
echo "/dev/mmcblk0p4 /log auto defaults 0 2" >> ${IMAGE_ROOTFS}/etc/fstab
# Blacklist the Golden partition from udev
echo "/dev/mmcblk0p1" >> ${IMAGE_ROOTFS}/etc/udev/mount.blacklist
# Put a "Version" file in the root partition
echo "${PV}" >> ${IMAGE_ROOTFS}/VERSION
echo ${IMAGE_NAME} >> ${IMAGE_ROOTFS}/VERSION
#Password is TjSDBkAu
sed 's%^root:[^:]*:%root:I8hkLIWAASD4Q:%' \
< ${IMAGE_ROOTFS}/etc/shadow \
> ${IMAGE_ROOTFS}/etc/shadow.new;
mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow ;
#pubkey for updater
mkdir -p ${IMAGE_ROOTFS}/home/root/.ssh
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDW+YxPnz9h+qMXWh52H2DwvUwbm4u7LiPcEGp0DtfdEmciCQJDzklNvY0tQgy+xv1C66O4SKUQiNbcWDvW2+5+RsQT2FtzjD9jxnLwZf/O1dK4p8G9sW773/1/z+UnTKDRjuVvuFXcu7a6UjQZ7AYaQZhFRoelJtK5ztmZG7/cv8CYzxBX4EDIY1iah3R3pLNksOVbG+UaOnHPqlHewuAXwkdVzBjb8vuFdXsAaDAD6doECSVhqoaOHysjjrQov+AqKKcMmfZCDbyd6Zl9G8g7q6M7lCNqwUaIA3rK6K3t4pyS0t4oUeiI/mxFjf8S4nLOmWCaYcNCAvWE1uQeniS3" >> ${IMAGE_ROOTFS}/home/root/.ssh/authorized_keys
#syslog is started in rcS (sololink.bb); the rc6.d entry is left as-is
rm ${IMAGE_ROOTFS}/etc/rc[0-5].d/[SK]*syslog
#this was started as S41 (sololink.bb)
rm ${IMAGE_ROOTFS}/etc/rcS.d/S40networking
# pick solo's syslog.conf
rm ${IMAGE_ROOTFS}/etc/syslog.conf.busybox.controller
mv ${IMAGE_ROOTFS}/etc/syslog.conf.busybox.solo \
${IMAGE_ROOTFS}/etc/syslog.conf.busybox
# pick solo's logrotate-sololink.conf
rm ${IMAGE_ROOTFS}/etc/logrotate-sololink.conf.controller
mv ${IMAGE_ROOTFS}/etc/logrotate-sololink.conf.solo \
${IMAGE_ROOTFS}/etc/logrotate-sololink.conf
# the public key corresponding to this private key is added to authorized_keys file in 3dr-controller.bb
# this is used by dataFlashMAVLink-to-artoo.py (sololink.bb)
ID_XFER_FILEPATH="${IMAGE_ROOTFS}/home/root/.ssh/id_rsa-mav-df-xfer"
cat >>$ID_XFER_FILEPATH <<'EOF'
-----BEGIN RSA PRIVATE KEY-----
MIIEpgIBAAKCAQEArNYzJhbfGF7mu9/7a2KUTwZsqgARLElhpR9qnWBDBugP/I84
J21dhAn2FAVkPkP6jY5Di1elaUelkTf7tG0wHQAvmcLbd0MYbm8uIF8jDz/+gVJI
4Ar+K8iPROEGhc31R4NsGMYWhCFxn3heMk6ktDPzKbbXsEJfYaOmSHtYImhWAhWs
l9fDASm3lr/PMH4lYg75GgDXV/2gpWNv2HcQ12Pgl188XFhahvvBgjkCnw8GLanH
QJ3NA6IZwY4391aV4TcpWsvdYG9twFUrFGgPunsp7n5pHSbrW6mzZ/7h06vmonXO
mw7i2SmM+LpUWIHqqemh/+4GT3R2UDx2//wXnQIDAQABAoIBAQCDvkaAuyBU8EnK
XYHEqgDId+oubxyn+Etw1RCsYyrUQeGlrvmrvAZzVjB3tGBjwedjLVS5CxbvuAgx
OE4piq0I/hJKjyhAsSkXTLIJRNtxjWMO6kzYUijJ8PecFjalmYdken3UKHITR3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LBq59gwPtS1dgFNJCpvBeU4w3i8qcJ
-----END RSA PRIVATE KEY-----
EOF
chmod 600 "$ID_XFER_FILEPATH"
MAV_DF_RSA_PUB_KEY="
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs1jMmFt8YXua73/trYpRPBmyqABEsSWGlH2qdYEMG6A/8jzgnbV2ECfYUBWQ+Q/qNjkOLV6VpR6WRN/u0bTAdAC+Zwtt3Qxhuby4gXyMPP/6BUkjgCv4ryI9E4QaFzfVHg2wYxhaEIXGfeF4yTqS0M/MpttewQl9ho6ZIe1giaFYCFayX18MBKbeWv88wfiViDvkaANdX/aClY2/YdxDXY+CXXzxcWFqG+8GCOQKfDwYtqcdAnc0DohnBjjf3VpXhNylay91gb23AVSsUaA+6eynufmkdJutbqbNn/uHTq+aidc6bDuLZKYz4ulRYgeqp6aH/7gZPdHZQPHb//Bed root@3dr_solo
"
ID_XFER_PUB_FILEPATH="${IMAGE_ROOTFS}/home/root/.ssh/id_rsa-mav-df-xfer.pub"
echo $MAV_DF_RSA_PUB_KEY >"$ID_XFER_PUB_FILEPATH"
}
ROOTFS_POSTPROCESS_COMMAND += "update_config_files"
IMAGE_FSTYPES = "squashfs sdcard"
export IMAGE_BASENAME = "3dr-solo"

View File

@ -0,0 +1,24 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver nl80211
wpa-conf /etc/wpa_supplicant.conf
pre-up sleep 1; # workaround for race; sometimes phy0 is not yet there
pre-up iw phy0 set distance 1800
iface wlan0-ap inet static
address 10.1.1.1
netmask 255.255.255.0
pre-up sleep 1; # workaround for race; sometimes phy0 is not yet there
pre-up iw phy0 set distance 1800
post-up iptables -t nat -A POSTROUTING -j MASQUERADE
post-up echo 1 > /proc/sys/net/ipv4/ip_forward

View File

@ -0,0 +1,26 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
iface wlan0 inet dhcp
udhcpc_opts -x hostname:solo -T 1
wireless_mode managed
wireless_essid any
wpa-driver nl80211
wpa-conf /etc/wpa_supplicant.conf
pre-up sleep 1; # XXX workaround for race; sometimes phy0 is not yet there
pre-up iw phy0 set distance 1800
post-up route add default gw 10.1.1.1 wlan0 # XXX assumes net number
iface wlan0-ap inet static
address 10.1.1.1
netmask 255.255.255.0
pre-up sleep 1; # workaround for race; sometimes phy0 is not yet there
pre-up iw phy0 set distance 1800
post-up iptables -t nat -A POSTROUTING -j MASQUERADE
post-up echo 1 > /proc/sys/net/ipv4/ip_forward

View File

@ -0,0 +1,10 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PRINC := "${@int(PRINC) + 2}"
SRC_URI_append = " file://interfaces-controller \
file://interfaces-solo"
do_install_append() {
install -m 0644 ${WORKDIR}/interfaces-controller ${D}${sysconfdir}/network/
install -m 0644 ${WORKDIR}/interfaces-solo ${D}${sysconfdir}/network/
}

View File

@ -0,0 +1,11 @@
DESCRIPTION = "The /init script for 3dr initramfs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://init"
FILES_${PN} = "/"
do_install() {
install -m 0755 ${WORKDIR}/init ${D}/init
}

View File

@ -0,0 +1,375 @@
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
ROOT_MOUNT="/rootfs/"
# Copied from initramfs-framework. The core of this script probably should be
# turned into initramfs-framework modules to reduce duplication.
udev_daemon() {
OPTIONS="/sbin/udev/udevd /sbin/udevd /lib/udev/udevd /lib/systemd/systemd-udevd"
for o in $OPTIONS; do
if [ -x "$o" ]; then
echo $o
return 0
fi
done
return 1
}
_UDEV_DAEMON=`udev_daemon`
early_setup() {
mkdir -p /proc
mkdir -p /sys
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs none /dev
# mknod -m 600 /dev/initctl p
# support modular kernel
modprobe isofs 2> /dev/null
mkdir -p /run
mkdir -p /var/run
#$_UDEV_DAEMON --daemon
#udevadm trigger --action=add
}
read_args() {
[ -z "$CMDLINE" ] && CMDLINE=`cat /proc/cmdline`
for arg in $CMDLINE; do
optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
case $arg in
root=*)
ROOT_DEVICE=$optarg ;;
factoryreset=*)
FORCE_FACTORY_RESET=$optarg;;
esac
done
}
boot_live_root() {
# Watches the udev event queue, and exits if all current events are handled
#udevadm settle --timeout=3 --quiet
#killall "${_UDEV_DAEMON##*/}" 2>/dev/null
mount -n --move /proc ${ROOT_MOUNT}/proc
mount -n --move /sys ${ROOT_MOUNT}/sys
mount -n --move /dev ${ROOT_MOUNT}/dev
echo "Switching root"
cd $ROOT_MOUNT
exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init
}
fatal() {
echo $1 >$CONSOLE
echo >$CONSOLE
exec sh
}
create_partitions()
{
echo "Creating partitions"
parted -s -- /dev/mmcblk0 unit MB mkpart primary fat32 100 200
parted -s -- /dev/mmcblk0 unit MB mkpart primary ext2 200 300
parted -s -- /dev/mmcblk0 unit MB mkpart primary ext2 300 -1
echo "Formatting LATEST"
mkfs.vfat /dev/mmcblk0p2 -n LATEST
echo "Formatting RWFS"
mkfs.ext3 /dev/mmcblk0p3 -L RWFS -q
echo "Formatting LOG"
mkfs.ext3 /dev/mmcblk0p4 -L LOG -q
}
remove_partitions()
{
parted -s -- /dev/mmcblk0 rm 2
parted -s -- /dev/mmcblk0 rm 3
parted -s -- /dev/mmcblk0 rm 4
}
setScreenUpdating() {
#Set up the Artoo serial port, send a slip-encoded message
#indicating that we've started the update.
stty -F /dev/ttymxc1 115200 cs8 -cstopb -parity -crtscts
echo -en "\xC0\x12\x00\xC0" > /dev/ttymxc1
}
setLedUpdating() {
#Blink the LED crazy fast
echo timer >> /sys/class/leds/user2/trigger
echo 50 >> /sys/class/leds/user2/delay_on
echo 50 >> /sys/class/leds/user2/delay_off
}
setLedDone() {
echo none >> /sys/class/leds/user2/trigger
}
checkRwfs() {
fsck.ext3 -y /dev/mmcblk0p3
if [ $? -ge 4 ]; then
echo "Error detected on RWFS partition"
setLedUpdating
umount /dev/mmcblk0p3
mkfs.ext3 /dev/mmcblk0p3 -L RWFS -q
setLedDone
fi
}
checkLog() {
fsck.ext3 -y /dev/mmcblk0p4
if [ $? -ge 4 ]; then
echo "Error detected on LOG partition, repartitioning"
setLedUpdating
umount /dev/mmcblk0p4
parted -s -- /dev/mmcblk0 rm 4
parted -s -- /dev/mmcblk0 unit MB mkpart primary ext2 300 -1
mkfs.ext3 /dev/mmcblk0p4 -L LOG -q
setLedDone
# this should not trigger an "update done" screen
mkdir -f /mnt/log/updates
mount /dev/mmcblk0p4 /mnt/log
mkdir /mnt/log/updates
touch /mnt/log/updates/READY
umount /mnt/log
fi
}
mount_and_boot() {
mkdir $ROOT_MOUNT
mknod /dev/loop0 b 7 0 2>/dev/null
mkdir -p /mnt/ro_rootfs
mkdir -p /mnt/rw_rootfs
mkdir -p /mnt/boot
#Check the boot partitions
fsck.vfat -y /dev/mmcblk0p1
if [ $? -ge 4 ]; then
echo "Error detected on GOLDEN partition"
fi
fsck.vfat -y /dev/mmcblk0p2
if [ $? -ge 4 ]; then
echo "Error detected on LATEST partition"
fi
#Mount the boot partition
echo "Using $ROOT_DEVICE as the boot partition"
mount -o ro $ROOT_DEVICE /mnt/boot
#Mount the read-only squashfs partition
mount -o ro /mnt/boot/*.squashfs /mnt/ro_rootfs
#Check the rw partition
checkRwfs
#mount the read-write partition
mount /dev/mmcblk0p3 /mnt/rw_rootfs
#Mount the aufs union partition
mount -t aufs -o br=/mnt/rw_rootfs:/mnt/ro_rootfs none $ROOT_MOUNT
#Move all those mount points
mkdir -p $ROOT_MOUNT/mnt/rootfs.ro $ROOT_MOUNT/mnt/rootfs.rw $ROOT_MOUNT/mnt/boot
mount --move /mnt/boot $ROOT_MOUNT/mnt/boot
mount --move /mnt/ro_rootfs $ROOT_MOUNT/mnt/rootfs.ro
mount --move /mnt/rw_rootfs $ROOT_MOUNT/mnt/rootfs.rw
# boot the image
boot_live_root
}
factory_reset() {
setScreenUpdating
setLedUpdating
#delete partions 2-4,
#Recreate new partitions
remove_partitions
create_partitions
#Reflash u-boot if its file exists
mkdir -p /mnt/golden
mount /dev/mmcblk0p1 /mnt/golden
if [ -e /mnt/golden/u-boot.imx ]; then
dd if=/mnt/golden/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2
fi
setLedDone
umount /mnt/golden
sync
/sbin/shutdown -r -n now
}
echo "******************** INITRD ********************"
early_setup
read_args
[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
#if there is no LATEST partition, assume that we need to create
#the RWFS and LOG partitions as well
if [ ! -e /dev/mmcblk0p2 ]; then
echo "No LATEST partition, creating partition scheme"
#Set the LED to let the user know its formatting
setScreenUpdating
setLedUpdating
create_partitions
setLedDone
else
#If there was a factory reset request from u-boot, handle it here
echo "Factory reset: " $FORCE_FACTORY_RESET
if [ $FORCE_FACTORY_RESET == 1 ]; then
echo "Factory reset from GPIO request"
factory_reset
fi
checkLog
echo "Checking for an update..."
#See if there is an update file we should be using
mkdir /mnt/log
mount /dev/mmcblk0p4 /mnt/log
if [ -e /mnt/log/updates/UPDATE ]; then
echo "Update requested checking for update file"
rm -f /mnt/log/updates/READY
sync
setScreenUpdating
setLedUpdating
for file in $(find /mnt/log/updates/ -type f -name "*.tar.gz" | sort); do
echo "Found file $file".
latestFile=$file
done
#Is there an update file?
if [ -z $latestFile ]; then
echo "No update tarball, restarting"
rm /mnt/log/updates/UPDATE
echo "No update tarball" >> /mnt/log/updates/UPDATEFAILED
setLedDone
sync
/sbin/shutdown -r -n now
fi
#Check the MD5sum of the update tarball
if [ ! -e ${latestFile}.md5 ]; then
echo "No MD5 file for update tarball, removing and restarting"
rm $latestFile
rm /mnt/log/updates/UPDATE
echo "MD5 Missing" >> /mnt/log/updates/UPDATEFAILED
setLedDone
sync
/sbin/shutdown -r -n now
fi
cd /mnt/log/updates
md5res=`md5sum -c ${latestFile}.md5 | awk '{print $2}'`
if [ $md5res == 'OK' ]; then
echo "MD5 OK, proceeding"
else
echo "MD5 failure, removing file and rebooting"
rm $latestFile
rm ${latestFile}.md5
rm /mnt/log/updates/UPDATE
echo "MD5 Failed" >> /mnt/log/updates/UPDATEFAILED
setLedDone
sync
/sbin/shutdown -r -n now
fi
cd ~/
#Mount the LATEST partition and overwrite everything in it
echo "Formatting LATEST"
mkfs.vfat /dev/mmcblk0p2 -n LATEST
echo "Updating LATEST with $latestFile"
mkdir /mnt/latest
mount /dev/mmcblk0p2 /mnt/latest
tar -xf $latestFile -C /mnt/latest/
#if there is a u-boot.imx, flash it to the SD card
if [ -e /mnt/latest/u-boot.imx ]; then
dd if=/mnt/latest/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2
fi
#We're all done here
rm /mnt/log/updates/UPDATE
# Check and see if theres a settings reset also requested
if [ -e /mnt/log/updates/RESETSETTINGS ]; then
echo "Settings reset also requested."
#Unmount active partitions, delete partions 3-4,
#Recreate new partitions 3 and 4
umount /mnt/log /mnt/latest
parted -s -- /dev/mmcblk0 rm 3
parted -s -- /dev/mmcblk0 rm 4
parted -s -- /dev/mmcblk0 unit MB mkpart primary ext2 200 300
parted -s -- /dev/mmcblk0 unit MB mkpart primary ext2 300 -1
mkfs.ext3 /dev/mmcblk0p3 -L RWFS -q
mkfs.ext3 /dev/mmcblk0p4 -L LOG -q
fi
echo "Done updating, restarting"
setLedDone
sync
/sbin/shutdown -r -n now
elif [ -e /mnt/log/updates/FACTORYRESET ]; then
echo "Factory reset requested."
umount /mnt/log
factory_reset
elif [ -e /mnt/log/updates/RESETSETTINGS ]; then
echo "Settings reset requested."
#Set the LED to let the user know its formatting
setScreenUpdating
setLedUpdating
#Unmount active partitions, delete partions 3-4,
#Recreate new partitions 3 and 4
umount /mnt/log
parted -s -- /dev/mmcblk0 rm 3
parted -s -- /dev/mmcblk0 rm 4
parted -s -- /dev/mmcblk0 unit MB mkpart primary ext2 200 300
parted -s -- /dev/mmcblk0 unit MB mkpart primary ext2 300 -1
mkfs.ext3 /dev/mmcblk0p3 -L RWFS -q
mkfs.ext3 /dev/mmcblk0p4 -L LOG -q
setLedDone
sync
/sbin/shutdown -r -n now
else
echo "No update available, booting."
fi
umount /mnt/log
fi
#Boot the squashfs
mount_and_boot

View File

@ -0,0 +1,36 @@
# This configuration file lists filesystem objects that should get verified
# during startup and be created if missing.
#
# Every line must either be a comment starting with #
# or a definition of format:
# <type> <owner> <group> <mode> <path> <linksource>
# where the items are separated by whitespace !
#
# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
#
# A linking example:
# l root root 0777 /var/test /tmp/testfile
# f root root 0644 /var/test none
#
# Understanding links:
# When populate-volatile is to verify/create a directory or file, it will first
# check it's existence. If a link is found to exist in the place of the target,
# the path of the target is replaced with the target the link points to.
# Thus, if a link is in the place to be verified, the object will be created
# in the place the link points to instead.
# This explains the order of "link before object" as in the example above, where
# a link will be created at /var/test pointing to /tmp/testfile and due to this
# link the file defined as /var/test will actually be created as /tmp/testfile.
d root root 1777 /run/lock none
d root root 1777 /var/volatile/tmp none
l root root 1777 /var/lock /run/lock
l root root 0755 /var/log /log
l root root 0755 /var/run /run
l root root 1777 /var/tmp /var/volatile/tmp
l root root 1777 /tmp /var/tmp
d root root 0755 /var/lock/subsys none
f root root 0664 /var/log/wtmp none
f root root 0664 /var/run/utmp none
l root root 0644 /etc/resolv.conf /var/run/resolv.conf
f root root 0644 /var/run/resolv.conf none
d root root 0644 /log/solo/dataflash none

View File

@ -0,0 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://volatiles \
"

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

View File

@ -0,0 +1,37 @@
/*
* pslash - a lightweight framebuffer splashscreen for embedded devices.
*
* Copyright (c) 2012 sleep(5) ltd
* Author: Tomas Frydrych <tomas@sleepfive.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _HAVE_PSPLASH_COLORS_H
#define _HAVE_PSPLASH_COLORS_H
/* This is the overall background color */
//#define PSPLASH_BACKGROUND_COLOR 0xFF,0xFF,0xFF
#define PSPLASH_BACKGROUND_COLOR 0x00, 0x00, 0x00
/* This is the color of any text output */
#define PSPLASH_TEXT_COLOR 0x6d,0x6d,0x70
/* This is the color of the progress bar indicator */
#define PSPLASH_BAR_COLOR 0xFF, 0xFF, 0xFF
//#define PSPLASH_BAR_COLOR 0x6d,0x6d,0x70
/* This is the color of the progress bar background */
//#define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1
#define PSPLASH_BAR_BACKGROUND_COLOR 0x00, 0x00, 0x00
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -0,0 +1,26 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DEPENDS += "gdk-pixbuf-native"
PRINC = "8"
SRC_URI += "file://psplash-colors.h \
file://psplash-bar-img.png"
# NB: this is only for the main logo image; if you add multiple images here,
# poky will build multiple psplash packages with 'outsuffix' in name for
# each of these ...
SPLASH_IMAGES = "file://psplash-poky-img.png;outsuffix=default"
# The core psplash recipe is only designed to deal with modifications to the
# 'logo' image; we need to change the bar image too, since we are changing
# colors
do_configure_append () {
cd ${S}
cp ../psplash-colors.h ./
# strip the -img suffix from the bar png -- we could just store the
# file under that suffix-less name, but that would make it confusing
# for anyone updating the assets
cp ../psplash-bar-img.png ./psplash-bar.png
./make-image-header.sh ./psplash-bar.png BAR
}

View File

@ -0,0 +1,52 @@
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:3:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevel 2 is multi-user.
# Runlevel 3 is STANDBY (controller/solo not paired).
# Runlevel 4 is READY or FLIGHT (all flight code running).
# Runlevel 5 is MAINTENANCE.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin
TOP:345:respawn:proc_top /log/3dr-top.log
PAIR:345:respawn:pair_solo.py
TEMP:345:respawn:log_temp
DSYN:4:respawn:dataFlashMAVLink-to-artoo.py
DFL:4:respawn:dataflash_logger
RCRX:4:respawn:pixrc
VID:4:respawn:vidlaunch
MAV:4:respawn:telem_forwarder
API:4:respawn:run_shotmanager.sh
RSSI:4:respawn:rssi_send
LOCK:345:once:unlock
CLK:2345:respawn:clock_sync
2:2345:respawn:/sbin/getty 115200 ttyGS0 vt100
BNK1:3:once:`echo timer >> /sys/class/leds/user2/trigger`
BNK2:45:once:`echo none >> /sys/class/leds/user2/trigger; echo 1 >> /sys/class/leds/user2/brightness`

View File

@ -0,0 +1,50 @@
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:3:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevel 2 is multi-user.
# Runlevel 3 is STANDBY (controller/solo not paired).
# Runlevel 4 is READY or FLIGHT (all flight code running).
# Runlevel 5 is MAINTENANCE.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin
BLNK:2345:once:echo heartbeat > /sys/class/leds/user2/trigger
SPSC:3:once:zcat /3dr.fb.gz > /dev/fb0
SRVY:3:once:survey_log
TOP:345:respawn:proc_top /log/3dr-top.log
RCTX:345:respawn:stm32
PAIR:345:respawn:pair_server.py
APP:4:respawn:app_server.py
TEMP:345:respawn:log_temp
WIFI:4:respawn:logRCUp.sh
STRM:4:respawn:app_streamer
HDMI:4:respawn:hdmiout
TLM:4:respawn:telem_ctrl
TLG:4:respawn:tlog

View File

@ -0,0 +1,15 @@
#!/bin/bash
#
if grep -sq ttymxc0 /proc/cmdline; then
/sbin/getty -L ttymxc0 115200 vt100
elif grep -sq ttymxc1 /proc/cmdline; then
/sbin/getty -L ttymxc1 115200 vt100
elif grep -sq ttymxc2 /proc/cmdline; then
/sbin/getty -L ttymxc2 115200 vt100
elif grep -sq ttymxc3 /proc/cmdline; then
/sbin/getty -L ttymxc3 115200 vt100
elif grep -sq ttymxc4 /proc/cmdline; then
/sbin/getty -L ttymxc4 115200 vt100
else
sleep 100000
fi

View File

@ -0,0 +1 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

View File

@ -0,0 +1,16 @@
DESCRIPTION = "backport of Python 3.4's enum package"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://enum/LICENSE;md5=0a97a53a514564c20efd7b2e8976c87e"
PR = "r0"
SRCNAME = "enum34"
SRC_URI = "http://pypi.python.org/packages/source/e/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "f31c81947ff8e54ec0eb162633d134ce"
SRC_URI[sha256sum] = "865506c22462236b3a2e87a7d9587633e18470e7a93a79b594791de2d31e9bc8"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
DEPENDS += " python-pip "

View File

@ -0,0 +1,27 @@
DESCRIPTION = "An implementation of time.monotonic() for Python 2 & < 3.3"
HOMEPAGE = "https://github.com/adtd/monotonic"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
PR = "r0"
SRCNAME = "monotonic"
SRC_URI = "http://pypi.python.org/packages/source/m/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "2f77ba5a56051b0442b1c74fd05dafb5"
SRC_URI[sha256sum] = "2bc780a16024427cb4bfbfff77ed328484cf6937a787cc50055b83b13b653e74"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
#inherit distutils
# DEPENDS_default: python-pip
DEPENDS += " \
python-pip \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
"

View File

@ -0,0 +1,33 @@
DESCRIPTION = "POSIX IPC primitives (semaphores, shared memory and message queues) for Python"
HOMEPAGE = "http://semanchuk.com/philip/posix_ipc/"
SECTION = "devel/python"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d92bb5439aee694c0a87bfb51579e37b"
PR = "r0"
SRCNAME = "posix_ipc"
SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
# 0.9.8
#SRC_URI[md5sum] = "f3e78df4ab4e0f43ea04ef5c53563970"
#SRC_URI[sha256sum] = "271446eb133efb7410eb51265807aa54e0acb8eb7c2abcf027e51b4cb36d36dd"
# 0.9.9
SRC_URI[md5sum] = "63f56900aa5e843990e66e7c5bfbf882"
SRC_URI[sha256sum] = "b3b7e464ebfb524bfe50861067d7fadaa801a76c1975014c1955cc32b3f9f41e"
S = "${WORKDIR}/${SRCNAME}-${PV}"
#inherit setuptools
inherit distutils
# DEPENDS_default: python-pip
DEPENDS += " \
python-pip \
"
# RDEPENDS_default:
RDEPENDS_${PN} += " \
"

View File

@ -0,0 +1,20 @@
SUMMARY = "A Python Parsing Module"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://pyparsing.py;beginline=3;endline=23;md5=06277c41c36d17c011da1050c730a193"
SRCNAME = "pyparsing"
SRC_URI = "https://pypi.python.org/packages/source/p/pyparsing/pyparsing-${PV}.tar.gz"
SRC_URI[md5sum] = "37adec94104b98591507218bc82e7c31"
SRC_URI[sha256sum] = "0007cd3f008eba4a203f1f6b4b133ddc352552c8808b694c88c23db56416e4e4"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
# avoid "error: option --single-version-externally-managed not recognized"
DISTUTILS_INSTALL_ARGS = "--root=${D} \
--prefix=${prefix} \
--install-lib=${PYTHON_SITEPACKAGES_DIR} \
--install-data=${datadir}"

View File

@ -0,0 +1,27 @@
DESCRIPTION = "Serial Port Support for Python"
SECTION = "devel/python"
LICENSE = "PSF"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c557c64905dac5b725980b9505bf8d7b"
SRCNAME = "pyserial"
PR = "ml4"
SRC_URI = "${SOURCEFORGE_MIRROR}/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
# FIXME might stop packaging serialwin32 and serialjava files
RDEPENDS_${PN} = "\
python-fcntl \
python-io \
python-stringold \
"
# avoid "error: option --single-version-externally-managed not recognized"
DISTUTILS_INSTALL_ARGS = "--root=${D} \
--prefix=${prefix} \
--install-lib=${PYTHON_SITEPACKAGES_DIR} \
--install-data=${datadir}"
SRC_URI[md5sum] = "794506184df83ef2290de0d18803dd11"
SRC_URI[sha256sum] = "3542ec0838793e61d6224e27ff05e8ce4ba5a5c5cc4ec5c6a3e8d49247985477"

View File

@ -0,0 +1,13 @@
DESCRIPTION = "Non-interactive ssh password auth"
HOMEPAGE = "http://sshpass.sourceforge.net/"
SECTION = "console/network"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "${SOURCEFORGE_MIRROR}/sshpass/sshpass-${PV}.tar.gz"
INC_PR = "r0"
inherit autotools

View File

@ -0,0 +1,6 @@
PR = "${INC_PR}.0"
require sshpass.inc
SRC_URI[md5sum] = "c52d65fdee0712af6f77eb2b60974ac7"
SRC_URI[sha256sum] = "c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e"

View File

@ -0,0 +1,10 @@
# see "man logrotate" for details
# rotate messages, and keep 20 versions.
create
missingok
rotate 20
nodateext
/var/log/messages { }
/var/log/kern.log { }

View File

@ -0,0 +1,14 @@
--- a/syslog.busybox 2015-11-12 11:13:23.000000000 -0800
+++ b/syslog.busybox 2015-11-12 11:13:04.000000000 -0800
@@ -54,7 +54,11 @@
case "$1" in
start)
echo -n "Starting syslogd/klogd: "
+ if [ -f /usr/sbin/logrotate -a -f /var/log/messages ]; then
+ logrotate -f /etc/logrotate-syslog.conf -s /dev/null
+ fi
start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS
+ usleep 10000
start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n
echo "done"
;;

View File

@ -0,0 +1,13 @@
# This configuration file is used by the busybox syslog init script,
# /etc/init.d/syslog[.busybox] to set syslog configuration at start time.
DESTINATION=file # log destinations (buffer file remote)
LOGFILE=/var/log/messages # where to log (file)
REMOTE=loghost:514 # where to log (syslog remote)
REDUCE=no # reduce-size logging
DROPDUPLICATES=no # whether to drop duplicate log entries
ROTATESIZE=10000 # rotate log if grown beyond X [kByte]
ROTATEGENS=1 # keep X generations of rotated logs
BUFFERSIZE=64 # size of circular buffer [kByte]
FOREGROUND=no # run in foreground (don't use!)
LOGLEVEL=7 # local log level (between 1 and 8)

View File

@ -0,0 +1,16 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://syslog-patch \
file://syslog-startup.conf.busybox \
file://logrotate-syslog.conf \
"
do_install_prepend() {
patch -p 1 ${WORKDIR}/syslog < ${WORKDIR}/syslog-patch
}
do_install_append() {
install -m 0755 ${WORKDIR}/syslog-startup.conf.busybox ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/logrotate-syslog.conf ${D}${sysconfdir}
}

View File

@ -0,0 +1,13 @@
--- a/dmesg.sh 2015-05-14 13:44:29.649021344 -0700
+++ b/dmesg.sh 2015-05-14 13:43:48.005021912 -0700
@@ -8,8 +8,8 @@
### END INIT INFO
if [ -f /var/log/dmesg ]; then
- if [ -f /usr/sbin/logrotate ]; then
- logrotate -f /etc/logrotate-dmesg.conf
+ if [ -f /usr/sbin/logrotate -a -f /var/log/dmesg ]; then
+ logrotate -f /etc/logrotate-dmesg.conf -s /dev/null
else
mv -f /var/log/dmesg /var/log/dmesg.old
fi

View File

@ -0,0 +1,9 @@
# see "man logrotate" for details
# rotate dmesg, and keep 20 versions.
/var/log/dmesg {
create
rotate 20
nodateext
}

View File

@ -0,0 +1,14 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://logrotate-dmesg.conf \
file://dmesg.sh-patch \
"
do_install_prepend() {
patch -p 1 ${WORKDIR}/dmesg.sh < ${WORKDIR}/dmesg.sh-patch
}
do_install_append() {
install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}
}

View File

@ -0,0 +1,19 @@
LICENSE = "CLOSED"
ALLOW_EMPTY_${PN} = "1"
DEPENDS_${PN} = " \
busybox \
initscripts \
logrotate \
sysvinit \
wtmp-rotate \
"
RDEPENDS_${PN} = " \
busybox \
initscripts \
logrotate \
sysvinit \
wtmp-rotate \
"

View File

@ -0,0 +1,89 @@
#! /bin/sh
#
# bootlogd One of the first scripts to be executed. Starts or stops
# the bootlogd log program. If this script is called as
# "stop-bootlogd", it will stop the daemon instead of
# starting it even when called with the "start" argument.
#
# Version: @(#)bootlogd 2.85-12 21-Mar-2004 miquels@cistron.nl
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/bootlogd
NAME=bootlogd
DESC="Bootlog daemon"
# source function library
. /etc/init.d/functions
test -f $DAEMON || exit 0
[ -r /etc/default/bootlogd ] && . /etc/default/bootlogd
## set -e # not needed
case "$BOOTLOGD_ENABLE" in
[Nn]*)
exit 0
;;
esac
STOPPER=
ACTION="$1"
case "$0" in
*stop-bootlog*)
STOPPER=Y
if [ "$ACTION" = start ]
then
ACTION=stop
fi
;;
esac
case "$ACTION" in
start)
echo -n "Starting $DESC: "
if [ -d /proc/1/. ]
then
umask 027
start-stop-daemon --start --quiet \
--exec $DAEMON -- -r -c -l /tmp/boot
else
$DAEMON -r -c -l /tmp/boot
fi
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --exec $DAEMON
if [ -f /tmp/boot ]; then
if [ -f /usr/sbin/logrotate -a -f /var/log/boot ]; then
logrotate -f /etc/logrotate-boot.conf -s /dev/null
fi
mv /tmp/boot /var/log/boot
fi
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --exec $DAEMON
echo "$NAME."
;;
status)
status $DAEMON
exit $?
;;
*)
N=${0##*/}
N=${N#[SK]??}
echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,9 @@
# see "man logrotate" for details
# rotate boot, and keep 20 versions.
/var/log/boot {
create
rotate 20
nodateext
}

View File

@ -0,0 +1,11 @@
--- a/rcS-default 2015-05-14 12:25:38.953085880 -0700
+++ b/rcS-default 2015-05-14 12:26:16.973085362 -0700
@@ -22,7 +22,7 @@
# Set TICKADJ to the correct tick value for this specific machine
#TICKADJ=10000
# Enable caching in populate-volatile.sh
-VOLATILE_ENABLE_CACHE=yes
+#VOLATILE_ENABLE_CACHE=yes
# Indicate whether the rootfs is intended to be read-only or not.
# Setting ROOTFS_READ_ONLY to yes and rebooting will give you a read-only rootfs.
# Normally you should not change this value.

View File

@ -0,0 +1,17 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://bootlogd \
file://logrotate-boot.conf \
file://rcS-default-patch \
"
do_install_prepend() {
patch -p 1 ${WORKDIR}/rcS-default < ${WORKDIR}/rcS-default-patch
}
do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/bootlogd ${D}${sysconfdir}/init.d/
install -m 0644 ${WORKDIR}/logrotate-boot.conf ${D}${sysconfdir}
}

View File

@ -0,0 +1,9 @@
# see "man logrotate" for details
# rotate wtmp, and keep 20 versions.
/var/log/wtmp {
create
rotate 20
nodateext
}

View File

@ -0,0 +1,5 @@
#!/bin/sh
if [ -f /usr/sbin/logrotate -a -f /var/log/wtmp ]; then
logrotate -f /etc/logrotate-wtmp.conf -s /dev/null
fi

View File

@ -0,0 +1,20 @@
SUMMARY = "wtmp file rotation"
LICENSE = "CLOSED"
FILESEXTRAPATHS := "${THISDIR}/${PN}:"
SRC_URI = " \
file://wtmp_rotate \
file://logrotate-wtmp.conf \
"
FILES_${PN} = "/"
do_install() {
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/rcS.d
install -m 0755 ${WORKDIR}/wtmp_rotate ${D}${sysconfdir}/init.d/
install -m 0644 ${WORKDIR}/logrotate-wtmp.conf ${D}${sysconfdir}
ln -s ../init.d/wtmp_rotate ${D}${sysconfdir}/rcS.d/S42wtmp_rotate
}

View File

@ -0,0 +1,56 @@
SUMMARY = "Artoo firmware binary"
LICENSE = "CLOSED"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
# stick-cfg-evt-*.cfg are for use with sololink_config
SRC_URI += "file://stick-cfg-evt-mode1.cfg \
file://stick-cfg-evt-mode2.cfg \
file://stick-cfg-evt-default.cfg"
firmwaredir = "/firmware"
FILES_${PN} += "${firmwaredir}/"
FILES_${PN} += "${firmwaredir}/cfg"
REPO_NAME = "artoo"
REPO_TAG = "v${PV}"
FILE_EXT = "bin"
FILE_SRC = "artoo_${PV}.${FILE_EXT}"
FILE_DST = "artoo_${PV}.${FILE_EXT}"
do_fetch () {
#
# look up a release by tag name via the github api,
# extract the url for the build artifact that we're interested in (*.FILE_EXT),
# and download it.
#
# requires jq 1.4 or later: https://stedolan.github.io/jq/
#
# NB: this relies on the fact that tag names in the repo are of a specific form
# such that we can derive the tag name from the bitbake PV variable, which is itself
# derived from the name of this file.
# There must be a github "personal access token" in the file ~/.ssh/github_token
# https://help.github.com/articles/creating-an-access-token-for-command-line-use/
TOKEN=$(cat ~/.ssh/github_token)
SRC_URL="https://api.github.com/repos/3drobotics/${REPO_NAME}/releases/tags/${REPO_TAG}"
BIN_URL=$(curl -s -H "Authorization: token ${TOKEN}" -H "Accept: application/json" ${SRC_URL} | jq -r '.assets[] | select(.name | endswith(".${FILE_EXT}")) | .url')
# NB: supply github access token as url param because if we supply it as a header,
# once github redirects us to s3, it gets included in that request as well
# and amazon complains that 2 forms of auth have been provided and quits.
curl -v -L -H "Accept: application/octet-stream" ${BIN_URL}?access_token=${TOKEN} -o ${WORKDIR}/${FILE_SRC}
}
do_install () {
install -d ${D}${firmwaredir}
install -m 0644 ${WORKDIR}/${FILE_SRC} ${D}${firmwaredir}/${FILE_DST}
install -d ${D}${firmwaredir}/cfg/
install -m 0644 ${WORKDIR}/stick-cfg-evt-mode1.cfg ${D}${firmwaredir}/cfg
install -m 0644 ${WORKDIR}/stick-cfg-evt-mode2.cfg ${D}${firmwaredir}/cfg
install -m 0644 ${WORKDIR}/stick-cfg-evt-default.cfg ${D}${firmwaredir}/cfg
}

View File

@ -0,0 +1,12 @@
# stick-0 is left, horizontal
[stick-0]
# stick-1 is right, vertical
[stick-1]
# stick-2 is right, horizontal
[stick-2]
# stick-3 is left, vertical
[stick-3]

View File

@ -0,0 +1,24 @@
# stick-0 is left, horizontal
[stick-0]
# map to yaw
mapped_stick_id: 3
direction: 0
# stick-1 is right, vertical
[stick-1]
# map to throttle
mapped_stick_id: 0
direction: 0
# stick-2 is right, horizontal
[stick-2]
# map to roll
mapped_stick_id: 1
direction: 1
# stick-3 is left, vertical
[stick-3]
# map to pitch
mapped_stick_id: 2
direction: 0

View File

@ -0,0 +1,24 @@
# stick-0 is left, horizontal
[stick-0]
# map to yaw
mapped_stick_id: 3
direction: 0
# stick-1 is right, vertical
[stick-1]
# map to pitch
mapped_stick_id: 2
direction: 1
# stick-2 is right, horizontal
[stick-2]
# map to roll
mapped_stick_id: 1
direction: 1
# stick-3 is left, vertical
[stick-3]
# map to throttle
mapped_stick_id: 0
direction: 1

View File

@ -0,0 +1,44 @@
SUMMARY = "Axon firmware binary"
LICENSE = "CLOSED"
firmwaredir = "/firmware"
FILES_${PN} += "${firmwaredir}/"
REPO_NAME = "solo-gimbal"
REPO_TAG = "v${PV}"
FILE_EXT = "ax"
FILE_SRC = "gimbal_firmware_${PV}.${FILE_EXT}"
FILE_DST = "gimbal_firmware_${PV}.${FILE_EXT}"
do_fetch () {
#
# look up a release by tag name via the github api,
# extract the url for the build artifact that we're interested in (*.FILE_EXT),
# and download it.
#
# requires jq 1.4 or later: https://stedolan.github.io/jq/
#
# NB: this relies on the fact that tag names in the repo are of a specific form
# such that we can derive the tag name from the bitbake PV variable, which is itself
# derived from the name of this file.
# There must be a github "personal access token" in the file ~/.ssh/github_token
# https://help.github.com/articles/creating-an-access-token-for-command-line-use/
TOKEN=$(cat ~/.ssh/github_token)
SRC_URL="https://api.github.com/repos/3drobotics/${REPO_NAME}/releases/tags/${REPO_TAG}"
BIN_URL=$(curl -s -H "Authorization: token ${TOKEN}" -H "Accept: application/json" ${SRC_URL} | jq -r '.assets[] | select(.name | endswith(".${FILE_EXT}")) | .url')
# NB: supply github access token as url param because if we supply it as a header,
# once github redirects us to s3, it gets included in that request as well
# and amazon complains that 2 forms of auth have been provided and quits.
curl -v -L -H "Accept: application/octet-stream" ${BIN_URL}?access_token=${TOKEN} -o ${WORKDIR}/${FILE_SRC}
}
do_install () {
install -d ${D}${firmwaredir}
install -m 0644 ${WORKDIR}/${FILE_SRC} ${D}${firmwaredir}/${FILE_DST}
}

View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -0,0 +1,45 @@
SUMMARY = "Pixhawk firmware binary"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://${THISDIR}/files/COPYING.txt;md5=d32239bcb673463ab874e80d47fae504"
firmwaredir = "/firmware"
FILES_${PN} += "${firmwaredir}/"
REPO_NAME = "ardupilot-solo"
REPO_TAG = "solo-${PV}"
FILE_EXT = "px4"
FILE_SRC = "ArduCopter-v2.${FILE_EXT}"
FILE_DST = "ArduCopter-${PV}.${FILE_EXT}"
do_fetch () {
#
# look up a release by tag name via the github api,
# extract the url for the build artifact that we're interested in (*.FILE_EXT),
# and download it.
#
# requires jq 1.4 or later: https://stedolan.github.io/jq/
#
# NB: this relies on the fact that tag names in the repo are of a specific form
# such that we can derive the tag name from the bitbake PV variable, which is itself
# derived from the name of this file.
# There must be a github "personal access token" in the file ~/.ssh/github_token
# https://help.github.com/articles/creating-an-access-token-for-command-line-use/
TOKEN=$(cat ~/.ssh/github_token)
SRC_URL="https://api.github.com/repos/3drobotics/${REPO_NAME}/releases/tags/${REPO_TAG}"
BIN_URL=$(curl -s -H "Authorization: token ${TOKEN}" -H "Accept: application/json" ${SRC_URL} | jq -r '.assets[] | select(.name | endswith(".${FILE_EXT}")) | .url')
# NB: supply github access token as url param because if we supply it as a header,
# once github redirects us to s3, it gets included in that request as well
# and amazon complains that 2 forms of auth have been provided and quits.
curl -v -L -H "Accept: application/octet-stream" ${BIN_URL}?access_token=${TOKEN} -o ${WORKDIR}/${FILE_SRC}
}
do_install () {
install -d ${D}${firmwaredir}
install -m 0644 ${WORKDIR}/${FILE_SRC} ${D}${firmwaredir}/${FILE_DST}
}

View File

@ -0,0 +1,13 @@
--- a/Makefile.real
+++ b/Makefile.real
@@ -24,8 +24,8 @@ listnewconfig oldaskconfig oldconfig \
silentoldconfig olddefconfig oldnoconfig \
allnoconfig allyesconfig allmodconfig \
alldefconfig randconfig:
- @$(MAKE) -C kconf conf
- @./kconf/conf --$@ Kconfig
+ #@$(MAKE) -C kconf conf
+ #@./kconf/conf --$@ Kconfig
.PHONY: usedefconfig
usedefconfig:

View File

@ -0,0 +1,38 @@
From 90d0d3014ec113a6f36e567d7564f39cc4c5e135 Mon Sep 17 00:00:00 2001
From: Allan Matthew <amatthew@3dr.com>
Date: Tue, 27 Oct 2015 15:47:04 -0700
Subject: [PATCH] reinit
---
backport-include/linux/completion.h | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/backport-include/linux/completion.h b/backport-include/linux/completion.h
index 477530d..ba7eddc 100644
--- a/backport-include/linux/completion.h
+++ b/backport-include/linux/completion.h
@@ -3,19 +3,8 @@
#include_next <linux/completion.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
-/**
- * reinit_completion - reinitialize a completion structure
- * @x: pointer to completion structure that is to be reinitialized
- *
- * This inline function should be used to reinitialize a completion structure so it can
- * be reused. This is especially important after complete_all() is used.
- */
-#define reinit_completion LINUX_BACKPORT(reinit_completion)
-static inline void reinit_completion(struct completion *x)
-{
- x->done = 0;
-}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0))
+#define reinit_completion(x) INIT_COMPLETION(*(x))
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */
#endif /* __BACKPORT_COMPLETION_H */
--
2.1.2

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,945 @@
#
# Automatically generated file; DO NOT EDIT.
# Backports from "Linux" "next-20150903-0-ga672f92" (backports "backports-20150903-0-g7b34ea2")
#
CPTCFG_WIRELESS=y
CPTCFG_NET_CORE=y
CPTCFG_EXPERT=y
CPTCFG_BP_MODULES=y
CPTCFG_BPAUTO_NEW_LEDS=y
CPTCFG_BPAUTO_LEDS_CLASS=y
CPTCFG_BPAUTO_LEDS_TRIGGERS=y
# CPTCFG_BPAUTO_USERSEL_BUILD_ALL is not set
CPTCFG_BPAUTO_CRYPTO_CCM=y
# CPTCFG_BPAUTO_BUILD_CRYPTO_CCM is not set
CPTCFG_BPAUTO_RHASHTABLE=y
CPTCFG_CFG80211=m
# CPTCFG_NL80211_TESTMODE is not set
# CPTCFG_CFG80211_DEVELOPER_WARNINGS is not set
# CPTCFG_CFG80211_REG_DEBUG is not set
# CPTCFG_CFG80211_CERTIFICATION_ONUS is not set
# CPTCFG_CFG80211_DEFAULT_PS is not set
# CPTCFG_CFG80211_DEBUGFS is not set
CPTCFG_CFG80211_INTERNAL_REGDB=y
# CPTCFG_LIB80211 is not set
CPTCFG_MAC80211=m
CPTCFG_MAC80211_HAS_RC=y
CPTCFG_MAC80211_RC_MINSTREL=y
CPTCFG_MAC80211_RC_MINSTREL_HT=y
# CPTCFG_MAC80211_RC_MINSTREL_VHT is not set
CPTCFG_MAC80211_RC_DEFAULT_MINSTREL=y
CPTCFG_MAC80211_RC_DEFAULT="minstrel_ht"
# CPTCFG_MAC80211_MESH is not set
CPTCFG_MAC80211_LEDS=y
CPTCFG_MAC80211_DEBUGFS=y
# CPTCFG_MAC80211_MESSAGE_TRACING is not set
# CPTCFG_MAC80211_DEBUG_MENU is not set
CPTCFG_MAC80211_STA_HASH_MAX_SIZE=0
CPTCFG_WLAN=y
# CPTCFG_LIBERTAS_THINFIRM is not set
# CPTCFG_AT76C50X_USB is not set
# CPTCFG_USB_NET_RNDIS_WLAN is not set
# CPTCFG_MAC80211_HWSIM is not set
# CPTCFG_MWL8K is not set
CPTCFG_ATH_COMMON=m
CPTCFG_ATH_CARDS=m
# CPTCFG_ATH_DEBUG is not set
# CPTCFG_ATH5K is not set
# CPTCFG_ATH5K_PCI is not set
CPTCFG_ATH9K_HW=m
CPTCFG_ATH9K_COMMON=m
CPTCFG_ATH9K_BTCOEX_SUPPORT=y
CPTCFG_ATH9K=m
CPTCFG_ATH9K_PCI=y
# CPTCFG_ATH9K_AHB is not set
CPTCFG_ATH9K_DEBUGFS=y
# CPTCFG_ATH9K_STATION_STATISTICS is not set
# CPTCFG_ATH9K_DYNACK is not set
# CPTCFG_ATH9K_WOW is not set
# CPTCFG_ATH9K_CHANNEL_CONTEXT is not set
# CPTCFG_ATH9K_PCOEM is not set
# CPTCFG_ATH9K_HTC is not set
# CPTCFG_CARL9170 is not set
# CPTCFG_ATH6KL is not set
# CPTCFG_AR5523 is not set
# CPTCFG_WIL6210 is not set
# CPTCFG_ATH10K is not set
# CPTCFG_WCN36XX is not set
# CPTCFG_B43 is not set
# CPTCFG_B43LEGACY is not set
# CPTCFG_BRCMSMAC is not set
# CPTCFG_BRCMFMAC is not set
# CPTCFG_IWLWIFI is not set
# CPTCFG_IWL4965 is not set
# CPTCFG_IWL3945 is not set
# CPTCFG_P54_COMMON is not set
# CPTCFG_RT2X00 is not set
# CPTCFG_WL_MEDIATEK is not set
# CPTCFG_RTL_CARDS is not set
# CPTCFG_WL_TI is not set
# CPTCFG_ZD1211RW is not set
# CPTCFG_MWIFIEX is not set
# CPTCFG_CW1200 is not set
# CPTCFG_RSI_91X is not set
CPTCFG_ETHERNET=y
CPTCFG_NET_VENDOR_ATHEROS=y
# CPTCFG_ATL2 is not set
# CPTCFG_ATL1 is not set
# CPTCFG_ATL1E is not set
# CPTCFG_ATL1C is not set
# CPTCFG_ALX is not set
CPTCFG_NET_VENDOR_BROADCOM=y
CPTCFG_NET_VENDOR_INTEL=y
# CPTCFG_IGB is not set
CPTCFG_USB_NET_DRIVERS=m
# CPTCFG_USB_USBNET is not set
CPTCFG_SSB_POSSIBLE=y
#
# Sonics Silicon Backplane
#
# CPTCFG_SSB is not set
CPTCFG_BCMA_POSSIBLE=y
#
# Broadcom specific AMBA
#
# CPTCFG_BCMA is not set
# CPTCFG_NFC is not set
# CPTCFG_MEDIA_SUPPORT is not set
# CPTCFG_6LOWPAN is not set
#
# USB Device Class drivers
#
# CPTCFG_USB_WDM is not set
CPTCFG_ARM=y
CPTCFG_MIGHT_HAVE_PCI=y
CPTCFG_SYS_SUPPORTS_APM_EMULATION=y
CPTCFG_HAVE_PROC_CPU=y
CPTCFG_STACKTRACE_SUPPORT=y
CPTCFG_LOCKDEP_SUPPORT=y
CPTCFG_TRACE_IRQFLAGS_SUPPORT=y
CPTCFG_RWSEM_GENERIC_SPINLOCK=y
CPTCFG_ARCH_HAS_CPUFREQ=y
CPTCFG_GENERIC_HWEIGHT=y
CPTCFG_GENERIC_CALIBRATE_DELAY=y
CPTCFG_ZONE_DMA=y
CPTCFG_NEED_DMA_MAP_STATE=y
CPTCFG_ARM_PATCH_PHYS_VIRT=y
CPTCFG_GENERIC_BUG=y
CPTCFG_IRQ_WORK=y
CPTCFG_BUILDTIME_EXTABLE_SORT=y
CPTCFG_LOCALVERSION_AUTO=y
CPTCFG_HAVE_KERNEL_GZIP=y
CPTCFG_HAVE_KERNEL_LZMA=y
CPTCFG_HAVE_KERNEL_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TS=y
CPTCFG_PERF_USE_VMALLOC=y
CPTCFG_PERF_EVENTS=y
CPTCFG_VM_EVENT_COUNTERS=y
CPTCFG_SLUB=y
CPTCFG_HAVE_OPROFILE=y
CPTCFG_HAVE_KPROBES=y
CPTCFG_HAVE_KRETPROBES=y
CPTCFG_HAVE_ARCH_TRACEHOOK=y
CPTCFG_HAVE_DMA_ATTRS=y
CPTCFG_HAVE_DMA_CONTIGUOUS=y
CPTCFG_USE_GENERIC_SMP_HELPERS=y
CPTCFG_GENERIC_SMP_IDLE_THREAD=y
CPTCFG_GENERIC_IDLE_POLL_SETUP=y
CPTCFG_HAVE_REGS_AND_STACK_ACCESS_API=y
CPTCFG_HAVE_CLK=y
CPTCFG_HAVE_DMA_API_DEBUG=y
CPTCFG_HAVE_HW_BREAKPOINT=y
CPTCFG_HAVE_ARCH_JUMP_LABEL=y
CPTCFG_ARCH_WANT_IPC_PARSE_VERSION=y
CPTCFG_HAVE_ARCH_SECCOMP_FILTER=y
CPTCFG_HAVE_CONTEXT_TRACKING=y
CPTCFG_HAVE_IRQ_TIME_ACCOUNTING=y
CPTCFG_HAVE_MOD_ARCH_SPECIFIC=y
CPTCFG_MODULES_USE_ELF_REL=y
CPTCFG_CLONE_BACKWARDS=y
CPTCFG_OLD_SIGSUSPEND3=y
CPTCFG_OLD_SIGACTION=y
CPTCFG_HAVE_GENERIC_DMA_COHERENT=y
CPTCFG_RT_MUTEXES=y
CPTCFG_MODULES=y
CPTCFG_MODULE_UNLOAD=y
CPTCFG_MODVERSIONS=y
CPTCFG_MODULE_SRCVERSION_ALL=y
CPTCFG_STOP_MACHINE=y
CPTCFG_BLOCK=y
CPTCFG_LBDAF=y
CPTCFG_MSDOS_PARTITION=y
CPTCFG_EFI_PARTITION=y
CPTCFG_IOSCHED_NOOP=y
CPTCFG_IOSCHED_DEADLINE=y
CPTCFG_IOSCHED_CFQ=y
CPTCFG_DEFAULT_CFQ=y
CPTCFG_UNINLINE_SPIN_UNLOCK=y
CPTC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TCFG_KERNEL_4_7=y
CPTCFG_KERNEL_4_8=y
CPTCFG_KERNEL_4_9=y
CPTCFG_KERNEL_4_10=y
CPTCFG_KERNEL_4_11=y
CPTCFG_KERNEL_4_12=y
CPTCFG_KERNEL_4_13=y
CPTCFG_KERNEL_4_14=y
CPTCFG_KERNEL_4_15=y
CPTCFG_KERNEL_4_16=y
CPTCFG_KERNEL_4_17=y
CPTCFG_KERNEL_4_18=y
CPTCFG_KERNEL_4_19=y
CPTCFG_KERNEL_4_20=y
CPTCFG_KERNEL_4_21=y
CPTCFG_KERNEL_4_22=y
CPTCFG_KERNEL_4_23=y
CPTCFG_KERNEL_4_24=y
CPTCFG_KERNEL_4_25=y
CPTCFG_KERNEL_4_26=y
CPTCFG_KERNEL_4_27=y
CPTCFG_KERNEL_4_28=y
CPTCFG_KERNEL_4_29=y
CPTCFG_KERNEL_4_30=y
CPTCFG_KERNEL_4_31=y
CPTCFG_KERNEL_4_32=y
CPTCFG_KERNEL_4_33=y
CPTCFG_KERNEL_4_34=y
CPTCFG_KERNEL_4_35=y
CPTCFG_KERNEL_4_36=y
CPTCFG_KERNEL_4_37=y
CPTCFG_KERNEL_4_38=y
CPTCFG_KERNEL_4_39=y
CPTCFG_KERNEL_4_40=y
CPTCFG_KERNEL_4_41=y
CPTCFG_KERNEL_4_42=y
CPTCFG_KERNEL_4_43=y
CPTCFG_KERNEL_4_44=y
CPTCFG_KERNEL_4_45=y
CPTCFG_KERNEL_4_46=y
CPTCFG_KERNEL_4_47=y
CPTCFG_KERNEL_4_48=y
CPTCFG_KERNEL_4_49=y
CPTCFG_KERNEL_4_50=y
CPTCFG_KERNEL_4_51=y
CPTCFG_KERNEL_4_52=y
CPTCFG_KERNEL_4_53=y
CPTCFG_KERNEL_4_54=y
CPTCFG_KERNEL_4_55=y
CPTCFG_KERNEL_4_56=y
CPTCFG_KERNEL_4_57=y
CPTCFG_KERNEL_4_58=y
CPTCFG_KERNEL_4_59=y
CPTCFG_KERNEL_4_60=y
CPTCFG_KERNEL_4_61=y
CPTCFG_KERNEL_4_62=y
CPTCFG_KERNEL_4_63=y
CPTCFG_KERNEL_4_64=y
CPTCFG_KERNEL_4_65=y
CPTCFG_KERNEL_4_66=y
CPTCFG_KERNEL_4_67=y
CPTCFG_KERNEL_4_68=y
CPTCFG_KERNEL_4_69=y
CPTCFG_KERNEL_4_70=y
CPTCFG_KERNEL_4_71=y
CPTCFG_KERNEL_4_72=y
CPTCFG_KERNEL_4_73=y
CPTCFG_KERNEL_4_74=y
CPTCFG_KERNEL_4_75=y
CPTCFG_KERNEL_4_76=y
CPTCFG_KERNEL_4_77=y
CPTCFG_KERNEL_4_78=y
CPTCFG_KERNEL_4_79=y
CPTCFG_KERNEL_4_80=y
CPTCFG_KERNEL_4_81=y
CPTCFG_KERNEL_4_82=y
CPTCFG_KERNEL_4_83=y
CPTCFG_KERNEL_4_84=y
CPTCFG_KERNEL_4_85=y
CPTCFG_KERNEL_4_86=y
CPTCFG_KERNEL_4_87=y
CPTCFG_KERNEL_4_88=y
CPTCFG_KERNEL_4_89=y
CPTCFG_KERNEL_4_90=y
CPTCFG_KERNEL_4_91=y
CPTCFG_KERNEL_4_92=y
CPTCFG_KERNEL_4_93=y
CPTCFG_KERNEL_4_94=y
CPTCFG_KERNEL_4_95=y
CPTCFG_KERNEL_4_96=y
CPTCFG_KERNEL_4_97=y
CPTCFG_KERNEL_4_98=y
CPTCFG_KERNEL_4_99=y

View File

@ -0,0 +1,80 @@
From ca8181d335313371b01299957405b7fff69ae420 Mon Sep 17 00:00:00 2001
From: Allan Matthew <amatthew@3dr.com>
Date: Mon, 4 Jan 2016 14:41:55 -0800
Subject: [PATCH] Fixes for Japanese reg domain. We lower the THRESH62 value
for CA and eliminate stuck beacon resets and nfcals to eliminate spurious
transmissions
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 14 ++++++++++++++
drivers/net/wireless/ath/ath9k/beacon.c | 12 +++++++++---
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 922042a..a75522c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -4135,6 +4135,7 @@ static void ar9003_hw_apply_minccapwr_thresh(struct ath_hw *ah,
bool is2ghz)
{
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
+ struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
const u_int32_t cca_ctrl[AR9300_MAX_CHAINS] = {
AR_PHY_CCA_CTRL_0,
AR_PHY_CCA_CTRL_1,
@@ -4143,6 +4144,19 @@ static void ar9003_hw_apply_minccapwr_thresh(struct ath_hw *ah,
int chain;
u32 val;
+ /* Force a lower thresh value */
+ if(regulatory->region == NL80211_DFS_JP) {
+ ath_dbg(ath9k_hw_common(ah), EEPROM, "Japanese regulatory, setting THRESH62 lower\n");
+ val = (u32)(-60);
+ for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
+ if (!(ah->caps.tx_chainmask & BIT(chain)))
+ continue;
+
+ REG_RMW_FIELD(ah, cca_ctrl[chain],
+ AR_PHY_EXT_CCA0_THRESH62_1, val);
+ }
+ }
+
if (is2ghz) {
if (!(eep->base_ext1.misc_enable & BIT(2)))
return;
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index f50a6bc..d161f2b 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -321,6 +321,7 @@ void ath9k_beacon_tasklet(unsigned long data)
struct ath_softc *sc = (struct ath_softc *)data;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
+ struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
struct ath_buf *bf = NULL;
struct ieee80211_vif *vif;
bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
@@ -358,12 +359,17 @@ void ath9k_beacon_tasklet(unsigned long data)
"missed %u consecutive beacons\n",
sc->beacon.bmisscnt);
ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq);
- if (sc->beacon.bmisscnt > 3)
- ath9k_hw_bstuck_nfcal(ah);
+ /* Do not reset nfcal in Japan, as it might cause a spurious beacon */
+ if(regulatory->region != NL80211_DFS_JP) {
+ if (sc->beacon.bmisscnt > 3)
+ ath9k_hw_bstuck_nfcal(ah);
+ }
} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
ath_dbg(common, BSTUCK, "beacon is officially stuck\n");
sc->beacon.bmisscnt = 0;
- ath9k_queue_reset(sc, RESET_TYPE_BEACON_STUCK);
+ /* Do not reset chip in Japan, as it might cause a spurious beacon */
+ if(regulatory->region != NL80211_DFS_JP)
+ ath9k_queue_reset(sc, RESET_TYPE_BEACON_STUCK);
}
return;
--
2.1.2

View File

@ -0,0 +1,17 @@
include compat-wireless.inc
SRC_URI = " \
https://www.kernel.org/pub/linux/kernel/projects/backports/2015/09/03/backports-${PV}.tar.xz \
file://0001-disable_kconf.patch \
file://0002-define_reinit.patch \
file://add_db_txt.patch \
file://japanese_regulatory.patch \
file://defconfig \
"
COMPAT_WIRELESS_VERSION = "${PV}"
S = "${WORKDIR}/backports-${COMPAT_WIRELESS_VERSION}"
SRC_URI[md5sum] = "f53560aa0cfc006d637a74fd76d2a3af"
SRC_URI[sha256sum] = "bf7707aa9c222e357048431ad5060fb2081a20ec6ef945be6611e962579d5c6e"

View File

@ -0,0 +1,28 @@
DESCRIPTION = "Latest wireless drivers"
HOMEPAGE = "http://wireless.kernel.org/en/users/Download"
SECTION = "kernel/modules"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
RDEPENDS_${PN} = "wireless-tools"
INC_PR = "r1"
# depends on config options which are not enabled in qemu* MACHINEs by default
# config.mk:25: *** "ERROR: your kernel has CONFIG_CFG80211=y, you should have it CONFIG_CFG80211=m if you want to use this thing.". Stop.
EXCLUDE_FROM_WORLD = "1"
COMPAT_WIRELESS_VERSION = "${PV}-1"
SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
S = "${WORKDIR}/backports-${COMPAT_WIRELESS_VERSION}"
inherit module
EXTRA_OEMAKE = "KLIB_BUILD=${STAGING_KERNEL_DIR} KLIB=${D}"
do_configure_prepend() {
cp ${WORKDIR}/defconfig ${S}/.config
}
do_install() {
make -C ${STAGING_KERNEL_DIR} M=${S} INSTALL_MOD_PATH=${D} modules_install
}

View File

@ -0,0 +1,10 @@
# Without this change, the observed behavior is:
# - bitbake tries to clone dtc from jdl.com and fails
# - bitbake gets a dtc tarball from a mirror (succeeds)
# - bitbake bails out because of the failure-to-clone
# - another run of bitbake works
# This makes it so it never tries jdl.com (which is often down).
SRC_URI_remove = "git://www.jdl.com/software/dtc.git"
SRC_URI_prepend = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git "

View File

@ -0,0 +1,50 @@
From 58085a1475840fd91d07392470c20a4bec23b2f1 Mon Sep 17 00:00:00 2001
From: Allan Matthew <amatthew@3drobotics.com>
Date: Wed, 11 Feb 2015 11:04:55 +0800
Subject: [PATCH] dts changes to add uart5
---
arch/arm/boot/dts/imx6qdl.dtsi | 9 +++++++++
arch/arm/boot/dts/imx6solo-3dr-1080p.dts | 6 ++++++
2 files changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index 0836e90..7cf97c8 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -1594,6 +1594,15 @@
};
};
+ uart5 {
+ pinctrl_uart5_1: uart5grp-1 {
+ fsl,pins = <
+ MX6QDL_PAD_KEY_COL1__UART5_TX_DATA 0x1b0b1
+ MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA 0x1b0b1
+ >;
+ };
+ };
+
usbotg {
pinctrl_usbotg_1: usbotggrp-1 {
fsl,pins = <
diff --git a/arch/arm/boot/dts/imx6solo-3dr-1080p.dts b/arch/arm/boot/dts/imx6solo-3dr-1080p.dts
index 4a347e1..b17241c 100644
--- a/arch/arm/boot/dts/imx6solo-3dr-1080p.dts
+++ b/arch/arm/boot/dts/imx6solo-3dr-1080p.dts
@@ -368,6 +368,12 @@
status = "okay";
};
+&uart5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart5_1>;
+ status = "okay";
+};
+
&usbh1 {
vbus-supply = <&reg_usb_h1_vbus>;
status = "okay";
--
2.1.0

View File

@ -0,0 +1,139 @@
Fix the build errors listed below
Upstream-Status: Inappropriate [other]
Freescale does not currently support the real-time kernel
Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
CC drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.o
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c: In function 'gckOS_WaitSignal':
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7835:5: error: passing argument 1 of 'spin_lock_irq' from incompatible pointer type [-Werror]
spin_lock_irq(&signal->obj.wait.lock);
^
In file included from include/linux/seqlock.h:29:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:316:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
static inline void spin_lock_irq(spinlock_t *lock)
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7867:9: error: passing argument 1 of '__add_wait_queue_tail' from incompatible pointer type [-Werror]
__add_wait_queue_tail(&signal->obj.wait, &wait);
^
In file included from include/linux/mmzone.h:9:0,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/wait.h:120:20: note: expected 'struct wait_queue_head_t *' but argument is of type 'struct swait_head *'
static inline void __add_wait_queue_tail(wait_queue_head_t *head,
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7879:13: error: passing argument 1 of 'spin_unlock_irq' from incompatible pointer type [-Werror]
spin_unlock_irq(&signal->obj.wait.lock);
^
In file included from include/linux/seqlock.h:29:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:341:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
static inline void spin_unlock_irq(spinlock_t *lock)
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7881:13: error: passing argument 1 of 'spin_lock_irq' from incompatible pointer type [-Werror]
spin_lock_irq(&signal->obj.wait.lock);
^
In file included from include/linux/seqlock.h:29:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:316:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
static inline void spin_lock_irq(spinlock_t *lock)
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7945:9: error: passing argument 1 of '__remove_wait_queue' from incompatible pointer type [-Werror]
__remove_wait_queue(&signal->obj.wait, &wait);
^
In file included from include/linux/mmzone.h:9:0,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/wait.h:133:20: note: expected 'struct wait_queue_head_t *' but argument is of type 'struct swait_head *'
static inline void __remove_wait_queue(wait_queue_head_t *head,
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:7958:5: error: passing argument 1 of 'spin_unlock_irq' from incompatible pointer type [-Werror]
spin_unlock_irq(&signal->obj.wait.lock);
^
In file included from include/linux/seqlock.h:29:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/spinlock.h:341:20: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
static inline void spin_unlock_irq(spinlock_t *lock)
^
cc1: all warnings being treated as errors
make[4]: *** [drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.o] Error 1
Index: git/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
===================================================================
--- git.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ git/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -7832,7 +7832,7 @@ gckOS_WaitSignal(
might_sleep();
- spin_lock_irq(&signal->obj.wait.lock);
+ raw_spin_lock_irq(&signal->obj.wait.lock);
if (signal->obj.done)
{
@@ -7862,9 +7862,8 @@ gckOS_WaitSignal(
: Wait * HZ / 1000;
#endif
- DECLARE_WAITQUEUE(wait, current);
- wait.flags |= WQ_FLAG_EXCLUSIVE;
- __add_wait_queue_tail(&signal->obj.wait, &wait);
+ DEFINE_SWAITER(wait);
+ swait_prepare_locked(&signal->obj.wait, &wait);
while (gcvTRUE)
{
@@ -7876,9 +7875,9 @@ gckOS_WaitSignal(
}
__set_current_state(TASK_INTERRUPTIBLE);
- spin_unlock_irq(&signal->obj.wait.lock);
+ raw_spin_unlock_irq(&signal->obj.wait.lock);
timeout = schedule_timeout(timeout);
- spin_lock_irq(&signal->obj.wait.lock);
+ raw_spin_lock_irq(&signal->obj.wait.lock);
if (signal->obj.done)
{
@@ -7942,7 +7941,7 @@ gckOS_WaitSignal(
}
}
- __remove_wait_queue(&signal->obj.wait, &wait);
+ swait_finish_locked(&signal->obj.wait, &wait);
#if gcdDETECT_TIMEOUT
if (complained)
@@ -7955,7 +7954,7 @@ gckOS_WaitSignal(
#endif
}
- spin_unlock_irq(&signal->obj.wait.lock);
+ raw_spin_unlock_irq(&signal->obj.wait.lock);
OnError:
/* Return status. */

View File

@ -0,0 +1,111 @@
Fix the build errors listed below, when PREEMPT_RT_FULL is enabled
Upstream-Status: Pending
Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
CC drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.o
In file included from include/linux/seqlock.h:29:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c: In function 'gckOS_CreateMutex':
include/linux/mutex_rt.h:74:24: error: dereferencing 'void *' pointer [-Werror]
rt_mutex_init(&(mutex)->lock); \
^
include/linux/spinlock.h:104:9: note: in definition of macro 'raw_spin_lock_init'
do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0)
^
include/linux/mutex_rt.h:74:2: note: in expansion of macro 'rt_mutex_init'
rt_mutex_init(&(mutex)->lock); \
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3046:5: note: in expansion of macro 'mutex_init'
mutex_init(*Mutex);
^
include/linux/mutex_rt.h:74:24: error: request for member 'lock' in something not a structure or union
rt_mutex_init(&(mutex)->lock); \
^
include/linux/spinlock.h:104:9: note: in definition of macro 'raw_spin_lock_init'
do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0)
^
include/linux/mutex_rt.h:74:2: note: in expansion of macro 'rt_mutex_init'
rt_mutex_init(&(mutex)->lock); \
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3046:5: note: in expansion of macro 'mutex_init'
mutex_init(*Mutex);
^
In file included from include/linux/spinlock_types.h:18:0,
from include/linux/spinlock.h:81,
from include/linux/seqlock.h:29,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
include/linux/mutex_rt.h:74:24: error: dereferencing 'void *' pointer [-Werror]
rt_mutex_init(&(mutex)->lock); \
^
include/linux/mutex_rt.h:74:2: note: in expansion of macro 'rt_mutex_init'
rt_mutex_init(&(mutex)->lock); \
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3046:5: note: in expansion of macro 'mutex_init'
mutex_init(*Mutex);
^
include/linux/mutex_rt.h:74:24: error: request for member 'lock' in something not a structure or union
rt_mutex_init(&(mutex)->lock); \
^
include/linux/mutex_rt.h:74:2: note: in expansion of macro 'rt_mutex_init'
rt_mutex_init(&(mutex)->lock); \
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3046:5: note: in expansion of macro 'mutex_init'
mutex_init(*Mutex);
^
In file included from include/linux/mutex.h:28:0,
from include/linux/notifier.h:13,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:771,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h:27,
from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:22:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c: In function 'gckOS_DeleteMutex':
include/linux/mutex_rt.h:46:48: error: dereferencing 'void *' pointer [-Werror]
#define mutex_destroy(l) rt_mutex_destroy(&(l)->lock)
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3091:5: note: in expansion of macro 'mutex_destroy'
mutex_destroy(Mutex);
^
include/linux/mutex_rt.h:46:48: error: request for member 'lock' in something not a structure or union
#define mutex_destroy(l) rt_mutex_destroy(&(l)->lock)
^
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3091:5: note: in expansion of macro 'mutex_destroy'
mutex_destroy(Mutex);
^
cc1: all warnings being treated as errors
make[4]: *** [drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.o] Error 1
Index: git/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
===================================================================
--- git.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ git/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -3043,7 +3043,7 @@ gckOS_CreateMutex(
gcmkONERROR(gckOS_Allocate(Os, gcmSIZEOF(struct mutex), Mutex));
/* Initialize the mutex. */
- mutex_init(*Mutex);
+ mutex_init((struct mutex*)*Mutex);
/* Return status. */
gcmkFOOTER_ARG("*Mutex=0x%X", *Mutex);
@@ -3088,7 +3088,7 @@ gckOS_DeleteMutex(
gcmkVERIFY_ARGUMENT(Mutex != gcvNULL);
/* Destroy the mutex. */
- mutex_destroy(Mutex);
+ mutex_destroy((struct mutex*)Mutex);
/* Free the mutex structure. */
gcmkONERROR(gckOS_Free(Os, Mutex));

View File

@ -0,0 +1,84 @@
Work around the oops below by disabling split ptlocks
Upstream-Status: Inappropriate [disable feature]
Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = ac5a8000
[00000000] *pgd=3c8db831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 277 Comm: test-qt5 Not tainted 3.10.17-rt12-monkey+gec1af9f #2
task: ac65df80 ti: ac968000 task.ti: ac968000
PC is at _raw_spin_lock+0x10/0x4c
LR is at get_parent_ip+0x10/0x2c
pc : [<80623fd4>] lr : [<8004ef18>] psr: 60010013
sp : ac969c38 ip : 80c44404 fp : 00000000
r10: ac65df80 r9 : ac969cd8 r8 : 00000000
r7 : 00000054 r6 : afffe000 r5 : 00000000 r4 : 00000000
r3 : ac65df80 r2 : 00000001 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: 3c5a804a DAC: 00000015
Process test-qt5 (pid: 277, stack limit = 0xac968238)
Stack: (0xac969c38 to 0xac96a000)
9c20: b00549a8 806235e0
9c40: 00000000 ac968000 812f9a00 80017cec ac969c74 fffffffe 00000000 00005000
9c60: 00000000 80017e6c ac968000 ac65df80 00000000 00000000 00000001 ac968001
9c80: ac65df80 b00549a8 00000000 afffe000 00000054 00000000 ac969cd8 afffe150
9ca0: b0054bf8 8044e540 ac969cd8 b00549a8 ac0b8180 00000230 ac8fd000 00000230
9cc0: 00000000 8044f6f4 ac155700 ac969cf4 ac155700 804605b8 ac155700 ac969d8c
9ce0: 00000002 ac969d24 b0054bf8 804607f4 7ef1fcd0 80450078 ac0b8180 ac155700
9d00: ac969d8c 00000002 ac8fd000 8045f1a0 ac969d24 00000000 ac8fd01c b00549a8
9d20: b0050000 00000008 ac969d98 ac0b8300 ac969d8c 00000115 ac969d98 ac969e00
9d40: ac155600 ac3985f0 7ef1fcd0 8045661c 00000115 00000000 00000001 00000000
9d60: 00007530 80454144 80c32e18 00000001 81518e18 806237dc 00000001 ac968038
9d80: 00000000 00000000 00000000 00000000 00000115 806237dc ac6f5688 ac968018
9da0: 812e1640 00000000 00000001 ac968000 ac969dc4 8004efe4 ac968008 ac39a000
9dc0: ac744400 ac968020 00007530 ac968000 ac968000 ac3985f0 7ef1fcd0 8044d374
9de0: 7ef1fd20 00000000 000000f8 00000000 7ef1fd20 00000000 000000f8 00000000
9e00: 00000028 00000002 00000000 6437d1dd 7ef1fddc 76f9c030 7ef1fd88 76fb9abc
9e20: 00000320 00005007 e02c7eca c1399eff 020fb2db 00000000 00000000 00000000
9e40: 00000001 00000040 00000400 00000004 00000010 00000400 00000002 00000100
9e60: 00000100 00000008 00000008 00000000 ffffffff 00000000 7588e180 76fb1000
9e80: 08000000 00000000 00000000 76fb11b8 000000af 760b6cd8 ffffffff 7431d4c0
9ea0: 000cb1ac 75889000 00000000 00000001 000000b0 00000000 00000000 76fa0da0
9ec0: 00000000 00000001 00000001 00000000 00000000 7588cb40 00000001 75957ecc
9ee0: 00000001 7ef1fe7c 75953e94 7ef1fedc 00000002 76fa789c 00007530 ac6813c0
9f00: 00000000 7ef1fcd0 ac6813c0 ac968000 ac3985f0 800d68fc 00000001 ac968000
9f20: ac969f34 8004efe4 ac4f71d4 6c31d000 00000000 80623fd4 00000000 80623578
9f40: ac4f71d4 800a3d40 00000001 00000000 ac969f5c 00000003 ac6813c8 00000000
9f60: 00000001 00007530 00000003 00000000 7ef1fcd0 ac6813c0 ac968000 00000000
9f80: 00000000 800d6afc ac4f7180 00000000 00002710 00007530 75957e40 00000036
9fa0: 8000e2c4 8000e140 00002710 00007530 00000003 00007530 7ef1fcd0 01bc3008
9fc0: 00002710 00007530 75957e40 00000036 01bd2e70 00000001 7ef1fd20 00000000
9fe0: 759540c4 7ef1fcbc 7593f698 760a0ccc 20010010 00000003 00000000 00000000
[<80623fd4>] (_raw_spin_lock+0x10/0x4c) from [<806235e0>] (rt_spin_lock_slowlock+0x34/0x29c)
[<806235e0>] (rt_spin_lock_slowlock+0x34/0x29c) from [<8044e540>] (_QueryProcessPageTable+0x8c/0xdc)
[<8044e540>] (_QueryProcessPageTable+0x8c/0xdc) from [<8044f6f4>] (gckOS_GetPhysicalAddress+0x20/0x58)
[<8044f6f4>] (gckOS_GetPhysicalAddress+0x20/0x58) from [<804605b8>] (gckHARDWARE_ConvertLogical+0x2c/0x90)
[<804605b8>] (gckHARDWARE_ConvertLogical+0x2c/0x90) from [<804607f4>] (gckHARDWARE_Link+0x60/0x104)
[<804607f4>] (gckHARDWARE_Link+0x60/0x104) from [<8045f1a0>] (gckCONTEXT_Construct+0x264/0x2bc)
[<8045f1a0>] (gckCONTEXT_Construct+0x264/0x2bc) from [<8045661c>] (gckCOMMAND_Attach+0x44/0x88)
[<8045661c>] (gckCOMMAND_Attach+0x44/0x88) from [<80454144>] (gckKERNEL_Dispatch+0x358/0x12c8)
[<80454144>] (gckKERNEL_Dispatch+0x358/0x12c8) from [<8044d374>] (drv_ioctl+0x120/0x284)
[<8044d374>] (drv_ioctl+0x120/0x284) from [<800d68fc>] (do_vfs_ioctl+0x408/0x5d0)
[<800d68fc>] (do_vfs_ioctl+0x408/0x5d0) from [<800d6afc>] (SyS_ioctl+0x38/0x64)
[<800d6afc>] (SyS_ioctl+0x38/0x64) from [<8000e140>] (ret_fast_syscall+0x0/0x30)
Code: e92d4010 e1a04000 e3a00001 ebe8abd7 (e1943f9f)
---[ end trace 0000000000000002 ]---
note: test-qt5[277] exited with preempt_count 1
Index: git/include/linux/mm_types.h
===================================================================
--- git.orig/include/linux/mm_types.h
+++ git/include/linux/mm_types.h
@@ -24,7 +24,7 @@
struct address_space;
-#define USE_SPLIT_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
+#define USE_SPLIT_PTLOCKS (0)
/*
* Each physical page in the system has a struct page associated with

View File

@ -0,0 +1,17 @@
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index d799140..fbe4f56 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1335,10 +1335,12 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
ucr2 &= ~UCR2_IRTS;
ucr2 |= UCR2_CTSC;
+#if 0
/* Can we enable the DMA support? */
if (is_imx6q_uart(sport) && !uart_console(port)
&& !sport->dma_is_inited)
imx_uart_dma_init(sport);
+#endif
} else {
termios->c_cflag &= ~CRTSCTS;
}

View File

@ -0,0 +1,185 @@
config AUFS_FS
tristate "Aufs (Advanced multi layered unification filesystem) support"
help
Aufs is a stackable unification filesystem such as Unionfs,
which unifies several directories and provides a merged single
directory.
In the early days, aufs was entirely re-designed and
re-implemented Unionfs Version 1.x series. Introducing many
original ideas, approaches and improvements, it becomes totally
different from Unionfs while keeping the basic features.
if AUFS_FS
choice
prompt "Maximum number of branches"
default AUFS_BRANCH_MAX_127
help
Specifies the maximum number of branches (or member directories)
in a single aufs. The larger value consumes more system
resources and has a minor impact to performance.
config AUFS_BRANCH_MAX_127
bool "127"
help
Specifies the maximum number of branches (or member directories)
in a single aufs. The larger value consumes more system
resources and has a minor impact to performance.
config AUFS_BRANCH_MAX_511
bool "511"
help
Specifies the maximum number of branches (or member directories)
in a single aufs. The larger value consumes more system
resources and has a minor impact to performance.
config AUFS_BRANCH_MAX_1023
bool "1023"
help
Specifies the maximum number of branches (or member directories)
in a single aufs. The larger value consumes more system
resources and has a minor impact to performance.
config AUFS_BRANCH_MAX_32767
bool "32767"
help
Specifies the maximum number of branches (or member directories)
in a single aufs. The larger value consumes more system
resources and has a minor impact to performance.
endchoice
config AUFS_SBILIST
bool
depends on AUFS_MAGIC_SYSRQ || PROC_FS
default y
help
Automatic configuration for internal use.
When aufs supports Magic SysRq or /proc, enabled automatically.
config AUFS_HNOTIFY
bool "Detect direct branch access (bypassing aufs)"
help
If you want to modify files on branches directly, eg. bypassing aufs,
and want aufs to detect the changes of them fully, then enable this
option and use 'udba=notify' mount option.
Currently there is only one available configuration, "fsnotify".
It will have a negative impact to the performance.
See detail in aufs.5.
choice
prompt "method" if AUFS_HNOTIFY
default AUFS_HFSNOTIFY
config AUFS_HFSNOTIFY
bool "fsnotify"
select FSNOTIFY
endchoice
config AUFS_EXPORT
bool "NFS-exportable aufs"
depends on EXPORTFS
help
If you want to export your mounted aufs via NFS, then enable this
option. There are several requirements for this configuration.
See detail in aufs.5.
config AUFS_INO_T_64
bool
depends on AUFS_EXPORT
depends on 64BIT && !(ALPHA || S390)
default y
help
Automatic configuration for internal use.
/* typedef unsigned long/int __kernel_ino_t */
/* alpha and s390x are int */
config AUFS_XATTR
bool "support for XATTR/EA (including Security Labels)"
help
If your branch fs supports XATTR/EA and you want to make them
available in aufs too, then enable this opsion and specify the
branch attributes for EA.
See detail in aufs.5.
config AUFS_FHSM
bool "File-based Hierarchical Storage Management"
help
Hierarchical Storage Management (or HSM) is a well-known feature
in the storage world. Aufs provides this feature as file-based.
with multiple branches.
These multiple branches are prioritized, ie. the topmost one
should be the fastest drive and be used heavily.
config AUFS_RDU
bool "Readdir in userspace"
help
Aufs has two methods to provide a merged view for a directory,
by a user-space library and by kernel-space natively. The latter
is always enabled but sometimes large and slow.
If you enable this option, install the library in aufs2-util
package, and set some environment variables for your readdir(3),
then the work will be handled in user-space which generally
shows better performance in most cases.
See detail in aufs.5.
config AUFS_SHWH
bool "Show whiteouts"
help
If you want to make the whiteouts in aufs visible, then enable
this option and specify 'shwh' mount option. Although it may
sounds like philosophy or something, but in technically it
simply shows the name of whiteout with keeping its behaviour.
config AUFS_BR_RAMFS
bool "Ramfs (initramfs/rootfs) as an aufs branch"
help
If you want to use ramfs as an aufs branch fs, then enable this
option. Generally tmpfs is recommended.
Aufs prohibited them to be a branch fs by default, because
initramfs becomes unusable after switch_root or something
generally. If you sets initramfs as an aufs branch and boot your
system by switch_root, you will meet a problem easily since the
files in initramfs may be inaccessible.
Unless you are going to use ramfs as an aufs branch fs without
switch_root or something, leave it N.
config AUFS_BR_FUSE
bool "Fuse fs as an aufs branch"
depends on FUSE_FS
select AUFS_POLL
help
If you want to use fuse-based userspace filesystem as an aufs
branch fs, then enable this option.
It implements the internal poll(2) operation which is
implemented by fuse only (curretnly).
config AUFS_POLL
bool
help
Automatic configuration for internal use.
config AUFS_BR_HFSPLUS
bool "Hfsplus as an aufs branch"
depends on HFSPLUS_FS
default y
help
If you want to use hfsplus fs as an aufs branch fs, then enable
this option. This option introduces a small overhead at
copying-up a file on hfsplus.
config AUFS_BDEV_LOOP
bool
depends on BLK_DEV_LOOP
default y
help
Automatic configuration for internal use.
Convert =[ym] into =y.
config AUFS_DEBUG
bool "Debug aufs"
help
Enable this to compile aufs internal debug code.
It will have a negative impact to the performance.
config AUFS_MAGIC_SYSRQ
bool
depends on AUFS_DEBUG && MAGIC_SYSRQ
default y
help
Automatic configuration for internal use.
When aufs supports Magic SysRq, enabled automatically.
endif

View File

@ -0,0 +1,43 @@
include ${src}/magic.mk
ifeq (${CONFIG_AUFS_FS},m)
include ${src}/conf.mk
endif
-include ${src}/priv_def.mk
# cf. include/linux/kernel.h
# enable pr_debug
ccflags-y += -DDEBUG
# sparse requires the full pathname
ifdef M
ccflags-y += -include ${M}/../../include/uapi/linux/aufs_type.h
else
ccflags-y += -include ${srctree}/include/uapi/linux/aufs_type.h
endif
obj-$(CONFIG_AUFS_FS) += aufs.o
aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o \
wkq.o vfsub.o dcsub.o \
cpup.o whout.o wbr_policy.o \
dinfo.o dentry.o \
dynop.o \
finfo.o file.o f_op.o \
dir.o vdir.o \
iinfo.o inode.o i_op.o i_op_add.o i_op_del.o i_op_ren.o \
mvdown.o ioctl.o
# all are boolean
aufs-$(CONFIG_PROC_FS) += procfs.o plink.o
aufs-$(CONFIG_SYSFS) += sysfs.o
aufs-$(CONFIG_DEBUG_FS) += dbgaufs.o
aufs-$(CONFIG_AUFS_BDEV_LOOP) += loop.o
aufs-$(CONFIG_AUFS_HNOTIFY) += hnotify.o
aufs-$(CONFIG_AUFS_HFSNOTIFY) += hfsnotify.o
aufs-$(CONFIG_AUFS_EXPORT) += export.o
aufs-$(CONFIG_AUFS_XATTR) += xattr.o
aufs-$(CONFIG_AUFS_FHSM) += fhsm.o
aufs-$(CONFIG_AUFS_POLL) += poll.o
aufs-$(CONFIG_AUFS_RDU) += rdu.o
aufs-$(CONFIG_AUFS_BR_HFSPLUS) += hfsplus.o
aufs-$(CONFIG_AUFS_DEBUG) += debug.o
aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o

View File

@ -0,0 +1,59 @@
/*
* Copyright (C) 2005-2014 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* all header files
*/
#ifndef __AUFS_H__
#define __AUFS_H__
#ifdef __KERNEL__
#define AuStub(type, name, body, ...) \
static inline type name(__VA_ARGS__) { body; }
#define AuStubVoid(name, ...) \
AuStub(void, name, , __VA_ARGS__)
#define AuStubInt0(name, ...) \
AuStub(int, name, return 0, __VA_ARGS__)
#include "debug.h"
#include "branch.h"
#include "cpup.h"
#include "dcsub.h"
#include "dbgaufs.h"
#include "dentry.h"
#include "dir.h"
#include "dynop.h"
#include "file.h"
#include "fstype.h"
#include "inode.h"
#include "loop.h"
#include "module.h"
#include "opts.h"
#include "rwsem.h"
#include "spl.h"
#include "super.h"
#include "sysaufs.h"
#include "vfsub.h"
#include "whout.h"
#include "wkq.h"
#endif /* __KERNEL__ */
#endif /* __AUFS_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,268 @@
/*
* Copyright (C) 2005-2014 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* branch filesystems and xino for them
*/
#ifndef __AUFS_BRANCH_H__
#define __AUFS_BRANCH_H__
#ifdef __KERNEL__
#include <linux/mount.h>
#include "dynop.h"
#include "rwsem.h"
#include "super.h"
/* ---------------------------------------------------------------------- */
/* a xino file */
struct au_xino_file {
struct file *xi_file;
struct mutex xi_nondir_mtx;
/* todo: make xino files an array to support huge inode number */
#ifdef CONFIG_DEBUG_FS
struct dentry *xi_dbgaufs;
#endif
};
/* File-based Hierarchical Storage Management */
struct au_br_fhsm {
#ifdef CONFIG_AUFS_FHSM
struct mutex bf_lock;
unsigned long bf_jiffy;
struct aufs_stfs bf_stfs;
int bf_readable;
#endif
};
/* members for writable branch only */
enum {AuBrWh_BASE, AuBrWh_PLINK, AuBrWh_ORPH, AuBrWh_Last};
struct au_wbr {
struct au_rwsem wbr_wh_rwsem;
struct dentry *wbr_wh[AuBrWh_Last];
atomic_t wbr_wh_running;
#define wbr_whbase wbr_wh[AuBrWh_BASE] /* whiteout base */
#define wbr_plink wbr_wh[AuBrWh_PLINK] /* pseudo-link dir */
#define wbr_orph wbr_wh[AuBrWh_ORPH] /* dir for orphans */
/* mfs mode */
unsigned long long wbr_bytes;
};
/* ext2 has 3 types of operations at least, ext3 has 4 */
#define AuBrDynOp (AuDyLast * 4)
#ifdef CONFIG_AUFS_HFSNOTIFY
/* support for asynchronous destruction */
struct au_br_hfsnotify {
struct fsnotify_group *hfsn_group;
};
#endif
/* sysfs entries */
struct au_brsysfs {
char name[16];
struct attribute attr;
};
enum {
AuBrSysfs_BR,
AuBrSysfs_BRID,
AuBrSysfs_Last
};
/* protected by superblock rwsem */
struct au_branch {
struct au_xino_file br_xino;
aufs_bindex_t br_id;
int br_perm;
unsigned int br_dflags;
struct path br_path;
spinlock_t br_dykey_lock;
struct au_dykey *br_dykey[AuBrDynOp];
atomic_t br_count;
struct au_wbr *br_wbr;
struct au_br_fhsm *br_fhsm;
/* xino truncation */
atomic_t br_xino_running;
#ifdef CONFIG_AUFS_HFSNOTIFY
struct au_br_hfsnotify *br_hfsn;
#endif
#ifdef CONFIG_SYSFS
/* entries under sysfs per mount-point */
struct au_brsysfs br_sysfs[AuBrSysfs_Last];
#endif
};
/* ---------------------------------------------------------------------- */
static inline struct vfsmount *au_br_mnt(struct au_branch *br)
{
return br->br_path.mnt;
}
static inline struct dentry *au_br_dentry(struct au_branch *br)
{
return br->br_path.dentry;
}
static inline struct super_block *au_br_sb(struct au_branch *br)
{
return au_br_mnt(br)->mnt_sb;
}
static inline int au_br_rdonly(struct au_branch *br)
{
return ((au_br_sb(br)->s_flags & MS_RDONLY)
|| !au_br_writable(br->br_perm))
? -EROFS : 0;
}
static inline int au_br_hnotifyable(int brperm __maybe_unused)
{
#ifdef CONFIG_AUFS_HNOTIFY
return !(brperm & AuBrPerm_RR);
#else
return 0;
#endif
}
/* ---------------------------------------------------------------------- */
/* branch.c */
struct au_sbinfo;
void au_br_free(struct au_sbinfo *sinfo);
int au_br_index(struct super_block *sb, aufs_bindex_t br_id);
struct au_opt_add;
int au_br_add(struct super_block *sb, struct au_opt_add *add, int remount);
struct au_opt_del;
int au_br_del(struct super_block *sb, struct au_opt_del *del, int remount);
long au_ibusy_ioctl(struct file *file, unsigned long arg);
#ifdef CONFIG_COMPAT
long au_ibusy_compat_ioctl(struct file *file, unsigned long arg);
#endif
struct au_opt_mod;
int au_br_mod(struct super_block *sb, struct au_opt_mod *mod, int remount,
int *do_refresh);
struct aufs_stfs;
int au_br_stfs(struct au_branch *br, struct aufs_stfs *stfs);
/* xino.c */
static const loff_t au_loff_max = LLONG_MAX;
int au_xib_trunc(struct super_block *sb);
ssize_t xino_fread(au_readf_t func, struct file *file, void *buf, size_t size,
loff_t *pos);
ssize_t xino_fwrite(au_writef_t func, struct file *file, void *buf, size_t size,
loff_t *pos);
struct file *au_xino_create2(struct file *base_file, struct file *copy_src);
struct file *au_xino_create(struct super_block *sb, char *fname, int silent);
ino_t au_xino_new_ino(struct super_block *sb);
void au_xino_delete_inode(struct inode *inode, const int unlinked);
int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino,
ino_t ino);
int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino,
ino_t *ino);
int au_xino_br(struct super_block *sb, struct au_branch *br, ino_t hino,
struct file *base_file, int do_test);
int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex);
struct au_opt_xino;
int au_xino_set(struct super_block *sb, struct au_opt_xino *xino, int remount);
void au_xino_clr(struct super_block *sb);
struct file *au_xino_def(struct super_block *sb);
int au_xino_path(struct seq_file *seq, struct file *file);
/* ---------------------------------------------------------------------- */
/* Superblock to branch */
static inline
aufs_bindex_t au_sbr_id(struct super_block *sb, aufs_bindex_t bindex)
{
return au_sbr(sb, bindex)->br_id;
}
static inline
struct vfsmount *au_sbr_mnt(struct super_block *sb, aufs_bindex_t bindex)
{
return au_br_mnt(au_sbr(sb, bindex));
}
static inline
struct super_block *au_sbr_sb(struct super_block *sb, aufs_bindex_t bindex)
{
return au_br_sb(au_sbr(sb, bindex));
}
static inline void au_sbr_put(struct super_block *sb, aufs_bindex_t bindex)
{
atomic_dec(&au_sbr(sb, bindex)->br_count);
}
static inline int au_sbr_perm(struct super_block *sb, aufs_bindex_t bindex)
{
return au_sbr(sb, bindex)->br_perm;
}
static inline int au_sbr_whable(struct super_block *sb, aufs_bindex_t bindex)
{
return au_br_whable(au_sbr_perm(sb, bindex));
}
/* ---------------------------------------------------------------------- */
/*
* wbr_wh_read_lock, wbr_wh_write_lock
* wbr_wh_read_unlock, wbr_wh_write_unlock, wbr_wh_downgrade_lock
*/
AuSimpleRwsemFuncs(wbr_wh, struct au_wbr *wbr, &wbr->wbr_wh_rwsem);
#define WbrWhMustNoWaiters(wbr) AuRwMustNoWaiters(&wbr->wbr_wh_rwsem)
#define WbrWhMustAnyLock(wbr) AuRwMustAnyLock(&wbr->wbr_wh_rwsem)
#define WbrWhMustWriteLock(wbr) AuRwMustWriteLock(&wbr->wbr_wh_rwsem)
/* ---------------------------------------------------------------------- */
#ifdef CONFIG_AUFS_FHSM
static inline void au_br_fhsm_init(struct au_br_fhsm *brfhsm)
{
mutex_init(&brfhsm->bf_lock);
brfhsm->bf_jiffy = 0;
brfhsm->bf_readable = 0;
}
static inline void au_br_fhsm_fin(struct au_br_fhsm *brfhsm)
{
mutex_destroy(&brfhsm->bf_lock);
}
#else
AuStubVoid(au_br_fhsm_init, struct au_br_fhsm *brfhsm)
AuStubVoid(au_br_fhsm_fin, struct au_br_fhsm *brfhsm)
#endif
#endif /* __KERNEL__ */
#endif /* __AUFS_BRANCH_H__ */

View File

@ -0,0 +1,38 @@
AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
define AuConf
ifdef ${1}
AuConfStr += ${1}=${${1}}
endif
endef
AuConfAll = BRANCH_MAX_127 BRANCH_MAX_511 BRANCH_MAX_1023 BRANCH_MAX_32767 \
SBILIST \
HNOTIFY HFSNOTIFY \
EXPORT INO_T_64 \
XATTR \
FHSM \
RDU \
SHWH \
BR_RAMFS \
BR_FUSE POLL \
BR_HFSPLUS \
BDEV_LOOP \
DEBUG MAGIC_SYSRQ
$(foreach i, ${AuConfAll}, \
$(eval $(call AuConf,CONFIG_AUFS_${i})))
AuConfName = ${obj}/conf.str
${AuConfName}.tmp: FORCE
@echo ${AuConfStr} | tr ' ' '\n' | sed -e 's/^/"/' -e 's/$$/\\n"/' > $@
${AuConfName}: ${AuConfName}.tmp
@diff -q $< $@ > /dev/null 2>&1 || { \
echo ' GEN ' $@; \
cp -p $< $@; \
}
FORCE:
clean-files += ${AuConfName} ${AuConfName}.tmp
${obj}/sysfs.o: ${AuConfName}
-include ${srctree}/${src}/conf_priv.mk

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,94 @@
/*
* Copyright (C) 2005-2014 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* copy-up/down functions
*/
#ifndef __AUFS_CPUP_H__
#define __AUFS_CPUP_H__
#ifdef __KERNEL__
#include <linux/path.h>
struct inode;
struct file;
struct au_pin;
void au_cpup_attr_flags(struct inode *dst, unsigned int iflags);
void au_cpup_attr_timesizes(struct inode *inode);
void au_cpup_attr_nlink(struct inode *inode, int force);
void au_cpup_attr_changeable(struct inode *inode);
void au_cpup_igen(struct inode *inode, struct inode *h_inode);
void au_cpup_attr_all(struct inode *inode, int force);
/* ---------------------------------------------------------------------- */
struct au_cp_generic {
struct dentry *dentry;
aufs_bindex_t bdst, bsrc;
loff_t len;
struct au_pin *pin;
unsigned int flags;
};
/* cpup flags */
#define AuCpup_DTIME 1 /* do dtime_store/revert */
#define AuCpup_KEEPLINO (1 << 1) /* do not clear the lower xino,
for link(2) */
#define AuCpup_RENAME (1 << 2) /* rename after cpup */
#define AuCpup_HOPEN (1 << 3) /* call h_open_pre/post() in
cpup */
#define AuCpup_OVERWRITE (1 << 4) /* allow overwriting the
existing entry */
#define AuCpup_RWDST (1 << 5) /* force write target even if
the branch is marked as RO */
#define au_ftest_cpup(flags, name) ((flags) & AuCpup_##name)
#define au_fset_cpup(flags, name) \
do { (flags) |= AuCpup_##name; } while (0)
#define au_fclr_cpup(flags, name) \
do { (flags) &= ~AuCpup_##name; } while (0)
int au_copy_file(struct file *dst, struct file *src, loff_t len);
int au_sio_cpup_simple(struct au_cp_generic *cpg);
int au_sio_cpdown_simple(struct au_cp_generic *cpg);
int au_sio_cpup_wh(struct au_cp_generic *cpg, struct file *file);
int au_cp_dirs(struct dentry *dentry, aufs_bindex_t bdst,
int (*cp)(struct dentry *dentry, aufs_bindex_t bdst,
struct au_pin *pin,
struct dentry *h_parent, void *arg),
void *arg);
int au_cpup_dirs(struct dentry *dentry, aufs_bindex_t bdst);
int au_test_and_cpup_dirs(struct dentry *dentry, aufs_bindex_t bdst);
/* ---------------------------------------------------------------------- */
/* keep timestamps when copyup */
struct au_dtime {
struct dentry *dt_dentry;
struct path dt_h_path;
struct timespec dt_atime, dt_mtime;
};
void au_dtime_store(struct au_dtime *dt, struct dentry *dentry,
struct path *h_path);
void au_dtime_revert(struct au_dtime *dt);
#endif /* __KERNEL__ */
#endif /* __AUFS_CPUP_H__ */

View File

@ -0,0 +1,432 @@
/*
* Copyright (C) 2005-2014 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* debugfs interface
*/
#include <linux/debugfs.h>
#include "aufs.h"
#ifndef CONFIG_SYSFS
#error DEBUG_FS depends upon SYSFS
#endif
static struct dentry *dbgaufs;
static const mode_t dbgaufs_mode = S_IRUSR | S_IRGRP | S_IROTH;
/* 20 is max digits length of ulong 64 */
struct dbgaufs_arg {
int n;
char a[20 * 4];
};
/*
* common function for all XINO files
*/
static int dbgaufs_xi_release(struct inode *inode __maybe_unused,
struct file *file)
{
kfree(file->private_data);
return 0;
}
static int dbgaufs_xi_open(struct file *xf, struct file *file, int do_fcnt)
{
int err;
struct kstat st;
struct dbgaufs_arg *p;
err = -ENOMEM;
p = kmalloc(sizeof(*p), GFP_NOFS);
if (unlikely(!p))
goto out;
err = 0;
p->n = 0;
file->private_data = p;
if (!xf)
goto out;
err = vfs_getattr(&xf->f_path, &st);
if (!err) {
if (do_fcnt)
p->n = snprintf
(p->a, sizeof(p->a), "%ld, %llux%lu %lld\n",
(long)file_count(xf), st.blocks, st.blksize,
(long long)st.size);
else
p->n = snprintf(p->a, sizeof(p->a), "%llux%lu %lld\n",
st.blocks, st.blksize,
(long long)st.size);
AuDebugOn(p->n >= sizeof(p->a));
} else {
p->n = snprintf(p->a, sizeof(p->a), "err %d\n", err);
err = 0;
}
out:
return err;
}
static ssize_t dbgaufs_xi_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct dbgaufs_arg *p;
p = file->private_data;
return simple_read_from_buffer(buf, count, ppos, p->a, p->n);
}
/* ---------------------------------------------------------------------- */
struct dbgaufs_plink_arg {
int n;
char a[];
};
static int dbgaufs_plink_release(struct inode *inode __maybe_unused,
struct file *file)
{
free_page((unsigned long)file->private_data);
return 0;
}
static int dbgaufs_plink_open(struct inode *inode, struct file *file)
{
int err, i, limit;
unsigned long n, sum;
struct dbgaufs_plink_arg *p;
struct au_sbinfo *sbinfo;
struct super_block *sb;
struct au_sphlhead *sphl;
err = -ENOMEM;
p = (void *)get_zeroed_page(GFP_NOFS);
if (unlikely(!p))
goto out;
err = -EFBIG;
sbinfo = inode->i_private;
sb = sbinfo->si_sb;
si_noflush_read_lock(sb);
if (au_opt_test(au_mntflags(sb), PLINK)) {
limit = PAGE_SIZE - sizeof(p->n);
/* the number of buckets */
n = snprintf(p->a + p->n, limit, "%d\n", AuPlink_NHASH);
p->n += n;
limit -= n;
sum = 0;
for (i = 0, sphl = sbinfo->si_plink;
i < AuPlink_NHASH;
i++, sphl++) {
n = au_sphl_count(sphl);
sum += n;
n = snprintf(p->a + p->n, limit, "%lu ", n);
p->n += n;
limit -= n;
if (unlikely(limit <= 0))
goto out_free;
}
p->a[p->n - 1] = '\n';
/* the sum of plinks */
n = snprintf(p->a + p->n, limit, "%lu\n", sum);
p->n += n;
limit -= n;
if (unlikely(limit <= 0))
goto out_free;
} else {
#define str "1\n0\n0\n"
p->n = sizeof(str) - 1;
strcpy(p->a, str);
#undef str
}
si_read_unlock(sb);
err = 0;
file->private_data = p;
goto out; /* success */
out_free:
free_page((unsigned long)p);
out:
return err;
}
static ssize_t dbgaufs_plink_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct dbgaufs_plink_arg *p;
p = file->private_data;
return simple_read_from_buffer(buf, count, ppos, p->a, p->n);
}
static const struct file_operations dbgaufs_plink_fop = {
.owner = THIS_MODULE,
.open = dbgaufs_plink_open,
.release = dbgaufs_plink_release,
.read = dbgaufs_plink_read
};
/* ---------------------------------------------------------------------- */
static int dbgaufs_xib_open(struct inode *inode, struct file *file)
{
int err;
struct au_sbinfo *sbinfo;
struct super_block *sb;
sbinfo = inode->i_private;
sb = sbinfo->si_sb;
si_noflush_read_lock(sb);
err = dbgaufs_xi_open(sbinfo->si_xib, file, /*do_fcnt*/0);
si_read_unlock(sb);
return err;
}
static const struct file_operations dbgaufs_xib_fop = {
.owner = THIS_MODULE,
.open = dbgaufs_xib_open,
.release = dbgaufs_xi_release,
.read = dbgaufs_xi_read
};
/* ---------------------------------------------------------------------- */
#define DbgaufsXi_PREFIX "xi"
static int dbgaufs_xino_open(struct inode *inode, struct file *file)
{
int err;
long l;
struct au_sbinfo *sbinfo;
struct super_block *sb;
struct file *xf;
struct qstr *name;
err = -ENOENT;
xf = NULL;
name = &file->f_dentry->d_name;
if (unlikely(name->len < sizeof(DbgaufsXi_PREFIX)
|| memcmp(name->name, DbgaufsXi_PREFIX,
sizeof(DbgaufsXi_PREFIX) - 1)))
goto out;
err = kstrtol(name->name + sizeof(DbgaufsXi_PREFIX) - 1, 10, &l);
if (unlikely(err))
goto out;
sbinfo = inode->i_private;
sb = sbinfo->si_sb;
si_noflush_read_lock(sb);
if (l <= au_sbend(sb)) {
xf = au_sbr(sb, (aufs_bindex_t)l)->br_xino.xi_file;
err = dbgaufs_xi_open(xf, file, /*do_fcnt*/1);
} else
err = -ENOENT;
si_read_unlock(sb);
out:
return err;
}
static const struct file_operations dbgaufs_xino_fop = {
.owner = THIS_MODULE,
.open = dbgaufs_xino_open,
.release = dbgaufs_xi_release,
.read = dbgaufs_xi_read
};
void dbgaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex)
{
aufs_bindex_t bend;
struct au_branch *br;
struct au_xino_file *xi;
if (!au_sbi(sb)->si_dbgaufs)
return;
bend = au_sbend(sb);
for (; bindex <= bend; bindex++) {
br = au_sbr(sb, bindex);
xi = &br->br_xino;
debugfs_remove(xi->xi_dbgaufs);
xi->xi_dbgaufs = NULL;
}
}
void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex)
{
struct au_sbinfo *sbinfo;
struct dentry *parent;
struct au_branch *br;
struct au_xino_file *xi;
aufs_bindex_t bend;
char name[sizeof(DbgaufsXi_PREFIX) + 5]; /* "xi" bindex NULL */
sbinfo = au_sbi(sb);
parent = sbinfo->si_dbgaufs;
if (!parent)
return;
bend = au_sbend(sb);
for (; bindex <= bend; bindex++) {
snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d", bindex);
br = au_sbr(sb, bindex);
xi = &br->br_xino;
AuDebugOn(xi->xi_dbgaufs);
xi->xi_dbgaufs = debugfs_create_file(name, dbgaufs_mode, parent,
sbinfo, &dbgaufs_xino_fop);
/* ignore an error */
if (unlikely(!xi->xi_dbgaufs))
AuWarn1("failed %s under debugfs\n", name);
}
}
/* ---------------------------------------------------------------------- */
#ifdef CONFIG_AUFS_EXPORT
static int dbgaufs_xigen_open(struct inode *inode, struct file *file)
{
int err;
struct au_sbinfo *sbinfo;
struct super_block *sb;
sbinfo = inode->i_private;
sb = sbinfo->si_sb;
si_noflush_read_lock(sb);
err = dbgaufs_xi_open(sbinfo->si_xigen, file, /*do_fcnt*/0);
si_read_unlock(sb);
return err;
}
static const struct file_operations dbgaufs_xigen_fop = {
.owner = THIS_MODULE,
.open = dbgaufs_xigen_open,
.release = dbgaufs_xi_release,
.read = dbgaufs_xi_read
};
static int dbgaufs_xigen_init(struct au_sbinfo *sbinfo)
{
int err;
/*
* This function is a dynamic '__init' function actually,
* so the tiny check for si_rwsem is unnecessary.
*/
/* AuRwMustWriteLock(&sbinfo->si_rwsem); */
err = -EIO;
sbinfo->si_dbgaufs_xigen = debugfs_create_file
("xigen", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo,
&dbgaufs_xigen_fop);
if (sbinfo->si_dbgaufs_xigen)
err = 0;
return err;
}
#else
static int dbgaufs_xigen_init(struct au_sbinfo *sbinfo)
{
return 0;
}
#endif /* CONFIG_AUFS_EXPORT */
/* ---------------------------------------------------------------------- */
void dbgaufs_si_fin(struct au_sbinfo *sbinfo)
{
/*
* This function is a dynamic '__init' function actually,
* so the tiny check for si_rwsem is unnecessary.
*/
/* AuRwMustWriteLock(&sbinfo->si_rwsem); */
debugfs_remove_recursive(sbinfo->si_dbgaufs);
sbinfo->si_dbgaufs = NULL;
kobject_put(&sbinfo->si_kobj);
}
int dbgaufs_si_init(struct au_sbinfo *sbinfo)
{
int err;
char name[SysaufsSiNameLen];
/*
* This function is a dynamic '__init' function actually,
* so the tiny check for si_rwsem is unnecessary.
*/
/* AuRwMustWriteLock(&sbinfo->si_rwsem); */
err = -ENOENT;
if (!dbgaufs) {
AuErr1("/debug/aufs is uninitialized\n");
goto out;
}
err = -EIO;
sysaufs_name(sbinfo, name);
sbinfo->si_dbgaufs = debugfs_create_dir(name, dbgaufs);
if (unlikely(!sbinfo->si_dbgaufs))
goto out;
kobject_get(&sbinfo->si_kobj);
sbinfo->si_dbgaufs_xib = debugfs_create_file
("xib", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo,
&dbgaufs_xib_fop);
if (unlikely(!sbinfo->si_dbgaufs_xib))
goto out_dir;
sbinfo->si_dbgaufs_plink = debugfs_create_file
("plink", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo,
&dbgaufs_plink_fop);
if (unlikely(!sbinfo->si_dbgaufs_plink))
goto out_dir;
err = dbgaufs_xigen_init(sbinfo);
if (!err)
goto out; /* success */
out_dir:
dbgaufs_si_fin(sbinfo);
out:
return err;
}
/* ---------------------------------------------------------------------- */
void dbgaufs_fin(void)
{
debugfs_remove(dbgaufs);
}
int __init dbgaufs_init(void)
{
int err;
err = -EIO;
dbgaufs = debugfs_create_dir(AUFS_NAME, NULL);
if (dbgaufs)
err = 0;
return err;
}

View File

@ -0,0 +1,48 @@
/*
* Copyright (C) 2005-2014 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* debugfs interface
*/
#ifndef __DBGAUFS_H__
#define __DBGAUFS_H__
#ifdef __KERNEL__
struct super_block;
struct au_sbinfo;
#ifdef CONFIG_DEBUG_FS
/* dbgaufs.c */
void dbgaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex);
void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex);
void dbgaufs_si_fin(struct au_sbinfo *sbinfo);
int dbgaufs_si_init(struct au_sbinfo *sbinfo);
void dbgaufs_fin(void);
int __init dbgaufs_init(void);
#else
AuStubVoid(dbgaufs_brs_del, struct super_block *sb, aufs_bindex_t bindex)
AuStubVoid(dbgaufs_brs_add, struct super_block *sb, aufs_bindex_t bindex)
AuStubVoid(dbgaufs_si_fin, struct au_sbinfo *sbinfo)
AuStubInt0(dbgaufs_si_init, struct au_sbinfo *sbinfo)
AuStubVoid(dbgaufs_fin, void)
AuStubInt0(__init dbgaufs_init, void)
#endif /* CONFIG_DEBUG_FS */
#endif /* __KERNEL__ */
#endif /* __DBGAUFS_H__ */

View File

@ -0,0 +1,242 @@
/*
* Copyright (C) 2005-2014 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* sub-routines for dentry cache
*/
#include "aufs.h"
static void au_dpage_free(struct au_dpage *dpage)
{
int i;
struct dentry **p;
p = dpage->dentries;
for (i = 0; i < dpage->ndentry; i++)
dput(*p++);
free_page((unsigned long)dpage->dentries);
}
int au_dpages_init(struct au_dcsub_pages *dpages, gfp_t gfp)
{
int err;
void *p;
err = -ENOMEM;
dpages->dpages = kmalloc(sizeof(*dpages->dpages), gfp);
if (unlikely(!dpages->dpages))
goto out;
p = (void *)__get_free_page(gfp);
if (unlikely(!p))
goto out_dpages;
dpages->dpages[0].ndentry = 0;
dpages->dpages[0].dentries = p;
dpages->ndpage = 1;
return 0; /* success */
out_dpages:
kfree(dpages->dpages);
out:
return err;
}
void au_dpages_free(struct au_dcsub_pages *dpages)
{
int i;
struct au_dpage *p;
p = dpages->dpages;
for (i = 0; i < dpages->ndpage; i++)
au_dpage_free(p++);
kfree(dpages->dpages);
}
static int au_dpages_append(struct au_dcsub_pages *dpages,
struct dentry *dentry, gfp_t gfp)
{
int err, sz;
struct au_dpage *dpage;
void *p;
dpage = dpages->dpages + dpages->ndpage - 1;
sz = PAGE_SIZE / sizeof(dentry);
if (unlikely(dpage->ndentry >= sz)) {
AuLabel(new dpage);
err = -ENOMEM;
sz = dpages->ndpage * sizeof(*dpages->dpages);
p = au_kzrealloc(dpages->dpages, sz,
sz + sizeof(*dpages->dpages), gfp);
if (unlikely(!p))
goto out;
dpages->dpages = p;
dpage = dpages->dpages + dpages->ndpage;
p = (void *)__get_free_page(gfp);
if (unlikely(!p))
goto out;
dpage->ndentry = 0;
dpage->dentries = p;
dpages->ndpage++;
}
AuDebugOn(!dentry->d_count);
dpage->dentries[dpage->ndentry++] = dget_dlock(dentry);
return 0; /* success */
out:
return err;
}
int au_dcsub_pages(struct au_dcsub_pages *dpages, struct dentry *root,
au_dpages_test test, void *arg)
{
int err;
struct dentry *this_parent;
struct list_head *next;
struct super_block *sb = root->d_sb;
err = 0;
write_seqlock(&rename_lock);
this_parent = root;
spin_lock(&this_parent->d_lock);
repeat:
next = this_parent->d_subdirs.next;
resume:
if (this_parent->d_sb == sb
&& !IS_ROOT(this_parent)
&& au_di(this_parent)
&& this_parent->d_count
&& (!test || test(this_parent, arg))) {
err = au_dpages_append(dpages, this_parent, GFP_ATOMIC);
if (unlikely(err))
goto out;
}
while (next != &this_parent->d_subdirs) {
struct list_head *tmp = next;
struct dentry *dentry = list_entry(tmp, struct dentry,
d_u.d_child);
next = tmp->next;
spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
if (dentry->d_count) {
if (!list_empty(&dentry->d_subdirs)) {
spin_unlock(&this_parent->d_lock);
spin_release(&dentry->d_lock.dep_map, 1,
_RET_IP_);
this_parent = dentry;
spin_acquire(&this_parent->d_lock.dep_map, 0, 1,
_RET_IP_);
goto repeat;
}
if (dentry->d_sb == sb
&& au_di(dentry)
&& (!test || test(dentry, arg)))
err = au_dpages_append(dpages, dentry,
GFP_ATOMIC);
}
spin_unlock(&dentry->d_lock);
if (unlikely(err))
goto out;
}
if (this_parent != root) {
struct dentry *tmp;
struct dentry *child;
tmp = this_parent->d_parent;
rcu_read_lock();
spin_unlock(&this_parent->d_lock);
child = this_parent;
this_parent = tmp;
spin_lock(&this_parent->d_lock);
rcu_read_unlock();
next = child->d_u.d_child.next;
goto resume;
}
out:
spin_unlock(&this_parent->d_lock);
write_sequnlock(&rename_lock);
return err;
}
int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
int do_include, au_dpages_test test, void *arg)
{
int err;
err = 0;
write_seqlock(&rename_lock);
spin_lock(&dentry->d_lock);
if (do_include
&& dentry->d_count
&& (!test || test(dentry, arg)))
err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
spin_unlock(&dentry->d_lock);
if (unlikely(err))
goto out;
/*
* vfsmount_lock is unnecessary since this is a traverse in a single
* mount
*/
while (!IS_ROOT(dentry)) {
dentry = dentry->d_parent; /* rename_lock is locked */
spin_lock(&dentry->d_lock);
if (dentry->d_count
&& (!test || test(dentry, arg)))
err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
spin_unlock(&dentry->d_lock);
if (unlikely(err))
break;
}
out:
write_sequnlock(&rename_lock);
return err;
}
static inline int au_dcsub_dpages_aufs(struct dentry *dentry, void *arg)
{
return au_di(dentry) && dentry->d_sb == arg;
}
int au_dcsub_pages_rev_aufs(struct au_dcsub_pages *dpages,
struct dentry *dentry, int do_include)
{
return au_dcsub_pages_rev(dpages, dentry, do_include,
au_dcsub_dpages_aufs, dentry->d_sb);
}
int au_test_subdir(struct dentry *d1, struct dentry *d2)
{
struct path path[2] = {
{
.dentry = d1
},
{
.dentry = d2
}
};
return path_is_under(path + 0, path + 1);
}

View File

@ -0,0 +1,102 @@
/*
* Copyright (C) 2005-2014 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* sub-routines for dentry cache
*/
#ifndef __AUFS_DCSUB_H__
#define __AUFS_DCSUB_H__
#ifdef __KERNEL__
#include <linux/dcache.h>
#include <linux/fs.h>
struct dentry;
struct au_dpage {
int ndentry;
struct dentry **dentries;
};
struct au_dcsub_pages {
int ndpage;
struct au_dpage *dpages;
};
/* ---------------------------------------------------------------------- */
/* dcsub.c */
int au_dpages_init(struct au_dcsub_pages *dpages, gfp_t gfp);
void au_dpages_free(struct au_dcsub_pages *dpages);
typedef int (*au_dpages_test)(struct dentry *dentry, void *arg);
int au_dcsub_pages(struct au_dcsub_pages *dpages, struct dentry *root,
au_dpages_test test, void *arg);
int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
int do_include, au_dpages_test test, void *arg);
int au_dcsub_pages_rev_aufs(struct au_dcsub_pages *dpages,
struct dentry *dentry, int do_include);
int au_test_subdir(struct dentry *d1, struct dentry *d2);
/* ---------------------------------------------------------------------- */
static inline int au_d_hashed_positive(struct dentry *d)
{
int err;
struct inode *inode = d->d_inode;
err = 0;
if (unlikely(d_unhashed(d) || !inode || !inode->i_nlink))
err = -ENOENT;
return err;
}
static inline int au_d_alive(struct dentry *d)
{
int err;
struct inode *inode;
err = 0;
if (!IS_ROOT(d))
err = au_d_hashed_positive(d);
else {
inode = d->d_inode;
if (unlikely(d_unlinked(d) || !inode || !inode->i_nlink))
err = -ENOENT;
}
return err;
}
static inline int au_alive_dir(struct dentry *d)
{
int err;
err = au_d_alive(d);
if (unlikely(err || IS_DEADDIR(d->d_inode)))
err = -ENOENT;
return err;
}
static inline int au_qstreq(struct qstr *a, struct qstr *b)
{
return a->len == b->len
&& !memcmp(a->name, b->name, a->len);
}
#endif /* __KERNEL__ */
#endif /* __AUFS_DCSUB_H__ */

Some files were not shown because too many files have changed in this diff Show More