-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling SPI support for the yocto build #6
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
This README file contains information on the contents of the meta-spi layer. | ||
|
||
Please see the corresponding sections below for details. | ||
|
||
Dependencies | ||
============ | ||
|
||
URI: <first dependency> | ||
branch: <branch name> | ||
|
||
URI: <second dependency> | ||
branch: <branch name> | ||
|
||
. | ||
. | ||
. | ||
|
||
Patches | ||
======= | ||
|
||
Please submit any patches against the meta-spi layer to the xxxx mailing list ([email protected]) | ||
and cc: the maintainer: | ||
|
||
Maintainer: XXX YYYYYY <[email protected]> | ||
|
||
Table of Contents | ||
================= | ||
|
||
I. Adding the meta-spi layer to your build | ||
II. Misc | ||
|
||
|
||
I. Adding the meta-spi layer to your build | ||
================================================= | ||
|
||
Run 'bitbake-layers add-layer meta-spi' | ||
|
||
II. Misc | ||
======== | ||
|
||
--- replace with specific information about the meta-spi layer --- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# We have a conf and classes directory, add to BBPATH | ||
BBPATH .= ":${LAYERDIR}" | ||
|
||
# We have recipes-* directories, add to BBFILES | ||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
${LAYERDIR}/recipes-*/*/*.bbappend" | ||
|
||
BBFILE_COLLECTIONS += "meta-spi" | ||
BBFILE_PATTERN_meta-spi = "^${LAYERDIR}/" | ||
BBFILE_PRIORITY_meta-spi = "5" | ||
|
||
LAYERDEPENDS_meta-spi = "core" | ||
LAYERSERIES_COMPAT_meta-spi = "kirkstone" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# See http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/files/common-licenses | ||
LICENSE = "GPL Version 2" | ||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
|
||
# TODO: Set this with the path to your assignments rep. Use ssh protocol and see lecture notes | ||
# about how to setup ssh-agent for passwordless access | ||
SRC_URI = "git://[email protected]/cu-ecen-aeld/Finalproject-Shreyan-Bala-shared.git;protocol=ssh;branch=master" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shreyan-collab can you put a README at https://github.com/cu-ecen-aeld/Finalproject-Shreyan-Bala-shared/tree/master/spi_package detailing where this utility came from (my guess is https://github.com/torvalds/linux/blob/master/tools/spi/spidev_test.c but it would also be great to link a specific version) and also what, if any changes you needed to make to it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dwalkes I have added a README file and pushed the code |
||
|
||
PV = "1.0+git${SRCPV}" | ||
# TODO: set to reference a specific commit hash in your assignment repo | ||
SRCREV = "${AUTOREV}" | ||
|
||
# This sets your staging directory based on WORKDIR, where WORKDIR is defined at | ||
# https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-WORKDIR | ||
# We reference the "server" directory here to build from the "server" directory | ||
# in your assignments repo | ||
S = "${WORKDIR}/git" | ||
B = "${S}/spi_package" | ||
|
||
# TODO: Add the aesdsocket application and any other files you need to install | ||
# See http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/conf/bitbake.conf?h=warrior for yocto path prefixes | ||
FILES_${PN} += "${bindir}/spidevtest" | ||
|
||
# TODO: customize these as necessary for any libraries you need for your application | ||
|
||
do_configure () { | ||
: | ||
} | ||
|
||
do_compile () { | ||
oe_runmake | ||
} | ||
|
||
do_install () { | ||
# TODO: Install your binaries/scripts here. | ||
# Be sure to install the target directory with install -d first | ||
# Yocto variables ${D} and ${S} are useful here, which you can read about at | ||
# https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-D | ||
# and | ||
# https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-S | ||
# See example at https://github.com/cu-ecen-aeld/ecen5013-yocto/blob/ecen5013-hello-world/meta-ecen5013/recipes-ecen5013/ecen5013-hello-world/ecen5013-hello-world_git.bb | ||
install -d ${D}${bindir} | ||
install -m 0755 ${B}/spidevtest ${D}${bindir}/ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shreyan-collab you can't use MIT for this code, because it's GPL version 2. See https://github.com/cu-ecen-aeld/Finalproject-Shreyan-Bala-shared/blob/master/spi_package/spidevtest.c#L1-L9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwalkes You want me to change the license and push the code again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwalkes I have modified the license to GPL Version 2