Compare commits

...

394 Commits
sumo ... HEAD

Author SHA1 Message Date
Mr Jenkins a4ab48c63e meta-netmodule-bsp: updated source revisions 2023-12-27 20:36:58 +01:00
Mr Jenkins a3e87ec6d9 meta-netmodule-bsp: updated source revisions 2023-12-14 10:32:44 +01:00
Mr Jenkins 7cad5c1048 meta-netmodule-bsp: updated source revisions 2023-12-13 11:09:21 +01:00
Alexandre Bard 17c6b96ac9 machine:hw20: Add gnss support 2023-05-22 08:36:01 +02:00
Alexandre Bard b12ccc01a8 freecale/imx-mkimage: Remove autorev
The the branch is anyway not updated anymore and the autorev is causing
parsing problem even when the recipe is not used.
2023-05-16 09:32:45 +02:00
Alexandre Bard a2226ab942 recipes-imx: Update SRC_URIs
codeaurora closed and the sources moved to github

id:382539
2023-04-03 11:02:57 +02:00
Alexandre Bard cff1dfc0c6 ublox-gnss-fw-update: Move to fct layer
This tool is deprecated and used only for factory testing.
So the updated version has been added to fct layer.

id:379391
2023-03-30 11:10:00 +02:00
Mr Jenkins 65b0b8f377 meta-netmodule-bsp: updated source revisions 2023-03-25 20:49:28 +01:00
Patrick Zysset 3cd38e5536 Revert "lpa: Add NRSW base recipe"
Additionally the two follow up commits are reverted too:
Revert "lpa: Remove dependencies to NRSW"
Revert "lpa: Use latest version with patched toby driver"

This reverts commit
8f2fca9c5f,
c1187b5553 and
c18ced1d01.

id:379399

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2023-03-24 17:31:48 +01:00
Mr Jenkins 25003ce8e1 meta-netmodule-bsp: updated source revisions 2023-03-10 10:59:22 +01:00
Mr Jenkins bc645c4c48 meta-netmodule-bsp: updated source revisions 2023-03-06 22:33:48 +01:00
Mr Jenkins cacadef098 meta-netmodule-bsp: updated source revisions 2023-03-06 13:57:19 +01:00
Alexandre Bard 6dc6ddc79c hw26/hw21: Fix order of machine overrides
For most of the overrides the order is not important since all overrides
are used.

But when using a file specific to a machine, only one override is used
and in this case the order is important: the last override matching is
used. So we must keep more specific overrides at the end.

id:366284
2023-02-15 09:44:30 +01:00
Alexandre Bard 5d00c9807b hw25: Remove machine override from hw24
This override was useful in the past when we had a lot of features
defined directly using the machine name. But now it is not needed
anymore.

It is actually the source of problems when using specific files for both
hw24 and 25: Since the HW24 overrides was at the end, the files for it
were always used and the files for HW25 were ignored.

id:366284
2023-02-15 09:44:23 +01:00
Alexandre Bard a020f9406e lmsensors: Add ignition voltage to HW24
id:366281
2023-02-15 09:44:13 +01:00
Mr Jenkins 335e778fed meta-netmodule-bsp: updated source revisions 2023-02-06 16:35:25 +01:00
Mr Jenkins fc29da1d42 meta-netmodule-bsp: updated source revisions 2023-01-20 22:03:46 +01:00
Alexandre Bard ab9518068b wwan-config: configuration: Add comments for fields specific to TOBY-L2
The default APN configuration is only required for TOBY-L2. For LARA, it
is properly handled through the QMI interface.

For LARA the only supported profile is RMNET, so this is not
configurable.

tpID: #354963
2023-01-20 11:56:16 +01:00
Alexandre Bard 3ba77cdf83 modemmanager: Add support for LARA-L6
LARA-L6 is using a QMI interface so we need to enable QMI and the
"generic" plugin.

Also we need to backport libqmi to have the version matching
ModemManager 1.14.

BugzID: 81947
2022-12-13 12:59:41 +01:00
Mr Jenkins 1f8c466f7d meta-netmodule-bsp: updated source revisions 2022-11-25 11:19:51 +01:00
Alexandre Bard 063bdd83a3 network-manager-conf: Enhance support for user module
Now all scenarios with a user module are covered:

- static setup with a user module will create a bridge with static IP
- dhcp setup with a user module will put a static IP on the UM and DHCP
on the main interface

BugzID: 81969
2022-11-18 10:07:49 +01:00
Alexandre Bard 230743c03d networkmanager-conf: Add support for bridge to user-module
This is a setup required for the factory testing image: the user module
must be reachable from the CPU. And since the subnet of the fct ethernet
port and the subnet of the user module are the same, we must bridge them
together.

BugzID: 81969
2022-11-14 15:55:20 +01:00
Alexandre Bard 6fa868f2d4 machines.conf: Add new machine hw26-vcupro
This is the new VCU pro based on HW26 but which includes the user
module.
Because of this change, we cannot reuse HW21 nor HW26 machines.

BugzID: 81969
2022-11-14 15:40:40 +01:00
Alexandre Bard 3c281d8e78 lmsensors: hw20: Remove input voltage
This is not implemented.
2022-09-27 08:50:13 +02:00
Alexandre Bard 76457f2106 lmsensors: Fully extend configs for DA9063 on all hardwares
BugzID: 81382
2022-09-13 15:00:44 +02:00
Alexandre Bard 275d265ee7 lmsensors: Add configs for HW21 and HW26
Label and compute all input from the PMIC.

BugzID: 81382
2022-09-12 16:31:11 +02:00
Alexandre Bard 1eb5a1a51e wwan-config: Fix ModemManager not stopped when stopping wwan-config
BugzID: 81051
2022-09-01 12:24:38 +00:00
Alexandre Bard 2fca63a11b lmsensors-config: Update da9063 rules
Names with dashes are not allowed. They were working only because of a
patch.

BugzID: 81093
2022-08-24 10:00:47 +02:00
Alexandre Bard 9183a5f886 lmsensors: Remove uneeded patch
After discussion with the maintainers, the problem actually lies in the
kernel drivers where a dash is forbidden. But the da9063-hwmon driver
was using a deprecated function which was not checking the name.

BugzID: 81093
2022-08-24 09:59:10 +02:00
Alexandre Bard c18ced1d01 lpa: Use latest version with patched toby driver
BugzID: 80707
2022-08-16 15:25:14 +00:00
Alexandre Bard c1187b5553 lpa: Remove dependencies to NRSW
BugzID: 80707
2022-08-16 15:25:14 +00:00
Alexandre Bard 8f2fca9c5f lpa: Add NRSW base recipe
This is a tool to manage eUICC sim cards profiles.

BugzID: 80707
2022-08-16 15:25:14 +00:00
Alexandre Bard 376186bb85 wwan-config: Get rid of platform specific files
These platform specific files are replaced by definitions in devicetree
or abstraction through lmsensors.
2022-08-16 15:55:05 +02:00
Alexandre Bard a8254343f4 Add lmsensors rules for HW24 and HW25
These two hardware have the ability to read out the wwan modem supply to
know when it is completely turned off.

This is abstracted to wwan-config through lmsensors rules.

BugzID: 80542
2022-08-16 15:55:05 +02:00
Alexandre Bard f4fcefbc19 Patch lmsensors to support da9063-hwmon driver
lmsensors is not able to handle driver names with dashes inside by
default.

BugzID: 80542
2022-08-16 15:55:05 +02:00
Alexandre Bard 34bdf31db0 ssf: sysstate module: Remove SSC_KBUILD_EXTRA_SYMBOLS variable
It is suspected that having this variable containing a local path is the
reason why when building from sstate, the kernel sometimes need to be
rebuild.

BugzID: 80858
2022-08-04 10:55:51 +02:00
Marc Mattmueller a5300c936e u-boot: set default URL to public GitLab
BugzID: 80085
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2022-07-28 12:21:35 +02:00
Marc Mattmueller 38d78f2ba0 linux-netmodule kernel: set default URL to public GitLab
BugzID: 80085
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2022-07-28 11:28:50 +02:00
Mr Jenkins 87cf99189d meta-netmodule-bsp: updated source revisions 2022-06-28 09:17:53 +02:00
Alexandre Bard 3dba18ccfc netmodule-fitimage: Fix deployment when building from sstate
Deploying directly the DEPLOY_DIR_IMAGE bypasses the shared state
mechanism implemented in the deploy class, leading to the image not
being properly deployed when building entirely from sstate.

BugzID: 80331
2022-06-24 16:02:36 +02:00
Alexandre Bard d7bb7b2796 wwan-config: Increase TimeoutStartSec
As explained in the comment, the start of this service may include some
power cycles of the modem and also the startup of ModemManager. All of
this may take longer than the default 90 seconds in some special cases.

This should anyway not be a problem since this service is self resilient
and can handle errors during startup.

BugzID: 80178
2022-06-21 17:07:26 +02:00
Mr Jenkins 886811e338 meta-netmodule-bsp: updated source revisions 2022-06-20 09:01:42 +02:00
Mr Jenkins d070d3f944 meta-netmodule-bsp: updated source revisions 2022-06-16 14:35:14 +02:00
Mr Jenkins 5bb784bd38 meta-netmodule-bsp: updated source revisions 2022-06-14 08:17:40 +02:00
Alexandre Bard 8b20e8ef04 fpga-image: Restrict compatible machines
This avoid a warning when building for machines which don't have an
fpga.
2022-06-10 19:07:10 +02:00
Alexandre Bard 50916d798c kernel-modules: Build them for architecture and not MACHINE
As for the kernel, we don't need to build them for every MACHINE and
will save some build time when building them only once per architecture.

BugzID: 80015
2022-06-09 12:11:39 +02:00
Alexandre Bard dae3c027be recipes-kernel: Build kernel tools for architecture and not machine
As explained in the comments, in yocto the kernel is expected to be
built for each MACHINE and not for each architecture as we do.

Therefor all tools related to kernel must also be adapted.

BugzID: 80015
2022-06-09 12:11:39 +02:00
Alexandre Bard 43dd045696 linux-netmodule: Remove latest dependencies to MACHINE variable
These dependencies lead to a partial rebuild of the kernel when
switching machine, even where they are actually using the exact same
kernel sources and config.

BugzID: 80015
2022-06-09 12:11:18 +02:00
Alexandre Bard ee9b13081b recipes-kernel: Reorganize directory
Grouping all system state framework modules into one directory and all
other modules together.

BugzID: 80015
2022-06-09 12:11:00 +02:00
Alexandre Bard 537291f8dd Remove outdated devicetree tools
These tools are not used anymore and not planned to be used in a near
future.

BugzID: 80015
2022-06-09 12:10:51 +02:00
Alexandre Bard 9e05073856 Remove wireless-regdb
This is already part of meta-netmodule-wlan and maintained there.

BugzID: 80015
2022-06-09 12:10:40 +02:00
Alexandre Bard 901c12f911 linux-netmodule: Split per kernel version
Instead of having one kernel recipe with two hashes, it makes more sense
and is easier to maintain two recipes with the same name but different
versions. The shared part is in an include file.

Each machine then chooses which version it wants to use with
PREFERRED_VERSION variable.

BugzID: 79987
2022-06-08 08:37:11 +02:00
Mr Jenkins bf8e21637a meta-netmodule-bsp: updated source revisions 2022-05-31 12:22:29 +02:00
Alexandre Bard d7d56c9048 Remove wlconf-bin
This is now integrated in meta-netmodule-wlan.

BugzID: 79548
2022-05-11 18:11:56 +02:00
Alexandre Bard 8b8abe9561 fpga-image: Update HW18 image
BugzID: 77953
2022-05-05 15:42:31 +02:00
Alexandre Bard e99985266c fpga-image: Make compatible with HW17
BugzID: 77953
2022-05-05 15:42:08 +02:00
Alexandre Bard d934b0e9d1 HW17: machine.conf: Rename and add machine features
Following new standard without nr or nb prefix in machine names.

BugzID: 77953
2022-05-05 15:41:13 +02:00
Alexandre Bard 58102512a5 HW17: machine.conf: Update kernel configuration
BugzID: 77953
2022-05-05 15:33:58 +02:00
Alexandre Bard cd3f47b05b armada: machine.conf: Update u-boot configs
BugzID: 77953
2022-05-05 15:02:28 +02:00
Alexandre Bard e284973988 mac-address-set: BT: do a hard reset when soft reset fails
It happens that a soft reset is failing and blocking the chip in a state
where it always times out. The only wait to get out of this is to hard
reset the bluetooth chip.

BugzID: 77171
2022-02-08 10:59:01 +01:00
Alexandre Bard b1540a4555 mac-address-set: Make the bt mac inverted on demand
Detecting if the mac address must be inverted means doing two resets of
the chip in a short period when the mac must be inverted.
These two resets is sometimes letting the BT chip in a state where it
does not answer for more than a minute.

Also fixes getopts string: options -w and -b don't have arguments.

BugzID: 77171
2022-02-03 16:52:44 +01:00
Patrick Zysset 7c3befb14c mac-address-set: use own services for bt and wlan settings
settin mac address of bt and wlan is now triggered in two separated
services.

BugzID: 77171

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2022-01-31 23:43:02 +01:00
Patrick Zysset d4799485a9 mac-address-set: bug fixes and testify support
added several enhancements to the mac-address-set script:

- splittet wlan and bt address setting (use -w / -b options)
- fixed upper and lower case problem with vcu1 addresses
- fixed hexadecimal support with vcu2 addresses
- added testify support (incl. log_test function)

BugzID: 77171

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2022-01-31 23:24:13 +01:00
Patrick Zysset 2734a8b02f mac-address-set: add testify unit-test
adding a unit test script which uses testify framework to test the
mac-address-set script for vuc1 and vcu2.

BugzID: 77171

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2022-01-31 23:24:03 +01:00
Patrick Zysset 2173bda09c mac-address-set: add timeout to wait_on function
if a device is never getting ready on startup sequence, the wait_on()
function runs forever. with this patch it aborts after 10 seconds.

BugzID: 77171

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2022-01-25 18:17:23 +01:00
Alexandre Bard 197b4f6f07 mac-address-set: start service before NetworkManager
If NetworkManager starts before, it may change the mac address for
scanning and store the chip mac address. When finaly using a static mac
address (for an established connection or AP) it will restore the chip
address instead of our address.

BugzID: 77171

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2022-01-18 16:45:45 +01:00
Alexandre Bard da62ee6786 mac-address-set: adding vcu2 support (hw23)
After an overall refactoring this script now does:

 * Wait on devices being ready before changing the address
 * Handle errors when setting wlan or bluetooth mac address
 * Handle different MAC address schemes
 * Handle different behaviors when setting wlan mac:

On HW21, the address must be set while the interface is down, but on
HW23 it must be set while the interface is up and if it is down, no
error is thrown, so the modified address is checked.

 * Handle different behaviors while setting BT mac:

On HW21, the address must be given with the bytes in reverse order.
We therefore first try with the right order and check the address and
retry with the reversed address if it failed.

BugzID: 77171

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2022-01-18 16:43:06 +01:00
Alexandre Bard 54d559d706 hw23: Force wpa-supplicant and hostapd versions
hw23: Force wpa-supplicant and hostapd versions

meta-netmodule-wlan provides modified versions of these tools, but they
seem to not work properly on HW23. Since this HW is anyway not supported
in meta-netmodule-wlan, we force the usage of latest stable version.

BugzID: 77173

Co-authored-by: Patrick Zysset <patrick.zysset@netmodule.com>
Reviewed-on: https://git.netmodule.intranet/yoctoproject/meta-netmodule-bsp/pulls/111
Co-Authored-By: Alexandre Bard <alexandre.bard@netmodule.com>
Co-Committed-By: Alexandre Bard <alexandre.bard@netmodule.com>
2022-01-12 00:36:22 +01:00
Alexandre Bard 07b47e5c7d gpsd: Update to 3.23.1
This fixes a bug where the dates is rolled back to 20 years ago.

BugzID: 77484
2022-01-06 16:48:45 +01:00
Lucien Mueller 180f8c8028 scfw: dlm update to 02348b77dae2096e536a193f51936d2294efbad8
master update to 29839d110cf4566709b1f2ba653df6638d5ad95d

BugzID: 75851

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-12-10 13:51:22 +01:00
Alexandre Bard 8bc99070fa udev-rules-nmhw: Update rule to also add scripts
Some scripts trigerred by udev rules must also be installed.

BugzID: 75479
2021-12-10 09:48:38 +01:00
Alexandre Bard 27a82d21c9 linux-netmodule: Update kernel to 5.10 branch
BugzID: 75479
2021-12-09 16:07:03 +01:00
Marc Mattmueller d887e262a8 storage-info: set license to MIT
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-11-29 09:50:24 +01:00
Marc Mattmueller 4856b5a3d8 storage-info: adapted install of config and systemd service files
those files reside now in the repository itself, thus the recipe
needed to be adapted

BugzID: 75350
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-11-24 15:59:21 +01:00
Marc Mattmueller 842e337481 recipes-bsp: added storage-info as systemd service
BugzID: 75350
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-11-24 15:38:27 +01:00
Marc Mattmueller 96c52172f7 linux-netmodule: changed git url from gitea to (internal) gitlab
BugzID: 75775
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-11-17 17:01:31 +01:00
Alexandre Bard 405c374f05 linux-netmodule: Remove redundant find_cfgs function
This function is already present in the cml1 bbclass which is
automatically inherited by the kernel bbclass.

BugzID: 75318
2021-10-19 10:39:18 +02:00
Alexandre Bard 514cd7fd80 Add support for shared kernel between IMX machines
BugzID: 75223
2021-10-16 17:24:02 +02:00
Alexandre Bard 723c5db1de Use one kernel config for all armada devices
BugzID: 75223
2021-10-15 14:23:54 +02:00
Alexandre Bard 17f6ca3268 Move the kernel sharing variable into a common config file
BugzID: 75223
2021-10-15 14:23:54 +02:00
Alexandre Bard 17fae35e5e linux-kernel: Build only one kernel per platform
With this change we are building the same kernel config for all
hardwares belonging to the same platform. The configs only differ from
one or two drivers which are enabled or not and they are anyway not
loaded as long as the devicetree is not matching.

But having only one config for several hardwares is reducing maintenance
(like enabling or disabling kernel security features) and also reducing
build time when building for different machines.

BugzID: 75223
2021-10-15 14:05:12 +02:00
Alexandre Bard 7bc85ccf32 linux-netmodule: Remove useless do_install steps
The two "ifs" are covering cases where the fitImage is not used and we
don't support this case.

And as the Module.symvers comment says, this has been fixed upstream in
kernel.bbclass.

BugzID: 75220
2021-10-12 16:44:43 +02:00
Lucien Mueller 23ef02e236 u-boot: use mainline u-boot.inc
Our u-boot-nm.inc was just a copy of an outdated u-boot.inc.
I now changed the u-boot-nm.inc file to be a common configuration file
for our u-boot recipes.

BugzID: 75187

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-10-12 13:42:21 +02:00
Lucien Mueller 554d477873 hw23, hw21: add da9063-ignition machine feature.
ATM the system state framework only works properly if we have the da9063
with working ignition.

BugzID: 74987

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-09-28 12:12:18 +02:00
Alexandre Bard 8c76216b9b linux-netmodule: Remove useless HW23 overrides
The only thing which is different for HW23 is the kernel source (which
contains a different license)

BugzID: 74961
2021-09-24 16:34:54 +02:00
Alexandre Bard 7627d49b28 linux-netmodule: Remove PV variables
These values are out of date with the real kernel versions and may be
misleading. Since we have only one version of the kernel, we can remove
them and "git" will be used as default value.

BugzID: 74959
2021-09-24 16:06:53 +02:00
Alexandre Bard 3efbecb49f linux-netmodule: Remove symlinks for devicetrees
These symlinks were required for compatibility with NRSW u-boot.
Since we are now using fitimage, the name of the devicetree is not
relevant since it is directly part of the fitimage.

BugzID: 74958
2021-09-24 15:48:22 +02:00
Alexandre Bard dc6566f9a6 linux-netmodule: Don't install kernel in /boot directory
We don't need the kernel in the rootfs since it is always packed into a
fitimage.

BugzID: 74573
2021-09-02 13:19:11 +02:00
Lucien Mueller 93af481ded hw23: remove additional configs.
BugzID: 74562

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-09-01 13:19:03 +02:00
Alexandre Bard c76e078016 kernel-fitimage: Fix fpga support in fitimage
Instead of rewriting the full fitimage_assemble, we can just append to
the part generating the kernel entry, therefore reducing the duplicated
code.

BugzID: 74530
2021-08-30 11:03:16 +02:00
Alexandre Bard 29d4398168 gpsd.bbappend: Use machine features instead of machine overrides
With this approach, we just need to change a machine.conf file to add
advanced-gnss to machine_feature in machine.conf to enable gnss-mgr,
force gpsd to start with 115200 bitrate and to disable gpsd service
because it will be started by gnss-mgr.

BugzID: 74458
2021-08-26 13:11:56 +02:00
Lucien Mueller 26e480a6e0 netmodule-fitimage: do_assemble_fitimage is now run before the do_deploy
step.

BugzID: 74417

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-08-24 13:12:36 +02:00
Alexandre Bard a9ac74dac7 u-boot-armada: Deploy u-boot-spl.kwb file
This is the name used for the wic file creation.

BugzID: 74357
2021-08-23 15:02:36 +02:00
Alexandre Bard 139bb581ba u-boot-ti: Deploy MLO and u-boot.img files
These are the names used for the wic file creation.

BugzID: 74357
2021-08-23 14:16:56 +02:00
Alexandre Bard 4d68c84dfc u-boot: fix name of deployed artifacts
And also reduce the number of created artifacts and simplify do_deploy.
The rm commands are not required. bitbake is smart enough to remove the
old deployed artifacts of a recipe.

BugzID: 74357

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2021-08-19 22:20:41 +02:00
Alexandre Bard 7cdc60e983 u-boot: make only one u-boot recipe per soc
BugzID: 74357

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2021-08-19 22:19:53 +02:00
Alexandre Bard b2bb823e3c machines.conf: add pci to MACHINE_FEATURES
This will bring pciutils automatically to all machines:
- all armada machines
- all am33x machines
- imx8 hw23

BugzID: 73589

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2021-08-19 22:19:41 +02:00
Alexandre Bard b0a1d9ead2 machines.conf: add machine feature user-module to hw21
and remove the machine feature on hw26 since it is derived from hw21
machine config.

BugzID: 73593

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2021-08-17 02:40:24 +02:00
Alexandre Bard 1fe3fd0780 machines.conf: add wifi machine features
In order to pull in some chip specific firmware / drivers or tool there
are also one specific wifi feature per wifi chip:
- ath-wifi for atheros chips
- ti-wifi for TI chips
- ublox-wifi for u-blox chips

BugzID: 75593

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2021-08-17 02:39:35 +02:00
Alexandre Bard 42f969ee33 machines.conf: add machine feature advanced-gnss to hw21 and hw23
This describes gnss chips with ADR which are supported by gnss-mgr.

BugzID: 73593

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2021-08-17 02:38:17 +02:00
Lucien Mueller cac425ad89 Add missing UBOOT_LOADADDRESS variable.
Because we don't have the kernel class in the netmodule-fitimage recipe,
we have to add this line there.

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-08-04 09:24:47 +02:00
Lucien Mueller dd047c4fbd fix the PROVIDES variable.
Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-08-03 13:51:40 +02:00
Lucien Mueller 898c9d60a8 fix ostree build with netmodule-fitimage.
Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-08-03 12:20:09 +02:00
Alexandre Bard 6204c7fbdc HW21+HW23: Add gnss as machine feature
BugzID: 73593
2021-08-02 13:00:07 +02:00
Alexandre Bard 7b757d4c9e HW21 + HW23: Add imu to machine features
BugzID: 73593
2021-08-02 13:00:07 +02:00
Alexandre Bard de1294228d HW21 and HW23: Add spi machine feature
BugzID: 73593
2021-08-02 13:00:07 +02:00
Alexandre Bard 200a4ee56b HW16: add wakeuptimer as a machine feature
BugzID: 73593
2021-08-02 13:00:07 +02:00
Alexandre Bard 473fedd18b machines.conf: Add can MACHINE_FEATURE when required
BugzID: 73593
2021-08-02 13:00:07 +02:00
Lucien Mueller 1bf9ce5778 add netmodule-fitimage recipe.
This recipe lets us create a fitimage outside of the kernel recipe.
For this to work we need to create just the zImage from the standard
 kernel recipe.

BugzID: 73616

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-07-30 12:37:35 +02:00
Stefan Eichenberger 1b86182dc6 ssc-sysstate-driver: add Module.symvers path
Make sure that the sysstate driver finds the Module.symvers file of the
broker driver.

Signed-off-by: Stefan Eichenberger <eichest@gmail.com>
2021-06-09 18:38:59 +02:00
Alexandre Bard 89440ae8d9 imx-sc-firmware: Cleanup
Removed state machine, ignition handling and V2X power handling.

BugzID: 73163
2021-06-09 15:24:27 +02:00
Marc Mattmueller ddd720dc11 v2x: added error check when aborting get_status in v2x-fw-load
BugzID: 67750
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-08 12:59:12 +02:00
Marc Mattmueller f626798f94 v2x-fw-load: waiting for exiting DFU mode with placeholder fw
BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-07 18:40:49 +02:00
Marc Mattmueller db235c3453 v2x: added config file for shipment
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-07 16:55:02 +02:00
Marc Mattmueller c18178f212 gnss-init: reverted the gnss-init service back to "original" state
Reason for reverting to originial state:
- adaption of the v2x-fw-load script
- re-introduction of the v2x recipe in all of our images
- no difference when wainting on USB disconnect event or directly
  releaseing the gnss module from its reset

BTW: The original timeout of 50s can be explained as the SCU held a
delay of 40s until powering the v2x module. This delay shall be
removed in the next couple of days.

BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-07 14:46:32 +02:00
Marc Mattmueller b9e18a3a0b gnss-init: disable device state check when timeout is set to 0 (default)
BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-07 14:06:18 +02:00
Marc Mattmueller 21679f459f v2x: reworked the v2x-fw-load script for shell
BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-03 22:32:10 +02:00
Marc Mattmueller 29bc1b86ac v2x: removed capture of get_status error during abort
we power cylce now the power of the v2x module hence it is no longer
needed.

BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-03 17:41:46 +02:00
Marc Mattmueller 06295ec022 v2x: v2x-fw-load script reads a config file, where the fw load can be skipped
the v2x-fw-load script was refactored and ready now a config file. The v2x
recipe installs a v2x config file depending on a distro variable
V2X_ENABLE_FW_LOAD. Inthere it is possible to declare a parameter line like
'is-placeholder-firmware=true' to skip the firmware load in the v2x-fw-load
script. The skip includes also the detection of the DFU mode of the module.

These changes enables us to introduce the v2x package in all our images so
that the service doesn't fail anymore when we are using our placeholder
firmware.

BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-03 17:01:51 +02:00
Marc Mattmueller 8487d2fb79 gnss-init: added option to script for setting the check timeout
adapted also the default timeout down to 20s

BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-03 13:59:10 +02:00
Marc Mattmueller c3e5b9af5a gnss-reset: fixed error checking when setting reset pin
BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-03 09:24:08 +02:00
Marc Mattmueller e367bcf0c1 usb-hub/gnss-init: handle releasing resets at power-up and reboot
start-up changes:
 - usb-hub is just released from reset
 - gnss-init service calls a script twice:
   - as pre-step: checking the hub state depending on the start
                  reason:
                   - at reboot   --> just go on, at power-up
                   - at power-up --> wait for a USB disconnect
                                     of a device for a certain
                                     time
   - as start step: releasing gnss module from reset

shutdown changes:
 - no resets were triggered

BugzID: 72787
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-06-02 18:53:38 +02:00
Marc Mattmueller c2eabcb4e9 usb-hub/gnss-init: handle potential enabling within bootloader
The bootloader might already release the usb-hub, the v2x module and
the gnss modem from reset. Thus the usb-hub and the gnss modem are put
into reset first so that a proper enumeration would be possible.

BugzID: 72787

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-05-20 13:42:44 +02:00
Marc Mattmueller 09903e21fc ubs-hub-reset/gnss-init: added postfix and fixed post command path
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-05-19 19:11:51 +02:00
Marc Mattmueller dbdef42445 v2x/gnss-init/usb-hub-reset: extracted the usb hub reset part from v2x
The v2x firmware load script contained also the usb hub reset which
affects the GNSS modem. This means that the GNSS modem worked only
when the v2x recipe was enabled. But without firmware the v2x-service
fails at start-up which affects all other images except vcu.

Therefore the usb-hub reset part was extracted from the v2x firmware
load script so that we decouple those two functions. ZF/OM need a
failing v2x service when no firmware is loaded, thus the v2x service
was moved back to the vcu image (see meta-netmodule-om).

The systemd services v2x and gnss-init depend now on usb-hub-reset
whereas gnss-init additionally depends on v2x (if available).

BugzID: 72787

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-05-19 12:22:47 +02:00
Marc Mattmueller 3c25250176 gnss-init.service: set gnss modem into reset state at reboot/poweroff
BugzID: 72787

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-05-19 10:48:51 +02:00
Marc Mattmueller 2b3c3f3e9f v2x: added exit criteria when no v2x module was found on the usb bus
the v2x service won't fail anymore if no modem is found on the usb
bus.

BugzID: 72787

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-05-18 14:27:54 +02:00
Marc Mattmueller 0b52ba81d1 v2x: added recipe (moved from meta-netmodule-om)
BugzID: 72787

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-05-18 11:36:40 +02:00
Alexandre Bard 3cfed374e5 board-descriptor: Fix partial installation
The descriptor.py file was not properly packaged because the variable
PYTHON_SITEPACKAGES_DIR was not defined. It is defined in the
python3-dir class.

BugzID: 72580
2021-05-04 17:17:30 +02:00
Alexandre Bard 0f78b1b8e5 imx-sc-firmware: Let uboot clear irq registers
uboot is now able to communicate with the SCU and to clear the irq
registers itself.

BugzID: 71440
2021-04-30 10:19:12 +02:00
Alexandre Bard 4e05cd8cf9 imx-sc-firmware: Update SCU firmware with I2C tunnel
This updated firmware is allowing the kernel core to access the I2C bus
of the SCU core.

It also properly forwards the interrupts from the SCU core to linux.

BugzID: 70694
2021-04-20 20:09:39 +02:00
Alexandre Bard 52a03477a8 wlan: make bbappend compatible with any versions
These tools were updated in meta-netmodule-wlan and the version number
changed.
2021-03-29 12:03:08 +02:00
Alexandre Bard 007da9524c HW26: Add support for PPS
BugzID: 66249
2021-03-25 19:19:37 +01:00
Lucien Mueller 5db36b3b32 system-state-framework: remove extmod-driver.
BugzID: 70266

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-02-15 17:00:25 +01:00
Lucien Mueller 9a830cc206 system-state-framework: fix dependency to broker.
BugzID: 70200

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-02-12 17:17:01 +01:00
Alexandre Bard 52a8c3468e wwan-config: Fix systemd service location
The service is required by multi user target and not just wanted.

BugzID: 70251
2021-02-12 09:11:01 +01:00
Alexandre Bard 99ec03ae74 tibluetooth: Handle errors intead of relying on abritrary delay
There is no guarantee that a fix delay is actually enough, because with
the BT_EN gpio, we only control activation of bluetooth on the chip. But
we don't know the status of the whole chip.

Also hciattach has anyway a timeout of 5 seconds, so 0.1 seconds does
probably not make a big difference in this regard.

So in order to make it the safest possible, we can only rely a failure
handling and retrying. The number 5 for retries has been defined since
repeated restart of the service with only 3 retries leads to failure
pretty quickly. At 4 there is no failure anymore. So with 5 we are sure
the risk of failure is really low.

BugzID: 70195
2021-02-10 12:18:33 +01:00
Alexandre Bard d6ee12600f wwan-config: Make APN configurable
BugzID: 69970
2021-01-27 11:43:04 +01:00
Alexandre Bard b034539375 tibluetooth: Start only after bluetooth0 symlink is ready
The service must wait until udev has setup the symlink, since it is
using it.

BugzID: 69855
2021-01-20 15:37:26 +01:00
Lucien Mueller 70bdcc3110 ssf: autoload kernel modules
BugzID: 69520

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-01-19 13:34:29 +01:00
Alexandre Bard 36546bdf67 tibluetooth: Add missing dependency to gpio tools
This package contains gpioset, gpiofind, etc
This tools are required to access the gpios from shell scripts.

Also fixes the RDEPENDS ${PN}

BugzID: 65420
2021-01-19 12:27:13 +01:00
Lucien Mueller 9361b9851c tibluetooth: optimize build.
Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-01-18 14:45:58 +01:00
Lucien Mueller 1c8c1bb002 tibluetooth: improved the service to be more generic.
Name the BT_EN gpio in the device tree when you want to use this service.
It has to be found with the command: "gpiofind BT_EN".

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-01-18 14:19:36 +01:00
Alexandre Bard da7ad95535 u-boot-hw23: Set empty initial environment
The default behavior is to try to build u-boot-initial-env
Which is not implemented in our u-boot repo.

Part of yocto update to dunfell release.

BugzID: 69636
2021-01-16 18:47:54 +01:00
Alexandre Bard 3a0b031550 jody-w1-bt-hcd: Add missing dependency
The BT script is using the libgpiod tools (gpioset, gpiofind).

Part of yocto update to dunfell release.

BugzID: 69636
2021-01-16 18:47:54 +01:00
Alexandre Bard 69b1bfbdad hw23: Use A35 tune instead of generic aarch64
Afer upgrading meta-freescale to dunfell, the new default tune is
a35-crypto instead of aarch64.

Part of yocto update to dunfell release.

BugzID: 69636
2021-01-16 18:47:54 +01:00
Alexandre Bard 0bfb1df3f3 imx-sc-firmware: Update to 1.5.0
Aligning with recipes from meta-freescale/dunfell.

Part of yocto update to dunfell release.

BugzID: 69636
2021-01-16 18:47:54 +01:00
Alexandre Bard 2e9dbfea17 Make layer compatible with dunfell
BugzID: 69636
2021-01-16 18:47:54 +01:00
Alexandre Bard c3cd8fb06f gpsd: Move to recipes-navigation
BugzID: 67798
2021-01-16 18:47:54 +01:00
Alexandre Bard ddec09b25f gpsd: Use official backport recipe from meta-oe/master
BugzID: 67798
2021-01-16 18:47:54 +01:00
Alexandre Bard 17b7f134d8 ssc drivers: Fix build dependency
Build dependency are not package related and therefor the suffix _${PN}
is not required and not working as expected.

