rpi0w support
parent
de736c704e
commit
6b8d0d8a95
|
@ -0,0 +1,9 @@
|
|||
use Mix.Config
|
||||
config :farmbot,
|
||||
path: "/state",
|
||||
config_file_name: "default_config_rpi3.json",
|
||||
configurator_port: 80
|
||||
|
||||
config :farmbot, :redis,
|
||||
server: true,
|
||||
port: 6379
|
|
@ -0,0 +1 @@
|
|||
plant-detection
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -0,0 +1 @@
|
|||
plant-detection
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -0,0 +1,16 @@
|
|||
defmodule Module.concat([Farmbot, System, "rpi0w", FileSystem]) do
|
||||
@moduledoc false
|
||||
@behaviour Farmbot.System.FS
|
||||
@state_path Application.get_env(:farmbot, :path)
|
||||
@block_device "/dev/mmcblk0p3"
|
||||
@fs_type "ext4"
|
||||
@ro_options ["-t", @fs_type, "-o", "ro,remount", @block_device, @state_path]
|
||||
@rw_options ["-t", @fs_type, "-o", "rw,remount", @block_device, @state_path]
|
||||
use Farmbot.System.NervesCommon.FileSystem,
|
||||
target: "rpi0w",
|
||||
ro_options: @ro_options,
|
||||
rw_options: @rw_options,
|
||||
state_path: @state_path,
|
||||
fs_type: @fs_type,
|
||||
block_device: @block_device
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
defmodule Module.concat([Farmbot, System, "rpi0w", Network]) do
|
||||
use Farmbot.System.NervesCommon.Network, target: "rpi0w", modules: ["brcmfmac"]
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
defmodule Module.concat([Farmbot, System, "rpi0w"]) do
|
||||
@moduledoc false
|
||||
@behaviour Farmbot.System
|
||||
|
||||
use Farmbot.System.NervesCommon, target: "rpi0w"
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
defmodule Module.concat([Farmbot, System, "rpi0w", Updates]) do
|
||||
use Farmbot.System.NervesCommon.Updates, target: "rpi0w"
|
||||
end
|
6
mix.lock
6
mix.lock
|
@ -9,7 +9,7 @@
|
|||
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], []},
|
||||
"credo": {:hex, :credo, "0.6.0-rc1", "3db898270ba651aa7d8dc8d844f2827e0111526a01474ab088c7f7f677e83778", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, optional: false]}]},
|
||||
"dialyxir": {:hex, :dialyxir, "0.4.3", "a4daeebd0107de10d3bbae2ccb6b8905e69544db1ed5fe9148ad27cd4cb2c0cd", [:mix], []},
|
||||
"distillery": {:hex, :distillery, "1.2.2", "d5a52920cbe2378c8a21dfc83b526b4225944b9dce7bf170fe5f5cddda81ffb3", [:mix], []},
|
||||
"distillery": {:hex, :distillery, "1.3.1", "211231af29ea55c79143d601a2caaf5936cc7b99e73bef25d78a0ff7f321b7fe", [:mix], []},
|
||||
"earmark": {:hex, :earmark, "1.0.3", "89bdbaf2aca8bbb5c97d8b3b55c5dd0cff517ecc78d417e87f1d0982e514557b", [:mix], []},
|
||||
"elixir_make": {:hex, :elixir_make, "0.4.0", "992f38fabe705bb45821a728f20914c554b276838433349d4f2341f7a687cddf", [:mix], []},
|
||||
"ex_doc": {:hex, :ex_doc, "0.14.5", "c0433c8117e948404d93ca69411dd575ec6be39b47802e81ca8d91017a0cf83c", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, optional: false]}]},
|
||||
|
@ -46,9 +46,9 @@
|
|||
"nerves_network_interface": {:hex, :nerves_network_interface, "0.3.2", "e7450f7eccd7387ceebee6096a0646bcdc0dd4aa77077e5fa81f6767da9b77af", [:make, :mix], [{:elixir_make, "~> 0.3", [hex: :elixir_make, optional: false]}]},
|
||||
"nerves_runtime": {:hex, :nerves_runtime, "0.1.1", "efa80e0dab93a53cb44dacdb6e2a326dfe4b54b94a0da6173c10f410e08fecb5", [:make, :mix], [{:elixir_make, "~> 0.3", [hex: :elixir_make, optional: false]}, {:gen_stage, "~> 0.4", [hex: :gen_stage, optional: false]}, {:nerves_uart, "~> 0.1.0", [hex: :nerves_uart, optional: true]}]},
|
||||
"nerves_ssdp_server": {:hex, :nerves_ssdp_server, "0.2.1", "2d010552023fc1a724e8cb5c92479a58552976e6f805b6dbf09babd31f923b8f", [:mix], []},
|
||||
"nerves_system_br": {:hex, :nerves_system_br, "0.9.4", "5096a9dfec49d4663ccb94c4a4fe45885303fbf31108f7e9400369bdec94b5e7", [:mix], []},
|
||||
"nerves_system_br": {:git, "https://github.com/tmecklem/nerves_system_br.git", "b4297e361bb8ecb3abb6abdd49e52faa6350af51", [branch: "master"]},
|
||||
"nerves_toolchain_arm_unknown_linux_gnueabihf": {:hex, :nerves_toolchain_arm_unknown_linux_gnueabihf, "0.10.0", "18200c6cc3fcda1cbe263b7f7d50ff05db495b881ade9436cd1667b3e8e62429", [:mix], [{:nerves, "~> 0.4", [hex: :nerves, optional: false]}, {:nerves_toolchain_ctng, "~> 0.9", [hex: :nerves_toolchain_ctng, optional: false]}]},
|
||||
"nerves_toolchain_armv6_rpi_linux_gnueabi": {:hex, :nerves_toolchain_armv6_rpi_linux_gnueabi, "0.9.0", "11618febee06ceb16eae5833e0df331599c135727630e1aedec7b2677a5fa9dc", [:mix], [{:nerves, "~> 0.4.0", [hex: :nerves, optional: false]}, {:nerves_toolchain_ctng, "~> 0.8.0", [hex: :nerves_toolchain_ctng, optional: false]}]},
|
||||
"nerves_toolchain_armv6_rpi_linux_gnueabi": {:hex, :nerves_toolchain_armv6_rpi_linux_gnueabi, "0.10.0", "a730667fb22710270d3e9fdab8ce7230381c424f65b0381feb693829bc460f80", [:mix], [{:nerves, "~> 0.4", [hex: :nerves, optional: false]}, {:nerves_toolchain_ctng, "~> 0.9", [hex: :nerves_toolchain_ctng, optional: false]}]},
|
||||
"nerves_toolchain_ctng": {:hex, :nerves_toolchain_ctng, "0.9.0", "825b2b5bbacc3ad20c8513baafd44978616d5b451e6e052cdb727be81e7cdcac", [:mix], []},
|
||||
"nerves_uart": {:hex, :nerves_uart, "0.1.2", "4310dbb1721a5a007b8e5c416cf81754415bde6b7e2c9aa65a059886b85e637c", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, optional: false]}]},
|
||||
"nerves_wpa_supplicant": {:hex, :nerves_wpa_supplicant, "0.2.3", "2666b21bf0868f0d3b127930c3bacf59b178a0d015d308ae3985dcb7c1595870", [:make, :mix], [{:elixir_make, "~> 0.3", [hex: :elixir_make, optional: false]}]},
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/_build
|
||||
/cover
|
||||
/deps
|
||||
erl_crash.dump
|
||||
*.ez
|
||||
build.log
|
||||
.nerves
|
|
@ -0,0 +1,88 @@
|
|||
# Changelog
|
||||
|
||||
## v0.11.1-dev
|
||||
|
||||
## v0.11.0
|
||||
|
||||
* New features
|
||||
* Enabled USB_SERIAL and FTDI_SIO support. Needed for connecting with Arduino to the USB ports
|
||||
* Support for Nerves 0.5.0
|
||||
|
||||
## v0.10.0
|
||||
|
||||
* New features
|
||||
* Upgraded the Linux kernel to 4.4.43. This also removes the
|
||||
call to mkknlimg which is no longer needed.
|
||||
* Bump toolchain to use gcc 5.3 (previously using gcc 4.9.3)
|
||||
|
||||
## v0.9.1
|
||||
|
||||
* Bug Fixes
|
||||
* Loosen mistaken nerves dep on `0.4.0` to `~> 0.4.0`
|
||||
|
||||
## v0.9.0
|
||||
|
||||
This version switches to using the `nerves_package` compiler. This will
|
||||
consolidate overall deps and compilers.
|
||||
|
||||
* Nerves.System.BR v0.8.1
|
||||
* Support for distillery
|
||||
* Support for nerves_package compiler
|
||||
|
||||
## v0.7.0
|
||||
|
||||
When upgrading to this version, be sure to review the updates to
|
||||
nerves_defconfig if you have customized this system.
|
||||
|
||||
* nerves_system_br v0.7.0
|
||||
* Package updates
|
||||
* Buildroot 2016.08
|
||||
* Linux 4.4
|
||||
|
||||
## v0.6.1
|
||||
|
||||
* Package versions
|
||||
* Nerves.System.BR v0.6.1
|
||||
|
||||
* New features
|
||||
* All Raspberry Pi-specific configuration is now in this repository
|
||||
* Enabled SMP Erlang - even though the RPi Zero and Model B+ are
|
||||
single core systems, some NIFs require SMP Erlang.
|
||||
|
||||
## v0.6.0
|
||||
* Nerves.System.BR v0.6.0
|
||||
* Package updates
|
||||
* Erlang OTP 19
|
||||
* Elixir 1.3.1
|
||||
* fwup 0.8.0
|
||||
* erlinit 0.7.3
|
||||
* bborg-overlays (pull in I2C typo fix from upstream)
|
||||
* Bug fixes
|
||||
* Synchronize file system kernel configs across all platforms
|
||||
|
||||
## v0.5.2
|
||||
* Enhancements
|
||||
* Enabled USB Printer kernel mod. Needs to be loaded with `modprobe` to use
|
||||
* Bug Fixes(raspberry pi)
|
||||
* Enabled multicast in linux config for rpi/rpi2/rpi3/ev3
|
||||
|
||||
## v0.5.1
|
||||
* Nerves.System.BR v0.5.1
|
||||
* Bug Fixes(nerves-env)
|
||||
* Added include paths to CFLAGS and CXXFLAGS
|
||||
* Pass sysroot to LDFLAGS
|
||||
|
||||
## v0.5.0
|
||||
* Nerves.System.BR v0.5.0
|
||||
* New features
|
||||
* WiFi drivers enabled by default on RPi2 and RPi3
|
||||
* Include wireless regulatory database in Linux kernel by default
|
||||
on WiFi-enabled platforms. Since kernel/rootfs are read-only and
|
||||
coupled together for firmware updates, the normal CRDA/udev approach
|
||||
isn't necessary.
|
||||
* Upgraded the default BeagleBone Black kernel from 3.8 to 4.4.9. The
|
||||
standard BBB device tree overlays are included by default even though the
|
||||
upstream kernel patches no longer include them.
|
||||
* Change all fwup configurations from two step upgrades to one step
|
||||
upgrades. If you used the base fwup.conf files to upgrade, you no
|
||||
longer need to finalize the upgrade. If not, there's no change.
|
|
@ -0,0 +1,4 @@
|
|||
# Add project-specific packages for Buildroot here
|
||||
#
|
||||
# If these are non-proprietary, please consider contributing them back to
|
||||
# Nerves or Buildroot.
|
|
@ -0,0 +1,201 @@
|
|||
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.
|
|
@ -0,0 +1,54 @@
|
|||
# Raspberry Pi Model Zero
|
||||
|
||||
This is the base Nerves System configuration for the Raspberry Pi Zero and
|
||||
Raspberry Pi Zero W.
|
||||
|
||||
![Fritzing Raspberry Pi Zero image](assets/images/raspberry-pi-model-zero.png)
|
||||
<br><sup>[Image credit](#fritzing)</sup>
|
||||
|
||||
| Feature | Description |
|
||||
| -------------------- | ------------------------------- |
|
||||
| CPU | 1 GHz ARM1176JZF-S |
|
||||
| Memory | 512 MB |
|
||||
| Storage | MicroSD |
|
||||
| Linux kernel | 4.4 w/ Raspberry Pi patches |
|
||||
| IEx terminal | HDMI and USB keyboard (can be changed to UART or OTG USB serial via `ttyGS0`) |
|
||||
| GPIO, I2C, SPI | Yes - Elixir ALE |
|
||||
| ADC | No |
|
||||
| PWM | Yes, but no Elixir support |
|
||||
| UART | 1 available - `ttyAMA0` |
|
||||
| Camera | Yes - via rpi-userland |
|
||||
| Ethernet | Yes - via OTG USB port |
|
||||
| WiFi | Pi Zero W, IoT pHAT or USB WiFi dongle |
|
||||
| Bluetooth | Not supported yet |
|
||||
|
||||
## Supported OTG USB modes
|
||||
|
||||
The base image activates the `dwc2` overlay, which allows the Pi Zero to appear as a
|
||||
device (aka gadget mode). When plugged into a host computer via the OTG port, the Pi
|
||||
Zero will appear as a composite ethernet and serial device.
|
||||
|
||||
When a peripheral is plugged into the OTG port, the Pi Zero will act as USB host, with
|
||||
somewhat reduced performace vs the `dwc_otg` driver used in other base systems like
|
||||
the official `nerves_system_rpi`.
|
||||
|
||||
## Supported HAT WiFi devices
|
||||
|
||||
The base image includes drivers for the Red Bear IoT pHAT.
|
||||
|
||||
## Supported USB WiFi devices
|
||||
|
||||
The base image includes drivers and firmware for onboard Raspberry Pi
|
||||
Zero W wifi driver (`brcmfmac` driver), Ralink RT53xx
|
||||
(`rt2800usb` driver) and RealTek RTL8712U (`r8712u` driver) devices.
|
||||
|
||||
If you are unsure what driver your WiFi dongle requires, run Raspbian and configure WiFi
|
||||
for your device. At a shell prompt, run `lsmod` to see which drivers are loaded.
|
||||
Running `dmesg` may also give a clue. When using `dmesg`, reinsert the USB
|
||||
dongle to generate new log messages if you don't see them.
|
||||
|
||||
## Installation
|
||||
|
||||
Coming soon. For now, a custom system build is required until a system image file is created.
|
||||
|
||||
[Image credit](#fritzing): This image is from the [Fritzing](http://fritzing.org/home/) parts library.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootwait
|
|
@ -0,0 +1,26 @@
|
|||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using a post-build script.
|
||||
# See http://buildroot.org/downloads/manual/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
# Device tree options are documented at
|
||||
# https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md
|
||||
|
||||
kernel=zImage
|
||||
|
||||
# This, along with the Raspberry Pi "x" firmware is need for the camera
|
||||
# to work. See Target packages->Hardware handling->Firmware for "x" firmware.
|
||||
gpu_mem=128
|
||||
|
||||
# Enable I2C and SPI
|
||||
dtparam=i2c_arm=on,spi=on
|
||||
|
||||
# Comment this in or modify to enable OneWire
|
||||
# NOTE: check that the overlay that you specify is in the boot partition or
|
||||
# this won't work.
|
||||
#dtoverlay=w1-gpio-pullup,gpiopin=4
|
||||
dtoverlay=dwc2
|
||||
dtoverlay=pi3-disable-bt
|
||||
|
||||
# Enable the UART (/dev/ttyS0) on the RPi3.
|
||||
enable_uart=1
|
|
@ -0,0 +1,359 @@
|
|||
# Firmware configuration file for the Raspberry Pi
|
||||
|
||||
# Default paths if not specified via the commandline
|
||||
define(ROOTFS, "${NERVES_SYSTEM}/images/rootfs.squashfs")
|
||||
|
||||
# This configuration file will create an image that
|
||||
# has an MBR and the following 3 partitions:
|
||||
#
|
||||
# +----------------------------+
|
||||
# | MBR |
|
||||
# +----------------------------+
|
||||
# | p0: Boot partition (FAT32) |
|
||||
# | zImage, bootcode.bin, |
|
||||
# | config.txt, etc. |
|
||||
# +----------------------------+
|
||||
# | p1*: Rootfs A (squashfs) |
|
||||
# +----------------------------+
|
||||
# | p1*: Rootfs B (squashfs) |
|
||||
# +----------------------------+
|
||||
# | p2: Application (FAT32) |
|
||||
# +----------------------------+
|
||||
#
|
||||
# The p1 partition points to whichever of Rootfs A or B that
|
||||
# is active.
|
||||
#
|
||||
# The image is sized to be less than 1 GB so that it fits on
|
||||
# nearly any SDCard around. If you have a larger SDCard and
|
||||
# need more space, feel free to bump the partition sizes
|
||||
# below.
|
||||
|
||||
# The Raspberry Pi is incredibly picky on the partition sizes
|
||||
# and in ways that I don't understand. Test changes one at a
|
||||
# time to make sure that they boot. (Sizes are in 512 byte
|
||||
# blocks)
|
||||
define(BOOT_PART_OFFSET, 63)
|
||||
define(BOOT_PART_COUNT, 77261)
|
||||
|
||||
# Let the rootfs have room to grow up to 128 MiB and align
|
||||
# it to the nearest 1 MB boundary
|
||||
define(ROOTFS_A_PART_OFFSET, 77324)
|
||||
define(ROOTFS_A_PART_COUNT, 289044)
|
||||
define(ROOTFS_B_PART_OFFSET, 366368)
|
||||
define(ROOTFS_B_PART_COUNT, 289044)
|
||||
|
||||
# Application partition. This partition can occupy all of the
|
||||
# remaining space. Size it to fit the destination.
|
||||
define(APP_PART_OFFSET, 655412)
|
||||
define(APP_PART_COUNT, 1048576)
|
||||
|
||||
# Firmware metadata
|
||||
meta-product = "Nerves Firmware"
|
||||
meta-description = ""
|
||||
meta-version = ${NERVES_SDK_VERSION}
|
||||
meta-platform = "rpi"
|
||||
meta-architecture = "arm"
|
||||
meta-author = "Frank Hunleth"
|
||||
|
||||
# File resources are listed in the order that they are included in the .fw file
|
||||
# This is important, since this is the order that they're written on a firmware
|
||||
# update due to the event driven nature of the update system.
|
||||
file-resource bootcode.bin {
|
||||
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/bootcode.bin"
|
||||
}
|
||||
file-resource fixup.dat {
|
||||
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/fixup.dat"
|
||||
}
|
||||
file-resource start.elf {
|
||||
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/start.elf"
|
||||
}
|
||||
file-resource config.txt {
|
||||
host-path = "${NERVES_SYSTEM}/images/config.txt"
|
||||
}
|
||||
file-resource cmdline.txt {
|
||||
host-path = "${NERVES_SYSTEM}/images/cmdline.txt"
|
||||
}
|
||||
file-resource zImage {
|
||||
host-path = "${NERVES_SYSTEM}/images/zImage"
|
||||
}
|
||||
file-resource bcm2708-rpi-0-w.dtb {
|
||||
host-path = "${NERVES_SYSTEM}/images/bcm2708-rpi-0-w.dtb"
|
||||
}
|
||||
file-resource bcm2708-rpi-b-plus.dtb {
|
||||
host-path = "${NERVES_SYSTEM}/images/bcm2708-rpi-b-plus.dtb"
|
||||
}
|
||||
file-resource w1-gpio-pullup.dtbo {
|
||||
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/w1-gpio-pullup.dtbo"
|
||||
}
|
||||
file-resource dwc2.dtbo {
|
||||
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/dwc2.dtbo"
|
||||
}
|
||||
file-resource pi3-disable-bt.dtbo {
|
||||
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/pi3-disable-bt.dtbo"
|
||||
}
|
||||
|
||||
file-resource rootfs.img {
|
||||
host-path = ${ROOTFS}
|
||||
}
|
||||
|
||||
mbr mbr-a {
|
||||
partition 0 {
|
||||
block-offset = ${BOOT_PART_OFFSET}
|
||||
block-count = ${BOOT_PART_COUNT}
|
||||
type = 0xc # FAT32
|
||||
boot = true
|
||||
}
|
||||
partition 1 {
|
||||
block-offset = ${ROOTFS_A_PART_OFFSET}
|
||||
block-count = ${ROOTFS_A_PART_COUNT}
|
||||
type = 0x83 # Linux
|
||||
}
|
||||
partition 2 {
|
||||
block-offset = ${APP_PART_OFFSET}
|
||||
block-count = ${APP_PART_COUNT}
|
||||
type = 0xc # FAT32
|
||||
}
|
||||
# partition 3 is unused
|
||||
}
|
||||
|
||||
mbr mbr-b {
|
||||
partition 0 {
|
||||
block-offset = ${BOOT_PART_OFFSET}
|
||||
block-count = ${BOOT_PART_COUNT}
|
||||
type = 0xc # FAT32
|
||||
boot = true
|
||||
}
|
||||
partition 1 {
|
||||
block-offset = ${ROOTFS_B_PART_OFFSET}
|
||||
block-count = ${ROOTFS_B_PART_COUNT}
|
||||
type = 0x83 # Linux
|
||||
}
|
||||
partition 2 {
|
||||
block-offset = ${APP_PART_OFFSET}
|
||||
block-count = ${APP_PART_COUNT}
|
||||
type = 0xc # FAT32
|
||||
}
|
||||
# partition 3 is unused
|
||||
}
|
||||
|
||||
# This firmware task writes everything to the destination media
|
||||
task complete {
|
||||
# Only match if not mounted
|
||||
require-unmounted-destination = true
|
||||
|
||||
# Everything that gets written can be verified on the fly.
|
||||
# This speeds things up, since we don't care about detecting
|
||||
# errors before data gets written.
|
||||
verify-on-the-fly = true
|
||||
|
||||
on-init {
|
||||
mbr_write(mbr-a)
|
||||
|
||||
fat_mkfs(${BOOT_PART_OFFSET}, ${BOOT_PART_COUNT})
|
||||
fat_setlabel(${BOOT_PART_OFFSET}, "BOOT")
|
||||
fat_mkdir(${BOOT_PART_OFFSET}, "overlays")
|
||||
}
|
||||
|
||||
on-resource config.txt { fat_write(${BOOT_PART_OFFSET}, "config.txt") }
|
||||
on-resource cmdline.txt { fat_write(${BOOT_PART_OFFSET}, "cmdline.txt") }
|
||||
on-resource bootcode.bin { fat_write(${BOOT_PART_OFFSET}, "bootcode.bin") }
|
||||
on-resource start.elf { fat_write(${BOOT_PART_OFFSET}, "start.elf") }
|
||||
on-resource fixup.dat { fat_write(${BOOT_PART_OFFSET}, "fixup.dat") }
|
||||
on-resource zImage { fat_write(${BOOT_PART_OFFSET}, "zImage") }
|
||||
on-resource bcm2708-rpi-0-w.dtb { fat_write(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb") }
|
||||
on-resource bcm2708-rpi-b-plus.dtb { fat_write(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb") }
|
||||
on-resource w1-gpio-pullup.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo") }
|
||||
on-resource dwc2.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo") }
|
||||
on-resource pi3-disable-bt.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo") }
|
||||
|
||||
on-resource rootfs.img {
|
||||
# write to the first rootfs partition
|
||||
raw_write(${ROOTFS_A_PART_OFFSET})
|
||||
}
|
||||
|
||||
on-finish {
|
||||
# Initialize a big partition for application data
|
||||
# This is done last so that the boot partition can be written to completely
|
||||
# before the first write to this partition. Not skipping back and forth between
|
||||
# FAT filesystems saves a little time when programming the Flash.
|
||||
fat_mkfs(${APP_PART_OFFSET}, ${APP_PART_COUNT})
|
||||
fat_setlabel(${APP_PART_OFFSET}, "APPDATA")
|
||||
}
|
||||
}
|
||||
|
||||
task upgrade.a {
|
||||
# This task upgrades the A partition
|
||||
require-partition1-offset = ${ROOTFS_B_PART_OFFSET}
|
||||
|
||||
# Since the upgrade won't run until it has been finalized, it's ok
|
||||
# to write data as it is read.
|
||||
verify-on-the-fly = true
|
||||
|
||||
on-init {
|
||||
# Erase any old saved files from previous upgrades
|
||||
fat_rm(${BOOT_PART_OFFSET}, "zImage.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "config.txt.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "cmdline.txt.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bootcode.bin.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "start.elf.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "fixup.dat.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.pre")
|
||||
|
||||
# Make the overlays directory in case it isn't already there.
|
||||
fat_mkdir(${BOOT_PART_OFFSET}, "overlays")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.pre")
|
||||
}
|
||||
|
||||
# Write the new firmware and Linux images, but don't
|
||||
# commit them. That way if the user aborts midway, we
|
||||
# still are using the original firmware.
|
||||
on-resource config.txt { fat_write(${BOOT_PART_OFFSET}, "config.txt.new") }
|
||||
on-resource cmdline.txt { fat_write(${BOOT_PART_OFFSET}, "cmdline.txt.new") }
|
||||
on-resource bootcode.bin { fat_write(${BOOT_PART_OFFSET}, "bootcode.bin.new") }
|
||||
on-resource start.elf { fat_write(${BOOT_PART_OFFSET}, "start.elf.new") }
|
||||
on-resource fixup.dat { fat_write(${BOOT_PART_OFFSET}, "fixup.dat.new") }
|
||||
on-resource zImage { fat_write(${BOOT_PART_OFFSET}, "zImage.new") }
|
||||
on-resource bcm2708-rpi-0-w.dtb { fat_write(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.new") }
|
||||
on-resource bcm2708-rpi-b-plus.dtb { fat_write(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.new") }
|
||||
on-resource w1-gpio-pullup.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.new") }
|
||||
on-resource dwc2.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.new") }
|
||||
on-resource pi3-disable-bt.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.new") }
|
||||
|
||||
on-resource rootfs.img {
|
||||
# write to the first rootfs partition
|
||||
raw_write(${ROOTFS_A_PART_OFFSET})
|
||||
}
|
||||
|
||||
on-finish {
|
||||
# Switch over to boot the new firmware
|
||||
mbr_write(mbr-a)
|
||||
|
||||
fat_mv(${BOOT_PART_OFFSET}, "zImage", "zImage.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "config.txt", "config.txt.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "cmdline.txt", "cmdline.txt.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bootcode.bin", "bootcode.bin.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "start.elf", "start.elf.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "fixup.dat", "fixup.dat.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb", "bcm2708-rpi-0-w.dtb.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb", "bcm2708-rpi-b-plus.dtb.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo", "overlays/w1-gpio-pullup.dtbo.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo", "overlays/dwc2.dtbo.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo", "overlays/pi3-disable-bt.dtbo.pre")
|
||||
|
||||
fat_mv(${BOOT_PART_OFFSET}, "zImage.new", "zImage")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "config.txt.new", "config.txt")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "cmdline.txt.new", "cmdline.txt")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bootcode.bin.new", "bootcode.bin")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "start.elf.new", "start.elf")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "fixup.dat.new", "fixup.dat")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.new", "bcm2708-rpi-0-w.dtb")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.new", "bcm2708-rpi-b-plus.dtb")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.new", "overlays/w1-gpio-pullup.dtbo")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.new", "overlays/dwc2.dtbo")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.new", "overlays/pi3-disable-bt.dtbo")
|
||||
}
|
||||
|
||||
on-error {
|
||||
# Clean up in case something goes wrong
|
||||
fat_rm(${BOOT_PART_OFFSET}, "zImage.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "config.txt.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "cmdline.txt.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bootcode.bin.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "start.elf.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "fixup.dat.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.new")
|
||||
}
|
||||
}
|
||||
|
||||
task upgrade.b {
|
||||
# This task upgrades the B partition
|
||||
require-partition1-offset = ${ROOTFS_A_PART_OFFSET}
|
||||
|
||||
# Since the upgrade won't run until it has been finalized, it's ok
|
||||
# to write data as it is read.
|
||||
verify-on-the-fly = true
|
||||
|
||||
on-init {
|
||||
fat_rm(${BOOT_PART_OFFSET}, "zImage.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "config.txt.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "cmdline.txt.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bootcode.bin.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "start.elf.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "fixup.dat.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.pre")
|
||||
|
||||
fat_mkdir(${BOOT_PART_OFFSET}, "overlays")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.pre")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.pre")
|
||||
}
|
||||
|
||||
on-resource config.txt { fat_write(${BOOT_PART_OFFSET}, "config.txt.new") }
|
||||
on-resource cmdline.txt { fat_write(${BOOT_PART_OFFSET}, "cmdline.txt.new") }
|
||||
on-resource bootcode.bin { fat_write(${BOOT_PART_OFFSET}, "bootcode.bin.new") }
|
||||
on-resource start.elf { fat_write(${BOOT_PART_OFFSET}, "start.elf.new") }
|
||||
on-resource fixup.dat { fat_write(${BOOT_PART_OFFSET}, "fixup.dat.new") }
|
||||
on-resource zImage { fat_write(${BOOT_PART_OFFSET}, "zImage.new") }
|
||||
on-resource bcm2708-rpi-0-w.dtb { fat_write(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.new") }
|
||||
on-resource bcm2708-rpi-b-plus.dtb { fat_write(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.new") }
|
||||
on-resource w1-gpio-pullup.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.new") }
|
||||
on-resource dwc2.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.new") }
|
||||
on-resource pi3-disable-bt.dtbo { fat_write(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.new") }
|
||||
|
||||
on-resource rootfs.img {
|
||||
# write to the first rootfs partition
|
||||
raw_write(${ROOTFS_B_PART_OFFSET})
|
||||
}
|
||||
|
||||
on-finish {
|
||||
# Switch over to boot the new firmware
|
||||
mbr_write(mbr-b)
|
||||
|
||||
fat_mv(${BOOT_PART_OFFSET}, "zImage", "zImage.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "config.txt", "config.txt.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "cmdline.txt", "cmdline.txt.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bootcode.bin", "bootcode.bin.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "start.elf", "start.elf.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "fixup.dat", "fixup.dat.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb", "bcm2708-rpi-0-w.dtb.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb", "bcm2708-rpi-b-plus.dtb.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo", "overlays/w1-gpio-pullup.dtbo.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo", "overlays/dwc2.dtbo.pre")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo", "overlays/pi3-disable-bt.dtbo.pre")
|
||||
|
||||
fat_mv(${BOOT_PART_OFFSET}, "zImage.new", "zImage")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "config.txt.new", "config.txt")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "cmdline.txt.new", "cmdline.txt")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bootcode.bin.new", "bootcode.bin")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "start.elf.new", "start.elf")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "fixup.dat.new", "fixup.dat")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.new", "bcm2708-rpi-0-w.dtb")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.new", "bcm2708-rpi-b-plus.dtb")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.new", "overlays/w1-gpio-pullup.dtbo")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.new", "overlays/dwc2.dtbo")
|
||||
fat_mv(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.new", "overlays/pi3-disable-bt.dtbo")
|
||||
}
|
||||
|
||||
on-error {
|
||||
# Clean up in case something goes wrong
|
||||
fat_rm(${BOOT_PART_OFFSET}, "zImage.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "config.txt.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "cmdline.txt.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bootcode.bin.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "start.elf.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "fixup.dat.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-0-w.dtb.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "bcm2708-rpi-b-plus.dtb.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/dwc2.dtbo.new")
|
||||
fat_rm(${BOOT_PART_OFFSET}, "overlays/pi3-disable-bt.dtbo.new")
|
||||
}
|
||||
}
|
|
@ -0,0 +1,257 @@
|
|||
# CONFIG_ARM_PATCH_PHYS_VIRT is not set
|
||||
CONFIG_PHYS_OFFSET=0
|
||||
CONFIG_LOCALVERSION="-v7"
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_FHANDLE=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_DELAY_ACCT=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
CONFIG_TASK_IO_ACCOUNTING=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_RD_BZIP2 is not set
|
||||
# CONFIG_RD_LZMA is not set
|
||||
# CONFIG_RD_XZ is not set
|
||||
# CONFIG_RD_LZO is not set
|
||||
# CONFIG_RD_LZ4 is not set
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_JUMP_LABEL=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SRCVERSION_ALL=y
|
||||
CONFIG_BLK_DEV_THROTTLING=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_CFQ_GROUP_IOSCHED=y
|
||||
CONFIG_ARCH_BCM2708=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_OABI_COMPAT=y
|
||||
# CONFIG_CPU_SW_DOMAIN_PAN is not set
|
||||
CONFIG_CLEANCACHE=y
|
||||
CONFIG_FRONTSWAP=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_UACCESS_WITH_MEMCPY=y
|
||||
CONFIG_SECCOMP=y
|
||||
# CONFIG_ATAGS is not set
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=squashfs rootwait"
|
||||
CONFIG_CPU_FREQ=y
|
||||
# CONFIG_CPU_FREQ_STAT is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_VFP=y
|
||||
# CONFIG_SUSPEND is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_SYN_COOKIES=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_CFG80211=y
|
||||
CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
CONFIG_MAC80211=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_CMA_SIZE_MBYTES=5
|
||||
CONFIG_OF_CONFIGFS=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_EEPROM_AT24=m
|
||||
CONFIG_SCSI=y
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_ETHERNET is not set
|
||||
CONFIG_USB_USBNET=y
|
||||
# CONFIG_USB_NET_AX8817X is not set
|
||||
# CONFIG_USB_NET_AX88179_178A is not set
|
||||
# CONFIG_USB_NET_CDCETHER is not set
|
||||
# CONFIG_USB_NET_CDC_NCM is not set
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
# CONFIG_USB_NET_NET1080 is not set
|
||||
# CONFIG_USB_NET_CDC_SUBSET is not set
|
||||
# CONFIG_USB_NET_ZAURUS is not set
|
||||
CONFIG_BRCMFMAC=m
|
||||
CONFIG_RT2X00=y
|
||||
CONFIG_RT2800USB=y
|
||||
# CONFIG_RT2800USB_RT33XX is not set
|
||||
# CONFIG_RT2800USB_RT35XX is not set
|
||||
# CONFIG_RT2800USB_RT53XX=y
|
||||
# CONFIG_RTL8192CU=m
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_EVDEV=m
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_SERIO is not set
|
||||
CONFIG_BRCM_CHAR_DRIVERS=y
|
||||
CONFIG_BCM_VC_CMA=y
|
||||
CONFIG_BCM_VCIO=y
|
||||
CONFIG_BCM_VC_SM=y
|
||||
CONFIG_BCM2835_DEVGPIOMEM=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_TTY_PRINTK=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_RAW_DRIVER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_BCM2708=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM2835=y
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_BCM_VIRT=y
|
||||
CONFIG_GPIO_STMPE=y
|
||||
CONFIG_W1=y
|
||||
CONFIG_W1_MASTER_GPIO=y
|
||||
CONFIG_W1_SLAVE_THERM=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_GPIO=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_BCM2835=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_BCM2835_WDT=m
|
||||
CONFIG_MFD_STMPE=y
|
||||
CONFIG_STMPE_SPI=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_BCM2708=y
|
||||
CONFIG_FB_RPISENSE=m
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_LOGO=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=m
|
||||
CONFIG_SND_SEQUENCER=m
|
||||
CONFIG_SND_SEQ_DUMMY=m
|
||||
CONFIG_SND_MIXER_OSS=m
|
||||
CONFIG_SND_PCM_OSS=m
|
||||
CONFIG_SND_BCM2835=m
|
||||
CONFIG_SND_SOC=m
|
||||
CONFIG_SND_BCM2835_SOC_I2S=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m
|
||||
CONFIG_SND_BCM2708_SOC_RPI_DAC=m
|
||||
CONFIG_SND_BCM2708_SOC_RPI_PROTO=m
|
||||
CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m
|
||||
CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m
|
||||
CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m
|
||||
CONFIG_SND_BCM2708_SOC_RASPIDAC3=m
|
||||
CONFIG_SND_SOC_ADAU1701=m
|
||||
CONFIG_SND_SOC_WM8804_I2C=m
|
||||
CONFIG_SND_SIMPLE_CARD=m
|
||||
CONFIG_SOUND_PRIME=m
|
||||
CONFIG_HIDRAW=y
|
||||
CONFIG_HID_APPLE=y
|
||||
CONFIG_HID_PID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_ACM=y
|
||||
CONFIG_USB_PRINTER=m
|
||||
CONFIG_USB_WDM=m
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SERIAL=y
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_CDC_COMPOSITE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_BCM2835=y
|
||||
CONFIG_MMC_BCM2835_DMA=y
|
||||
CONFIG_MMC_BCM2835_SDHOST=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_LEDS_TRIGGER_TRANSIENT=y
|
||||
CONFIG_LEDS_TRIGGER_CAMERA=y
|
||||
CONFIG_LEDS_TRIGGER_INPUT=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
# CONFIG_RTC_HCTOSYS is not set
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_BCM2708=y
|
||||
CONFIG_UIO=m
|
||||
CONFIG_UIO_PDRV_GENIRQ=m
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_R8712U=y
|
||||
CONFIG_STAGING_MEDIA=y
|
||||
CONFIG_MAILBOX=y
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM2835=m
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_FANOTIFY=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_SQUASHFS=y
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
CONFIG_NLS_DEFAULT="utf8"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_850=y
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_BOOT_PRINTK_DELAY=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
CONFIG_CRC_ITU_T=m
|
||||
CONFIG_CRC7=m
|
|
@ -0,0 +1,26 @@
|
|||
defmodule NervesSystemRpi.Mixfile do
|
||||
use Mix.Project
|
||||
|
||||
@version Path.join([__DIR__, "..", "..", "VERSION"])
|
||||
|> File.read!
|
||||
|> String.strip
|
||||
|
||||
def project do
|
||||
[app: :nerves_system_rpi0w,
|
||||
version: @version,
|
||||
elixir: "~> 1.3",
|
||||
compilers: Mix.compilers ++ [:nerves_package],
|
||||
deps: deps(),
|
||||
aliases: ["deps.precompile": ["nerves.env", "deps.precompile"]]]
|
||||
end
|
||||
|
||||
def application do
|
||||
[]
|
||||
end
|
||||
|
||||
defp deps do
|
||||
[{:nerves, "~> 0.5.1", runtime: false },
|
||||
{:nerves_system_br, github: "tmecklem/nerves_system_br", branch: "master", runtime: false},
|
||||
{:nerves_toolchain_armv6_rpi_linux_gnueabi, "~> 0.10.0", runtime: false}]
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
%{"distillery": {:hex, :distillery, "1.3.0", "2145a0a2195df928d276d96fafbf93380d29e8c54156711a3baf0030ce00943b", [:mix], []},
|
||||
"nerves": {:hex, :nerves, "0.5.1", "a55d73752e8f271c7aca5fbe47747f07d0e7760b5e858e7f8da17ab06287f49c", [:mix], [{:distillery, "~> 1.0", [hex: :distillery, optional: false]}]},
|
||||
"nerves_system_br": {:git, "https://github.com/tmecklem/nerves_system_br.git", "b4297e361bb8ecb3abb6abdd49e52faa6350af51", [branch: "master"]},
|
||||
"nerves_toolchain_armv6_rpi_linux_gnueabi": {:hex, :nerves_toolchain_armv6_rpi_linux_gnueabi, "0.10.0", "a730667fb22710270d3e9fdab8ce7230381c424f65b0381feb693829bc460f80", [:mix], [{:nerves, "~> 0.4", [hex: :nerves, optional: false]}, {:nerves_toolchain_ctng, "~> 0.9", [hex: :nerves_toolchain_ctng, optional: false]}]},
|
||||
"nerves_toolchain_ctng": {:hex, :nerves_toolchain_ctng, "0.9.0", "825b2b5bbacc3ad20c8513baafd44978616d5b451e6e052cdb727be81e7cdcac", [:mix], []}}
|
|
@ -0,0 +1,29 @@
|
|||
use Mix.Config
|
||||
|
||||
version = Path.join([__DIR__, "..", "..", "VERSION"])
|
||||
|> File.read!
|
||||
|> String.strip
|
||||
|
||||
pkg = :nerves_system_rpi0w
|
||||
nerves_target = "rpi0w"
|
||||
|
||||
config pkg, :nerves_env,
|
||||
type: :system,
|
||||
version: version,
|
||||
compiler: :nerves_package,
|
||||
artifact_url: [
|
||||
"https://github.com/FarmBot/farmbot_os/releases/download/v#{version}/farmbot.rootfs-#{nerves_target}-#{version}.tar.gz"
|
||||
],
|
||||
platform: Nerves.System.BR,
|
||||
platform_config: [
|
||||
defconfig: "nerves_defconfig",
|
||||
],
|
||||
checksum: [
|
||||
"nerves_defconfig",
|
||||
"rootfs-additions",
|
||||
"linux-4.4.defconfig",
|
||||
"fwup.conf",
|
||||
"cmdline.txt",
|
||||
"config.txt",
|
||||
"post-createfs.sh"
|
||||
]
|
|
@ -0,0 +1,91 @@
|
|||
BR2_arm=y
|
||||
BR2_arm1176jzf_s=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/nerves-project/toolchains/releases/download/v0.10.0/nerves_toolchain_armv6_rpi_linux_gnueabi-0.10.0.linux-x86_64.tar.xz"
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="armv6-rpi-linux-gnueabi"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_5=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
BR2_TARGET_GENERIC_HOSTNAME=""
|
||||
BR2_TARGET_GENERIC_ISSUE=""
|
||||
BR2_INIT_NONE=y
|
||||
# BR2_TARGET_GENERIC_GETTY is not set
|
||||
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
|
||||
BR2_ENABLE_LOCALE_WHITELIST="locale-archive"
|
||||
BR2_GENERATE_LOCALE="en_US.UTF-8"
|
||||
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_NERVES_PATH}/board/nerves-common/rootfs-additions ${NERVES_DEFCONFIG_DIR}/rootfs-additions"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_NERVES_PATH}/board/nerves-common/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${NERVES_DEFCONFIG_DIR}/post-createfs.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_GIT=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux.git"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="04c8e47067d4873c584395e5cb260b4f170a99ea"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${NERVES_DEFCONFIG_DIR}/linux-4.4.defconfig"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-0-w bcm2708-rpi-b-plus"
|
||||
BR2_LINUX_KERNEL_EXT_KERNEL_WIRELESS_REGDB=y
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_NERVES_PATH}/board/nerves-common/busybox-1.22.config"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="${NERVES_DEFCONFIG_DIR}/busybox_defconfig"
|
||||
BR2_PACKAGE_E2FSPROGS=y
|
||||
# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_CHATTR is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_E2FSCK is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_FSCK is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_LSATTR is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set
|
||||
# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set
|
||||
BR2_PACKAGE_FWUP=y
|
||||
BR2_PACKAGE_FSWEBCAM=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_X=y
|
||||
BR2_PACKAGE_AVRDUDE=y
|
||||
BR2_PACKAGE_RPI_USERLAND=y
|
||||
BR2_PACKAGE_ERLANG_SMP=y
|
||||
BR2_PACKAGE_PYTHON=y
|
||||
BR2_PACKAGE_PYTHON_CURSES=y
|
||||
BR2_PACKAGE_PYTHON_READLINE=y
|
||||
BR2_PACKAGE_PYTHON_SSL=y
|
||||
BR2_PACKAGE_PYTHON_NUMPY=y
|
||||
BR2_PACKAGE_PYTHON_REQUESTS=y
|
||||
BR2_PACKAGE_REDIS=y
|
||||
BR2_PACKAGE_OPENCV=y
|
||||
BR2_PACKAGE_OPENCV_LIB_PYTHON=y
|
||||
BR2_PACKAGE_OPENCV_WITH_JASPER=y
|
||||
BR2_PACKAGE_OPENCV_WITH_JPEG=y
|
||||
BR2_PACKAGE_OPENCV_WITH_PNG=y
|
||||
BR2_PACKAGE_OPENCV_WITH_V4L=y
|
||||
BR2_PACKAGE_LIBV4L=y
|
||||
BR2_PACKAGE_LIBV4L_UTILS=y
|
||||
BR2_PACKAGE_LIBMNL=y
|
||||
BR2_PACKAGE_DNSMASQ=y
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
BR2_PACKAGE_HOSTAPD=y
|
||||
BR2_PACKAGE_IW=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG=y
|
||||
BR2_PACKAGE_INOTIFY_TOOLS=y
|
||||
BR2_PACKAGE_MRUBY=y
|
||||
BR2_PACKAGE_PYTHON_PICAMERA=y
|
||||
BR2_PACKAGE_PYTHON_REDISPY=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_NERVES_SYSTEM_NAME="nerves_system_rpi0w"
|
||||
BR2_NERVES_ADDITIONAL_IMAGE_FILES="$(NERVES_DEFCONFIG_DIR)/fwup.conf ${NERVES_DEFCONFIG_DIR}/cmdline.txt ${NERVES_DEFCONFIG_DIR}/config.txt"
|
||||
BR2_PACKAGE_BOARDID=y
|
||||
BR2_PACKAGE_ERLANG_HISTORY=y
|
||||
BR2_PACKAGE_NERVES_CONFIG=y
|
||||
BR2_PACKAGE_NERVES_CONFIG_NO_ERLINIT_CONF=y
|
||||
BR2_PACKAGE_NERVES_CONFIG_APPS="crypto"
|
||||
BR2_PACKAGE_NERVES_CONFIG_SNAME="farmbot"
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
FWUP_CONFIG=$NERVES_DEFCONFIG_DIR/fwup.conf
|
||||
|
||||
# Run the common post-image processing for nerves
|
||||
$BR2_EXTERNAL_NERVES_PATH/board/nerves-common/post-createfs.sh $TARGET_DIR $FWUP_CONFIG
|
|
@ -0,0 +1,41 @@
|
|||
# Additional configuration for erlinit
|
||||
|
||||
# Turn on the debug prints
|
||||
#-v
|
||||
|
||||
# Specify the UART port that the shell should use.
|
||||
# -c tty1
|
||||
-c ttyAMA0
|
||||
|
||||
# If more than one tty are available, always warn if the user is looking at
|
||||
# the wrong one.
|
||||
--warn-unused-tty
|
||||
|
||||
# Use dtach to capture the iex session so that it can be redirected
|
||||
# to the app's GUI
|
||||
#-s "/usr/bin/dtach -N /tmp/iex_prompt"
|
||||
|
||||
# Specify the user and group IDs for the Erlang VM
|
||||
#--uid 100
|
||||
#--gid 200
|
||||
|
||||
# Uncomment to hang the board rather than rebooting when Erlang exits
|
||||
--hang-on-exit
|
||||
|
||||
# Optionally run a program if the Erlang VM exits
|
||||
#--run-on-exit /bin/sh
|
||||
|
||||
# Enable UTF-8 filename handling in Erlang and custom inet configuration
|
||||
-e LANG=en_US.UTF-8;LANGUAGE=en;ERL_INETRC=/etc/erl_inetrc
|
||||
|
||||
# Mount the application partition
|
||||
# See http://www.linuxfromscratch.org/lfs/view/6.3/chapter08/fstab.html about
|
||||
# ignoring warning the Linux kernel warning about using UTF8 with vfat.
|
||||
# -m /dev/mmcblk0p3:/root:vfat::
|
||||
|
||||
# Erlang release search path
|
||||
-r /srv/erlang
|
||||
|
||||
# Assign a unique hostname based on the board id
|
||||
-d "/usr/bin/boardid -b rpi -n 4"
|
||||
-n nerves-%.4s
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,66 @@
|
|||
# NVRAM file for BCM943430WLPTH
|
||||
# 2.4 GHz, 20 MHz BW mode
|
||||
|
||||
# The following parameter values are just placeholders, need to be updated.
|
||||
manfid=0x2d0
|
||||
prodid=0x0727
|
||||
vendid=0x14e4
|
||||
devid=0x43e2
|
||||
boardtype=0x0727
|
||||
boardrev=0x1101
|
||||
boardnum=22
|
||||
macaddr=00:90:4c:c5:12:38
|
||||
sromrev=11
|
||||
boardflags=0x00404201
|
||||
boardflags3=0x08000000
|
||||
xtalfreq=37400
|
||||
nocrc=1
|
||||
ag0=255
|
||||
aa2g=1
|
||||
ccode=ALL
|
||||
|
||||
pa0itssit=0x20
|
||||
extpagain2g=0
|
||||
#PA parameters for 2.4GHz, measured at CHIP OUTPUT
|
||||
pa2ga0=-168,7161,-820
|
||||
AvVmid_c0=0x0,0xc8
|
||||
cckpwroffset0=5
|
||||
|
||||
# PPR params
|
||||
maxp2ga0=84
|
||||
txpwrbckof=6
|
||||
cckbw202gpo=0
|
||||
legofdmbw202gpo=0x66111111
|
||||
mcsbw202gpo=0x77711111
|
||||
propbw202gpo=0xdd
|
||||
|
||||
# OFDM IIR :
|
||||
ofdmdigfilttype=18
|
||||
ofdmdigfilttypebe=18
|
||||
# PAPD mode:
|
||||
papdmode=1
|
||||
papdvalidtest=1
|
||||
pacalidx2g=42
|
||||
papdepsoffset=-22
|
||||
papdendidx=58
|
||||
|
||||
# LTECX flags
|
||||
ltecxmux=0
|
||||
ltecxpadnum=0x0102
|
||||
ltecxfnsel=0x44
|
||||
ltecxgcigpio=0x01
|
||||
|
||||
il0macaddr=00:90:4c:c5:12:38
|
||||
wl0id=0x431b
|
||||
|
||||
deadman_to=0xffffffff
|
||||
# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG
|
||||
muxenab=0x1
|
||||
# CLDO PWM voltage settings - 0x4 - 1.1 volt
|
||||
#cldo_pwm=0x4
|
||||
|
||||
#VCO freq 326.4MHz
|
||||
spurconfig=0x3
|
||||
|
||||
edonthd20l=-75
|
||||
edoffthd20ul=-80
|
Binary file not shown.
|
@ -0,0 +1,21 @@
|
|||
diff --git a/package/rpi-firmware/rpi-firmware.hash b/package/rpi-firmware/rpi-firmware.hash
|
||||
index 8161d7a..f6dd03a 100644
|
||||
--- a/package/rpi-firmware/rpi-firmware.hash
|
||||
+++ b/package/rpi-firmware/rpi-firmware.hash
|
||||
@@ -1,2 +1,2 @@
|
||||
# Locally computed
|
||||
-sha256 144de63ee1999155fc1ff597630f1a13f798e597e7c4d144b8b625fa774c1f9b rpi-firmware-7f8ac8dac0b80291cbf5e56580139034a0a42070.tar.gz
|
||||
+sha256 173c55441a78b5ce9cd7739318f71361b7569597e409c0e002c71e0fd6909481 rpi-firmware-b51046a2b2bb69771579a549d157205d9982f858.tar.gz
|
||||
diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
|
||||
index d2cd481..b73ef53 100644
|
||||
--- a/package/rpi-firmware/rpi-firmware.mk
|
||||
+++ b/package/rpi-firmware/rpi-firmware.mk
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
-RPI_FIRMWARE_VERSION = 7f8ac8dac0b80291cbf5e56580139034a0a42070
|
||||
+RPI_FIRMWARE_VERSION = b51046a2b2bb69771579a549d157205d9982f858
|
||||
RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION))
|
||||
RPI_FIRMWARE_LICENSE = BSD-3c
|
||||
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
|
|
@ -0,0 +1,21 @@
|
|||
diff --git a/package/rpi-userland/rpi-userland.hash b/package/rpi-userland/rpi-userland.hash
|
||||
index 24b6584..3e0dbfa 100644
|
||||
--- a/package/rpi-userland/rpi-userland.hash
|
||||
+++ b/package/rpi-userland/rpi-userland.hash
|
||||
@@ -1,2 +1,2 @@
|
||||
# Locally computed
|
||||
-sha256 f229c29ceae611101bf4716b112251b2f2a33cfbb6636d736deda4e1314bb9d9 rpi-userland-c139376e9bc6fbd93f777c7fc3c7d7cf2cc35122.tar.gz
|
||||
+sha256 9f7caa5fee77cef034551b23a7c12d78792ebd2feca7bcbc677da4daf2a98cf7 rpi-userland-f410ec051a3724934e3671315474d4b81424b0ef.tar.gz
|
||||
diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
|
||||
index 4e3b4ec..aec721d 100644
|
||||
--- a/package/rpi-userland/rpi-userland.mk
|
||||
+++ b/package/rpi-userland/rpi-userland.mk
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
-RPI_USERLAND_VERSION = c139376e9bc6fbd93f777c7fc3c7d7cf2cc35122
|
||||
+RPI_USERLAND_VERSION = f410ec051a3724934e3671315474d4b81424b0ef
|
||||
RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
|
||||
RPI_USERLAND_LICENSE = BSD-3c
|
||||
RPI_USERLAND_LICENSE_FILES = LICENCE
|
|
@ -10,5 +10,9 @@ else
|
|||
git clone $NERVES_SYSTEM_BR_GIT nerves/nerves_system_br
|
||||
fi
|
||||
|
||||
cp buildroot_patches/*.patch nerves/nerves_system_br/patches
|
||||
nerves/nerves_system_br/create-build.sh nerves/nerves_system_$SYSTEM/nerves_defconfig nerves/NERVES_SYSTEM_$SYSTEM
|
||||
if [ ! -f nerves/nerves_system_br/buildroot/.farmbot_applied_patches_list ]; then
|
||||
echo "Applying FarmbotOS patches"
|
||||
nerves/nerves_system_br/buildroot/support/scripts/apply-patches.sh nerves/nerves_system_br/buildroot patches
|
||||
cp nerves/nerves_system_br/buildroot/.applied_patches_list nerves/nerves_system_br/buildroot/.farmbot_applied_patches_list
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue