initial commit

This commit is contained in:
Shaun Mulligan 2017-04-25 18:52:04 +02:00
commit 5254ee34c4
18 changed files with 504 additions and 0 deletions

18
.gitmodules vendored Normal file
View file

@ -0,0 +1,18 @@
[submodule "resin-yocto-scripts"]
path = resin-yocto-scripts
url = https://github.com/resin-os/resin-yocto-scripts.git
[submodule "layers/poky"]
path = layers/poky
url = http://git.yoctoproject.org/cgit/cgit.cgi/poky
[submodule "layers/meta-openembedded"]
path = layers/meta-openembedded
url = https://github.com/openembedded/meta-openembedded
[submodule "layers/meta-resin"]
path = layers/meta-resin
url = https://github.com/resin-os/meta-resin
[submodule "layers/oe-meta-go"]
path = layers/oe-meta-go
url = https://github.com/mem/oe-meta-go
[submodule "layers/meta-sunxi"]
path = layers/meta-sunxi
url = https://github.com/linux-sunxi/meta-sunxi.git

@ -0,0 +1 @@
Subproject commit 444e1fb198076f34a0fa66e83f3eec76efba2e6c

1
layers/meta-resin Submodule

@ -0,0 +1 @@
Subproject commit 7192cd27fe72ced1d26f9f6763502370c6087236

View file

@ -0,0 +1,204 @@
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.

View file

@ -0,0 +1,12 @@
# Resin.io layer for meta-sunxi supported boards
## Description
This repository enables building resin.io for chosen meta-sunxi machines.
## Supported machines
* orange-pi-one
## How to?
Q: I generated an image without debug or I downloaded a resin image from the production dashboard. How can I login over serial port?
A: We don't start getty on non debug images. As well there are passward changes for root user needed. In order to simplify this process, there is a helper script https://github.com/resin-os/serial-it which does everything for you. Check the help message of that script.

Binary file not shown.

View file

@ -0,0 +1,8 @@
BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "resin-allwinner"
BBFILE_PATTERN_resin-allwinner := "^${LAYERDIR}/"
BBFILE_PRIORITY_resin-allwinner = "1337"

View file