BugzID: 69520
2021-01-16 18:46:02 +01:00
Lucien Müller 1ae49c5df8 fb69520-integrate-system-state-framework (#70)
system-state-framework: added recipes for the broker, extmod and
sysstate parts.

move include files to ${STAGING_KERNEL_BUILDDIR}/include/broker/

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>

Co-authored-by: Ramon Moesching <ramon.moesching@netmodule.com>
Reviewed-on: https://git.netmodule.intranet/yoctoproject/meta-netmodule-bsp/pulls/70
2021-01-15 14:14:01 +01:00
Alexandre Bard 52f1381685 layer.conf: Fix dependency to freescale layer
The name to use is actually the name defined in the layer.conf of the
target layer and not the name of the directory itself (which can
actually change).

BugzID: 69469
2021-01-07 20:11:38 +01:00
Alexandre Bard e4faf46035 Fix dependencies to python3
python tools must now depend explicitly on python3-core.
If it is not done, bitbake will now throw an error.

BugzID: 69636
2021-01-04 16:24:52 +01:00
Alexandre Bard b8efbe729a Get rid of u-boot-fw-utils
These tools are not required anymore and not present in dunfell release.

BugzID: 69636
2021-01-04 16:23:54 +01:00
Alexandre Bard a254220540 ModemManager: Update to 1.14.8
- Backport 1.14.8 recipe from meta-oe/master
 - Update our internal git repo
 - Use new feature to exclude unused plugins

BugzID: 60585
2020-12-31 12:01:21 +01:00
Alexandre Bard 2680c89a08 Make imx recipes depend on freescale layer
In order to use this layer without hard dependency to the freescale
layer. The freescale layer is only necessary to build HW23 images.

BugzID: 69469
2020-12-20 21:02:14 +01:00
Ramon Moesching 3bdeb0a83b u-boot-am335x-nmhw21: don't use symlink for hw26 artifacts
Replace with copy command.

BugzID: 69325

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-12-15 10:07:35 +01:00
Alexandre Bard 8a4c0869d3 network-manager-conf: Don't always use eth0 as default
It was already the case for HW18: eth2 was the default.
Now with HW25, we can't rely either on eth0 name since it is assigned by
default to the wrong port.

We are therefor using lan0 for HW25 and make the nm-conf recipe more
generic.

BugzID: 69468
2020-12-14 14:05:27 +01:00
Ramon Moesching 5bec9ecf1f u-boot-am335x-nmhw21: deploy nmhw21 as hw26 binaries
nmhw21 and hw26 are using common u-boot code base.
Thus we are creating symlink from nmhw21 to hw26.
With this fix jenkins packaging stage is working again.

BugzID: 69325

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-12-14 13:17:19 +01:00
Alexandre Bard 597b53438c linux-initramfs: Remove WLAN cfg patch
This patch is removing wlan config to use the backports instead. But the
backports are not compatible with other kernel than virtual/kernel.

We must therefor rely in the default wlan for the moment

BugzID: 69147
2020-11-27 22:29:12 +01:00
Alexandre Bard 7ac62047b1 kernel: Create specific recipe for initramfs images
Changing KERNEL_PACKAGE_NAME allows this variant of the kernel to live
its own life in tmp/work/ instead of being shared in tmp/work-shared.

It is also not providing virtual/kernel.

This way, the "official" kernel (virtual/kernel) is never modified and
rebuilt, leading to strange behavior regarding deployed licenses.

BugzID: 69147
2020-11-27 14:20:46 +01:00
Lucien Mueller 0d3fc719bc gpsd: add gpsd-modification to hw23
BugzID: 67902

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2020-11-25 17:53:25 +01:00
Alexandre Bard 3ffadd7487 HW23: Add machine feature imx-boot
Since imx-boot is different than a classic u-boot we need to handle it
separatly. bootloader-config does not support it so we use this variable
to remove it at build time.

BugzID: 69098
2020-11-24 13:56:59 +01:00
Alexandre Bard ae37c1b2b9 wwan-config: Make service less nice
In order to make the service start faster we make it less nice.
It will therefor have more cpu resources to setup the modem faster. The
overall goal being to have WWAN connectivity earlier during boot
process.

BugzID: 67742
2020-11-20 20:43:58 +01:00
Ramon Moesching 73ad873411 layer.conf: fix wrong BBFILES_DYNAMIC for applying layer meta-ublox-module
Due typo and wrong usage bbappends were never applied to
meta-ublox-module layer.

BugzID 68069

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-18 14:43:43 +01:00
Alexandre Bard f9eb3a95ee uboot: Prevent overwriting of build date
After changing the distro config to allow reproducible builds, a side
effect was that the date printed during uboot startup was 1 Jan 1970.

In order to get the real build date in uboot, we must unset the
SOURCE_DATE_EPOCH variable.

BugzID: 67738
2020-11-11 16:13:17 +01:00
Ramon Moesching dd685550a6 linux-firmware: remove unused append file for ti wl18xx chip
BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching e59cbfccc5 wl1271-nvs.bin: add bluetooth binary for ti-wl18xx chip
picked from:
origin: git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
commit id: 07b925b450bfb4cf3e141c612ec5b104658cd020

BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching fed151500e firmware-ti-wl18xx.bbappend: install wl1271-nvs.bin into package
BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 24abcaf6d0 iw.bbappnd: depends on libnl and change build flags
bbappend for iw recipe from meta-netmodule-wlan

BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching de8b39110d wpa-supplicant.bbappend: add dependencies, CFLAGS and systemd services
BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 743eaa233d hostapd.bbappend: CFLAGS and dependencies
BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 84df6d93ae linux-netmodule: add wlan.cfg kernel config fragment
Used for disabling built in wlan into kernel, instead use
backport

BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 3b651b1605 linux-netmodule: add config merge functionality
BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 1c88d5b97a ti33x.inc: add NM_TARGET and add it to MACHINEOVERRIDES
BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 1faf92f794 armada.inc: add NM_TARGET and add it to MACHINEOVERRIDES
BugzID: 67825

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 1d23c603d7 hostapd: remove recipe, use meta-netmodule-wlan layer
hostapd is now maintained by meta-netmodule-wlan layer

BugzID: 67576

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Ramon Moesching 39810b981b tibluetooth: remove firmware file, handled speratly
The wifi and bluetooth chip ti wl18xx firmware files are handled by seperate
meta-netmodule-wlan layer.

BugzID: 67576

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Alexandre Bard e49f0152b8 gnss-mgr: Use python service file instead of the old bash one
BugzID: 67743
2020-11-09 22:46:56 +01:00
Alexandre Bard 1125597f8a HW25: Remove bluetooth tools
Bluetooth is not supported on this board, therefor the related tools are
not required.

BugzID: 66158
2020-10-21 10:19:05 +02:00
Alexandre Bard 8a46892b27 hw25: Fix console definition
BugzID: 66158
2020-10-20 12:57:13 +02:00
Alexandre Bard a171b1c96a Add HW25 machine.conf
BugzID: 66158
2020-09-30 16:08:07 +02:00
Alexandre Bard a55783bb20 Add u-boot recipe for HW25
BugzID: 66158
2020-09-30 16:02:40 +02:00
Alexandre Bard 3538141bb0 DLM: Remove V2X support
The DLM board does not have V2X module. Therefor we must remove related
software components. These components will there be enabled by looking
at v2x in MACHINE_FEATURES.

BugzID: 66088
2020-09-23 17:35:10 +02:00
Alexandre Bard bedc347bcf layer.conf: Improve dependencies to u-blox layer
Instead of checking if we are building for an IMX target to include or
not the jody bbappends, we are now including them only when the ublox
meta-layer is present, which offer more scalability for futur HW design.

BugzID: 65947
2020-09-10 11:24:33 +02:00
Alexandre Bard a72bba45b3 imx-sc-firmware: Add scu firmware for DLM board
DLM board requires a different SCU firmware than HW23.
This firmware includes changes in the branch "dlm" from imx8-scfw repo:

https://git.netmodule.intranet/hancock/imx8-scfw/src/branch/dlm
(latest revision : 0356a979932ae24ef1b9d6f0c3b33c82abd42948)

BugzID: 65899
2020-09-09 17:19:56 +02:00
Alexandre Bard 83eae69159 Add new machine HW23-DLM
Variant of HW23 with different CPU

BugzID: 65899
2020-09-09 17:19:56 +02:00
Alexandre Bard 5bc7c2e9cc gpsd: hw21: Fix gpsd starting in autodetect mode
BugzID: 65905
2020-09-08 17:34:14 +02:00
Alexandre Bard 3349f227a0 hw26: Use machine overrides from HW21
Since HW26 is sharing a lot with HW21, we can avoid redefining
everything twice by using this feature.

BugzID: 63682
2020-09-08 14:35:33 +02:00
Ramon Moesching 64cbcbd2cd am335x-hw26.conf: initial machine configuration
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-09-08 13:37:49 +02:00
Alexandre Bard 9051b7c4ea gpsd: Disable systemd service only for HW21
gnss-mgr is only present on HW21 and therefor gpsd will not be started
on other HWs if the service is disabled.

Also the bitrate is configured by gnss-mgr so we must keep gpsd with
default bitrate detection mode.
2020-08-28 12:31:11 +02:00
Marc Mattmueller f26ef41692 wlanconf: adapted SRC_URI from gitea to gitlab
BugzID: 65572

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2020-08-28 07:49:53 +02:00
Alexandre Bard 7139363337 gpsd: Use gnss0 instead of tty number 2020-08-26 19:11:48 +02:00
Alexandre Bard c7be0e4d01 gnss-mgr: Add test package
This package contains a script that is able to read the configuration of
the receiver. This option is not part of the main tool.

BugzID: 65664
2020-08-25 19:07:10 +02:00
Alexandre Bard 89428f1358 gnss-mgr: Add service wrapper and new config file 2020-08-24 23:20:32 +02:00
Alexandre Bard 2612c50926 gpsd: Start after gnss-mgr with fix baudrate
gnss-mgr will start gpsd automatically when it is done.

BugzID: 65640
2020-08-24 01:53:26 +02:00
Alexandre Bard cbf6593672 wwan-config: Use systemd logging library
The tool was previously just printing log messages. Using this log
library, the timestamps in journald will be more precise and it will be
possible to filter by log level.

BugzID: 65586
2020-08-20 11:22:09 +02:00
Alexandre Bard 1e80e38269 gpsd: Remove neom8tool and config
This tool has been replaced by gnss-mgr.

BugzID: 65566
2020-08-19 15:27:06 +02:00
Alexandre Bard 72088c2c2c gnss-mgr: Add example config file
The default config file has been emptied to not set dummy values
A example file has been added so the user knows which fields can be set.

BugzID: 65564
2020-08-19 14:40:11 +02:00
Marc Mattmueller 332881d5c8 ubxlib: renaming ubxlib into nmubxlib
Our used ubxlib was forked and diverged too much from the original
one. Now there is a naming conflict when installing our image in
the car drive tests.
Therefore our ubxlib is renamed to nmubxlib

BugzID: 65478

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2020-08-13 08:01:26 +02:00
Andrejs Cainikovs 6aba86efae scfw_tcm firmware: implement system state machine
Reference: 3cd993f466efe7da8558f97f01188b81298273ff
Remote: git.netmodule.intranet:hancock/imx8-scfw.git
2020-08-10 14:10:51 +02:00
Alexandre Bard 7a107f2695 tibluetooth: Restart on failure
It can happen that hciattach fails because of timeout.
Reexecuting the service in this case makes sure that the bluetooth
device is handled by bluetoothctl.

BugzID: 65391
2020-08-06 23:09:57 +02:00
Alexandre Bard 5bf5cd79a6 wwan: Make ModemManager be started by wwan-config
wwan-config is also monitoring ModemManager to detect potential
failures.

BugzID: 65396
2020-08-06 14:48:43 +02:00
Alexandre Bard 07a3d136d7 gpsd: Move python gps library to python3
The library is required for gnss-mgr to check when gpsd is ready.

BugzID: 63624
2020-07-07 20:59:07 +02:00
Ramon Moesching 6f1f6a73ee u-boot-imx8-mek: remove recipe
BSP is not longer available.

BugzID: 63879

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-06-30 16:38:26 +02:00
Alexandre Bard 57486cf692 Remove gnss-config and gnss-save-on-shutdown
They are replaced by gnss-mgr

BugzID: 63624
2020-06-26 16:38:22 +02:00
Alexandre Bard 415028fbdc Add gnssm-mgr
BugzID: 63624
2020-06-26 16:30:19 +02:00
Alexandre Bard 23de70f4da Add ubxlib
This is a python library used to talk to u-blox gnss modems.

BugzID: 63624
2020-06-25 08:31:53 +02:00
Ramon Moesching 7397bb8e90 tibluetooth: hw26 initial bsp
Forked from nmhw21

BugzID: 63686

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-06-24 15:54:47 +02:00
Ramon Moesching b9f6f0e3f7 am335x-hw26.conf: new machine configuration
Require nmhw21 as base machine

BugzID: 63681

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-06-24 15:54:32 +02:00
Alexandre Bard 07f045cac2 wwan-config: Automatically restart service when it fails
It may happen that the service is failing, because the modem is in an
unpredictable state. To avoid this kind of cases and increase the
resilience of the system, systemd will now restart the service if it
fails, leading to a full power cycle of the modem.

BugzID: 63740
2020-06-23 16:59:28 +02:00
Alexandre Bard af1e36b559 gpsd: Fix do_install taking ages
scons was called manually in do_install step with different parameters
than in do_compile step, leading to a recompilation in do_install (but
without -j4), leading it to take very long.

BugzID: 62046
2020-06-23 13:50:27 +02:00
Ramon Moesching 4c87031b2b wireless-regdb: backport version 2020.04.29 into warrior
Get rid of issue: Fix overlapping ranges for Switzerland and
Liechtenstein
Fixed with upstream commit: 5dd4dbf709d38aab21cba0183cf26510054449f0

BugzID: 61219

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-06-05 11:22:03 +02:00
Andrejs Cainikovs 69fd3f7762 scfw_tcm firmware: reset v2x power on soft reboot
Reference: b5943a3639241941cbe86de3a1f453cc5e7e49e6
Remote: git.netmodule.intranet:hancock/imx8-scfw.git
2020-05-16 22:17:58 +02:00
Andrejs Cainikovs 61e1d23292 scfw_tcm firmware: fix ignition switch logic
Reference: 32229e7869e0068a5da511c045f94149e1d330ac
Remote: git.netmodule.intranet:hancock/imx8-scfw.git

BugzID: 62892
2020-05-12 19:29:03 +02:00
Alexandre Bard c1ec2a0207 Revert "gpsd: Clearly separate NetModule from mainline version"
This reverts commit 791d40ccd7.

It is bringing licenses problem, leading to errors. This has to be fixed
first.

BugzID: 62684
2020-04-30 09:52:21 +02:00
Alexandre Bard 791d40ccd7 gpsd: Clearly separate NetModule from mainline version
Making it clear what is related to netmodule version and what can be
appended to any gpsd version.

Additional small changes:
 1. Removed udev rules createing /dev/gps0
Not needed since we have proper udev rules in their own repo now.

 2. Removed patch 0001-gps_shm_close-Free-privdata.patch
It was not used referenced anywhere, probably a remans of an old
version.

 3. Use gnss0 as default TTY device on all targets.
It avoids rebuilding everything when changing MACHINE

 4. Update checksums for mainline gpsd archive.
This recipe alone is still not building but at least the checksums are
now correct.

BugzID: 62684
2020-04-24 17:15:18 +02:00
Andrejs Cainikovs 0ef153c0e7 scfw_tcm firmware: fix V2X power enable
Reference: 29cf4355e1f26a2875e265bef82652cacb71581f
Remote: git.netmodule.intranet:hancock/imx8-scfw.git

BugzID: 61493
2020-04-17 16:43:29 +02:00
Andrejs Cainikovs db2842786b scfw_tcm firmware: ignition switch handling
Reference: 2036dc792cdabaa10bb7923f52912ee477c99ece
Remote: git.netmodule.intranet:hancock/imx8-scfw.git

BugzID: 61994
2020-04-16 12:49:03 +02:00
Ramon Moesching 076bdb314f gpsd append: rdepends on python for ubxtool support
ubxtool is using some old python2 modules.

BugzID: 62531

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-04-15 19:42:38 +02:00
Alexandre Bard e74ba11c22 linux-firmware: Remove License checksum override
These definitions were here since the beginning of the project and
nobody really knows what they are used for.

Now it is the source of a build error because it is overwritting
definitions from upstream yocto.

Removing is fixing error and seems to fix other warnings related to
licenses too.

BugzID: 62473
2020-04-07 13:17:05 +02:00
Tobias Jäggi 30afb7eff8 gpsd: created gps-utils-conf package
neom8tool is part of gps-utils, the gnss0.ubx config file
is now part of the newly created gps-utils-congf package.

BugzID: 62085

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-04-06 08:25:40 +02:00
Tobias Jäggi de62abf132 gpsd: moving neom8tool from OM to BSP layer
BugzID: 62177

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-04-06 08:25:40 +02:00
Tobias Jäggi 1945cd4165 gnss-save-on-shutdown: bugfix gpsd no NMEA data
Issue: after a reboot with no power cycle the gnss reveiver
was in the wrong state and did not send any NMEA data for gpsd to use.
Solution: Added a controlled GNSS start on boot to make sure that
the receiver is in the correct state.

BugzID: 62382

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-04-02 15:35:09 +02:00
Alexandre Bard aaef6af80c am335x: wic: Make bootloader redundant
BugzID: 61929
2020-04-01 17:26:17 +02:00
Alexandre Bard 68727c8b26 Add bootloader-config tool
This tool is parsing first sector of MMC to find bootloaders, and then
reports the data of these bootloaders to /run/bootloader.

It also creates the file /dev/bootloaderX for each bootloader, allowing
to do a safe and redundant update.

BugzID: 62317
2020-04-01 10:10:57 +02:00
Tobias Jäggi 187c376ca6 gnss-config.sh: replace /dev/ttyS3 with /dev/gnss0
Adoption of recent changes in udev rules and gpsd build recipe
to gnss-config script.

BugzID: 62295

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-03-27 08:49:34 +01:00
Tobias Jäggi 90c8eef146 gnss-config: added return code if gpsd restart fails
Script returns 7 if gpsd restart failed. Used for lava testing.

BugzID: 62045

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-03-27 08:46:45 +01:00
Tobias Jäggi fa5d8c2231 gpsd: removed pythonpath patch
The pythonpath is now fixed in 3.20/netmodule branch on netmodule
gpsd gitlab repository. therfore the patch is no longer needed in the recipe.

BugzID: 61939

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-03-20 21:04:30 +01:00
Alexandre Bard 07f2dd98a5 kernel: update nmhw23 to nxp kernel 4.19.98
BugzID: 62178

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-03-20 21:01:14 +01:00
Alexandre Bard db9a70b163 connectivity: remove ublox-gsm-fw-update recipe
This tool is not used anymore and has been replaced by the more
generic nmhw-fwupdate tool.

BugzID: 62102

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-03-20 21:00:29 +01:00
Tobias Jäggi b5c8336b0d recipes-connectivity: added gnss-save-on-shutdown
gnss-save-on-shutdown is a service, makes gnss receiver state persistent
before shut down and check if state got loaded again upon boot

on shutdown:
	contents of receiver ram gets dumped to receiver flash
on boot:
	checks if ram dump got loaded from receiver flash back into receiver ram

BugzID: 60669

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-03-19 08:57:24 +01:00
Tobias Jäggi ca0c6bd6df gnss-config: fixed typo in /run/gnss/gnss0.config
corrected Satelite to Satellite

BugzID: 62086

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-03-17 13:56:12 +01:00
Tobias Jäggi 3addd366af gnss-config: fixing typo in gnss0.config
The gnss0.config file still used the old name for gnss-config.service.
Changed it to the current name.

BugzID: 61707

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-03-12 11:15:33 +01:00
Alexandre Bard 343c9c789e wwan-config: Fix missing config file
When the service was not enabled by default, the config file was
not created either.

BugzID: 61873
2020-03-09 14:00:06 +01:00
Alexandre Bard 7d1cdfd8c9 wwan-config: Add missing python dependencies
BugzID: 61873
2020-03-09 13:58:49 +01:00
Alexandre Bard 5cb9641ba9 gnss-config: Move config to gnss subdirectory
To align with wwan structure and allow later more gnss receivers.
Alignment helps in handling the firmware update in a more generic
way.

BugzID: 61471
2020-03-06 12:03:00 +01:00
Alexandre Bard 4d8cab637b ublox-gsm-fw-update: use new wwan-config service
BugzID: 61873

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-03-06 02:22:50 +01:00
Alexandre Bard 26cc313322 wwan-config: replace ublox-gsm-config
wwan-config is a rework of ublox-gsm-config.
It is more generic and allows better extension and customization.

BugzID: 61873

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-03-06 02:22:50 +01:00
Alexandre Bard b677ba83d7 udev-rules: remove generic rules
we are only using hardware specific rules from now. Generic rules don't make sense.
Some rules can be common to different hardwares but none can
be completely generic.

BugzID: 61729

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-03-06 02:13:47 +01:00
Alexandre Bard 43e07b2283 ublox-gnss-fw-update: add ubxtool only pkgconfig
Add packageconfig to keep only the ublox tool.
Missing files if this config is applied are:
 - firmware itself (UBX_M8_301_ADR_421_NEO_M8L.bin)
 - map of the flash (ubx-fw-flash.xml)
 - wrapper to flash the modem easily (gnss-fw-update)

BugzID: 60600

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-03-05 21:09:53 +01:00
Alexandre Bard 5fcc982c21 ublox-gnss-fw-update: Fix yocto QA issue
QA Issue: No GNU_HASH in the elf binary

The makefile provided by ublox was using LFLAGS instead of LDFLAGS.

BugzID: 55167
2020-03-05 18:17:14 +01:00
Tobias Jäggi 2e441d7d35 gnss-config: formerly ublox-gnss-config - improved config file
Vendor, model, firmware, ubx-protocol version, supported satelite
systems and supported augmentation services ar now dumped into a config
file at /run/gnss
Renamed gnss.config to gnss0.config to be in line with wwan rework.

Add grep as depency because -P option is required and is not available
in busybox grep.

BugzID: 61707

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-03-03 22:58:48 +01:00
Lucien Mueller ab82ed3576 gpsd: update to 3.20
Added patch that reverts patch from gpsd mainline,
because it messes with the buildflags.

BugzID: 60987

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2020-02-27 14:20:55 +01:00
Tobias Jäggi 8c440ef470 ublox-gnss-config: split from gpsd layer, renamed, improved
Changes to baud rate config script:
+ more appropriate name
+ only one service
+ baud rate detector is faster in special case
+ shellcheck conform
- no longer creates default config file if file is missing, instead
throws error

BugzID: 60698

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-02-24 15:42:21 +01:00
Alexandre Bard 2778373994 ublox-gsm-config: Fix empty user in config
With an empty user, the script was setting the authentication flag
to 1, but sending an empty string.
2020-02-13 14:41:18 +01:00
Lucien Mueller 41ac224de8 machine configuration: Define the SERIAL_CONSOLES parameter.
The SERIAL_CONSOLES defaults to ttyS0 and
therefore a getty on ttyS0 is opened by systemd.
set USE_VT to 0 because we don't have virtual ttys.

BugzID: 61141

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2020-02-04 14:17:14 +01:00
Andrejs Cainikovs 47cb62ee21 scfw_tcm firmware: do not move any resources or pads to M4
M4 CPU is not used, leave all the pads and peripherals to the main CPU.

Reference: f010eb32247e0b06cfd63294ad8099f1889e3430
Remote: git.netmodule.intranet:hancock/imx8-scfw.git

BugzID: 61160
2020-01-28 17:54:06 +01:00
Tobias Jäggi e46b607bee gpsd: ubxtool: patch for adding python3 site package path
added patch file to ubxtool. Since ubxtool is now patched, assigning
the path of python3 env to PYTHONPATH and then exporting it in the
receiver config script is no longer needed.

BugzID: 61081

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
2020-01-23 17:19:24 +01:00
Tobias Jäggi 903e748473 config-gnss: baud rate configuration for gnss receiver and ttyS3
Added recipes aswell as scripts to automatically configure the baud
rate of ttyS3 and the GNSS receiver (NEO-M8L) with the baud rate
specified in a new config file called /etc/gnss.conf

tty interface also configured if receiver config gets launched manually.
If config-gnss-receiver was launched manually it now executes
config-gnss-tty to configure the tty interface before starting gpsd.

BugzID: 60698

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-01-23 17:19:24 +01:00
Alexandre Bard 7ced09c9c9 modemmanager: Check only whitelisted devices
With this whitelist, we make sure that only toby-l2 devices are
handled by ModemManager and that it won't mess up with other serial
or net devices.

BugzID: 59772
BugzID: 59771
2020-01-13 16:15:59 +01:00
Alexandre Bard 4310ef1b0a jody-w1-driver-pcie: Fix missing PATH for patch
PATH did not include the patch file.

BugzID: 58213
2020-01-13 11:38:31 +01:00
Alexandre Bard 289f2b3c10 jody-w1-driver-pcie: Disable wowlan
The wowlan feature is broken in the driver provided by cypress,
and although we don't need this feature for the moment, networkmanager
is calling some related functions when stopping which leads a kernel
crash.

BugzID: 58213
2020-01-12 21:57:44 +01:00
Andrejs Cainikovs 566f466cc4 scfw_tcm firmware: PMIC RPC communication
Implement temperature reporting and RPC communication.

Reference: 64a8d897af8c7474210f497ff51691db92bb5419
Remote: git.netmodule.intranet:hancock/imx8-scfw.git

BugzID: 57935
2020-01-10 16:01:16 +01:00
Ramon Moesching 2f99551809 gpsd: workaround for .so file at wrong place
install shared object files to expected place.

BugzID: 57162

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-01-10 11:08:21 +01:00
Ramon Moesching af6384d512 gpsd bbappend: use netmodule branch for regular builds
gpsd branch 3.19 with netmodule modifications on the top.

BugzID: 57162

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-01-10 09:50:43 +01:00
Ramon Moesching 8023b19728 gpsd: get rid of shaky baudrate configuration
serial gnss receiver baudrate configuration with gpsctl tool is too
shaky and not reliable. gps CLI tools calls are reconfigure
baudrate back to 9600 instead of forced 115200 baud.

Configuration is then blocking whole gpsd action and no gnss positon
data are delivered.

BugzID: 60550

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-01-07 08:44:46 +01:00
Alexandre Bard ef5ab78de0 ublox-gsm-config: Add empty apn.conf as placeholder
Should help avoiding errors when manually writing this file.

BugzID: 60832
2020-01-06 10:09:47 +01:00
Alexandre Bard a61b878ee0 networkmanager-conf: Setup DHCP for nrhw20
Custom config for HW20 with DHCP on the 4 lans of the switch instead
of 4 different static subnets.

BugzID: 60765
2019-12-26 16:45:49 +01:00
Alexandre Bard 24a56a9212 networkmanager-conf: Use eth2 has default for HW18
BugzID: 60763
2019-12-26 14:59:07 +01:00
Alexandre Bard a4ed9ead0c networkmanager: Add missing RDEPENDS to dnsmasq
This add a dependency to RDEPENDS when using this PACKAGECONFIG
feature.

BugzID: 60752
2019-12-23 22:20:48 +01:00
Alexandre Bard 946549e198 networkmanager: move config files to new recipe
This new recipe can be configured using PACKAGECONFIG to enable
different config option like DHCP or unmanaged devices.

BugzID: 60752

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-12-23 16:48:49 +01:00
Alexandre Bard 28d7752efa ublox-gsm-fw-update: Fix blocking timeout when using RPM
When running the script through RPM installer, the cat process
does not stop when receiving the TERM signal. So the KILL signal
has to be used to make sure that the script is not blocking.

BugzID: 60344
2019-12-19 14:50:02 +01:00
Tobias Jäggi 3ca58174f3 gpsd.bb: Fork: Update of gpsd to 3.19
ubxtool is required for gnss receiver configuration

fork gpsd recipe from openembedded:
ubxtool was introduced in version 3.18

BugzID: 60545

Signed-off-by: Tobias Jäggi <tobias.jaeggi@netmodule.com>
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-12-18 14:04:37 +01:00
Ramon Moesching 5dc6f2ce8d gpsd append: baudrate configuration by systemd service
configure baudrate of serial gnss receiver with gpsctl.

Todo: generic solutions for all hardware
      future-proof: support for more that one gnss module

BugzID: 60330

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-12-12 20:16:59 +01:00
Alexandre Bard a0b9dce696 NetworkManager: Remove disabling of random mac address for scanning
This feature had been disabled to prevent use of random mac address.
But apparently the random mac is only used for scanning and, when
actualy connecting to an AP, the real mac address is used.

Furthermore this config is generating errors in some cases when
using access point mode.

BugzID: 60405
2019-12-12 15:40:10 +01:00
Alexandre Bard 1ac3367e4e ublox-gsm-fw-update: Improve version detection
BugzID: 60230
2019-12-12 15:40:10 +01:00
Patrick Zysset e9ae851dfe nmhw24: machine config: use default defconfig
renamed defconfig from <machine>-fct_defconfig to <machine>_defconfig.

BugzID: 60559

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-12-12 14:50:12 +01:00
Patrick Zysset c2aa550101 kernel: adjust kernel v4.19.y version identifier
netmodule default kernel branch have been merged with 4.19.88.

BugzID: 60485

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-12-11 22:16:10 +01:00
Ramon Moesching b6a8d83b23 linux-firmware bbappend: fix: make main package depends on minimal
Make wl12xx and wl18xx main package RDEPENDS on minimal package.
Because of package split content of minimal package is not out of the
box also in main package.

FILES_${PN} package defintions doesn't allow to assaign same file to
different packages. During parsing process files are assaign only first
(from left to right). Futher infos FILES in yocto manual.

BugzID: 60410

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-12-10 17:13:40 +01:00
Alexandre Bard 70e60e2815 ublox-gsm-fw-update: Put all firmware data in an archive file
It avoids hardwritten data like md5 and fw version in the script
itself.

BugzID: 60230
2019-12-06 16:33:58 +01:00
Ramon Moesching 3d94a73f3f linux-firmware append: introduce wl12xx and wl18xx minimal packages
Get rid of rootfs postinstall scripts for removing manually unused
TI wl12xx and 18xx firmware binaries. So let's define new packages
with only necessary files and call it *-minimal.

BugzID: 60410

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-12-02 17:22:09 +01:00
Lucien Mueller 70e4f77ead udev: source from gitlab
BugzID: 59413

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2019-11-25 14:59:50 +01:00
Alexandre Bard e828bdcd38 Add ublox gsm firmware update tool
And latest firmware for Toby-L210

BugzID: 60230
2019-11-23 13:50:17 +01:00
Alexandre Bard 7fb4bf5d51 networkmanager: Add patch: reactivate GSM connection when MM reconnects
After a disconnection from network side, ModemManager can reconnect
itself if the modem requests it. This commit makes sure that a
reconnection of the modem makes the GSM connection active in NM.

BugzID: 60029
2019-11-19 15:20:34 +01:00
Alexandre Bard 440c447a2d modemmanager: Use own repo instead of patch files
All our patches are available in this repo.
It make it easier to maintain than to add patches over and over
in yocto environnement.

BugzID: 59859
2019-11-12 15:31:33 +01:00
Alexandre Bard 23ce58fd32 modemmanager: Upgrade to 1.10.8
BugzID: 59580
2019-11-01 18:01:48 +01:00
Alexandre Bard 25bdb8c717 modemmanager: Add new patches
0005: Improved handling of reconnect requests
0006: Increase timeout to avoid modem lock

BugzID: 59580
2019-11-01 16:11:41 +01:00
Lucien Mueller 2202714f71 gpsd: start gpsd service on system boot.
BugzID: 59834

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2019-11-01 13:43:01 +01:00
Alexandre Bard d87135fa32 gnss-fw-update: Remove lines demanding to connect safeboot pin
The safeboot pin is not required: the tool is automaticaly
requesting the module to reboot in safeboot mode.

BugzID:54544
2019-10-30 14:58:33 +01:00
Alexandre Bard 044bba17d0 hw24: Use common kernel branch
BugzID: 59702
2019-10-22 17:32:38 +02:00
Alexandre Bard b43b5ad630 modemmanager: Update patches
Allowing configuration of default bearer through modemamanger (0001)

Replacing the old dirty hack for default context by a better handling
specific to ublox devices. (0002 and 0003).

Handling reconnect requests from the modem (0004).

BugzID: 59580
2019-10-21 12:45:45 +02:00
Alexandre Bard a015e1d748 networkmanager: Add google dns as fallback
dnsmasq being now used for dns caching we add the google dns server
as fallback if other DNS are not reachable.

In case no DNS at all is configured in NM, dnsmasq will not be
started and in this case the google dns cannot be used either.

BugzID: 59522
2019-10-11 14:09:32 +02:00
Alexandre Bard dba889aac7 networkmanager: Get rid of unwanted auto connections
BugzID: 59531
2019-10-11 14:09:32 +02:00
Alexandre Bard cd2a4787d3 networkmanager: Use dnsmasq as DNS caching service
Since we removed systemd-resolvd, there is no caching service
anymore. dnsmasq being already in the system, it make sense
to use it.

BugzID: 59521
2019-10-11 14:09:32 +02:00
Alexandre Bard 1b87b138cd hw24: uboot: change u-boot defconfig name
u-boot defconfig name changed from nmhw24 to nrhw24

BugzID: 59516

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-10-11 11:22:49 +02:00
Alexandre Bard f5914ea51c Upgrade ModemManager to latest release (1.10.6) 2019-09-30 21:54:58 +02:00
Ramon Moesching 2b318e2dd6 modemmanager v. 1.10: upstream master
This new release fixes the issue of an IP address change on the
modem that is not noticed by ModemManager for u-blox modems.

BugzID: 59189

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-09-30 16:08:55 +02:00
Ramon Moesching 497e6283e8 wlconf-bin: repository reorganization: get rid of machine branches
Avoid using machine branches which can lead into failling bitbake
parsing process when branch does not exists.

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-09-18 09:33:50 +02:00
Alexandre Bard a440f9b0b4 Add atsha to MACHINE_FEATURES
atsha is the security chip used on NetModule HW
BugzID: 58663
2019-09-13 10:44:05 +02:00
Ramon Moesching 3dbf7afbd9 udev-rules-nmhw: initial commit: udev rules for common platforms
install udev rules for common hardware/platforms

BugzID: 58758

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-30 14:57:33 +02:00
Ramon Moesching 1148132513 layer.conf: mask out non-related recipes for imx8
wlconf-bin is fetching from git repository with branch name which is
derivied from MACHINE variable.

wlconf-bin is used for ti wl18xx bt/wifi chip which use mainly used on
nmhw21 and similar boards. On imx8-nmhw23 we are using u-blox jody-w1.

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-20 13:23:52 +02:00
Alexandre Bard 2cd6676823 gpsd.bbappend: Use the same SRC_URI definition as the main recipe
These variables may change in updates either in poky repo or
meta-openembedded, using directly the variable instead of the
static string name make it more failsafe to future upgrades.
2019-08-19 17:12:48 +02:00
Andrejs Cainikovs a7824ac32b Revert "linux: dts: remove cts and rts pin configuration from dts"
Having external patch in Yocto means we need to maintain it and check
that it applies without conflicts after every device tree change.
Let's move this temporary change to kernel git instead.

This reverts commit 2bfe8d31c7.

BugzID: 58086
2019-08-19 13:47:59 +02:00
Ramon Moesching ce333c7510 wlconf-bin recipe: install config binary symlink to top dir
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-16 11:44:01 +02:00
Ramon Moesching badd7036ac wlconf: assign commit id to nmhw21 and autorev for everything else
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-15 10:57:42 +02:00
Ramon Moesching 3bba371c5b gpsd bbappend: define gps tty name
nmhw24 has on ttyS3 gps attached

BugzID: 58182

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-14 14:42:01 +02:00
Ramon Moesching 4093099103 am335x-nmhw24: inital machine configuration
BugzID: 58178

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-14 11:42:39 +02:00
Ramon Moesching a8ff9e15a6 tibluetooth: initial nmhw24 bluetooth service
BugzID: 58405

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-14 11:40:44 +02:00
Ramon Moesching d172af6f30 linux-netmodule: 4.19 dev branch for nmhw24
linux 4.19 for nmhw24 development

BugzID: 58398 58180

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-14 10:36:08 +02:00
Ramon Moesching 21fe9db20c u-boot recipe: inital nmhw24 u-boot
BugzID: 58178 57912

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-14 10:34:48 +02:00
Ramon Moesching 6cd203ba44 gnss-init service: bring up gnss
bring up gnss module ublox neo

BugzID: 57871

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-08 18:16:38 +02:00
Ramon Moesching a01e4f5694 gpsd append: new udev rule for dev gps0
assign ublox neo gnss always name gps0 (/dev/gps0)
typ fix in url removement

BugzID: 58211

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-08 17:05:05 +02:00
Ramon Moesching 887c963070 layer.conf: mask board depend recipes out
todo: instead of specifire architecture use board e.g. nmhw23

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-06 11:01:15 +02:00
Ramon Moesching d9f2029c38 jody-w1-bt init service: jody bluetooth patchram and init script
initialize jody with patchram file and bring up hci0 interface

use systemd for enabling and disabling:
(requests BT_EN pin)
systemctl start jody-w1-bt-init (default after boot)
systemctl stop jody-w1-bt-init

BugzID: 58086

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-30 14:26:23 +02:00
Ramon Moesching ccae66f679 jody-w1 pcie driver: enable driver and load default firmware
use ublox modprobe.d config file for firmware loading

BugzID: 58087

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-30 09:17:33 +02:00
Ramon Moesching 2bfe8d31c7 linux: dts: remove cts and rts pin configuration from dts
Temporary workaround until issues are found.
rts and cts blocking serial communications, without rts and cts
serial communication works fine

BugzID: 58086

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-29 16:00:26 +02:00
Ramon Moesching 899e555d31 imx8-nmhw23 conf: add jody-w1 pcie to ublox features (driver support)
meta-ublox-modules driver installation by packagegroups

BugzID: 58087

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-29 10:30:16 +02:00
Alexandre Bard df39850735 ublox-gsm-config: Create a daemon to keep control of gpios 2019-07-25 08:19:21 +02:00
Ramon Moesching 97b9c7c32e scfw_tcm firmware: workaround: delayed power on of v2x
v2x power is enabled 40s after scu is starting.
v2x needs firmware binary loaded, request dfu mode.

Reference: f897899100ff6bafda187d22209dd6dc7a40dcf8
Remote: git.netmodule.intranet:hancock/imx8-scfw.git
Build machine: debian9-rm

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-23 13:48:19 +02:00
Alexandre Bard c5c26793f6 hw21 and 23: Add neo-m8l to MACHINE_FEATURES 2019-07-23 11:49:11 +02:00
Alexandre Bard 667fbe16d9 tibluetooth: Cleanup and use MACHINE_FEATURES 2019-07-23 11:29:40 +02:00
Alexandre Bard bacd0b86b1 modemmanager: Patch for all targets using toby-l2 modem 2019-07-22 16:29:13 +02:00
Ramon Moesching 18db17544b scfw_tcm firmware: latest binary, use internal pcie clock
Reference: a08f9aeec6391763f8298e9a60df9666164a82a2
Remote: git.netmodule.intranet:hancock/imx8-scfw.git
Build machine: debian9-rm

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-19 09:34:48 +02:00
Alexandre Bard f72bea9848 imx8: Move all recipes in main layer and use generic conf files from distro layer
To avoid problems when meta-freescale is not present, recipes-imx is masked
when building for other HWs.

meta-freescale us now dynamically added to bblayers when building for HW23.

BugzID: 57911
2019-07-16 18:14:35 +02:00
Alexandre Bard 83ab5b38c2 hw20: Add toby-l2 MACHINE_FEATURE 2019-07-15 14:18:05 +02:00
Alexandre Bard 2fd3b9559f ublox-gsm-config: Initialize sim switch line
This line needs to be enable to connect the physical SIM first.
Because it is only possible to detect if a physical SIM is present
or not. The eSIM will always be shown as present, even if not
configured.

BugzID: 57829
2019-07-10 15:44:43 +02:00
Alexandre Bard 661ed9e904 Revert "Add libgpiod_1.2"
This reverts commit dc30f20654.
It was required in sumo branch but it is not anymore, since
version 1.3 is present in meta-oe
2019-07-10 13:01:01 +02:00
Alexandre Bard 926c514d23 gpsd: Clean recipe and add support for HW23
BugzID: 57871
2019-07-09 10:29:06 +02:00
Alexandre Bard e6ad5c5a93 Use MACHINE_FEATURE to include ublox-gsm-config
BugzID: 57829
2019-07-09 10:29:06 +02:00
Ramon Moesching 45113e0b90 linux-netmodule: PV: revert PV to 4.14.125
With current src revision we are checking out kernel 4.14.78
Clearing cache and sstate won't fix issue

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-08 17:11:55 +02:00
Ramon Moesching c979bab719 scfw_tcm firmware: latest binary, PMIC enable all peripherals
Reference: 7b583ec797b05bf5ca199c5bac7d4a64b4936e6a
Remote: git.netmodule.intranet:hancock/imx8-scfw.git
2019-07-05 16:14:40 +02:00
Ramon Moesching 8506320178 initial nmhw23 (imx8) bsp layer
To apply: include meta-netmodule-bsp/recipes-bsp/imx8 to local bblayer
Requires: offical meta-freescale layer
linux kernel: use 4.14 kernel exclusive for imx8

BugzID: 57544

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-07-05 16:14:09 +02:00
Ramon Moesching 2603028f48 linux-netmodule bb: adjust nmhw22 to nmhw23
renaming machine tasks and args

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-06-18 17:28:55 +02:00
Andrejs Cainikovs a31869ff33 nmhw22 target renamed to nmhw23 2019-06-18 17:27:30 +02:00
Andrejs Cainikovs 5e82c74c04 Add imx8-nmhw22 target 2019-06-18 17:23:24 +02:00
Alexandre Bard dc30f20654 Add libgpiod_1.2
This version supports bindings for python.

BugzID: 57325
2019-06-18 17:13:34 +02:00
Alexandre Bard 3f8b6928f8 gpsd: Use netmodule fork
BugzID: 57168
2019-06-18 17:13:33 +02:00
Andrejs Cainikovs bde7631254 imx8-mek: add imx8-mek target
This is the official NXP imx8 evaluation board used as preview for nmhw23
target.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-06-18 17:12:26 +02:00
Alexandre Bard 3548aee12a ublox-gsm-config: Add factory reset feature
BugzID: 57487
2019-06-14 10:59:01 +02:00
Alexandre Bard bb22100f77 ublox-gsm-config: Add service description
BugzID: 57325
2019-06-14 10:58:47 +02:00
Alexandre Bard 8a844c660e ublox-gsm-config: Add header to sim.conf
BugzID: 57325
2019-06-14 10:58:12 +02:00
Alexandre Bard 75a42ce252 ublox-gsm-config: Improve check of bridge and ecm modes
BugzID: 57325
2019-06-13 16:19:33 +02:00
Alexandre Bard 769add9c88 ublox-gsm-config: Write SIM with capital letters
BugzID: 57325
2019-06-13 16:19:33 +02:00
Alexandre Bard 793a0e0336 ublox-config: Rename to ublox-gsm-config
BugzID: 57325
2019-06-13 16:19:33 +02:00
Alexandre Bard 8acafeecc4 ublox-config: Increase poweroff delay
BugzID: 57325
2019-06-13 13:49:06 +02:00
Alexandre Bard f53a859d80 ublox-config: Use libgpiod for sim switch
BugzID: 57325
2019-06-13 13:45:20 +02:00
Alexandre Bard 83ca2f3e10 ublox-config: Add poweroff feature
systemctl start ModemManager will start ublox-config first
systemctl stop ublox-config will stop ModemManager first

BugzID: 57325
2019-06-12 19:03:47 +02:00
Alexandre Bard 512e2234de ublox-configuration: Add power on
BugzID: 57325
2019-06-12 11:11:59 +02:00
Alexandre Bard 2e6dd741a9 board-descriptor: Use variable for path to python lib 2019-06-12 09:51:46 +02:00
Alexandre Bard 5087062a29 ublox-config: Merge all modem scripts in one
Features:
  - Settings USB ECM mode and bridge mode
  - SIM switch (auto or according to sim.conf)
  - SW reset instead of HW reset
  - Supports private APN through apn.conf file
     - Now volatile config
  - Dump running config

BugzID: 57321
BugZID: 57325
2019-06-05 10:08:02 +02:00
Alexandre Bard dd827e8907 sim-config: Fix pathname in reset function 2019-05-29 08:32:04 +02:00
Patrick Zysset 6308680578 README: remove deprecated documentation
Please check netmodule-linux.readthedocs.io instead.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-05-28 20:18:54 +02:00
Patrick Zysset d9cbc9d9fe nrhw18: remote u-boot recipe for deprecated hw
Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-05-28 20:13:08 +02:00
Patrick Zysset 0558ac1232 linux: use kernel branch 4.19/standard/base
Merged base repository to 4.19.46 and updated tag in recipe.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-05-28 19:11:08 +02:00
Patrick Zysset 09db777a87 imx8-mek: adjust u-boot source tree
u-boot imx8-mek recipe is fetching from 2019.04/standard/imx8-mek
branch.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-05-23 14:50:54 +02:00
Andrejs Cainikovs aa546d3312 imx8-mek: add imx8-mek target
This is the official NXP imx8 evaluation board used as preview for nmhw23
target.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-05-23 14:50:12 +02:00
Alexandre Bard 168c584c96 nmhw21: mac-address-set: set wlan/bt mac address
on nmhw21 the following mac address scheme is used:
- Ethernet:    xx:xx:xx:50:xx:xx
- User Module: xx:xx:xx:60:xx:xx
- Wifi:        xx:xx:xx:70:xx:xx
- BT:          xx:xx:xx:80:xx:xx

Note: this scheme is only valid for nmhw21.

BugzID: 54514

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-05-23 14:47:21 +02:00
Alexandre Bard ac888de4bd hw18: Remove deprecated device trees 2019-05-16 16:37:37 +02:00
Alexandre Bard 6f5c13cdb8 modemmamanger: Make bbappend apply to future versions 2019-05-14 15:47:38 +02:00
Alexandre Bard eedbb5666a Remove libmbim
This version is now present in meta-openembedded
2019-05-14 15:34:21 +02:00
Alexandre Bard 0646e2e5c1 hostpad: Update patch for version 2.8 2019-05-14 15:32:32 +02:00
Alexandre Bard 8a7f5dc7ea layer.conf : Update compatiblity to warrior 2019-05-13 14:37:00 +02:00
Alexandre Bard 3c7c1dc49a Use only fitImage for all HWs
zImage is not required anymore since we are now packing everything
in fitImages.
Plus, KERNEL_IMAGETYPES should not be modified manually, it is
generated using KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE
2019-05-07 16:46:33 +02:00
Alexandre Bard 5468564377 hw18: Add support for FPGA image in fitImage
Note that the file kernel-fitimage-fpga.bbclass contains
overwrite of functions present in meta/kernel-fitimage.bbclass
and may not always be consistent with it
2019-05-07 16:34:48 +02:00
Alexandre Bard 473eafa303 fpga-image: Deploy fpga image to DEPLOYDIR
Deploying this image make it easily available to be added in
a fitImage.
2019-05-07 14:27:30 +02:00
Alexandre Bard e529a6b585 machine config: Remove image related config 2019-05-06 09:06:44 +02:00
Alexandre Bard 520aacff92 hw18: uboot: Use more meaningfull binary names 2019-04-23 12:01:32 +02:00
Alexandre Bard ea8c822d6d hw18: Cleanup and set ostree image configuration 2019-04-23 10:06:51 +02:00
Alexandre Bard 2083321292 dt-overlays: Use bitbake variable for lib directory
Required since use of usrmerge that make /lib a symlink to
/usr/lib
2019-04-18 17:28:52 +02:00
Alexandre Bard 21db487385 dt-overlay: Use autorev to get latest patches
Means: 4.19 compatible driver
2019-04-18 17:28:01 +02:00
Alexandre Bard 442fbdcd7b hw20:uboot: Use autorev to get latest version of uboot 2019-04-16 14:29:05 +02:00
Alexandre Bard 70f3ce5545 am335x: Move common configuration to common files
Generic HW related moved to include files
OStree related config moved to distro config in
meta-netmodule-distro
2019-04-16 14:15:05 +02:00
Alexandre Bard dc9dbb89c4 hw16: uboot: Fix uboot revision for HW16_v2
It was using the same revision as v1 before: outdated
2019-04-16 14:12:01 +02:00
Alexandre Bard 178e097144 hw16: kernel: Symlink dtb nbhw => nrhw 2019-04-11 17:58:40 +02:00
Alexandre Bard c50ab798f4 kernel: Fix dtb symlink name
Variable name changed with yocto thud
2019-04-11 17:57:11 +02:00
Alexandre Bard 44d382f295 hw16: tibluetooth: Delay startup
Since we moved to kernel 4.19 the WLAN/BT chip needs some time to
be initialized
2019-04-11 16:42:15 +02:00
Alexandre Bard 3dab9387cc kernel: Use same branch for all HW and cleanup machine conf 2019-04-09 11:08:36 +02:00
Alexandre Bard 4a05c43443 linux-netmodule: Update kernel version to 4.19 2019-04-09 11:06:00 +02:00
Alexandre Bard 3224929677 Remove useless linux-dtb recipe 2019-04-09 11:06:00 +02:00
Alexandre Bard 910d6ba8b8 Force initramfs in kernel fitImage 2019-04-09 11:06:00 +02:00
Alexandre Bard d08e1ed71e hw21: Add ostree initramfs to fitImage 2019-04-09 11:06:00 +02:00
Alexandre Bard 6c7f1b04f6 ti-connectivity: Use variable for lib directory 2019-04-09 11:06:00 +02:00
Alexandre Bard 04602d3080 wlconf: Use variable for lib directory 2019-04-09 11:06:00 +02:00
Alexandre Bard 610897b4c2 linux-firmware: use variable for lib directory 2019-04-09 11:06:00 +02:00
Alexandre Bard 8d0608dbc9 Remove modemmanager recipe
1.8.2 is now available in meta-oe
2019-04-09 11:05:59 +02:00
Alexandre Bard 3eb735a246 Make layer compatible with thud 2019-04-09 11:05:59 +02:00
Alexandre Bard 23c770a9a3 modem-config-dump: Create a nice human readable config file
Full config file under /run/modem/modem-at.config
New easily readable file under /run/modem/modem.config

BugzID: 56305
2019-04-09 11:05:35 +02:00
Alexandre Bard c3a7e34286 sim-config: Improve alive check after reset
BugzID: 56371
2019-04-09 11:05:35 +02:00
Alexandre Bard 23d8ad5769 Add sim-config and reorder modem related scripts
BugzID: 56371
2019-04-09 11:05:35 +02:00
Alexandre Bard eedea0b72d ublox-config: Make sure that device is available before sending commands
BugzID: 56371
2019-04-09 11:05:35 +02:00
Alexandre Bard 7ee9cc8cce ublox-config: Remove extension from rootfs binary
BugzID: 56371
2019-04-09 11:05:35 +02:00
Alexandre Bard 66fe76d92f modem-config-dump: Move config to /run and improve failure handling
BugzID: 56305
2019-04-09 11:05:35 +02:00
Alexandre Bard b968842975 Add mac-address-set
This script sets mac address of wifi and bluetooth chip
according to serial number

Also add NetworkManager config to not use random mac address on wifi

BugzID: 54514
2019-04-09 11:05:35 +02:00
Alexandre Bard 60b1e7f14f Add modem-config-dump
This script will dump the config of the modem (ublox l2)
to /tmp/config/ublox-tobyl2.conf on boot

BugzID: 56305
2019-04-09 11:05:35 +02:00
Alexandre Bard 7f5d088c45 ublox-config: Exit script only when modem reset is complete 2019-04-09 11:05:35 +02:00
Patrick Zysset c55e52e579 nrhw18: update fpga bitstream to v1.0
update fpga bitstream to v1.0 (imported from:
https://svn.netmodule.intranet/svn/projects/Projects/9100026_NRHW_18/FW_NRHW_18-MB/tags/20190314_FW_NBHW_18_v01.00/NBHW_18_deployement/LatticeDiamond/impl_nbhw18/output/LG00000000)

BugzID: 56159

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-04-09 11:05:35 +02:00
Patrick Zysset 3fbfab7cc0 u-boot: am335x: nrhw20: fix srcrev to 2018.07.17
use last known functional nrhw20 revision.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-04-09 11:05:35 +02:00
Patrick Zysset 915909c54e u-boot: am335x: update u-boot deployments
u-boot deployed files of am335x based platforms (nrhw16/20) should be renamed according former nmhw21 refactoring.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-04-09 11:05:35 +02:00
Patrick Zysset f7aa4a8a21 conf: streamline machine config of am335x-nrhw20
sync with latest changes introduced to am335x-nmhw21.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-04-09 11:05:35 +02:00
Patrick Zysset 37dfef71c7 nmhw21: remove v1 from am335x-nmhw21 u-boot name
since u-boot is backward compatible and today mainly used on v2 boards,
this naming is misleading.

BugzId: 55650

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-04-09 11:05:35 +02:00
Patrick Zysset 18bf58e094 board-descriptor: allow 0xffff as end tag
with latest nmhw21 boards 0xffff have been introduced as a new end tag
(with or without intention). Tag 65535 is now handled the same way as
Tag 0 (aka end-tag).

BugzId: 55411

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-01-29 15:43:02 +01:00
Patrick Zysset adb53649bc board-descriptor: fix partitioning of bd eeprom
the expected partitions are:
- board:       0..1024
- platform: 1024..1536
- settings: 1536..2048

start address of platform partition was not correct.

BugzID: 55411

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-01-29 10:32:47 +01:00
176 changed files with 3428 additions and 1844 deletions

127
README
View File

@ -1,134 +1,11 @@
This layer depends on:
URI: git://git.yoctoproject.org/poky
branch: jethro
branch: warrior
revision: HEAD
URI: git://git.openembedded.org/meta-openembedded
branch: jethro
branch: warrior
revision: HEAD
layers: meta-python, meta-oe, meta-networking
To get an image that is compatible with the NetModule router, build an nmrouter-image. Set the MACHINE in conf/local.conf to
MACHINE = "armada-385-nbhw17" (NB2800),
MACHINE = "armada-385-nbhw14" (NB3800/NB3711/NB3701) or
MACHINE = "am335x-nrhw16" # Internal name for NB800 family
and add the following layers to conf/bblayers.conf:
BBLAYERS ?= " \
<poky dir>/meta \
<poky dir>/meta-yocto \
<poky dir>/meta-nmrouter \
<poky dir>/meta-openembedded/meta-python \
<poky dir>/meta-openembedded/meta-oe \
<poky dir>/meta-openembedded/meta-networking \
"
NB2800:
While the NetModule router is running under the original software you have to do the following steps:
- Find out what boot partition is currently used:
cat /proc/cmdline
- The partition layout is mmcblk0p1 => bootpart0, mmcblk0p2 => bootpart1, mmcblk0p3=> overlay/data partition, mmcblk0p4 => user storage
- Untar the output of the nmrouter-image build to the partition that is not in use (if the above cmd returns mmcblk0p1 then to mmcblk0p2)
mount /dev/mmcblk0p2 /mnt
rm -rf /mnt/*
tar -xjf ./<image>.tar.bz2 -C /mnt
- reboot the netmodule router
- in u-boot you have to manually overwrite the bootcmd. Use the correct boot partition (bootpart0 => 0:1, bootpart1 => 0:2)
setenv bootcmd 'ext4load mmc 0:2 $kernel_addr /boot/zImage && ext4load mmc 0:2 $fdt_addr /boot/armada-385-nbhw17-nb2800.dtb && setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext4 console=ttyS0,115200 rootwait && bootz $kernel_addr - $fdt_addr'
saveenv # save the environment in eeprom (ignore message during bootup)
- boot to Linux:
boot
Do not overwrite the original partition, u-boot will search a valid FPGA there. If you want to overwrite the other partition, make sure you copy the /logic folder from the original partition to the new one!
To learn how to build an image and to find the build dependencies visit:
http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html
Memory Map of the FPGA (to switch SIMs, reset modems):
Address Width Name/Comment
0x0020 16 LED
LED Control Register
Slice Name Type Reset Description
0 LED0 green RW 1 Enable LED 0 (green)
1 LED0 red RW 1 Enable LED 0 (red)
2 LED1 green RW 0 Enable LED 1 (green)
3 LED1 red RW 0 Enable LED 1 (red)
4 LED2 green RW 0 Enable LED 2 (green)
5 LED2 red RW 0 Enable LED 2 (red)
6 LED3 green RW 0 Enable LED 3 (green)
7 LED3 red RW 0 Enable LED 3 (red)
8 LED4 green RW 0 Enable LED 4 (green)
9 LED4 red RW 0 Enable LED 4 (red)
10 LED5 green RW 0 Enable LED 5 (green)
11 LED5 red RW 0 Enable LED 5 (red)
12 LED6 green RW 0 Enable LED 6 (green)
13 LED6 red RW 0 Enable LED 6 (red)
14 LED7 green RW 0 Enable LED 7 (green)
15 LED7 red RW 0 Enable LED 7 (red)
SIM Card Control
Address Width Name/Comment
0x0040 16 SIM Ctrl
SIM Slot Control Register
Slice Name Type Reset Description
2..0 SIM1_SEL RW 0 000: disconnect
001: Connect Bus 1
010: Connect Bus 2
011: Connect Bus 3
100: Connect Bus 4
Note: If no SIM Card is inserted, the power is disable of the corresponding slot.
3 N/A R 0 Reserved
6..4 SIM2_SEL RW 0 000: disconnect
001: Connect Bus 1
010: Connect Bus 2
011: Connect Bus 3
100: Connect Bus 4
Note: If no SIM Card is inserted, the power is disabled of the corresponding slot.
7 N/A R 0 Reserved
10..8 SIM3_SEL RW 0 000: disconnect
001: Connect Bus 1
010: Connect Bus 2
011: Connect Bus 3
100: Connect Bus 4
Note: If no SIM Card is inserted, the power is disable of the corresponding slot.
11 N/A R 0 Reserved
14..12 SIM4_SE RW 0 000: disconnect
001: Connect Bus 1
010: Connect Bus 2
011: Connect Bus 3
100: Connect Bus 4
Note: If no SIM Card is inserted, the power is disabled of the corresponding slot.
15 N/A R 0 Reserved
PCIe Mini Slot Control:
Address Width Name/Comment
0x0030 16 PCIe Reset
PCIe Slot Reset
Slice Name Type Reset Description
0 PCIe1 RST~ RW 0 PCIe Slot 1 Reset
0: reset asserted
1 PCIe2 RST~ RW 0 PCIe Slot 2 Reset
0: reset asserted
2 PCIe3 RST~ RW 0 PCIe Slot 3 Reset
0: reset asserted
3 PCIe4 RST~ RW 0 PCIe Slot 4 Reset
0: reset asserted
4..15 n/a R 0
The FPGA Base address is at 0xfd000000, to enable for example LED0:red write 0x2 to 0xfd000020:
devmem2 0xfd000020 hw 0x02
NB800:
Coming from NetModule Software:
- Use the same steps as for NB2800 to install a custom rootfs
- You don't need to modify the u-boot environment, the NB800 automatically tries to load the correct dtb and the kernel /boot/zImage
- There is no FPGA available necessary for the NB800
Coming from an older Yocto image:
- To update the software you can do a sw-update.sh -l <rootfs.tar.gz>
- To read and write to the board descriptor use bd read/read-all/write
- To connect configure the modem and network interface use mmcli and nmcli (ModemManager and NetworkManager)
For questions, send an email to <stefan.eichenberger@netmodule.com>

View File

@ -0,0 +1,88 @@
#!/bin/sh
#
# JODY-W1 Bluetooth init script
#
# Copyright (C) u-blox
# u-blox reserves all rights in this deliverable (documentation, software,
# etc., hereafter “Deliverable”).
# u-blox grants you the right to use, copy, modify and distribute
# the Deliverable provided hereunder for any purpose without fee. provided this
# entire notice is included in all copies of any software which is or includes
# a copy or modification of this software and in all copies of the supporting
# documentation for such software.
# THIS DELIVERABLE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR U-BLOX MAKES ANY
# REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
# DELIVERABLE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
# In case you provide us a feedback or make a contribution in the form of
# a further development of the Deliverable (“Contribution”), u-blox will have
# the same rights as granted to you, namely to use, copy, modify and distribute
# the Contribution provided to us for any purpose without fee.
#
PIDFILE=/var/run/hciattach-jody-w1.pid
DAEMON=/usr/bin/hciattach
DESC="JODY-W1 Bluetooth"
#needs to be parametrized
HCIATTACH_ARGS="any 3000000 flow"
TTY=/dev/ttyLP1
PATCHRAMFILE=/lib/firmware/brcm/BCM89359_002.002.014.0120.0186.hcd
RET=1
test -x $DAEMON || exit 1
start() {
let i=0
while [ $i -lt 10 -a ! -c $TTY ]; do
sleep 1
let i=i+1
done
brcm_patchram_plus --no2bytes --tosleep 50000 --baudrate 3000000 \
--use_baudrate_for_download --patchram "$PATCHRAMFILE" $TTY
modprobe -q hci_uart
pid=$($DAEMON -p $TTY $HCIATTACH_ARGS | tail -1)
if [ -z "$pid" ]; then
echo "failed"
exit 1
fi
echo $pid > $PIDFILE
hciconfig all up
}
stop() {
hciconfig all down
if [ -e $PIDFILE ]; then
kill $(cat $PIDFILE)
rm -f $PIDFILE
fi
}
case "$1" in
start)
test -f $PIDFILE && exit 1
echo -n "Starting ${DESC}: "
start
RET=$?
echo "$(basename $DAEMON)"
;;
stop)
echo -n "Stopping ${DESC}: "
stop
RET=$?
echo "$(basename $DAEMON)"
;;
restart)
echo -n "Restarting ${DESC}: "
stop
start
RET=$?
echo "$(basename $DAEMON)"
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RET

View File

@ -0,0 +1,17 @@
[Unit]
Description=BT Firmware loader
After=network.target
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c "gpioset `gpiofind BT_EN`=1"
ExecStart=/usr/bin/jody-w1-bt start
ExecStop=/usr/bin/jody-w1-bt stop
ExecStopPost=/bin/sh -c "gpioset `gpiofind BT_EN`=0"
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
RequiredBy=multi-user.target

View File

@ -0,0 +1,30 @@
# Copyright (C) 2019 Ramon Moesching <ramon.moesching@netmodule.com>
# Released under the MIT license (see COPYING.MIT for the terms)
inherit systemd
RDEPENDS_${PN} += "libgpiod-tools"
FILESEXTRAPATHS_append := ":${THISDIR}/files"
SRC_URI_append = " \
file://jody-w1-bt-init.service \
file://jody-w1-bt \
"
S = "${WORKDIR}"
SYSTEMD_SERVICE_${PN} = " \
jody-w1-bt-init.service \
"
FILES_${PN}_append = "${systemd_unitdir}/system ${bindir}"
do_install_append() {
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/jody-w1-bt-init.service ${D}${systemd_unitdir}/system/
install -d ${D}${bindir}
install -m 744 ${WORKDIR}/jody-w1-bt ${D}${bindir}
}

View File

@ -0,0 +1,25 @@
From eb23ffbd0f6b6fc8a3b5e2bbd20f88ceeaa9157f Mon Sep 17 00:00:00 2001
From: Alexandre Bard <alexandre.bard@netmodule.com>
Date: Fri, 10 Jan 2020 16:31:00 +0100
Subject: [PATCH] Disable wowlan_config
---
wl_cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wl_cfg80211.c b/wl_cfg80211.c
index 1b5f186..5bcaacc 100644
--- a/wl_cfg80211.c
+++ b/wl_cfg80211.c
@@ -10255,7 +10255,7 @@ static s32 wl_setup_wiphy(struct wireless_dev *wdev, struct device *sdiofunc_dev
WL_ERR(("Can not allocate memory for brcm_wowlan_config,"
" So wiphy->wowlan_config is set to NULL\n"));
}
- wdev->wiphy->wowlan_config = brcm_wowlan_config;
+ wdev->wiphy->wowlan_config = NULL;
#else
wdev->wiphy->wowlan.flags = WIPHY_WOWLAN_ANY;
wdev->wiphy->wowlan.n_patterns = WL_WOWLAN_MAX_PATTERNS;
--
2.20.1

View File

@ -0,0 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
RDEPENDS_${PN}_remove = " ${PN}-wpa-supplicant ${PN}-hostapd"
SRC_URI_append = "file://0001-Disable-wowlan_config.patch"
# unblacklist pcie driver and fw files (default)
do_configure_prepend () {
for i in $(seq 1 4); do
sed -e "${i}s/^#*/#/" -i ${WORKDIR}/jody-w1-driver-pcie.conf
done
}

View File

@ -0,0 +1,23 @@
do_assemble_fitimage[depends] += "fpga-image:do_deploy"
#
# Emit the fitImage ITS fpga section
#
# $1 ... .its filename
# $2 ... Image counter
# $3 ... Path to fpga image
fitimage_emit_section_kernel_append() {
fpgacount=1
cat << EOF >> ${1}
fpga@${fpgacount} {
description = "FPGA";
data = /incbin/("${DEPLOY_DIR_IMAGE}/fpga-image-${MACHINE}");
type = "fpga";
arch = "${UBOOT_ARCH}";
compression = "none";
hash@1 {
algo = "sha1";
};
};
EOF
}

View File

@ -1 +0,0 @@
WKS_FILE_sota = "sdimage-sota-nmhw21.wks"

View File

@ -0,0 +1 @@
WKS_FILE_sota = "sdimage-sota-am335x.wks"

View File

@ -0,0 +1 @@
WKS_FILE_sota = "sdimage-sota-armada-385.wks"

View File

@ -0,0 +1 @@
WKS_FILE_sota = "sdimage-sota-mek.wks"

View File

@ -0,0 +1 @@
WKS_FILE_sota = "sdimage-sota-nmhw23.wks"

View File

@ -5,6 +5,10 @@ BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILES_DYNAMIC += "meta-ublox-modules:${LAYERDIR}/bbappends/ublox-module/recipes-*/*/*.bbappend"
BBFILES_DYNAMIC += "freescale-layer:${LAYERDIR}/freescale/recipes-*/*/*.bb*"
BBFILE_COLLECTIONS += "netmodule-bsp"
BBFILE_PATTERN_netmodule-bsp = "^${LAYERDIR}/"
BBFILE_PRIORITY_netmodule-bsp = "10"
@ -15,4 +19,5 @@ LAYERVERSION_netmodule-bsp = "1"
LAYERDEPENDS_netmodule-bsp = "core"
LAYERSERIES_COMPAT_netmodule-bsp = "sumo"
LAYERSERIES_COMPAT_netmodule-bsp = "dunfell"

View File

@ -0,0 +1,17 @@
#@TYPE: Machine
#@NAME: NetModule HW 25
#@DESCRIPTION: Machine configuration for the netmodule hw25, aka TC Router
require am335x-nmhw24.conf
UBOOT_MACHINE = "am335x_hw25_defconfig"
KERNEL_DEVICETREE_TO_USE = "${HW25_DT}"
SERIAL_CONSOLES = "115200;ttyS0"
DEFAULT_ETH = "lan0"
MACHINE_FEATURES_remove = " \
bluetooth \
tibluetooth \
"

View File

@ -0,0 +1,9 @@
#@TYPE: Machine
#@NAME: NetModule HW 26 with user module
#@DESCRIPTION: NG800 (hw26) was based on VCU1 (hw21), but later on,
# the new VCU pro was based on the changes done on NG800
require am335x-hw26.conf
MACHINEOVERRIDES =. "am335x-hw26:"
USER_MODULE_MACHINE_FEATURE = "user-module"

View File

@ -0,0 +1,13 @@
#@TYPE: Machine
#@NAME: NetModule HW 26
#@DESCRIPTION: Machine configuration for the netmodule hw26 mainboard
#require conf/machine/include/ti33x.inc
require am335x-nmhw21.conf
KERNEL_DEVICETREE_TO_USE = "${HW26_DT}"
MACHINEOVERRIDES =. "am335x-nmhw21:"
MACHINE_FEATURES += "pps"
# Remove usermodule
USER_MODULE_MACHINE_FEATURE = ""

View File

@ -4,25 +4,35 @@
require conf/machine/include/ti33x.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEFCONFIG ??= "am335x-nmhw21_defconfig"
KERNEL_DEVICETREE = "am335x-nmhw21-prod1.dtb \
"
KERNEL_DEVICETREE_TO_USE = "${HW21_DT}"
SOTA_MACHINE = "${MACHINE}"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti33x"
UBOOT_MACHINE = "am335x_nmhw21_defconfig"
KERNEL_CLASSES_append = " kernel-fitimage"
USE_VT = "0"
KERNEL_IMAGETYPE = "zImage"
KERNEL_IMAGETYPES = "fitImage zImage"
KERNEL_IMAGETYPE_sota = "fitImage"
KERNEL_IMAGETYPES_sota = "fitImage"
UBOOT_ENTRYPOINT ?= "0x80008000"
IMAGE_BOOT_FILES = "MLO u-boot.img"
SERIAL_CONSOLES ?= "115200;ttyS2"
WWAN_NBR = "1"
WWAN_VENDORS = "ublox"
MACHINE_FEATURES += " \
can \
spi \
imu \
gnss \
advanced-gnss \
wwan \
bluetooth \
tibluetooth \
neo-m8l \
wifi \
ti-wifi \
da9063-ignition \
"
USER_MODULE_MACHINE_FEATURE = "user-module"
MACHINE_FEATURES_append = " ${USER_MODULE_MACHINE_FEATURE}"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nmhw21-v1"

View File

@ -0,0 +1,30 @@
#@TYPE: Machine
#@NAME: NetModule HW 24
#@DESCRIPTION: Machine configuration for the nrhw24 mainboard
require conf/machine/include/ti33x.inc
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEVICETREE_TO_USE = "${HW24_DT}"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti33x"
UBOOT_MACHINE = "am335x_nrhw24_defconfig"
USE_VT = "0"
SERIAL_CONSOLES ?= "115200;ttyS1"
WWAN_NBR="1"
WWAN_VENDORS = "ublox"
MACHINE_FEATURES += " \
can \
wwan \
bluetooth \
tibluetooth \
atsha \
wifi \
ti-wifi \
"

View File

@ -4,23 +4,24 @@
require conf/machine/include/ti33x.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEFCONFIG ??= "nrhw16_defconfig"
KERNEL_DEVICETREE = "am335x-nrhw16.dtb \
am335x-nrhw16-prod2.dtb \
am335x-nrhw16-prod3.dtb \
am335x-nrhw16-prod4.dtb \
am335x-nrhw16-prod5.dtb \
KERNEL_DEVICETREE_TO_USE = "${HW16_DT}"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti33x"
UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig"
USE_VT = "0"
SERIAL_CONSOLES ?= "115200;ttyS1"
MACHINE_FEATURES += " \
can \
bluetooth \
tibluetooth \
atsha \
am335x-wakeup-timer \
wifi \
ti-wifi \
ath-wifi \
"
KERNEL_IMAGETYPE = "zImage"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nrhw16-v2"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PV_pn-linux-netmodule = "4.14.77-${SRCPV}"
SRC_URI_pn-linux-netmodule ?= "git://git.netmodule.intranet/yoctoproject/linux-netmodule.git;protocol=ssh;user=gitea;branch=4.14/standard/nrhw16"

View File

@ -4,18 +4,28 @@
require conf/machine/include/ti33x.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEFCONFIG ??= "am335x-nrhw20_defconfig"
KERNEL_DEVICETREE = "am335x-nrhw20-prod1.dtb \
KERNEL_DEVICETREE_TO_USE = "${HW20_DT}"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti33x"
UBOOT_MACHINE = "am335x_nrhw20_defconfig"
USE_VT = "0"
SERIAL_CONSOLES ?= "115200;ttyS1"
WWAN_NBR = "1"
WWAN_VENDORS = "ublox"
MACHINE_FEATURES += " \
can \
wwan \
gnss \
bluetooth \
tibluetooth \
atsha \
wifi \
ti-wifi \
ath-wifi \
"
KERNEL_IMAGETYPE = "zImage"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nrhw20-v1"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PV_pn-linux-netmodule = "4.14.14-${SRCPV}"
SRC_URI_pn-linux-netmodule ?= "git://git.netmodule.intranet/yoctoproject/linux-netmodule.git;protocol=ssh;user=gitea;branch=4.14/standard/nrhw20"

View File

@ -0,0 +1,21 @@
#@TYPE: Machine
#@NAME: HW17 based routers like NB2800
#@DESCRIPTION: Machine configuration for the HW17 based routers http://netmodule.com/en/products/vehicle-routers/NB2800
require conf/machine/include/armada.inc
SERIAL_CONSOLE = "115200 ttyS1"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
UBOOT_MACHINE = "${MACHINE}_defconfig"
IMAGE_BOOT_FILES = "u-boot-armada-385-hw17.kwb"
KERNEL_DEVICETREE_TO_USE = "${HW17_DT}"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
MACHINE_FEATURES += " \
fpga \
atsha \
wifi \
ath-wifi \
"

View File

@ -4,9 +4,6 @@
require conf/machine/include/armada.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
SERIAL_CONSOLE = "115200 ttyS1"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"

View File

@ -1,21 +0,0 @@
#@TYPE: Machine
#@NAME: NBHW17 based routers like NB2800
#@DESCRIPTION: Machine configuration for the NBHW17 based routers http://netmodule.com/en/products/vehicle-routers/NB2800
require conf/machine/include/armada.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
SERIAL_CONSOLE = "115200 ttyS1"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEFCONFIG ??= "nbhw_defconfig"
KERNEL_DEVICETREE = "armada-385-nbhw17-prod1.dtb"
KERNEL_IMAGETYPE = "zImage"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PV_pn-linux-netmodule = "4.12.0-${SRCPV}"
SRC_URI_pn-linux-netmodule = "git://github.com/netmodule/linux.git;protocol=https;branch=4.12/standard/nrhw14"
SRCREV_pn-linux-netmodule = "2fb3360ec3cf672c74321e1dbe5c04e59d1ced11"

View File

@ -4,26 +4,22 @@
require conf/machine/include/armada.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
SERIAL_CONSOLE = "115200 ttyS1"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEFCONFIG ??= "armada-385-nrhw18_defconfig"
KERNEL_DEVICETREE = "armada-385-nrhw18-prod4.dtb"
KERNEL_IMAGETYPE = "zImage"
KERNEL_CLASSES_append_sota = " kernel-fitimage"
KERNEL_IMAGETYPE_sota = "fitImage"
UBOOT_ENTRYPOINT_sota = "0x13000000"
KERNEL_DEVICETREE_TO_USE = "${HW18_DT}"
KERNEL_MODULE_PROBECONF += "ath10k_pci"
module_conf_ath10k_pci = "options ath10k_pci irq_mode=1"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-armada-385-nrhw18-v2"
IMAGE_BOOT_FILES = "u-boot-armada-385-nrhw18-v2.kwb"
UBOOT_MACHINE = "armada-385-hw18_defconfig"
IMAGE_BOOT_FILES = "u-boot-armada-385-hw18.kwb"
PV_pn-linux-netmodule = "4.14.77-${SRCPV}"
SRC_URI_pn-linux-netmodule ?= "git://git.netmodule.intranet/yoctoproject/linux-netmodule.git;protocol=ssh;user=gitea;branch=4.14/standard/nrhw18"
DEFAULT_ETH = "eth2"
MACHINE_FEATURES += " \
fpga \
atsha \
wifi \
ath-wifi \
"

View File

@ -4,8 +4,5 @@
require conf/machine/include/armada.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
SERIAL_CONSOLE = "115200 ttyS0"

View File

@ -0,0 +1,25 @@
#@TYPE: Machine
#@NAME: NXP MEK Board
#@DESCRIPTION: Machine configuration for the mek evalboard
require conf/machine/include/arm/arch-arm64.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEFCONFIG = ""
KERNEL_DEVICETREE = "freescale/fsl-imx8qxp-mek.dtb freescale/fsl-imx8qxp-mek-dom0.dtb"
SOTA_MACHINE = "${MACHINE}"
KERNEL_CLASSES_append = " kernel-fitimage"
KERNEL_IMAGETYPE = "Image"
UBOOT_ENTRYPOINT ?= "0x80020000"
UBOOT_MACHINE = "imx8qxp_mek_defconfig"
IMAGE_BOOT_FILES = "flash.bin"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx8-mek"

View File

@ -0,0 +1,10 @@
#@TYPE: Machine
#@NAME: NetModule HW 23 DLM
#@DESCRIPTION: Machine configuration for the netmodule HW23, DLM variant
require imx8-nmhw23.conf
KERNEL_DEVICETREE_TO_USE = "${HW23_DLM_DT}"
MACHINEOVERRIDES .= ":imx8-nmhw23"
SOTA_MACHINE = "imx8-nmhw23"
MACHINE_FEATURES_remove = "v2x"

View File

@ -0,0 +1,58 @@
#@TYPE: Machine
#@NAME: NetModule HW 23
#@DESCRIPTION: Machine configuration for the nmhw23 mainboard
require include/imx8.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEVICETREE_TO_USE = "${HW23_DT}"
SOTA_MACHINE = "${MACHINE}"
KERNEL_CLASSES_append = " kernel-fitimage"
#UBOOT_MACHINE = "imx8_nmhw23_defconfig"
IMAGE_BOOT_FILES = "flash.bin"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx8-nmhw23"
#PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
UBOOT_MAKE_TARGET = ""
#UBOOT_MAKE_TARGET = "u-boot.bin"
UBOOT_SUFFIX = "bin"
UBOOT_CONFIG ??= "flash"
UBOOT_CONFIG[flash] = "imx8_nmhw23_defconfig"
WWAN_NBR = "1"
WWAN_VENDORS = "ublox"
MACHINE_FEATURES += " \
pci \
can \
spi \
imu \
gnss \
advanced-gnss \
wwan \
bluetooth \
neo-m8l \
usb-hub-reset \
v2x \
imx-boot \
wifi \
ublox-wifi \
da9063-ignition \
"
ACCEPT_FSL_EULA = "1"
UBLOX_FEATURES = "jody-w1-pcie"
# Unstable versions are provided by meta-netmodule-wlan
# We prefer to keep the official stable versions
PREFERRED_VERSION_wpa-supplicant = "2.9"
PREFERRED_VERSION_hostapd = "2.9"

View File

@ -1,14 +1,13 @@
SOC_FAMILY = "armada"
require conf/machine/include/soc-family.inc
require netmodule-hardware.inc
DEFAULTTUNE ?= "cortexa9thf-neon"
require conf/machine/include/tune-cortexa9.inc
# Default providers, may need to override for specific machines
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
PREFERRED_PROVIDER_u-boot = "u-boot"
KERNEL_IMAGETYPE = "zImage"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-armada"
PREFERRED_PROVIDER_u-boot = "u-boot-armada"
UBOOT_ARCH = "arm"
UBOOT_MACHINE = "mvebu_db_armada8k_config"
@ -17,4 +16,22 @@ UBOOT_ENTRYPOINT = "0x13000000"
UBOOT_LOADADDRESS = "0x13000000"
# List common SoC features, may need to add touchscreen for specific machines
MACHINE_FEATURES = "kernel26 usbgadget usbhost vfat ext2 ext4 ethernet"
MACHINE_FEATURES = "kernel26 usbgadget usbhost pci vfat ext2 ext4 ethernet"
SOTA_MACHINE = "armada-385"
NM_TARGET = "netbolt"
NM_ARCH = "arm"
MACHINEOVERRIDES =. "${NM_TARGET}:"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-netmodule"
PREFERRED_VERSION_linux-netmodule ?= "git-5.10"
# We have one kernel for all armada machines
KERNEL_IMAGETYPE = "zImage"
KERNEL_DEFCONFIG = "armada-385-netmodule_defconfig"
HW17_DT = "armada-385-nbhw17-prod1.dtb"
HW18_DT = "armada-385-nrhw18-prod1.dtb"
KERNEL_DEVICETREE = "${HW17_DT} ${HW18_DT}"

View File

@ -0,0 +1,24 @@
require conf/machine/include/imx-base.inc
require netmodule-hardware.inc
# Prevent the use of imx mainline BSP
IMX_DEFAULT_BSP = ""
# Prevent usage of dynamic-packagearch for the kernel
MACHINE_ARCH_FILTER = ""
require conf/machine/include/tune-cortexa35.inc
MACHINEOVERRIDES =. "mx8:mx8x:mx8qxp:"
KERNEL_IMAGETYPE = "Image"
KERNEL_ALT_IMAGETYPE = "Image"
UBOOT_ENTRYPOINT = "0x80280000"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-netmodule"
PREFERRED_VERSION_linux-netmodule ?= "git-4.14-nxp"
KERNEL_DEFCONFIG = "imx8-netmodule_defconfig"
HW23_DT = "netmodule/imx8-nmhw23.dtb"
HW23_DLM_DT = "netmodule/imx8-nmhw23-dlm.dtb"
KERNEL_DEVICETREE = "${HW23_DT} ${HW23_DLM_DT}"

View File

@ -0,0 +1,2 @@
STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${TUNE_PKGARCH}/kernel-source"
STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${TUNE_PKGARCH}/kernel-build-artifacts"

View File

@ -1,5 +1,6 @@
SOC_FAMILY = "ti33x"
require conf/machine/include/soc-family.inc
require netmodule-hardware.inc
DEFAULTTUNE ?= "cortexa8thf-neon"
require conf/machine/include/tune-cortexa8.inc
@ -20,7 +21,8 @@ GUI_MACHINE_CLASS = "bigscreen"
MACHINE_KERNEL_PR = "r22"
# Default providers, may need to override for specific machines
PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-netmodule"
PREFERRED_VERSION_linux-netmodule ?= "git-5.10"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
@ -31,10 +33,37 @@ UBOOT_MACHINE ?= "am335x_evm_config"
UBOOT_ENTRYPOINT ?= "0x80008000"
UBOOT_LOADADDRESS ?= "0x80008000"
SOTA_MACHINE = "am335x"
IMAGE_BOOT_FILES = "MLO u-boot.img"
# Use the expected value of the ubifs filesystem's volume name in the kernel
# and u-boot.
UBI_VOLNAME = "rootfs"
# List common SoC features, may need to add touchscreen for specific machines
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet sgx"
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost pci vfat ext2 screen alsa ethernet sgx"
NM_TARGET = "netbird"
NM_ARCH = "arm"
MACHINEOVERRIDES =. "${NM_TARGET}:"
# We have one kernel for all TI machines
KERNEL_IMAGETYPE = "zImage"
KERNEL_DEFCONFIG = "am335x-netmodule_defconfig"
# We need to specify all devicetrees here in order to build them with the kernel
HW16_DT = "am335x-nrhw16.dtb \
am335x-nrhw16-prod2.dtb \
am335x-nrhw16-prod3.dtb \
am335x-nrhw16-prod4.dtb \
am335x-nrhw16-prod5.dtb \
"
HW20_DT = "am335x-nrhw20-prod1.dtb"
HW21_DT = "am335x-nmhw21-prod1.dtb"
HW24_DT = "am335x-nmhw24-prod1.dtb"
HW25_DT = "am335x-hw25.dtb"
HW26_DT = "am335x-hw26.dtb"
KERNEL_DEVICETREE = "${HW16_DT} ${HW20_DT} ${HW21_DT} ${HW24_DT} ${HW25_DT} ${HW26_DT}"

View File

@ -0,0 +1,17 @@
### Machine definition file utilities
def make_dtb_boot_files(d):
# Generate IMAGE_BOOT_FILES entries for device tree files listed in
# KERNEL_DEVICETREE.
# Use only the basename for dtb files:
alldtbs = d.getVar('KERNEL_DEVICETREE')
def transform(dtb):
if not (dtb.endswith('dtb') or dtb.endswith('dtbo')):
# eg: whatever/bcm2708-rpi-b.dtb has:
# DEPLOYDIR file: bcm2708-rpi-b.dtb
# destination: bcm2708-rpi-b.dtb
bb.error("KERNEL_DEVICETREE entry %s is not a .dtb or .dtbo file." % (dtb) )
return os.path.basename(dtb)
return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb])

