Compare commits
36 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1f08b06381 | |
|
|
31f86005b3 | |
|
|
e578b54105 | |
|
|
1658fc3621 | |
|
|
2713389914 | |
|
|
331ff2291b | |
|
|
4f7c0fece9 | |
|
|
92654f1907 | |
|
|
0e0ae3254c | |
|
|
b98dbc71a3 | |
|
|
40aca5599e | |
|
|
5fd5028063 | |
|
|
becbb56002 | |
|
|
4f1be4fe1b | |
|
|
8cea86285c | |
|
|
50723f08d9 | |
|
|
fa843b5729 | |
|
|
e74942f372 | |
|
|
a44eb7a9f6 | |
|
|
0f50b0ad35 | |
|
|
b033cd3f9d | |
|
|
0ab0535705 | |
|
|
d146532b31 | |
|
|
c3135842b5 | |
|
|
5116f1802d | |
|
|
011fc23c21 | |
|
|
68af9813d6 | |
|
|
c001bc907f | |
|
|
56295e2ed0 | |
|
|
d0e8bfaf25 | |
|
|
1f23dae1db | |
|
|
064ed29756 | |
|
|
4aa5842711 | |
|
|
4e12267cf4 | |
|
|
e2dba2dc79 | |
|
|
f1f908ce59 |
127
README
127
README
|
|
@ -1,11 +1,134 @@
|
||||||
This layer depends on:
|
This layer depends on:
|
||||||
|
|
||||||
URI: git://git.yoctoproject.org/poky
|
URI: git://git.yoctoproject.org/poky
|
||||||
branch: warrior
|
branch: jethro
|
||||||
revision: HEAD
|
revision: HEAD
|
||||||
|
|
||||||
URI: git://git.openembedded.org/meta-openembedded
|
URI: git://git.openembedded.org/meta-openembedded
|
||||||
branch: warrior
|
branch: jethro
|
||||||
revision: HEAD
|
revision: HEAD
|
||||||
layers: meta-python, meta-oe, meta-networking
|
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>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
[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
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
# 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}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
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
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
WKS_FILE_sota = "sdimage-sota-nmhw21.wks"
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
WKS_FILE_sota = "sdimage-sota-am335x.wks"
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
WKS_FILE_sota = "sdimage-sota-armada-385.wks"
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
WKS_FILE_sota = "sdimage-sota-nmhw23.wks"
|
|
||||||
|
|
@ -5,10 +5,6 @@ BBPATH .= ":${LAYERDIR}"
|
||||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||||
${LAYERDIR}/recipes-*/*/*.bbappend"
|
${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_COLLECTIONS += "netmodule-bsp"
|
||||||
BBFILE_PATTERN_netmodule-bsp = "^${LAYERDIR}/"
|
BBFILE_PATTERN_netmodule-bsp = "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_netmodule-bsp = "10"
|
BBFILE_PRIORITY_netmodule-bsp = "10"
|
||||||
|
|
@ -19,5 +15,4 @@ LAYERVERSION_netmodule-bsp = "1"
|
||||||
|
|
||||||
LAYERDEPENDS_netmodule-bsp = "core"
|
LAYERDEPENDS_netmodule-bsp = "core"
|
||||||
|
|
||||||
LAYERSERIES_COMPAT_netmodule-bsp = "dunfell"
|
LAYERSERIES_COMPAT_netmodule-bsp = "sumo"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
#@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 \
|
|
||||||
"
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#@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"
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
#@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 = ""
|
|
||||||
|
|
@ -4,35 +4,25 @@
|
||||||
|
|
||||||
require conf/machine/include/ti33x.inc
|
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"
|
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
||||||
|
|
||||||
KERNEL_DEVICETREE_TO_USE = "${HW21_DT}"
|
KERNEL_DEFCONFIG ??= "am335x-nmhw21_defconfig"
|
||||||
|
KERNEL_DEVICETREE = "am335x-nmhw21-prod1.dtb \
|
||||||
|
"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti33x"
|
SOTA_MACHINE = "${MACHINE}"
|
||||||
UBOOT_MACHINE = "am335x_nmhw21_defconfig"
|
|
||||||
|
|
||||||
USE_VT = "0"
|
KERNEL_CLASSES_append = " kernel-fitimage"
|
||||||
|
|
||||||
SERIAL_CONSOLES ?= "115200;ttyS2"
|
KERNEL_IMAGETYPE = "zImage"
|
||||||
|
KERNEL_IMAGETYPES = "fitImage zImage"
|
||||||
WWAN_NBR = "1"
|
KERNEL_IMAGETYPE_sota = "fitImage"
|
||||||
WWAN_VENDORS = "ublox"
|
KERNEL_IMAGETYPES_sota = "fitImage"
|
||||||
|
UBOOT_ENTRYPOINT ?= "0x80008000"
|
||||||
MACHINE_FEATURES += " \
|
IMAGE_BOOT_FILES = "MLO u-boot.img"
|
||||||
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"
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
#@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 \
|
|
||||||
"
|
|
||||||
|
|
||||||
|
|
@ -4,24 +4,23 @@
|
||||||
|
|
||||||
require conf/machine/include/ti33x.inc
|
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"
|
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
||||||
|
|
||||||
KERNEL_DEVICETREE_TO_USE = "${HW16_DT}"
|
KERNEL_DEFCONFIG ??= "nrhw16_defconfig"
|
||||||
|
KERNEL_DEVICETREE = "am335x-nrhw16.dtb \
|
||||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti33x"
|
am335x-nrhw16-prod2.dtb \
|
||||||
UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig"
|
am335x-nrhw16-prod3.dtb \
|
||||||
|
am335x-nrhw16-prod4.dtb \
|
||||||
USE_VT = "0"
|
am335x-nrhw16-prod5.dtb \
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
||||||
|
|
@ -4,28 +4,25 @@
|
||||||
|
|
||||||
require conf/machine/include/ti33x.inc
|
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"
|
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
||||||
|
|
||||||
KERNEL_DEVICETREE_TO_USE = "${HW20_DT}"
|
KERNEL_DEFCONFIG ??= "am335x-nrhw20_defconfig"
|
||||||
|
KERNEL_DEVICETREE = "am335x-nrhw20-prod1.dtb \
|
||||||
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 \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
|
SOTA_MACHINE = "${MACHINE}"
|
||||||
|
|
||||||
|
KERNEL_CLASSES_append = " kernel-fitimage"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
|
||||||
|
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nrhw20-v1"
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
#@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 \
|
|
||||||
"
|
|
||||||
|
|
@ -4,6 +4,9 @@
|
||||||
|
|
||||||
require conf/machine/include/armada.inc
|
require conf/machine/include/armada.inc
|
||||||
|
|
||||||
|
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
|
||||||
|
IMAGE_CLASSES += "image_types"
|
||||||
|
|
||||||
SERIAL_CONSOLE = "115200 ttyS1"
|
SERIAL_CONSOLE = "115200 ttyS1"
|
||||||
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
#@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"
|
||||||
|
|
||||||
|
|
@ -4,22 +4,26 @@
|
||||||
|
|
||||||
require conf/machine/include/armada.inc
|
require conf/machine/include/armada.inc
|
||||||
|
|
||||||
|
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
|
||||||
|
IMAGE_CLASSES += "image_types"
|
||||||
|
|
||||||
SERIAL_CONSOLE = "115200 ttyS1"
|
SERIAL_CONSOLE = "115200 ttyS1"
|
||||||
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
||||||
|
|
||||||
KERNEL_DEVICETREE_TO_USE = "${HW18_DT}"
|
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_MODULE_PROBECONF += "ath10k_pci"
|
KERNEL_MODULE_PROBECONF += "ath10k_pci"
|
||||||
module_conf_ath10k_pci = "options ath10k_pci irq_mode=1"
|
module_conf_ath10k_pci = "options ath10k_pci irq_mode=1"
|
||||||
|
|
||||||
UBOOT_MACHINE = "armada-385-hw18_defconfig"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
|
||||||
IMAGE_BOOT_FILES = "u-boot-armada-385-hw18.kwb"
|
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-armada-385-nrhw18-v2"
|
||||||
|
IMAGE_BOOT_FILES = "u-boot-armada-385-nrhw18-v2.kwb"
|
||||||
|
|
||||||
DEFAULT_ETH = "eth2"
|
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"
|
||||||
MACHINE_FEATURES += " \
|
|
||||||
fpga \
|
|
||||||
atsha \
|
|
||||||
wifi \
|
|
||||||
ath-wifi \
|
|
||||||
"
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,8 @@
|
||||||
|
|
||||||
require conf/machine/include/armada.inc
|
require conf/machine/include/armada.inc
|
||||||
|
|
||||||
|
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
|
||||||
|
IMAGE_CLASSES += "image_types"
|
||||||
|
|
||||||
SERIAL_CONSOLE = "115200 ttyS0"
|
SERIAL_CONSOLE = "115200 ttyS0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ SOTA_MACHINE = "${MACHINE}"
|
||||||
KERNEL_CLASSES_append = " kernel-fitimage"
|
KERNEL_CLASSES_append = " kernel-fitimage"
|
||||||
|
|
||||||
KERNEL_IMAGETYPE = "Image"
|
KERNEL_IMAGETYPE = "Image"
|
||||||
|
KERNEL_IMAGETYPES = "fitImage Image"
|
||||||
|
KERNEL_IMAGETYPE_sota = "fitImage"
|
||||||
|
KERNEL_IMAGETYPES_sota = "fitImage"
|
||||||
UBOOT_ENTRYPOINT ?= "0x80020000"
|
UBOOT_ENTRYPOINT ?= "0x80020000"
|
||||||
UBOOT_MACHINE = "imx8qxp_mek_defconfig"
|
UBOOT_MACHINE = "imx8qxp_mek_defconfig"
|
||||||
IMAGE_BOOT_FILES = "flash.bin"
|
IMAGE_BOOT_FILES = "flash.bin"
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
#@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"
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
#@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"
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
SOC_FAMILY = "armada"
|
SOC_FAMILY = "armada"
|
||||||
require conf/machine/include/soc-family.inc
|
require conf/machine/include/soc-family.inc
|
||||||
require netmodule-hardware.inc
|
|
||||||
|
|
||||||
DEFAULTTUNE ?= "cortexa9thf-neon"
|
DEFAULTTUNE ?= "cortexa9thf-neon"
|
||||||
require conf/machine/include/tune-cortexa9.inc
|
require conf/machine/include/tune-cortexa9.inc
|
||||||
|
|
||||||
# Default providers, may need to override for specific machines
|
# Default providers, may need to override for specific machines
|
||||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-armada"
|
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||||
PREFERRED_PROVIDER_u-boot = "u-boot-armada"
|
PREFERRED_PROVIDER_u-boot = "u-boot"
|
||||||
|
|
||||||
|
KERNEL_IMAGETYPE = "zImage"
|
||||||
|
|
||||||
UBOOT_ARCH = "arm"
|
UBOOT_ARCH = "arm"
|
||||||
UBOOT_MACHINE = "mvebu_db_armada8k_config"
|
UBOOT_MACHINE = "mvebu_db_armada8k_config"
|
||||||
|
|
@ -16,22 +17,4 @@ UBOOT_ENTRYPOINT = "0x13000000"
|
||||||
UBOOT_LOADADDRESS = "0x13000000"
|
UBOOT_LOADADDRESS = "0x13000000"
|
||||||
|
|
||||||
# List common SoC features, may need to add touchscreen for specific machines
|
# List common SoC features, may need to add touchscreen for specific machines
|
||||||
MACHINE_FEATURES = "kernel26 usbgadget usbhost pci vfat ext2 ext4 ethernet"
|
MACHINE_FEATURES = "kernel26 usbgadget usbhost 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}"
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
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}"
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${TUNE_PKGARCH}/kernel-source"
|
|
||||||
STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${TUNE_PKGARCH}/kernel-build-artifacts"
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
SOC_FAMILY = "ti33x"
|
SOC_FAMILY = "ti33x"
|
||||||
require conf/machine/include/soc-family.inc
|
require conf/machine/include/soc-family.inc
|
||||||
require netmodule-hardware.inc
|
|
||||||
|
|
||||||
DEFAULTTUNE ?= "cortexa8thf-neon"
|
DEFAULTTUNE ?= "cortexa8thf-neon"
|
||||||
require conf/machine/include/tune-cortexa8.inc
|
require conf/machine/include/tune-cortexa8.inc
|
||||||
|
|
@ -21,8 +20,7 @@ GUI_MACHINE_CLASS = "bigscreen"
|
||||||
MACHINE_KERNEL_PR = "r22"
|
MACHINE_KERNEL_PR = "r22"
|
||||||
|
|
||||||
# Default providers, may need to override for specific machines
|
# Default providers, may need to override for specific machines
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-netmodule"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline"
|
||||||
PREFERRED_VERSION_linux-netmodule ?= "git-5.10"
|
|
||||||
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
|
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
|
||||||
PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
|
PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
|
||||||
|
|
||||||
|
|
@ -33,37 +31,10 @@ UBOOT_MACHINE ?= "am335x_evm_config"
|
||||||
|
|
||||||
UBOOT_ENTRYPOINT ?= "0x80008000"
|
UBOOT_ENTRYPOINT ?= "0x80008000"
|
||||||
UBOOT_LOADADDRESS ?= "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
|
# Use the expected value of the ubifs filesystem's volume name in the kernel
|
||||||
# and u-boot.
|
# and u-boot.
|
||||||
UBI_VOLNAME = "rootfs"
|
UBI_VOLNAME = "rootfs"
|
||||||
|
|
||||||
# List common SoC features, may need to add touchscreen for specific machines
|
# List common SoC features, may need to add touchscreen for specific machines
|
||||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost pci vfat ext2 screen alsa ethernet sgx"
|
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost 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}"
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
### 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])
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# 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
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
# 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)"
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
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
|
|
||||||
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
# 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)"
|
|
||||||
|
|
@ -1,179 +0,0 @@
|
||||||
# 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)"
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
# 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
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# 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"
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
Custom build
|
|
||||||
TODO: Integrade https://git.netmodule.intranet/hancock/imx8-scfw as a recipe
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,44 +0,0 @@
|
||||||
# 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)"
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
# 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)"
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
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/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,26 +1,19 @@
|
||||||
DESCRIPTION = "Fpga images"
|
DESCRIPTION = "Fpga image for NRHW18"
|
||||||
LICENSE = "Proprietary"
|
LICENSE = "Proprietary"
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
|
||||||
|
|
||||||
inherit deploy
|
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "(armada-385-hw17|armada-385-nrhw18)"
|
SRC_URI_armada-385-nrhw18 = "file://LG00000000"
|
||||||
SRC_URI = "file://LG00000000"
|
|
||||||
|
|
||||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
DEPENDS = "bc-native"
|
||||||
|
SRCREV = "${AUTOREV}"
|
||||||
|
|
||||||
PV = "1.0.0"
|
PV = "1.0.0"
|
||||||
|
|
||||||
|
|
||||||
do_install () {
|
do_install_armada-385-nrhw18 () {
|
||||||
install -d ${D}/logic
|
install -d ${D}/logic
|
||||||
install -m 0644 ${WORKDIR}/LG00000000 ${D}/logic/
|
install -m 0644 ${WORKDIR}/LG00000000 ${D}/logic/
|
||||||
}
|
}
|
||||||
|
|
||||||
do_deploy () {
|
|
||||||
cp ${WORKDIR}/LG00000000 ${DEPLOYDIR}/fpga-image-${MACHINE}
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES_${PN} += "/logic/LG00000000"
|
FILES_${PN} += "/logic/LG00000000"
|
||||||
|
|
||||||
addtask deploy before do_build after do_compile
|
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +0,0 @@
|
||||||
chip "da9063-*"
|
|
||||||
label in0 "main-voltage"
|
|
||||||
ignore in1
|
|
||||||
ignore in2
|
|
||||||
label in3 "wwan0-supply"
|
|
||||||
label in4 "rtc-voltage"
|
|
||||||
label temp1 "tjunc"
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
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
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
am335x-hw26
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
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"
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
chip "da9063-*"
|
|
||||||
label in0 "main-voltage"
|
|
||||||
ignore in1
|
|
||||||
ignore in2
|
|
||||||
ignore in3
|
|
||||||
label in4 "rtc-voltage"
|
|
||||||
label temp1 "tjunc"
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
|
||||||
|
|
||||||
PACKAGECONFIG = ""
|
|
||||||
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
After=tibluetooth.service
|
After=tibluetooth.service
|
||||||
After=jody-w1-bt-init.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
ExecStart=/usr/bin/mac-address-set
|
||||||
ExecStart=/usr/bin/mac-address-set -b -l 1
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
@ -1,378 +1,25 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
help_text='
|
eth_mac=$(ip addr show eth0 | awk '$1 == "link/ether" {gsub(/\/.*$/, "", $2); print $2}')
|
||||||
This script configures bluetooth and wifi mac addresses
|
wlan_mac=$(echo $eth_mac | sed -r "s/^(.{9})50(.{6})/\170\2/")
|
||||||
It is using the eth0 mac address as reference and then applying
|
bt_addr=$(echo $eth_mac | sed -r "s/^(.{9})50(.{6})/\180\2/")
|
||||||
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
|
# Set WLAN address
|
||||||
|
ifconfig wlan0 | grep UP > /dev/null
|
||||||
|
up=$?
|
||||||
|
if [[ $up == 0 ]]; then
|
||||||
|
ifconfig wlan0 down
|
||||||
|
fi
|
||||||
|
ip link set wlan0 address $wlan_mac
|
||||||
|
|
||||||
It currently supports two schemes:
|
if [[ $up == 0 ]]; then
|
||||||
|
ifconfig wlan0 up
|
||||||
* 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
|
fi
|
||||||
|
|
||||||
main $@
|
|
||||||
exit $?
|
# Set BT address
|
||||||
|
bt_addr_rev=$(echo $bt_addr | sed -r "s/^(.{2}):(.{2}):(.{2}):(.{2}):(.{2}):(.{2})/\6:\5:\4:\3:\2:\1/")
|
||||||
|
bdaddr $bt_addr_rev
|
||||||
|
hciconfig hci0 reset
|
||||||
|
systemctl restart bluetooth
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Before=NetworkManager.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
RemainAfterExit=yes
|
|
||||||
ExecStart=/usr/bin/mac-address-set -w -l 1
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,8 +9,7 @@ PR = "r2"
|
||||||
inherit systemd
|
inherit systemd
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
file://wlan-address-set.service \
|
file://mac-address-set.service \
|
||||||
file://bt-address-set.service \
|
|
||||||
file://mac-address-set.sh \
|
file://mac-address-set.sh \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
@ -18,7 +17,7 @@ S = "${WORKDIR}"
|
||||||
|
|
||||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||||
|
|
||||||
SYSTEMD_SERVICE_${PN} = "wlan-address-set.service bt-address-set.service"
|
SYSTEMD_SERVICE_${PN} = "mac-address-set.service"
|
||||||
SYSTEMD_AUTO_ENABLE ?= "enable"
|
SYSTEMD_AUTO_ENABLE ?= "enable"
|
||||||
|
|
||||||
FILES_${PN}_append = " \
|
FILES_${PN}_append = " \
|
||||||
|
|
@ -26,17 +25,9 @@ FILES_${PN}_append = " \
|
||||||
/usr \
|
/usr \
|
||||||
"
|
"
|
||||||
|
|
||||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
install -d ${D}${systemd_unitdir}/system/
|
install -d ${D}${systemd_unitdir}/system/
|
||||||
install -m 0644 wlan-address-set.service ${D}${systemd_unitdir}/system/
|
install -m 0644 mac-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 -d ${D}/usr/bin
|
||||||
install -m 0755 mac-address-set.sh ${D}/usr/bin/mac-address-set
|
install -m 0755 mac-address-set.sh ${D}/usr/bin/mac-address-set
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
# 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.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
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}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
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 ?= "5c5c0b98fea0e9514d56de05c2033440608a53ef"
|
||||||
|
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}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
require u-boot-nm.inc
|
||||||
|
|
||||||
|
# Force machine configuration for this recipe
|
||||||
|
UBOOT_MACHINE = "am335x_nbhw16_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 ?= "a6f157c6dbd048b452c7e2640215c55be658780c"
|
||||||
|
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}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
require u-boot-am335x-nrhw16-v1_git.bb
|
||||||
|
|
||||||
|
# Force machine configuration for this recipe
|
||||||
|
UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig"
|
||||||
|
|
||||||
|
SRCREV ?= "${AUTOREV}"
|
||||||
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
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 ?= "88720cc579ddc712aa73a61e3426fe4bd1b8628e"
|
||||||
|
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}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
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}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
# 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
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
|
SRC_URI += "file://fw_env.config"
|
||||||
|
|
||||||
|
do_install_prepend() {
|
||||||
|
cp -f ${WORKDIR}/fw_env.config ${S}/tools/env/
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
require u-boot-nm.inc
|
||||||
|
|
||||||
|
DEPENDS += "bc-native coreutils-native dtc-native"
|
||||||
|
|
||||||
|
# Force machine configuration for this recipe
|
||||||
|
UBOOT_MACHINE = "imx8qxp_mek_defconfig"
|
||||||
|
|
||||||
|
# Be aware github/netmodule git
|
||||||
|
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot;protocol=ssh;user=gitea;branch=2019.04/standard/imx8-mek"
|
||||||
|
|
||||||
|
# License
|
||||||
|
LICENSE = "GPLv2+"
|
||||||
|
LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"
|
||||||
|
|
||||||
|
# Should be updated when a new U-Boot Version is available
|
||||||
|
SRCREV ?= "${AUTOREV}"
|
||||||
|
PV = "v2019.04pre+git${SRCPV}"
|
||||||
|
|
||||||
|
UBOOT_BINARY = "flash.bin"
|
||||||
|
UBOOT_MAKE_TARGET = "flash.bin"
|
||||||
|
|
||||||
|
do_compile() {
|
||||||
|
export ATF_LOAD_ADDR=0x80000000
|
||||||
|
export BL33_LOAD_ADDR=0x80020000
|
||||||
|
oe_runmake ${UBOOT_MACHINE}
|
||||||
|
# TODO: move this to U-Boot defconfig
|
||||||
|
echo "CONFIG_CMD_EXT2=y" >> ${B}/.config
|
||||||
|
echo "CONFIG_CMD_EXT4=y" >> ${B}/.config
|
||||||
|
echo "CONFIG_CMD_EXT4_WRITE=y" >> ${B}/.config
|
||||||
|
oe_runmake ${UBOOT_MAKE_TARGET}
|
||||||
|
dd if=${S}/u-boot.itb of=${S}/flash.bin bs=512 seek=528
|
||||||
|
}
|
||||||
|
|
||||||
|
do_deploy_append() {
|
||||||
|
cp ${S}/flash.bin ${DEPLOYDIR}/flash.bin
|
||||||
|
}
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
# 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)"
|
|
||||||
|
|
@ -1,13 +1,290 @@
|
||||||
require recipes-bsp/u-boot/u-boot.inc
|
SUMMARY = "Universal Boot Loader for embedded devices"
|
||||||
|
HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
|
||||||
|
|
||||||
LICENSE = "GPLv2+"
|
LICENSE = "GPLv2+"
|
||||||
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
|
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
B = "${WORKDIR}/build"
|
|
||||||
do_configure[cleandirs] = "${B}"
|
|
||||||
UBOOT_INITIAL_ENV = ""
|
|
||||||
|
|
||||||
# This variable is set to "0" in distro in order to get reproducible build
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||||
# It is however not needed for uboot and unsetting it allows us to keep the build date in uboot output
|
|
||||||
unset SOURCE_DATE_EPOCH
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
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}
|
|
||||||
}
|
|
||||||
|
|
@ -1,87 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
[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
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
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}
|
|
||||||
}
|
|
||||||
|
|
@ -1,141 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
[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
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
[default]
|
|
||||||
is-placeholder-firmware=true
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[default]
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
# 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}
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
[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
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
# 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/
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
[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
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
FILESEXTRAPATHS_prepend_am335x-nrhw20 := "${THISDIR}/${PN}:"
|
||||||
|
FILESEXTRAPATHS_prepend_am335x-nmhw21 := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
|
|
||||||
|
SRC_URI =+ "git://git.netmodule.intranet/nmsw/gpsd.git;protocol=ssh;user=gitea;branch=imu-integration"
|
||||||
|
SRC_URI_remove = "http://download.savannah.gnu.org/releases/gpsd/gpsd-3.17.tar.gz"
|
||||||
|
|
||||||
|
# overwrite default gpsd.service file with our configuration
|
||||||
|
SRCREV = "${AUTOREV}"
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
# 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
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
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);
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
|
SRC_URI_append = " \
|
||||||
|
file://force-40mhz.patch;patchdir=${S}/../ \
|
||||||
|
"
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
# referes to meta-netmodule-wlan layer
|
|
||||||
DEPENDS = "libnl"
|
|
||||||
|
|
||||||
CFLAGS = " "
|
|
||||||
LDFLAGS = " "
|
|
||||||
|
|
||||||
EXTRA_OEMAKE = "\
|
|
||||||
-f '${S}/Makefile' \
|
|
||||||
\
|
|
||||||
'PREFIX=${prefix}' \
|
|
||||||
'SBINDIR=${sbindir}' \
|
|
||||||
'MANDIR=${mandir}' \
|
|
||||||
"
|
|
||||||
|
|
||||||
CFLAGS += "-lnl-genl"
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
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"
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
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"
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
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"
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
# 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
Loading…
Reference in New Issue