@ -0,0 +1,97 @@
BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "resin-raspberrypi"
BBFILE_PATTERN_resin-raspberrypi := "^${LAYERDIR}/"
BBFILE_PRIORITY_resin-raspberrypi = "1337"
# Add all the overlays available in kernel source code
#
# The files below come from kernel-source/arch/arm/boot/dts/overlays/, but without
# the ones already defined in meta-raspberrypi/conf/machine/include/rpi-base.inc.
# They have been renamed to match rpi-base.inc.
KERNEL_DEVICETREE_append = " \
overlays/adau1977-adc.dtbo \
overlays/ads1015.dtbo \
overlays/ads7846.dtbo \
overlays/akkordion-iqdacplus.dtbo \
overlays/allo-piano-dac-pcm512x-audio.dtbo \
overlays/at86rf233.dtbo \
overlays/audioinjector-wm8731-audio.dtbo \
overlays/audremap.dtbo \
overlays/bmp085_i2c-sensor.dtbo \
overlays/dht11.dtbo \
overlays/dionaudio-loco.dtbo \
overlays/dpi18.dtbo \
overlays/dpi24.dtbo \
overlays/dwc2.dtbo \
overlays/dwc-otg.dtbo \
overlays/enc28j60.dtbo \
overlays/enc28j60-spi2.dtbo \
overlays/gpio-ir.dtbo \
overlays/gpio-poweroff.dtbo \
overlays/hifiberry-digi-pro.dtbo \
overlays/hy28a.dtbo \
overlays/hy28b.dtbo \
overlays/i2c0-bcm2708.dtbo \
overlays/i2c1-bcm2708.dtbo \
overlays/i2c-gpio.dtbo \
overlays/i2c-mux.dtbo \
overlays/i2c-pwm-pca9685a.dtbo \
overlays/i2c-sensor.dtbo \
overlays/i2s-gpio28-31.dtbo \
overlays/i2s-mmap.dtbo \
overlays/iqaudio-digi-wm8804-audio.dtbo \
overlays/justboom-dac.dtbo \
overlays/justboom-digi.dtbo \
overlays/mcp23017.dtbo \
overlays/mcp23s17.dtbo \
overlays/mcp2515-can0.dtbo \
overlays/mcp2515-can1.dtbo \
overlays/mcp3008.dtbo \
overlays/mmc.dtbo \
overlays/mz61581.dtbo \
overlays/pi3-act-led.dtbo \
overlays/pi3-disable-wifi.dtbo \
overlays/piscreen2r.dtbo \
overlays/piscreen.dtbo \
overlays/pisound.dtbo \
overlays/pitft28-capacitive.dtbo \
overlays/pitft35-resistive.dtbo \
overlays/pwm-2chan.dtbo \
overlays/pwm.dtbo \
overlays/qca7000.dtbo \
overlays/raspidac3.dtbo \
overlays/rpi-backlight.dtbo \
overlays/rpi-dac.dtbo \
overlays/rpi-display.dtbo \
overlays/rpi-proto.dtbo \
overlays/rpi-sense.dtbo \
overlays/rra-digidac1-wm8741-audio.dtbo \
overlays/sc16is750-i2c.dtbo \
overlays/sc16is752-spi1.dtbo \
overlays/sdhost.dtbo \
overlays/sdio-1bit.dtbo \
overlays/sdio.dtbo \
overlays/sdtweak.dtbo \
overlays/smi-dev.dtbo \
overlays/smi.dtbo \
overlays/smi-nand.dtbo \
overlays/spi0-cs.dtbo \
overlays/spi0-hw-cs.dtbo \
overlays/spi1-1cs.dtbo \
overlays/spi1-2cs.dtbo \
overlays/spi1-3cs.dtbo \
overlays/spi2-1cs.dtbo \
overlays/spi2-2cs.dtbo \
overlays/spi2-3cs.dtbo \
overlays/spi-gpio35-39.dtbo \
overlays/spi-rtc.dtbo \
overlays/tinylcd35.dtbo \
overlays/uart1.dtbo \
overlays/vc4-fkms-v3d.dtbo \
overlays/vga666.dtbo \
overlays/wittypi.dtbo \
"

View file

@ -0,0 +1,27 @@
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
${TOPDIR}/../layers/poky/meta \
${TOPDIR}/../layers/poky/meta-poky \
${TOPDIR}/../layers/meta-openembedded/meta-oe \
${TOPDIR}/../layers/meta-openembedded/meta-filesystems \
${TOPDIR}/../layers/meta-openembedded/meta-networking \
${TOPDIR}/../layers/meta-openembedded/meta-python \
${TOPDIR}/../layers/meta-sunxi \
${TOPDIR}/../layers/meta-resin/meta-resin-common \
${TOPDIR}/../layers/meta-resin/meta-resin-morty \
${TOPDIR}/../layers/meta-resin-allwinner \
${TOPDIR}/../layers/oe-meta-go \
"
BBLAYERS_NON_REMOVABLE ?= " \
${TOPDIR}/../layers/poky/meta \
${TOPDIR}/../layers/poky/meta-poky \
${TOPDIR}/../layers/meta-resin/meta-resin-common \
${TOPDIR}/../layers/meta-resin/meta-resin-morty \
"

View file

@ -0,0 +1,16 @@
_____ _ _
| __ \ (_) (_)
| |__) |___ ___ _ _ __ _ ___
| _ // _ \/ __| | '_ \ | |/ _ \
| | \ \ __/\__ \ | | | |_| | (_) |
|_| \_\___||___/_|_| |_(_)_|\___/
----------------------------------
Resin specific targets are:
resin-image
Nanopi Neo (EXPERIMENTAL) : $ MACHINE=nanopi-neo bitbake resin-image
orange pi one (EXPERIMENTAL) : $ MACHINE=orange-pi-one bitbake resin-image

View file