View File

@ -0,0 +1,22 @@
# Copyright (C) 2012-2016 Freescale Semiconductor
# Copyright 2017-2018 NXP
# Copyright (C) 2018 O.S. Systems Software LTDA.
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=80c0478f4339af024519b3723023fe28"
SRCBRANCH ?= "master"
SRC_URI = " \
${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \
"
#SRC_URI[md5sum] = "0967aa59b3fd8d80fcb98146a9aac91b"
#SRC_URI[sha256sum] = "910fbf866f61185adfd60c1704b2da41030cb175901d06e40402b49f9240bdee"
SRC_URI[md5sum] = "ff7e208761379890261b62f477b441ed"
SRC_URI[sha256sum] = "d6a1d8dc3ce8f2e928bc6b58c7d583126abfd14d8ab61a2d8ebd760a898b5195"
S = "${WORKDIR}/firmware-imx-${PV}"
inherit fsl-eula-unpack

View File

@ -0,0 +1,20 @@
# Copyright 2018 NXP
SUMMARY = "Freescale i.MX firmware for 8X family"
DESCRIPTION = "Freescale i.MX firmware for 8X family"
require firmware-imx-${PV}.inc
inherit deploy
do_install[noexec] = "1"
do_deploy() {
# SECO
install -m 0644 ${S}/firmware/seco/mx8qx-ahab-container.img ${DEPLOYDIR}
}
addtask deploy after do_install before do_build
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(mx8x)"

View File

@ -0,0 +1,29 @@
From 4123893a8a4d93362a0a36f72134f75436fee457 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Thu, 18 Oct 2018 18:03:46 -0500
Subject: [PATCH] Allow BUILD_STRING to be set in .revision file.
Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile b/Makefile
index 57c4a90..ec49397 100644
--- a/Makefile
+++ b/Makefile
@@ -97,6 +97,9 @@ endif
# Default build string (git branch and commit)
ifeq (${BUILD_STRING},)
+ BUILD_STRING := $(shell cat .revision 2> /dev/null)
+endif
+ifeq (${BUILD_STRING},)
BUILD_STRING := $(shell git describe --long --always --dirty --tags 2> /dev/null)
endif
VERSION_STRING := v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING}
--
2.7.4

View File

@ -0,0 +1,47 @@
# Copyright 2017-2018 NXP
DESCRIPTION = "i.MX ARM Trusted Firmware"
SECTION = "BSP"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
PV = "1.5.0+git${SRCPV}"
SRCBRANCH = "imx_4.14.98_2.0.0_ga"
SRC_URI = "git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \
file://0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch \
"
SRCREV ?= "413e93e10ee4838e9a68b190f1468722f6385e0e"
S = "${WORKDIR}/git"
inherit deploy
BOOT_TOOLS = "imx-boot-tools"
PLATFORM ?= "INVALID"
PLATFORM_mx8qm = "imx8qm"
PLATFORM_mx8qxp = "imx8qx"
PLATFORM_mx8mq = "imx8mq"
PLATFORM_mx8mm = "imx8mm"
EXTRA_OEMAKE += " \
CROSS_COMPILE="${TARGET_PREFIX}" \
PLAT=imx8qx \
"
do_compile() {
# Clear LDFLAGS to avoid the option -Wl recognize issue
unset LDFLAGS
oe_runmake bl31
}
do_install[noexec] = "1"
do_deploy() {
install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}p.bin
}
addtask deploy after do_compile
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(mx8)"