@ -0,0 +1,62 @@
# Supported machines
#MACHINE ?= "orange-pi-one"
#MACHINE ?= "nanopi-neo""
# More info meta-resin/README.md
#RESIN_CONNECTABLE ?= "1"
#RESIN_CONNECTABLE_ENABLE_SERVICES ?= "0"
#TARGET_REPOSITORY ?= ""
#TARGET_TAG ?= ""
# Set this to 1 if development image is desired
#DEVELOPMENT_IMAGE = "1"
# Set this to make build system generate resinhup bundles
#RESINHUP ?= "yes"
# Set this to change the supervisor tag used
#TARGET_TAG ?= "master"
# Compress final raw image
#RESIN_RAW_IMG_COMPRESSION ?= "xz"
# Parallelism Options
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
# Resin specific distros
DISTRO ?= "resin-systemd"
# Custom downloads directory
#DL_DIR ?= "${TOPDIR}/downloads"
# Custom sstate directory
#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
# Inheriting this class has shown to speed up builds due to significantly lower
# amounts of data stored in the data cache as well as on disk.
# http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-classes-rm-work
#INHERIT += "rm_work"
# Remove the old image before the new one is generated to save disk space when RM_OLD_IMAGE is set to 1, this is an easy way to keep the DEPLOY_DIR_IMAGE clean.
RM_OLD_IMAGE = "1"
# Package Management configuration
PACKAGE_CLASSES ?= "package_rpm"
# Additional image features
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
# By default disable interactive patch resolution (tasks will just fail instead):
PATCHRESOLVE = "noop"
# Disk Space Monitoring during the build
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K"
CONF_VERSION = "1"

View file

@ -0,0 +1,18 @@
#
# orange-pi-one
#
IMAGE_FSTYPES_append_orange-pi-one = " resinos-img"
# Customize resinos-img
RESIN_IMAGE_BOOTLOADER_orange-pi-one = "u-boot"
RESIN_BOOT_PARTITION_FILES_orange-pi-one = " \
${KERNEL_IMAGETYPE}-${MACHINE}.bin:/${KERNEL_IMAGETYPE} \
uImage-sun8i-h3-orangepi-one.dtb:/sun8i-h3-orangepi-one.dtb \
boot.scr:/boot.scr \
"
IMAGE_CMD_resinos-img_append_orange-pi-one () {
# orange-pi-one needs uboot written at a specific location
dd if=${DEPLOY_DIR_IMAGE}/u-boot-sunxi-with-spl.bin of=${RESIN_RAW_IMG} conv=notrunc seek=8 bs=1024
}

View file

@ -0,0 +1 @@
inherit kernel-resin

1
layers/meta-sunxi Submodule

@ -0,0 +1 @@
Subproject commit aaf413d6a708d37a27e3637ae9a4472064016031

1
layers/oe-meta-go Submodule

@ -0,0 +1 @@
Subproject commit fc6d8ac2951aa4548c2e1c67d1f3437eb2a8981f

1
layers/poky Submodule

@ -0,0 +1 @@
Subproject commit 55a53f53263ff4bf7bd6d0c454c464e595e11e4c

35
orange-pi-one.coffee Normal file
View file

@ -0,0 +1,35 @@
deviceTypesCommon = require '@resin.io/device-types/common'
{ networkOptions, commonImg, instructions } = deviceTypesCommon
module.exports =
version: 1
slug: 'orange-pi-one'
name: 'orange pi one'
arch: 'armv7hf'
state: 'experimental'
instructions: commonImg.instructions
gettingStartedLink:
windows: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#windows'
osx: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#on-mac-and-linux'
linux: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#on-mac-and-linux'
supportsBlink: false
options: [ networkOptions.group ]
yocto:
machine: 'orange-pi-one'
image: 'resin-image'
fstype: 'resinos-img'
version: 'yocto-morty'
deployArtifact: 'resin-image-orange-pi-one.resinos-img'
compressed: true
configuration:
config:
partition:
primary: 1
path: '/config.json'
initialization: commonImg.initialization

1
resin-yocto-scripts Submodule

@ -0,0 +1 @@
Subproject commit 8ebd1249330426d71aca5c0252e8e2530775a499