View File

@ -0,0 +1,179 @@
# Copyright 2017-2018 NXP
require imx-mkimage_git.inc
DESCRIPTION = "Generate Boot Loader for i.MX 8 device"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
SECTION = "BSP"
IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware"
IMX_EXTRA_FIRMWARE_mx8m = "firmware-imx-8m"
IMX_EXTRA_FIRMWARE_mx8x = "firmware-imx-8x imx-sc-firmware"
DEPENDS += " \
u-boot \
firmware-imx \
${IMX_EXTRA_FIRMWARE} \
imx-atf \
"
DEPENDS_append_mx8m = " dtc-native"
BOOT_NAME = "imx-boot"
PROVIDES = "${BOOT_NAME}"
inherit deploy
# Add CFLAGS with native INCDIR & LIBDIR for imx-mkimage build
CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR_NATIVE} -L ${STAGING_LIBDIR_NATIVE}"
# This package aggregates output deployed by other packages,
# so set the appropriate dependencies
do_compile[depends] += " \
virtual/bootloader:do_deploy \
${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \
imx-atf:do_deploy \
"
SC_FIRMWARE_NAME ?= "scfw_tcm_cfw.bin"
ATF_MACHINE_NAME ?= "bl31-imx8qm.bin"
ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin"
ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qxp.bin"
ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin"
ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin"
ATF_MACHINE_NAME_append = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', '-optee', '', d)}"
DCD_NAME ?= "imx8qm_dcd.cfg.tmp"
DCD_NAME_mx8qm = "imx8qm_dcd.cfg.tmp"
DCD_NAME_mx8qxp = "imx8qx_dcd.cfg.tmp"
UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin"
TOOLS_NAME ?= "mkimage_imx8"
SOC_TARGET ?= "INVALID"
SOC_TARGET_mx8qm = "iMX8QM"
SOC_TARGET_mx8qxp = "iMX8QX"
SOC_TARGET_mx8mq = "iMX8M"
SOC_TARGET_mx8mm = "iMX8MM"
IMXBOOT_TARGETS ?= \
"${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \
bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \
'flash flash_dcd', d), d)}"
IMXBOOT_TARGETS_mx8qxp = \
"${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \
bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \
'flash', d), d)}"
IMXBOOT_TARGETS_mx8qxpa0 = \
"${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi_a0', \
bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand_a0', \
'flash_a0 flash_dcd_a0', d), d)}"
BOOT_STAGING = "${S}/${SOC_TARGET}"
BOOT_STAGING_mx8mm = "${S}/iMX8M"
SOC_FAMILY = "INVALID"
SOC_FAMILY_mx8 = "mx8"
SOC_FAMILY_mx8m = "mx8m"
SOC_FAMILY_mx8x = "mx8x"
compile_mx8m() {
bbnote 8MQ/8MM boot binary build
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} "
cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING}
done
cp ${DEPLOY_DIR_IMAGE}/signed_*_imx8m.bin ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ${BOOT_STAGING}/u-boot-spl.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/mkimage_uboot ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
}
compile_mx8() {
bbnote 8QM boot binary build
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
cp ${DEPLOY_DIR_IMAGE}/mx8qm-ahab-container.img ${BOOT_STAGING}
}
compile_mx8x() {
bbnote 8QX boot binary build
cp ${DEPLOY_DIR_IMAGE}/mx8qx-ahab-container.img ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
}
do_compile() {
compile_${SOC_FAMILY}
# mkimage for i.MX8
for target in ${IMXBOOT_TARGETS}; do
bbnote "building ${SOC_TARGET} - ${target}"
make SOC=${SOC_TARGET} ${target}
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target}
dd if=${BOOT_STAGING}/flash.bin of=${S}/${BOOT_CONFIG_MACHINE}-${target}.sd bs=1k seek=32 conv=fsync
fi
done
}
do_install () {
install -d ${D}/boot
for target in ${IMXBOOT_TARGETS}; do
install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${D}/boot/
install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target}.sd ${D}/boot/
done
}
deploy_mx8m() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ${DEPLOYDIR}/${BOOT_TOOLS}
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS}
done
install -m 0644 ${DEPLOY_DIR_IMAGE}/signed_hdmi*.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS}
}
deploy_mx8() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/${DCD_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/mx8qm-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
}
deploy_mx8x() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
if [ "${MACHINE}" = "imx8qxpa0mek" ]; then
install -m 0644 ${BOOT_STAGING}/${DCD_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
fi
install -m 0644 ${BOOT_STAGING}/mx8qx-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
}
do_deploy() {
deploy_${SOC_FAMILY}
# copy the tool mkimage to deploy path and sc fw, dcd and uboot
install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
# copy makefile (soc.mak) for reference
install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS}
# copy the generated boot image to deploy path
for target in ${IMXBOOT_TARGETS}; do
# Use first "target" as IMAGE_IMXBOOT_TARGET
if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then
IMAGE_IMXBOOT_TARGET="$target"
echo "Set boot target as $IMAGE_IMXBOOT_TARGET"
fi
install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${DEPLOYDIR}
install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target}.sd ${DEPLOYDIR}
done
cd ${DEPLOYDIR}
ln -sf ${BOOT_CONFIG_MACHINE}-${IMAGE_IMXBOOT_TARGET} ${BOOT_NAME}
ln -sf ${BOOT_CONFIG_MACHINE}-${IMAGE_IMXBOOT_TARGET}.sd ${BOOT_NAME}.sd
cd -
}
addtask deploy before do_build after do_compile
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN} = "/boot"
COMPATIBLE_MACHINE = "(mx8)"

View File

@ -0,0 +1,35 @@
# Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2018 NXP
require imx-mkimage_git.inc
DESCRIPTION = "i.MX make image"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
SECTION = "BSP"
inherit native deploy
CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}"
do_compile () {
cd ${S}
oe_runmake clean
oe_runmake bin
oe_runmake -C iMX8M -f soc.mak mkimage_imx8
oe_runmake -C iMX8QM -f soc.mak imx8qm_dcd.cfg.tmp
oe_runmake -C iMX8QX -f soc.mak imx8qx_dcd.cfg.tmp
}
do_install () {
cd ${S}
install -d ${D}${bindir}
install -m 0755 iMX8M/mkimage_imx8 ${D}${bindir}/mkimage_imx8m
install -m 0755 mkimage_imx8 ${D}${bindir}/mkimage_imx8
}
do_deploy () {
install -m 0644 ${S}/iMX8QM/imx8qm_dcd.cfg.tmp ${DEPLOYDIR}
install -m 0644 ${S}/iMX8QX/imx8qx_dcd.cfg.tmp ${DEPLOYDIR}
}
addtask deploy before do_build after do_install

View File

@ -0,0 +1,12 @@
# Copyright 2017-2018 NXP
DEPENDS = "zlib-native openssl-native"
SRCBRANCH = "imx_4.14.98_2.0.0_ga"
SRC_URI = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
SRCREV ?= "dd0234001713623c79be92b60fa88bc07b07f24f"
S = "${WORKDIR}/git"
BOOT_TOOLS = "imx-boot-tools"
SYSROOT_DIRS += "/boot"

View File

@ -0,0 +1,2 @@
Custom build
TODO: Integrade https://git.netmodule.intranet/hancock/imx8-scfw as a recipe

Binary file not shown.

View File

@ -0,0 +1,44 @@
# Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2018 NXP
DESCRIPTION = "i.MX System Controller Firmware"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
SECTION = "BSP"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/${MACHINE}:"
inherit fsl-eula-unpack deploy
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
SRC_URI[md5sum] = "e939f40ca655afbdedabfae73863e6da"
SRC_URI[sha256sum] = "18ef3717180ef034c1a3418d7342803f2727e4e09531e0a5db13e6f5244f2058"
SC_FIRMWARE_NAME_mx8qxp = "scfw_tcm_cfw.bin"
symlink_name = "scfw_tcm.bin"
SRC_URI += "file://scfw_tcm_cfw.bin"
SC_FIRMWARE_NAME = "scfw_tcm_cfw.bin"
do_configure_prepend() {
cp ${WORKDIR}/scfw_tcm_cfw.bin ${B}
}
BOOT_TOOLS = "imx-boot-tools"
do_compile[noexec] = "1"
do_install[noexec] = "1"
do_deploy() {
install -Dm 0644 ${S}/${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}
ln -sf ${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${symlink_name}
}
addtask deploy after do_install
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)"

View File

@ -0,0 +1,20 @@
# Copyright (C) 2016 Freescale Semiconductor
SUMMARY = "A Daemon wait for Freescale/NXP mfgtools host's command"
SECTION = "base"
DEPENDS = "dosfstools-native"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
inherit autotools-brokensep
PV = "0.5.1+git${SRCPV}"
SRC_URI = "git://github.com/NXPmicro/imx-uuc.git;protocol=https"
SRCREV = "e3fbdfef978abd150d9ea71c4d174daded9c8d33"
S = "${WORKDIR}/git"
FILES_${PN} += "/linuxrc /fat"
COMPATIBLE_MACHINE = "(imx)"

View File

@ -0,0 +1,34 @@
DESCRIPTION = "Bootloader configuration tool"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
RDEPENDS_${PN} += " \
python3-setuptools \
"
DEPENDS = "python3-setuptools-git-version-native"
inherit setuptools3 gitpkgv systemd
# GITPKGVTAG is undefined when parsing and cannot be used for PV
PKGV = "${GITPKGVTAG}"
PV = "1.0-git${SRCPV}"
SRC_URI = "git://gitlab.com/netmodule/tools/bootloader-config.git;protocol=ssh;user=git;branch=master"
SRCREV ?= "60269b7bbb4076247607c7a59b2134c3a5369f07"
S = "${WORKDIR}/git"
# Likely required in the future
#PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit allarch
#do_configure_prepend() {
# cp ${S}/platforms/${MACHINE}/* ${S}/bootloader_config
#}
SYSTEMD_SERVICE_${PN} = "bootloader-config.service"
# do_install is done by setuptools
do_install_append() {
install -d ${D}/${systemd_unitdir}/system/
install -m 0644 ${S}/systemd/bootloader-config.service ${D}/${systemd_unitdir}/system/
}

View File

@ -1,19 +1,26 @@
DESCRIPTION = "Fpga image for NRHW18"
DESCRIPTION = "Fpga images"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
inherit deploy
SRC_URI_armada-385-nrhw18 = "file://LG00000000"
COMPATIBLE_MACHINE = "(armada-385-hw17|armada-385-nrhw18)"
SRC_URI = "file://LG00000000"
DEPENDS = "bc-native"
SRCREV = "${AUTOREV}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
PV = "1.0.0"
do_install_armada-385-nrhw18 () {
do_install () {
install -d ${D}/logic
install -m 0644 ${WORKDIR}/LG00000000 ${D}/logic/
}
do_deploy () {
cp ${WORKDIR}/LG00000000 ${DEPLOYDIR}/fpga-image-${MACHINE}
}
FILES_${PN} += "/logic/LG00000000"
addtask deploy before do_build after do_compile

View File

@ -0,0 +1,7 @@
chip "da9063-*"
label in0 "main-voltage"
ignore in1
ignore in2
label in3 "wwan0-supply"
label in4 "rtc-voltage"
label temp1 "tjunc"

View File

@ -0,0 +1,13 @@
chip "da9063-*"
label in0 "main-voltage"
label in1 "input-voltage"
compute in1 15.0*@, @/15.0
label in2 "ignition-voltage"
compute in2 4.96*@, @/4.96
ignore in3
label in4 "rtc-voltage"
label temp1 "tjunc"
chip "*-mdio-*"
ignore in0
ignore temp1

View File

@ -0,0 +1 @@
am335x-hw26

View File

@ -0,0 +1,9 @@
chip "da9063-*"
label in0 "main-voltage"
label in1 "input-voltage"
compute in1 15.0*@, @/15.0
label in2 "ignition-voltage"
compute in2 4.96*@, @/4.96
label in3 "wwan0-supply"
label in4 "rtc-voltage"
label temp1 "tjunc"

View File

@ -0,0 +1,7 @@
chip "da9063-*"
label in0 "main-voltage"
ignore in1
ignore in2
ignore in3
label in4 "rtc-voltage"
label temp1 "tjunc"

View File

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

View File

@ -0,0 +1,13 @@
[Unit]
After=tibluetooth.service
After=jody-w1-bt-init.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/mac-address-set -b -l 1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,378 @@
#!/usr/bin/env bash
help_text='
This script configures bluetooth and wifi mac addresses
It is using the eth0 mac address as reference and then applying
a logical operation based on the mac address range.
Since the handling of wifi and bluetooth devices may be different
on different devices, this script is doing several attempts with
different approaches to be compatible with all devices.
Currently supported devices: HW21 and HW23
It currently supports two schemes:
* VCU1 scheme, starts with 7C:97:63: and ends with:
eth0: :50:XX:YY
wlan0: :70:XX:YY
bt0: :80:XX:YY
* VCU2 scheme, starts with 00:11:2B: and ends with:
eth0: :XX:YY:ZZ
wlan0: :XX:YY:ZZ+3
bt0: :XX:YY:ZZ+4
This script is NOT setting eth0 mac address, this must be done
before (usually bootloader).
'
level_error=0
level_warning=1
level_info=2
level_test=3
log_level="$level_info"
eth_mac=0
set_wlan=0
set_bt=0
invert_bt_mac=0
log () {
msg_level="$1"
level_string="$2"
msg="$3"
if [ "$log_level" = "$level_test" ]; then
echo "$msg"
elif [ "$log_level" -ge "$msg_level" ]; then
echo "$0: $level_string: $msg"
fi
}
log_test() {
msg="$1"
log "$level_test" "test" "$msg"
}
log_info() {
msg="$1"
log "$level_info" "info" "$msg"
}
log_warning() {
msg="$1"
log "$level_warning" "warning" "$msg"
}
log_error() {
msg="$1"
log "$level_error" "error" "$msg"
}
wait_on() {
cmd=$1
device=$2
if $cmd "$device" > /dev/null 2>/dev/null; then
return
fi
log_info "$device not ready"
log_info "Waiting...."
wait_timeout=0
while ! $cmd "$device" > /dev/null 2>/dev/null; do
if [ $wait_timeout -gt 10 ]; then
log_warning "Timeout after 10 seconds, exiting now.."
break
else
sleep 1
fi
wait_timeout=$(($wait_timeout+1))
done
log_info "$device ready"
}
wait_on_wlan0() {
wait_on ifconfig wlan0
}
wait_on_hci0() {
wait_on hciconfig hci0
}
is_wlan0_up() {
if ifconfig wlan0 | grep UP > /dev/null;
then
return "1"
else
return "0"
fi
}
set_wlan_mac_address() {
address=$1
log_info "Setting wlan0 mac address to $address"
ip link set wlan0 address "$address"
ret=$?
if [ $ret -ne 0 ]; then
log_warning "Setting wlan address failed $ret"
fi
return $ret
}
set_and_check_wlan_mac_address() {
address=$1
set_wlan_mac_address "$address"
ret=$?
if [ $ret -ne 0 ]; then
log_warning "Setting wlan address failed: $ret"
return $ret
fi
log_info "Checking success"
# Setting the mac may fail without error
# Checking MAC to be sure it worked
if ifconfig wlan0 | grep -i "$address" > /dev/null; then
log_info "wlan mac address successfully set"
return 0
else
log_warning "Setting wlan address failed without throwing an error"
return 1
fi
}
prepare_wlan() {
is_wlan0_up
wlan_iface_was_up=$?
if [[ "$wlan_iface_was_up" -eq "1" ]]; then
log_info "Taking wlan0 down"
ifconfig wlan0 down
fi
return "$wlan_iface_was_up"
}
unprepare_wlan() {
wlan_iface_was_up=$1
if [[ "$wlan_iface_was_up" -eq "1" ]]; then
log_info "Taking wlan0 back up"
ifconfig wlan0 up
else
log_info "Making sure wlan0 is down"
ifconfig wlan0 down
fi
}
prepare_and_set_wlan_mac_address() {
address="$1"
wait_on_wlan0
prepare_wlan
wlan_iface_was_up=$?
set_and_check_wlan_mac_address "$address"
ret=$?
if [[ "$ret" -ne 0 ]]; then
# On some devices the interface must be up to set the address
log_warning "Setting wlan address failed, trying with interface up"
ifconfig wlan0 up
set_and_check_wlan_mac_address "$address"
ret=$?
fi
unprepare_wlan "$wlan_iface_was_up"
return $ret
}
# Returns 1 in case reset failed
# Returns 2 when the address is not correct after reset
set_and_check_bt_mac_address() {
address="$1"
addr_to_set="$address" # Because of some bug the address to set may be inverted
if [[ "$invert_bt_mac" -eq "1" ]]; then
addr_to_set=$(echo "$address" | sed -r "s/^(.{2}):(.{2}):(.{2}):(.{2}):(.{2}):(.{2})/\\6:\\5:\\4:\\3:\\2:\\1/")
fi
bdaddr "$addr_to_set" > /dev/null
ret=$?
if [ $ret -ne 0 ]; then
log_warning "Setting bluetooth address failed: $ret"
fi
sleep 2
log_info "Restarting bluetooth service"
if ! hciconfig hci0 reset; then
return 1
fi
systemctl restart bluetooth
sleep 1
wait_on_hci0
hciconfig hci0 up
log_info "Checking success"
if hciconfig hci0 | grep -i "$address" > /dev/null; then
log_info "Bluetooth address successfully set"
ret=0
else
log_warning "Setting bluetooth address failed without error"
ret=2
fi
return $ret
}
prepare_and_set_bt_mac_address() {
address=$1
wait_on_hci0
hciconfig hci0 up
log_info "Setting bluetooth mac address to $address"
set_and_check_bt_mac_address "$address"
ret=$?
return $ret
}
do_bt_hard_reset() {
if systemctl is-active --quiet jody-w1-bt-init; then
systemctl restart jody-w1-bt-init
elif systemctl is-active --quiet tibluetooth; then
systemctl restart tibluetooth
else
log_error "No hard reset possible"
return 1
fi
}
# VCU1 scheme, starts with 7C:97:63:
# eth0: 50:XX:YY
# wlan0: 70:XX:YY
# bt0: 80:XX:YY
is_vcu1_mac() {
[[ ${1^^} == "7C:97:63:50:"* ]]
}
vcu1_eth_to_wlan() {
echo "${1^^}" | sed -r "s/^(.{9})50(.{6})/\\170\\2/"
}
vcu1_eth_to_bt() {
echo "${1^^}" | sed -r "s/^(.{9})50(.{6})/\\180\\2/"
}
# VCU2 scheme, starts with 00:11:2B:
# eth0: XX:YY:ZZ
# wlan0: XX:YY:ZZ+3
# bt0: XX:YY:ZZ+4
is_vcu2_mac() {
[[ $1 == "00:11:2B:"* ]]
}
vcu2_eth_to_wlan_and_bt() {
iface="$1"
IFS=':' read -r -a digits <<< "$2"
# convert digits from hex to decimal
for ((x=0 ; x<6 ; x++)); do digits[x]=0x${digits[x]}; done
if [ $iface = "wlan" ]; then
digits[5]=$((digits[5] + 3))
elif [ $iface = "bt" ]; then
digits[5]=$((digits[5] + 4))
fi
mac=$(printf ":%02X" "${digits[@]}")
mac=${mac:1} # Remove first ":"
echo "$mac"
}
main() {
ret=0
if [ "$1" = "-h" ]; then
echo "$help_text"
echo "Usage:"
echo " $0"
echo " $0 -l <loglevel> # loglevel being between 0 (errors) and 2 (info)"
echo " $0 -w # set wifi address"
echo " $0 -b # set bluetooth address"
echo " $0 -i # invert bluetooth address"
echo " $0 -e <eth0 addr> # mac address input, e.g. 00:11:22:33:44:10"
exit 0
fi
while getopts l:wbie: option
do
case "${option}"
in
l)log_level=${OPTARG};;
w)set_wlan=1;;
b)set_bt=1;;
i)invert_bt_mac=1;;
e)eth_mac=${OPTARG};;
esac
done
if [ $eth_mac = 0 ]; then
eth_mac=$(ip addr show eth0 | awk '$1 == "link/ether" {gsub(/\/.*$/, "", $2); print $2}')
fi
eth_mac=${eth_mac^^} # UPPER case
if is_vcu1_mac "$eth_mac"; then
log_info "VCU1 mac address scheme"
wlan_mac=$(vcu1_eth_to_wlan "$eth_mac")
bt_addr=$(vcu1_eth_to_bt "$eth_mac")
elif is_vcu2_mac "$eth_mac"; then
log_info "VCU2 mac address scheme"
wlan_mac=$(vcu2_eth_to_wlan_and_bt "wlan" "$eth_mac")
bt_addr=$(vcu2_eth_to_wlan_and_bt "bt" "$eth_mac")
else
log_error "Unknown mac address scheme for: $eth_mac"
exit 1
fi
log_test "wlan: $wlan_mac"
log_test "bt: $bt_addr"
if [ $set_wlan = 1 ]; then
prepare_and_set_wlan_mac_address "$wlan_mac"
ret_wlan=$?
if [ $ret_wlan -ne 0 ]; then
log_error "Failed to set wlan mac address"
ret="$ret_wlan"
fi
fi
if [ $set_bt = 1 ]; then
prepare_and_set_bt_mac_address "$bt_addr"
ret_bt=$?
while [ $ret_bt -eq 1 ]; do
log_warning "Soft reset failed, doing hard reset and retrying"
do_bt_hard_reset
prepare_and_set_bt_mac_address "$bt_addr"
ret_bt=$?
done
if [ $ret_bt -ne 0 ]; then
log_error "Failed to set bluetooth mac address"
ret="$ret_bt"
fi
fi
return "$ret"
}
if [ "$1" = "testify" ]; then
return 0
fi
main $@
exit $?

View File

@ -0,0 +1,12 @@
[Unit]
Before=NetworkManager.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/mac-address-set -w -l 1
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,44 @@
SUMMARY = "Set mac addresses of Wifi and bluetooth chips"
DESCRIPTION = "Small scripts that set the mac addresses based on ethernet mac"
AUTHOR = "Alexandre Bard"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
PR = "r2"
inherit systemd
SRC_URI = " \
file://wlan-address-set.service \
file://bt-address-set.service \
file://mac-address-set.sh \
"
S = "${WORKDIR}"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
SYSTEMD_SERVICE_${PN} = "wlan-address-set.service bt-address-set.service"
SYSTEMD_AUTO_ENABLE ?= "enable"
FILES_${PN}_append = " \
/lib \
/usr \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_install () {
install -d ${D}${systemd_unitdir}/system/
install -m 0644 wlan-address-set.service ${D}${systemd_unitdir}/system/
install -m 0644 bt-address-set.service ${D}${systemd_unitdir}/system/
# Invert BT mac for TI chips
if ${@bb.utils.contains('MACHINE_FEATURES', 'tibluetooth', 'true', 'false',d)}; then
sed -i 's/^ExecStart=.*/& -i/g' ${D}${systemd_unitdir}/system/bt-address-set.service
fi
install -d ${D}/usr/bin
install -m 0755 mac-address-set.sh ${D}/usr/bin/mac-address-set
}

View File

@ -0,0 +1,48 @@
# bash-assert
testify is a lightweight unit testing framework for bash
# Usage
clone this repository `git clone https://github.com/zombieleet/testify.git` here.
run the mac-address-set-test.sh file and check the console output.
# Commands
all subcommands to the assert functions requres 4 arguments, the first argument is the actual value to test for, while the second argument
is the expected value, the thrid argument is a description of the test , while the fourth argument is a short description of what the test output should be
**expect** Compares two values
`assert expect "$(Name 'Jane' 'Doe')" "John Doe" "Test for Name Function" "should fail"`
To test the output of a function you have to use command substitution
You can also test single values
`assert expect "victory" "favour" "Test for Name comparison" "This should fail"`
testing for mathematical expressions
`assert expect "$((2+2))" "4" "Test for Simple Math Operation" "It should succeed"`
**regex** Does a regular expression match. The second argument to this subcommand should be a regular expression
`assert regex "What is the difference between 6 and half a dozen" "[[:digit:]]" "Match Number Regular Expression" "It should succeed"`
**status** Test for any status code. The second argument should be the expected status code. The first argument to this subcommand should be a command name, and it should not be passed as a command substitution but it should be passed as just a string wrapped in double quotes.
The arguments to the function should also be in the double quotes. Arguments with spaced should be wrapped in single quotes
`assert status "ls ." "0" "List in current dir" "it should return 0"`
**done** This should be last subcommand to call, it does not require any argument
# LICENSE
GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

View File

@ -0,0 +1,51 @@
#!/usr/bin/env bash
source ../files/mac-address-set.sh testify
source ./testify/testify.bash
assert expect "$(log_error 'test')" "$0: error: test" "Test for Error logging" "should succeed"
assert expect "$(log_info 'test')" "$0: info: test" "Test for Info logging" "should succeed"
# Testing VCU1 mac address converter
assert expect "$(vcu1_eth_to_wlan '7C:97:63:50:00:00')" "7C:97:63:70:00:00" "Test VCU1 WLAN 1" "should match"
assert expect "$(vcu1_eth_to_wlan '7c:97:63:50:00:00')" "7C:97:63:70:00:00" "Test VCU1 WLAN 2" "should match"
assert expect "$(vcu1_eth_to_bt '7C:97:63:50:00:0A')" "7C:97:63:80:00:0A" "Test VCU1 BT 1" "should match"
assert expect "$(vcu1_eth_to_bt '7c:97:63:50:00:0a')" "7C:97:63:80:00:0A" "Test VCU1 BT 2" "should match"
# Testing VCU2 mac address converter
assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:aa:cd:00')" "00:11:2B:AA:CD:03" "Test VCU2 WLAN 1" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2B:AA:CD:00')" "00:11:2B:AA:CD:03" "Test VCU2 WLAN 2" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:39')" "00:11:2B:00:00:3C" "Test VCU2 WLAN 3" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:f0')" "00:11:2B:00:00:F3" "Test VCU2 WLAN 4" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:f6')" "00:11:2B:00:00:F9" "Test VCU2 WLAN 5" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:f7')" "00:11:2B:00:00:FA" "Test VCU2 WLAN 6" "should match"
#assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:RS')" "" "Test VCU2 WLAN 7" "should match"
#assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:FF')" "" "Test VCU2 WLAN 8" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:06')" "00:11:2B:00:00:09" "Test VCU2 WLAN 9" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'bt' '00:11:2b:aa:cd:00')" "00:11:2B:AA:CD:04" "Test VCU2 BT 1" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'bt' '00:11:2B:AA:CD:00')" "00:11:2B:AA:CD:04" "Test VCU2 BT 2" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'bt' '00:11:2b:00:00:39')" "00:11:2B:00:00:3D" "Test VCU2 BT 3" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'bt' '00:11:2b:00:00:f0')" "00:11:2B:00:00:F4" "Test VCU2 BT 4" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'bt' '00:11:2b:00:00:f6')" "00:11:2B:00:00:FA" "Test VCU2 BT 5" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'bt' '00:11:2b:00:00:f7')" "00:11:2B:00:00:FB" "Test VCU2 BT 6" "should match"
#assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:RS')" "" "Test VCU2 BT 7" "should match"
#assert expect "$(vcu2_eth_to_wlan_and_bt 'wlan' '00:11:2b:00:00:FF')" "" "Test VCU2 BT 8" "should match"
assert expect "$(vcu2_eth_to_wlan_and_bt 'bt' '00:11:2b:00:00:06')" "00:11:2B:00:00:0A" "Test VCU2 BT 9" "should match"
# Examples:
#assert expect "$(Name 'Jane' 'Doe')" "John Doe" "Test for Name Function" "should fail"
#assert expect "$(Name 'Jane' 'Doe')" "Jane Doe" "Test for Name Function" "should succeed"
#assert status "Name" "5" "Test for status code" "should return 5"
#assert status "Name 'Jane' 'Doe'" "0" "Test for Status Code" "should return 0"
#assert status "Name 'Jane' " "3" "Test for Status Code" "should return 3"
#assert status "Name 'Jane' 'Doe'" "12" "Test for Status Code" "it should fail"
#assert regex "$(Name 'Jane' 'Doe')" "Jane" "Test for Regexp" "it should match"
#assert regex "123victory" "\W" "Test for Regexp Non Word Character" "it should fail if match failes"
#assert expect "$((2+2))" "4" "Test for Simple Math Operation" "It should succeed"
#assert regex "What is the difference between 6 and half a dozen" "[[:digit:]]" "Match Number Regular Expression" "It should succeed"
#assert status "ls ." "0" "List in current dir" "it should return 0"
assert done

View File

@ -0,0 +1,38 @@
SUMMARY = "Storage Information Tool"
SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=81438338854bd7a09cb97215f36db46b"
SRC_URI = "git://gitlab.com/netmodule/tools/storage-info.git;protocol=ssh;user=git;branch=develop"
SRCREV ?= "6584feb5fb3e18572fee1cea9e20a6b8e5cd0251"
PV = "0.0.1+git${SRCPV}"
DEPENDS_append = " libnmapp"
inherit systemd
S = "${WORKDIR}/git"
B = "${S}/build"
SYSTEMD_SERVICE_${PN} = "storage-info.service"
FILES_${PN} += " \
${bindir}/storage-info \
${systemd_system_unitdir}/storage-info.service \
${sysconfdir}/storage/storage-info.conf \
"
# build variables for the target (rest is default)
EXTRA_OEMAKE_append = " 'BUILD_TARGET=target' 'BUILD_CONFIG=rls' 'SYSROOT=${STAGING_DIR_TARGET}'"
do_install() {
install -d ${D}${bindir}
install -m 755 ${B}/rls/target/${BPN} ${D}${bindir}
install -d ${D}${sysconfdir}/storage
install -m 644 ${S}/config/${BPN}.conf ${D}${sysconfdir}/storage/
install -d ${D}${systemd_system_unitdir}
install -m 644 ${S}/systemd/${BPN}.service ${D}${systemd_system_unitdir}
}

View File

@ -1,24 +0,0 @@
require u-boot-nm.inc
# Force machine configuration for this recipe
UBOOT_MACHINE = "am335x_nmhw21_defconfig"
# Be aware github/netmodule git
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot;protocol=ssh;user=gitea;branch=2016.05-am335x-netmodule"
# Should be updated when a new U-Boot Version is available
SRCREV ?= "${AUTOREV}"
PV = "v2016.05+git${SRCPV}"
SPL_BINARY = "MLO"
UBOOT_SUFFIX = "img"
do_deploy_append() {
rm -f ${DEPLOYDIR}/*${PN}.xmodem.bin
rm -f ${DEPLOYDIR}/*${PN}.${UBOOT_SUFFIX}
cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/spl-${PN}.xmodem.bin
cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.xmodem.bin
cp ${S}/u-boot.img ${DEPLOYDIR}/${PN}.${UBOOT_SUFFIX}
cp ${S}/MLO ${DEPLOYDIR}/spl-${PN}.${UBOOT_SUFFIX}
}

View File

@ -1,26 +0,0 @@
# Force machine configuration for this recipe
UBOOT_MACHINE = "am335x_nbhw16_defconfig"
require u-boot-nm.inc
# Be aware github/netmodule git
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot;protocol=ssh;user=gitea;branch=2016.05-am335x-netmodule"
# Should be updated when a new U-Boot Version is available
SRCREV ?= "a6f157c6dbd048b452c7e2640215c55be658780c"
PV = "v2016.05+git${SRCPV}"
SPL_BINARY = "MLO"
UBOOT_SUFFIX = "img"
do_deploy_append() {
rm -f ${DEPLOYDIR}/${PN}-spl.bin
rm -f ${DEPLOYDIR}/${PN}.bin
rm -f ${DEPLOYDIR}/${PN}.img
rm -f ${DEPLOYDIR}/MLO-${PN}
cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin
cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin
cp ${S}/u-boot.img ${DEPLOYDIR}/${PN}.img
cp ${S}/MLO ${DEPLOYDIR}/MLO-${PN}
}

View File

@ -1,7 +0,0 @@
require u-boot-am335x-nrhw16-v1_git.bb
# Force machine configuration for this recipe
UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig"
SRCREV = "0b985705d558caceeb968b234af27cfc536ef019"

View File

@ -1,27 +0,0 @@
require u-boot-nm.inc
# Force machine configuration for this recipe
UBOOT_MACHINE = "am335x_nrhw20_defconfig"
# Be aware github/netmodule git
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot;protocol=ssh;user=gitea;branch=2016.05-am335x-netmodule"
# Should be updated when a new U-Boot Version is available
SRCREV ?= "297c60c69942e7d377925181b29a1f8e9515284d"
PV = "v2016.04+git${SRCPV}"
SPL_BINARY = "MLO"
UBOOT_SUFFIX = "img"
do_deploy_append() {
rm -f ${DEPLOYDIR}/${PN}-spl.bin
rm -f ${DEPLOYDIR}/${PN}.bin
rm -f ${DEPLOYDIR}/${PN}.img
rm -f ${DEPLOYDIR}/MLO-${PN}
cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin
cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin
cp ${S}/u-boot.img ${DEPLOYDIR}/${PN}.img
cp ${S}/MLO ${DEPLOYDIR}/MLO-${PN}
}

View File

@ -1,27 +0,0 @@
require u-boot-nm.inc
# Force machine configuration for this recipe
UBOOT_MACHINE = "armada-385-nbhw18-v1_defconfig"
# Be aware github/netmodule git
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot;protocol=ssh;user=gitea;branch=nbhw-armada-v2017.11"
DEPENDS = "bc-native"
# Should be updated when a new U-Boot Version is available
SRCREV ?= "f665946cc415e628b237fcf846bda1debf40980b"
PV = "v2017.11+git${SRCPV}"
UBOOT_SUFFIX = "kwb"
UBOOT_BINARY = "u-boot-spl.${UBOOT_SUFFIX}"
do_deploy() {
rm -f ${DEPLOYDIR}/${PN}-spl.bin
rm -f ${DEPLOYDIR}/${PN}.bin
rm -f ${DEPLOYDIR}/${PN}-spl.kwb
cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin
cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin
cp ${S}/u-boot-spl.kwb ${DEPLOYDIR}/${PN}.kwb
}

View File

@ -1,28 +0,0 @@
require u-boot-nm.inc
# Force machine configuration for this recipe
UBOOT_MACHINE = "armada-385-nrhw18-v2_defconfig"
# Be aware github/netmodule git
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot;protocol=ssh;user=gitea;branch=2017.11-armada-nrhw"
DEPENDS = "bc-native"
# Should be updated when a new U-Boot Version is available
#SRCREV ?= "f665946cc415e628b237fcf846bda1debf40980b"
SRCREV = "${AUTOREV}"
PV = "v2017.11+git${SRCPV}"
UBOOT_SUFFIX = "kwb"
UBOOT_BINARY = "u-boot-spl.${UBOOT_SUFFIX}"
do_deploy() {
rm -f ${DEPLOYDIR}/${PN}-spl.bin
rm -f ${DEPLOYDIR}/${PN}.bin
rm -f ${DEPLOYDIR}/${PN}-spl.kwb
cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin
cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin
cp ${S}/u-boot-spl.kwb ${DEPLOYDIR}/${PN}.kwb
}

View File

@ -0,0 +1,26 @@
require u-boot-nm.inc
# Be aware github/netmodule git
SRC_URI = "git://gitlab.com/netmodule/bootloader/netmodule-uboot.git;protocol=ssh;user=git;branch=2017.11/standard/armada-385"
DEPENDS += "bc-native"
# Should be updated when a new U-Boot Version is available
#SRCREV ?= "68d28424cf41e141207d9d8af76c5bc5e01a55e2"
SRCREV ?= "68d28424cf41e141207d9d8af76c5bc5e01a55e2"
UBOOT_SUFFIX = "kwb"
UBOOT_BINARY = "u-boot-spl.${UBOOT_SUFFIX}"
do_deploy() {
# xmodem files
cp ${B}/spl/u-boot-spl.bin ${DEPLOYDIR}/spl-u-boot-${MACHINE}.xmodem.bin
cp ${B}/u-boot.bin ${DEPLOYDIR}/u-boot-${MACHINE}.xmodem.bin
# file for wic file
cp ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/u-boot-spl.${UBOOT_SUFFIX}
# file for user usage
cp ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/u-boot-${MACHINE}.${UBOOT_SUFFIX}
}

View File

@ -1,9 +0,0 @@
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
# MTD device name Device offset Environment size
/sys/bus/i2c/devices/0-0050/eeprom 0x1000 0x0800

View File

@ -1,7 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://fw_env.config"
do_install_prepend() {
cp -f ${WORKDIR}/fw_env.config ${S}/tools/env/
}

View File

@ -0,0 +1,56 @@
# Copyright (C) 2013-2016 Freescale Semiconductor
# Copyright 2018 (C) O.S. Systems Software LTDA.
# Copyright 2017-2019 NXP
DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
require recipes-bsp/u-boot/u-boot.inc
PROVIDES += "u-boot"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://gitlab.com/netmodule/bootloader/netmodule-uboot.git;protocol=ssh;user=git;branch=2018.03/imx/imx8-nmhw23;destsuffix=git"
SRCREV ?= "68ad3ed09773011ab15e9dd50f9ec2bbf817ef3f"
S = "${WORKDIR}/git"
#inherit fsl-u-boot-localversion
LOCALVERSION ?= "-${SRCBRANCH}"
BOOT_TOOLS = "imx-boot-tools"
UBOOT_INITIAL_ENV = ""
do_configure_prepend() {
if [ ! -d ${S}/board/netmodule/common ]; then
mkdir -p ${S}/board/netmodule/
ln -s ${S}/board/freescale/common ${S}/board/netmodule/common
fi
}
do_deploy_append_mx8m() {
# Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary
if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
if [ $j -eq $i ]
then
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0777 ${B}/${config}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot
install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin
fi
done
unset j
done
unset i
fi
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"

View File

@ -1,290 +1,13 @@
SUMMARY = "Universal Boot Loader for embedded devices"
HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
require recipes-bsp/u-boot/u-boot.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
do_configure[cleandirs] = "${B}"
UBOOT_INITIAL_ENV = ""
PACKAGE_ARCH = "${MACHINE_ARCH}"
PROVIDES = "virtual/bootloader"
inherit uboot-config deploy
PROVIDES = "virtual/bootloader"
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
PACKAGECONFIG ??= "openssl"
# u-boot will compile its own tools during the build, with specific
# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
# a host build dependency.
PACKAGECONFIG[openssl] = ",,openssl-native"
# Allow setting an additional version string that will be picked up by the
# u-boot build system and appended to the u-boot version. If the .scmversion
# file already exists it will not be overwritten.
UBOOT_LOCALVERSION ?= ""
# Some versions of u-boot use .bin and others use .img. By default use .bin
# but enable individual recipes to change this value.
UBOOT_SUFFIX ??= "bin"
UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
UBOOT_SYMLINK ?= "${PN}.${UBOOT_SUFFIX}"
UBOOT_MAKE_TARGET ?= "all"
# Output the ELF generated. Some platforms can use the ELF file and directly
# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging
# purposes.
UBOOT_ELF ?= ""
UBOOT_ELF_SUFFIX ?= "elf"
UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}"
UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}"
UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
# Some versions of u-boot build an SPL (Second Program Loader) image that
# should be packaged along with the u-boot binary as well as placed in the
# deploy directory. For those versions they can set the following variables
# to allow packaging the SPL.
SPL_BINARY ?= ""
SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
SPL_SYMLINK ?= "${SPL_BINARY}-${PN}"
# Additional environment variables or a script can be installed alongside
# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
# or 'boot.scr', should be packaged along with u-boot as well as placed in the
# deploy directory. Machine configurations needing one of these files should
# include it in the SRC_URI and set the UBOOT_ENV parameter.
UBOOT_ENV_SUFFIX ?= "txt"
UBOOT_ENV ?= ""
UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
do_compile () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk
fi
unset LDFLAGS
unset CFLAGS
unset CPPFLAGS
if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
then
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
fi
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
oe_runmake O=${config} ${config}
oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
fi
done
unset j
done
unset i
else
oe_runmake ${UBOOT_MACHINE}
oe_runmake ${UBOOT_MAKE_TARGET}
fi
}
do_install () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install -d ${D}/boot
install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
fi
done
unset j
done
unset i
else
install -d ${D}/boot
install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
fi
if [ "x${UBOOT_ELF}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
fi
done
unset j
done
unset i
else
install ${S}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE}
ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY}
fi
fi
if [ -e ${WORKDIR}/fw_env.config ] ; then
install -d ${D}${sysconfdir}
install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
fi
if [ "x${SPL_BINARY}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}
fi
done
unset j
done
unset i
else
install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
fi
fi
if [ "x${UBOOT_ENV}" != "x" ]
then
install ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY}
fi
}
FILES_${PN} = "/boot ${sysconfdir}"
# Ensure the split debug part of any elf files are put into dbg
FILES_${PN}-dbg += "/boot/.debug"
do_deploy () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install -d ${DEPLOYDIR}
install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
cd ${DEPLOYDIR}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
fi
done
unset j
done
unset i
else
install -d ${DEPLOYDIR}
install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
cd ${DEPLOYDIR}
rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
fi
if [ "x${UBOOT_ELF}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
fi
done
unset j
done
unset i
else
install ${S}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE}
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
fi
fi
if [ "x${SPL_BINARY}" != "x" ]
then
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
i=`expr $i + 1`;
for type in ${UBOOT_CONFIG}; do
j=`expr $j + 1`;
if [ $j -eq $i ]
then
install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
fi
done
unset j
done
unset i
else
install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
fi
fi
if [ "x${UBOOT_ENV}" != "x" ]
then
install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
fi
}
addtask deploy before do_build after do_compile
# This variable is set to "0" in distro in order to get reproducible build
# It is however not needed for uboot and unsetting it allows us to keep the build date in uboot output
unset SOURCE_DATE_EPOCH

View File

@ -0,0 +1,24 @@
require u-boot-nm.inc
# Be aware github/netmodule git
SRC_URI = "git://gitlab.com/netmodule/bootloader/netmodule-uboot.git;protocol=ssh;user=git;branch=2016.05/standard/am335x"
# Should be updated when a new U-Boot Version is available
SRCREV = "69e9c386dd3734a01af79ca1cc565896facfb9f6"
SPL_BINARY = "MLO"
UBOOT_SUFFIX = "img"
do_deploy() {
# xmodem files
cp ${B}/spl/u-boot-spl.bin ${DEPLOYDIR}/spl-u-boot-${MACHINE}.xmodem.bin
cp ${B}/u-boot.bin ${DEPLOYDIR}/u-boot-${MACHINE}.xmodem.bin
# files for wic file
cp ${B}/MLO ${DEPLOYDIR}/
cp ${B}/u-boot.img ${DEPLOYDIR}/
# files for user usage
cp ${B}/MLO ${DEPLOYDIR}/spl-u-boot-${MACHINE}.${UBOOT_SUFFIX}
cp ${B}/u-boot.img ${DEPLOYDIR}/u-boot-${MACHINE}.${UBOOT_SUFFIX}
}

View File

@ -0,0 +1,87 @@
#!/bin/sh
# ************************************************************
# USB Hub Reset Script
# -----------------------
#
# The USB hub in the HW23 connects the GNSS modem, the v2x-
# module, the user interface and the user module.
#
# When HW23 device is powering up the v2x module enters DFU
# mode. This mode leads to enumeration errors when releasing
# the gnss module from reset. Thus a sequentialized startup
# is needed.
# This script just sets the USB hub either into reset mode or
# releases it from reset.
# ************************************************************
SCRIPT_NAME=$(basename "${0}")
SCRIPT_DIR=$(dirname "${0}")
SCRIPT_PATH=$(realpath "${SCRIPT_DIR}")
MYDIR=$(pwd)
HUB_RST=/sys/class/leds/hub_rst/brightness
ON_VALUE=0
OFF_VALUE=255
export HUB_RST_STATE="off"
#**********************************************************************************************
# local helper functions
#**********************************************************************************************
function printUsage()
{
echo -e "\\nUsage: ${SCRIPT_NAME} [OPTIONS] HUB_STATE\\n\\n"
echo -e " HUB_STATE The requested state of the usb hub:"
echo -e " * on = release hub from reset"
echo -e " * off = set hub into reset state (default)"
echo -e " OPTIONS:"
echo -e " -h|--help Show this help"
echo -e ""
}
#**********************************************************************************************
# main
#**********************************************************************************************
O=$(getopt -o h --long help -- "$@") || exit 1
if [ $? != 0 ]; then
echo "ERROR: Could not parse $SCRIPT_NAME command line options"
exit 1
fi
eval set -- "$O"
while true; do
case "${1}" in
-h|--help)
printUsage
exit 0
;;
--)
export HUB_RST_STATE="${2}"
shift 2
break
;;
*)
printUsage; exit 0 ;;
esac
done
if [ ! -f $HUB_RST ]; then
echo "ERROR $SCRIPT_NAME: USB hub reset lines not available"
return 1
fi
HUB_RST_VALUE=$OFF_VALUE
[[ "${HUB_RST_STATE}" != "off" ]] && HUB_RST_VALUE=$ON_VALUE || true
echo "$SCRIPT_NAME: set usb-hub=${HUB_RST_STATE}($HUB_RST_VALUE)..."
echo $HUB_RST_VALUE > $HUB_RST
if [[ "$?" != "0" ]]; then
echo "ERROR $SCRIPT_NAME: Could not set usb hub to ${HUB_RST_STATE}"
exit 1
fi
exit 0

View File

@ -0,0 +1,14 @@
[Unit]
Description=USB Hub Reset Service
Before=gpsd.service
[Service]
Type=oneshot
ExecStart=/usr/bin/usb-hub-reset on
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
RequiredBy=multi-user.target

View File

@ -0,0 +1,29 @@
DESCRIPTION = "USB-Hub Reset on HW23"
HOMEPAGE = "www.netmodule.com"
LICENSE = "MIT"
SECTION = "bsp"
RDEPENDS_${PN} = "usbutils coreutils"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit systemd
SRC_URI = " \
file://usb-hub-reset.service \
file://usb-hub-reset\
"
S = "${WORKDIR}"
SYSTEMD_SERVICE_${PN} = " \
usb-hub-reset.service \
"
FILES_${PN} = "${systemd_unitdir}/system ${bindir}"
do_install() {
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/usb-hub-reset.service ${D}${systemd_unitdir}/system/
install -d ${D}${bindir}
install -m 744 ${WORKDIR}/usb-hub-reset ${D}${bindir}
}

View File

@ -0,0 +1,141 @@
#!/bin/sh
SCRIPT_NAME=$(basename "${0}")
V2X_CONF=/etc/v2x0.conf
V2X_RST=/sys/class/leds/v2x_rst/brightness
ON_VALUE=0
#OFF_VALUE=255
IS_PLACEHOLDER_FW=false
#**********************************************************************************************
# local helper functions
#**********************************************************************************************
printUsage()
{
echo ""
echo "Usage: ${SCRIPT_NAME} [OPT] CMD"
echo ""
echo " CMD:"
echo " -h|--help Show this help"
echo ""
echo " OPT:"
echo " -c|--config-file=FILE The config file pathname (default=${V2X_CONF})"
echo ""
}
checkInputParameters()
{
if [ ! -f $V2X_RST ]; then
echo "ERROR $SCRIPT_NAME: v2x module reset lines not available"
exit 1
fi
if [ ! -f $V2X_CONF ]; then
echo "ERROR $SCRIPT_NAME: no v2x config file '${V2X_CONF}' found"
exit 1
fi
}
getConfigParameters()
{
echo "$SCRIPT_NAME: getting config parameter from $V2X_CONF"
placeholderEntry=$(grep is-placeholder-firmware $V2X_CONF | cut -d'=' -f2)
if [ "${placeholderEntry}" != "" ] && [ "${placeholderEntry}" = "true" ]; then
IS_PLACEHOLDER_FW=true
fi
}
enableTheModule()
{
pwrGpio="$(gpiofind UM_SUP_EN)"
echo "$SCRIPT_NAME: releasing v2x reset..."
echo $ON_VALUE > $V2X_RST
echo "$SCRIPT_NAME: toggling v2x module power..."
gpioset -m time -s 1 $pwrGpio=0
gpioset -m signal $pwrGpio=1 &
}
detectDfuMode()
{
timeoutS=30
echo "$SCRIPT_NAME: discovering DFU mode of v2x module (timeout=${timeoutS}s)..."
timeout $timeoutS bash -c -- 'while true; do lsusb | grep "0483:df11"; if [ $? == 0 ]; then break; fi; done'
if [ $? = 124 ]; then
echo "ERROR: v2x module is not available on usb bus"
exit 1
fi
}
waitForDfuModeExit()
{
disconnectTimeoutS=20
echo "$SCRIPT_NAME: wait for v2x module leaving DFU mode (timeout=${disconnectTimeoutS}s)..."
timeout $disconnectTimeoutS bash -c -- 'while true; do dmesg | grep "0483:df11"; if [ $? != 0 ]; then break; fi; done'
if [ $? = 124 ]; then
echo "$SCRIPT_NAME: no DFU mode exit of v2x module detected"
else
echo "$SCRIPT_NAME: v2x module exited DFU mode"
fi
}
loadFirmware()
{
echo "$SCRIPT_NAME: loading v2x firmware..."
output=$(dfu-util -d 0483:df11 -s 0x10000000 -D /lib/firmware/v2x/SECTON.packed_bin.rom 2>&1)
if [ $? != 0 ]; then
if echo "$output" | grep -i "Error during abort get_status"; then
echo "$SCRIPT_NAME: get_status abort error: ignoring"
exit 0
fi
echo "$SCRIPT_NAME: Something went wrong while uploading firmware:"
echo "$output"
exit 1
fi
}
#**********************************************************************************************
# main
#**********************************************************************************************
O=$(getopt -o hc: --long help,config-file: -- "$@") || exit 1
eval set -- "$O"
while true; do
case "${1}" in
-h|--help)
printUsage
exit 0
;;
-c|--config-file)
V2X_CONF=${2}
shift 2
;;
--)
break
;;
*)
printUsage; exit 0 ;;
esac
done
checkInputParameters
getConfigParameters
enableTheModule
detectDfuMode
if [ $IS_PLACEHOLDER_FW = true ]; then
echo "$SCRIPT_NAME: v2x placeholder firmware configured"
waitForDfuModeExit
exit 0
fi
loadFirmware
exit 0

View File

@ -0,0 +1,12 @@
[Unit]
Description=V2X Firmware loader
After=usb-hub-reset.service
[Service]
Type=oneshot
ExecStart=/usr/bin/v2x-fw-load
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
RequiredBy=multi-user.target

View File

@ -0,0 +1,2 @@
[default]
is-placeholder-firmware=true

View File

@ -0,0 +1 @@
[default]

View File

@ -0,0 +1,45 @@
# Copyright (C) 2019 Ramon Moesching <ramon.moesching@netmodule.com>
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Murata v2x module firmware loader service"
HOMEPAGE = "www.netmodule.com"
LICENSE = "MIT"
SECTION = "bsp/firmware"
RDEPENDS_${PN} = "dfu-util usbutils coreutils"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit systemd
SRC_URI = " \
file://v2x-ieee802.11p.service \
file://v2x-fw-load \
file://v2x_dummy.rom \
file://v2x0.conf \
file://v2x0-placeholderFw.conf \
"
S = "${WORKDIR}"
SYSTEMD_SERVICE_${PN} = " \
v2x-ieee802.11p.service \
"
FILES_${PN} = "${systemd_unitdir}/system ${bindir} ${nonarch_base_libdir}/firmware/v2x ${sysconfdir} "
do_install() {
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/v2x-ieee802.11p.service ${D}${systemd_unitdir}/system/
install -d ${D}${nonarch_base_libdir}/firmware/v2x
install -m 644 ${WORKDIR}/v2x_dummy.rom ${D}${nonarch_base_libdir}/firmware/v2x/SECTON.packed_bin.rom
install -d ${D}${sysconfdir}
if [ ! -z "${V2X_ENABLE_FW_LOAD}" ]; then
install -m 544 ${WORKDIR}/v2x0.conf ${D}${sysconfdir}
else
install -m 544 ${WORKDIR}/v2x0-placeholderFw.conf ${D}${sysconfdir}/v2x0.conf
fi
install -d ${D}${bindir}
install -m 744 ${WORKDIR}/v2x-fw-load ${D}${bindir}
}

View File

@ -0,0 +1,14 @@
[Unit]
Description=GNSS init service
After=usb-hub-reset.service v2x-ieee802.11p.service
[Service]
Type=oneshot
ExecStart=/usr/bin/sh -c "echo 0 > /sys/class/leds/gnss_rst/brightness"
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
RequiredBy=multi-user.target

View File

@ -0,0 +1,29 @@
# Copyright (C) 2019 Ramon Moesching <ramon.moesching@netmodule.com>
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "GNSS init service"
HOMEPAGE = "www.netmodule.com"
LICENSE = "MIT"
SECTION = "bsp/firmware"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit systemd
FILESEXTRAPATHS_append := ":${THISDIR}/files"
SRC_URI_append = " \
file://gnss-init.service \
"
S = "${WORKDIR}"
SYSTEMD_SERVICE_${PN} = " \
gnss-init.service \
"
FILES_${PN}_append = "${systemd_unitdir}/system ${bindir}"
do_install_append() {
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/gnss-init.service ${D}${systemd_unitdir}/system/
}

View File

@ -0,0 +1,48 @@
DESCRIPTION = "NetModule GNSS management tool"
LICENSE = "LGPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3000208d539ec061b899bce1d9ce9404"
RDEPENDS_${PN} += " \
python3-setuptools \
nmubxlib \
python3-systemd \
"
DEPENDS = "python3-setuptools-git-version-native"
inherit setuptools3
inherit gitpkgv
inherit systemd
SYSTEMD_SERVICE_${PN} = "gnss-mgr.service"
inherit allarch
# Package Version (built from tags)
PKGV = "${GITPKGVTAG}"
# Recipe Version
PV = "1.0-git${SRCPV}"
PR = "r1"
SRC_URI = "git://gitlab.com/netmodule/tools/gnssmgr.git;protocol=ssh;user=git;branch=master"
SRCREV = "3d80bb4871ddc2e3e84553a86b767b419b96148f"
S = "${WORKDIR}/git"
PACKAGES =+ "${PN}-test"
SUMMARY_${PN}-test = "Addon to gnss-mgr for testing purposes"
FILES_${PN}-test = "${bindir}/gnss-config-reader"
do_install_append() {
install -d ${D}${sysconfdir}/gnss
install -m 0644 ${S}/config/gnss-neom8.conf ${D}${sysconfdir}/gnss/gnss0.conf
install -d ${D}/${sbindir}/
install -m 0755 ${S}/systemd/gnss-mgr-service.py ${D}${sbindir}/gnss-mgr-service
install -d ${D}/${systemd_unitdir}/system/
install -m 0644 ${S}/systemd/gnss-mgr.service ${D}/${systemd_unitdir}/system/
# Test tool
install -d ${D}${bindir}/
install -m 0755 ${S}/testing/gnss-config-reader.py ${D}${bindir}/gnss-config-reader
}

View File

@ -1,10 +0,0 @@
[Unit]
Description=GPS (Global Positioning System) Daemon
Requires=gpsd.socket
[Service]
EnvironmentFile=/etc/default/gpsd
ExecStart=/usr/sbin/gpsd /dev/ttyS3
[Install]
Also=gpsd.socket

View File

@ -1,15 +0,0 @@
FILESEXTRAPATHS_prepend_am335x-nrhw20 := "${THISDIR}/${PN}:"
FILESEXTRAPATHS_prepend_am335x-nmhw21 := "${THISDIR}/${PN}:"
#SRC_URI_append = " file://gpsd.service"
# overwrite default gpsd.service file with our configuration
TTY_DEVICE = "/dev/ttyS3"
USBAUTO_STATE = "false"
do_install_append () {
#install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service
sed -i 's|DEVICES=""|DEVICES="${TTY_DEVICE}"|g' ${D}/etc/default/gpsd.default
sed -i 's|USBAUTO="true"|USBAUTO="${USBAUTO_STATE}"|g' ${D}/etc/default/gpsd.default
}

View File

@ -1,150 +0,0 @@
# 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 madwifi driver
#CONFIG_DRIVER_MADWIFI=y
#CFLAGS += -I../../madwifi # change to the madwifi source directory
# Driver interface for Prism54 driver
CONFIG_DRIVER_PRISM54=y
# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
CONFIG_LIBNL32=y
# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be
# shipped with your distribution yet. If that is the case, you need to build
# newer libnl version and point the hostapd build to use it.
#LIBNL=/usr/src/libnl
#CFLAGS += -I$(LIBNL)/include
#LIBS += -L$(LIBNL)/lib
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CFLAGS += -I/usr/local/include
#LIBS += -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)
# This version is an experimental implementation based on IEEE 802.11w/D1.0
# draft and is subject to change since the standard has not yet been finalized.
# Driver support is also needed for IEEE 802.11w.
#CONFIG_IEEE80211W=y
# Integrated EAP server
CONFIG_EAP=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-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: Default OpenSSL package does not include support for all the
# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL,
# the OpenSSL library must be patched (openssl-0.9.9-session-ticket.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
# EAP-IKEv2
#CONFIG_EAP_IKEV2=y
# Trusted Network Connect (EAP-TNC)
#CONFIG_EAP_TNC=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., madwifi or FreeBSD/net80211)
CONFIG_DRIVER_RADIUS_ACL=y
# IEEE 802.11n (High Throughput) support
CONFIG_IEEE80211N=y
# IEEE 802.11ac support
CONFIG_IEEE80211AC=y
CONFIG_ACS=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

View File

@ -1,26 +0,0 @@
diff --git a/hostapd-2.6/src/ap/hw_features.c b/hostapd-2.6/src/ap/hw_features.c
index 05431d3..7458d06 100644
--- a/hostapd-2.6/src/ap/hw_features.c
+++ b/hostapd-2.6/src/ap/hw_features.c
@@ -306,10 +306,12 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
iface->secondary_ch = iface->conf->secondary_channel;
if (!oper40) {
wpa_printf(MSG_INFO, "20/40 MHz operation not permitted on "
- "channel pri=%d sec=%d based on overlapping BSSes",
+ "channel pri=%d sec=%d based on overlapping BSSes "
+ "but will force now",
iface->conf->channel,
iface->conf->channel +
iface->conf->secondary_channel * 4);
+#if 0
iface->conf->secondary_channel = 0;
if (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX) {
/*
@@ -318,6 +320,7 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
* are received from associating stations.
*/
}
+#endif
}
res = ieee80211n_allowed_ht40_channel_pair(iface);

View File

@ -1,5 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = " \
file://force-40mhz.patch;patchdir=${S}/../ \
"

View File

@ -0,0 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
DEPENDS = "libnl dbus"
export EXTRA_CFLAGS = " \
${CFLAGS} \
-I${STAGING_DIR_TARGET}/usr/include/libnl3 \
"
do_configure_prepend () {
sed -i 's/CONFIG_LIBNL_TINY=y/#CONFIG_LIBNL_TINY=y/g' ${WORKDIR}/hostapd-full.config
}

View File

@ -0,0 +1,32 @@
DEPENDS = "libnl dbus"
export EXTRA_CFLAGS = " \
${CFLAGS} \
-I${STAGING_DIR_TARGET}/usr/include/libnl3 \
"
SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
SYSTEMD_AUTO_ENABLE = "disable"
FILES_${PN} += "/usr/lib/systemd/system/*"
do_configure_prepend () {
sed -i 's/#CONFIG_CTRL_IFACE_DBUS_NEW=y/CONFIG_CTRL_IFACE_DBUS_NEW=y/g' ${WORKDIR}/wpa_supplicant-full.config
sed -i 's/#CONFIG_CTRL_IFACE_DBUS_INTRO=y/CONFIG_CTRL_IFACE_DBUS_INTRO=y/g' ${WORKDIR}/wpa_supplicant-full.config
sed -i 's/CONFIG_LIBNL_TINY=y/#CONFIG_LIBNL_TINY=y/g' ${WORKDIR}/wpa_supplicant-full.config
}
do_install_append () {
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 ${@bb.utils.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
}

View File

@ -0,0 +1,15 @@
# referes to meta-netmodule-wlan layer
DEPENDS = "libnl"
CFLAGS = " "
LDFLAGS = " "
EXTRA_OEMAKE = "\
-f '${S}/Makefile' \
\
'PREFIX=${prefix}' \
'SBINDIR=${sbindir}' \
'MANDIR=${mandir}' \
"
CFLAGS += "-lnl-genl"

View File

@ -1,73 +0,0 @@
Check for clang compiler since we need to disable
unused-function warning for clang, at same time
pass werror when checking for compiler options if
werror is enabled so spurious options do not get
enabled. Only the ones that are supported by given
compiler are accepted.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
Index: libmbim-1.14.0/m4/compiler-warnings.m4
===================================================================
--- libmbim-1.14.0.orig/m4/compiler-warnings.m4
+++ libmbim-1.14.0/m4/compiler-warnings.m4
@@ -2,10 +2,30 @@ AC_DEFUN([LIBMBIM_COMPILER_WARNINGS],
[AC_ARG_ENABLE(more-warnings,
AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
set_more_warnings="$enableval",set_more_warnings=error)
+
+# Clang throws a lot of warnings when it does not understand a flag. Disable
+# this warning for now so other warnings are visible.
+AC_MSG_CHECKING([if compiling with clang])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#ifndef __clang__
+ not clang
+#endif
+ ]])],
+ [CLANG=yes],
+ [CLANG=no]
+)
+AC_MSG_RESULT([$CLANG])
+AS_IF([test "x$CLANG" = "xyes"], [CLANG_FLAGS=-Wno-error=unused-function])
+CFLAGS="$CFLAGS $CLANG_FLAGS"
+LDFLAGS="$LDFLAGS $CLANG_FLAGS"
+
AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="-Wall -std=gnu89 $CFLAGS"
+ if test "x$set_more_warnings" = xerror; then
+ WERROR="-Werror"
+ fi
for option in -Wmissing-declarations -Wmissing-prototypes \
-Wdeclaration-after-statement -Wstrict-prototypes \
@@ -17,22 +37,23 @@ if test "$GCC" = "yes" -a "$set_more_war
-Wmissing-include-dirs -Waggregate-return \
-Wformat-security; do
SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
+ CFLAGS="$CFLAGS $option $WERROR"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
if test $has_option = no; then
CFLAGS="$SAVE_CFLAGS"
+ else
+ CFLAGS="$SAVE_CFLAGS $option"
fi
AC_MSG_RESULT($has_option)
unset has_option
unset SAVE_CFLAGS
done
+ CFLAGS="$CFLAGS $WERROR"
unset option
- if test "x$set_more_warnings" = xerror; then
- CFLAGS="$CFLAGS -Werror"
- fi
+ unset WERROR
else
AC_MSG_RESULT(no)
fi

View File

@ -1,20 +0,0 @@
SUMMARY = "libmbim is library for talking to WWAN devices by MBIM protocol"
DESCRIPTION = "libmbim is a glib-based library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libmbim/"
LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
DEPENDS = "glib-2.0 libgudev glib-2.0-native"
inherit autotools pkgconfig
SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \
file://clang.patch \
"
SRC_URI[md5sum] = "76ea4d8381989919b1d9b91c818fed80"
SRC_URI[sha256sum] = "c8ca50beeddd4b43309df5b698917268303bf176cea58fe4fe53d5bf0e93fac2"
FILES_${PN}_append = " ${datadir}/bash-completion"

View File

@ -0,0 +1,21 @@
SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol"
DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems and \
devices which speak the Qualcomm MSM Interface (QMI) protocol"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi"
LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
DEPENDS = "glib-2.0 glib-2.0-native"
inherit autotools pkgconfig bash-completion gobject-introspection
SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz"
SRC_URI[sha256sum] = "a71963bb1097a42665287e40a9a36f95b8f9d6d6a4b7a5de22d660328af97cb9"
PACKAGECONFIG ??= "udev mbim"
PACKAGECONFIG[udev] = ",--without-udev,libgudev"
PACKAGECONFIG[mbim] = "--enable-mbim-qmux,--disable-mbim-qmux,libmbim"

View File

@ -1,68 +0,0 @@
From 66d04a3003f5974dbf1acd5b03b4fa7e50a1ccb0 Mon Sep 17 00:00:00 2001
From: Alexandre Bard <alexandre.bard@netmodule.com>
Date: Wed, 12 Dec 2018 15:25:11 +0100
Subject: [PATCH] Use default PDP ctx(4) with LTE and don't try to authenticate
on it
---
plugins/ublox/mm-broadband-bearer-ublox.c | 2 +-
src/mm-broadband-bearer.c | 14 +++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/plugins/ublox/mm-broadband-bearer-ublox.c b/plugins/ublox/mm-broadband-bearer-ublox.c
index 1adcaa2..37338de 100644
--- a/plugins/ublox/mm-broadband-bearer-ublox.c
+++ b/plugins/ublox/mm-broadband-bearer-ublox.c
@@ -530,7 +530,7 @@ check_supported_authentication_methods (GTask *task)
/* Flag whether authentication is required. If it isn't, we won't fail
* connection attempt if the +UAUTHREQ command fails */
- ctx->auth_required = (user && password && allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE);
+ ctx->auth_required = (ctx->cid != 4 && user && password && allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE);
/* If we already cached the support, not do it again */
if (self->priv->allowed_auths != MM_UBLOX_BEARER_ALLOWED_AUTH_UNKNOWN) {
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index 779cd9a..db570bd 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -773,6 +773,7 @@ parse_cid_range (MMBaseModem *modem,
gchar *ip_family_str;
ip_family_str = mm_bearer_ip_family_build_string_from_mask (format->pdp_type);
+ if (ctx->max_cid == 3) ctx->max_cid = 4;
if (ctx->max_cid < format->max_cid) {
cid = ctx->max_cid + 1;
mm_dbg ("Using empty CID %u with PDP type '%s'", cid, ip_family_str);
@@ -810,6 +811,7 @@ parse_pdp_list (MMBaseModem *modem,
GList *pdp_list;
GList *l;
guint cid;
+ gboolean lte_dflt_cid_detected = FALSE;
/* If cancelled, set result error */
if (g_cancellable_is_cancelled (ctx->cancellable)) {
@@ -862,9 +864,19 @@ parse_pdp_list (MMBaseModem *modem,
g_free (ip_family_str);
}
- /* Look for the exact PDP context we want */
+ /* Check if PDP context 4 is present */
for (l = pdp_list; l; l = g_list_next (l)) {
MM3gppPdpContext *pdp = l->data;
+ if(pdp->cid == 4){
+ lte_dflt_cid_detected = TRUE;
+ ctx->use_existing_cid = TRUE;
+ cid = 4;
+ break;
+ }
+ }
+ /* Look for the exact PDP context we want */
+ for (l = pdp_list; l && !lte_dflt_cid_detected; l = g_list_next (l)) {
+ MM3gppPdpContext *pdp = l->data;
if (pdp->pdp_type == ctx->ip_family) {
const gchar *apn;
--
2.1.4

View File

@ -0,0 +1,17 @@
ACTION!="add|change|move|bind", GOTO="mm_netmodule_whitelist_end"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1546", GOTO="mm_netmodule_whitelist"
GOTO="mm_netmodule_whitelist_end"
LABEL="mm_netmodule_whitelist"
# TOBY-L200
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1141", ENV{ID_MM_DEVICE_PROCESS}="1"
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1143", ENV{ID_MM_DEVICE_PROCESS}="1"
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1146", ENV{ID_MM_DEVICE_PROCESS}="1"
# LARA-L6
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1341", ENV{ID_MM_DEVICE_PROCESS}="1"
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1342", ENV{ID_MM_DEVICE_PROCESS}="1"
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1343", ENV{ID_MM_DEVICE_PROCESS}="1"
LABEL="mm_netmodule_whitelist_end"

View File

@ -0,0 +1,57 @@
# NB: backport from meta-oe/master
SUMMARY = "ModemManager is a daemon controlling broadband devices/connections"
DESCRIPTION = "ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and connections"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ModemManager/"
LICENSE = "GPL-2.0 & LGPL-2.1"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
inherit gnomebase gettext systemd vala gobject-introspection bash-completion
DEPENDS = "glib-2.0 libgudev intltool-native libxslt-native"
SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
SRC_URI[sha256sum] = "fe1a26ba51b4bda7abd09ad4dadedd87d8b8154809fc9d88e94f75fdfff19295"
S = "${WORKDIR}/ModemManager-${PV}"
PACKAGECONFIG = "systemd"
PACKAGECONFIG ??= "mbim qmi \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd polkit', d)} \
"
PACKAGECONFIG[at] = "--with-at-command-via-dbus"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,"
PACKAGECONFIG[polkit] = "--with-polkit=yes,--with-polkit=no,polkit"
# Support WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol.
PACKAGECONFIG[mbim] = "--with-mbim,--without-mbim,libmbim"
# Support WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol.
PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi"
EXTRA_OECONF = " \
--with-udev-base-dir=${nonarch_base_libdir}/udev \
"
FILES_${PN} += " \
${datadir}/icons \
${datadir}/polkit-1 \
${datadir}/dbus-1 \
${datadir}/ModemManager \
${libdir}/ModemManager \
${systemd_unitdir}/system \
"
FILES_${PN}-dev += " \
${libdir}/ModemManager/*.la \
"
FILES_${PN}-staticdev += " \
${libdir}/ModemManager/*.a \
"
FILES_${PN}-dbg += "${libdir}/ModemManager/.debug"
SYSTEMD_SERVICE_${PN} = "ModemManager.service"

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