meta-nmrouter: initial commit with a simple test image
This commit contains a valid machine configuration and a recipe for creating a NetModule router image.
This commit is contained in:
commit
8d4835d01a
|
|
@ -0,0 +1,107 @@
|
|||
This layer depends on:
|
||||
|
||||
URI: git://git.yoctoproject.org/poky
|
||||
branch: jethro
|
||||
revision: HEAD
|
||||
|
||||
|
||||
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" and add this layer to conf/bblayers.conf
|
||||
|
||||
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
|
||||
- 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_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.
|
||||
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
|
||||
|
||||
For questions, send an email to <stefan.eichenberger@netmodule.com>
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# We have a conf and classes directory, add to BBPATH
|
||||
BBPATH .= ":${LAYERDIR}"
|
||||
|
||||
# We have recipes-* directories, add to BBFILES
|
||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "nrhw15"
|
||||
BBFILE_PATTERN_nrhw15 = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_nrhw15 = "1"
|
||||
|
||||
# This should only be incremented on significant changes that will
|
||||
# cause compatibility issues with other layers
|
||||
LAYERVERSION_nrhw15 = "1"
|
||||
|
||||
LAYERDEPENDS_nrhw15 = "core"
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: AM437x EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM437x EVM
|
||||
|
||||
require conf/machine/include/armada.inc
|
||||
|
||||
DEFAULTTUNE = "armv7a"
|
||||
|
||||
IMAGE_FSTYPES += "tar.gz"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: NB2800
|
||||
#@DESCRIPTION: Machine configuration for the Armada based NB2800
|
||||
|
||||
require conf/machine/include/armada.inc
|
||||
|
||||
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
|
||||
IMAGE_CLASSES += "image_types_uboot"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
|
||||
|
||||
KERNEL_DEFCONFIG = "nbhw_defconfig"
|
||||
KERNEL_DEVICETREE = "armada-385-nbhw17-nb2800.dtb"
|
||||
|
||||
SRCREV_pn-linux-netmodule ?= "nbhw-mainline"
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-netmodule"
|
||||
PREFERRED_VERSION_linux ?= "4.5%"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: ARMADA 385 for NBHW17
|
||||
#@DESCRIPTION: Machine configuration for the Armada based NBHW17
|
||||
|
||||
require conf/machine/include/armada.inc
|
||||
|
||||
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
|
||||
IMAGE_CLASSES += "image_types_uboot"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: AM437x EVM
|
||||
#@DESCRIPTION: Machine configuration for the TI AM437x EVM
|
||||
|
||||
require conf/machine/include/armada.inc
|
||||
|
||||
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
|
||||
IMAGE_CLASSES += "image_types_uboot"
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
SOC_FAMILY = "armada"
|
||||
require conf/machine/include/soc-family.inc
|
||||
|
||||
DEFAULTTUNE ?= "cortexa9thf-neon"
|
||||
require conf/machine/include/tune-cortexa9.inc
|
||||
|
||||
# Default providers, may need to override for specific machines
|
||||
PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
|
||||
PREFERRED_PROVIDER_u-boot = "u-boot"
|
||||
|
||||
KERNEL_IMAGETYPE = "zImage"
|
||||
|
||||
UBOOT_ARCH = "arm"
|
||||
UBOOT_MACHINE = "mvebu"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x80008000"
|
||||
UBOOT_LOADADDRESS = "0x80008000"
|
||||
|
||||
# List common SoC features, may need to add touchscreen for specific machines
|
||||
MACHINE_FEATURES = "kernel26 usbgadget usbhost vfat ext2 ext4 ethernet"
|
||||
|
|
@ -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 @@
|
|||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
SRCREV = "40e9ae84308274b91ac069fba2f1a290fcdc83fc"
|
||||
|
||||
LIC_FILES_CHKSUM = "\
|
||||
file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
|
||||
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
|
||||
file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
|
||||
file://LICENCE.ca0132;md5=209b33e66ee5be0461f13d31da392198 \
|
||||
file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \
|
||||
file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed \
|
||||
file://LICENCE.ene_firmware;md5=ed67f0f62f8f798130c296720b7d3921 \
|
||||
file://LICENCE.fw_sst_0f28;md5=6353931c988ad52818ae733ac61cd293 \
|
||||
file://LICENCE.go7007;md5=c0bb9f6aaaba55b0529ee9b30aa66beb \
|
||||
file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \
|
||||
file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \
|
||||
file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \
|
||||
file://LICENCE.iwlwifi_firmware;md5=3fd842911ea93c29cd32679aa23e1c88 \
|
||||
file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
|
||||
file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
|
||||
file://LICENCE.mwl8335;md5=9a6271ee0e644404b2ff3c61fd070983 \
|
||||
file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
|
||||
file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
|
||||
file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
|
||||
file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \
|
||||
file://LICENCE.r8a779x_usb3;md5=4c1671656153025d7076105a5da7e498 \
|
||||
file://LICENCE.ralink_a_mediatek_company_firmware;md5=728f1a85fd53fd67fa8d7afb080bc435 \
|
||||
file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
|
||||
file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \
|
||||
file://LICENCE.tda7706-firmware.txt;md5=835997cf5e3c131d0dddd695c7d9103e \
|
||||
file://LICENCE.ti-connectivity;md5=186e7a43cf6c274283ad81272ca218ea \
|
||||
file://LICENCE.ueagle-atm4-firmware;md5=4ed7ea6b507ccc583b9d594417714118 \
|
||||
file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \
|
||||
file://LICENCE.wl1251;md5=ad3f81922bb9e197014bb187289d3b5b \
|
||||
file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
|
||||
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
|
||||
file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
|
||||
file://LICENSE.amd-ucode;md5=3a0de451253cc1edbf30a3c621effee3 \
|
||||
file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \
|
||||
file://LICENSE.radeon;md5=6c7f97c6c62bdd9596d0238bb205118c \
|
||||
file://LICENCE.siano;md5=602c79ae3f98f1e73d880fd9f940a418 \
|
||||
"
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
# Support for device tree generation
|
||||
FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*"
|
||||
|
||||
python __anonymous () {
|
||||
d.appendVar("PACKAGES", " kernel-devicetree")
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
if test -n "${KERNEL_DEVICETREE}"; then
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
if echo ${DTB} | grep -q '/dts/'; then
|
||||
bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
|
||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
||||
fi
|
||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
||||
DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||
DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
|
||||
oe_runmake ${DTB}
|
||||
if [ ! -e "${DTB_PATH}" ]; then
|
||||
DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
|
||||
fi
|
||||
install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
do_deploy_append() {
|
||||
if test -n "${KERNEL_DEVICETREE}"; then
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
if echo ${DTB} | grep -q '/dts/'; then
|
||||
bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
|
||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
||||
fi
|
||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
||||
DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||
DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
|
||||
if [ ! -e "${DTB_PATH}" ]; then
|
||||
DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
|
||||
fi
|
||||
install -d ${DEPLOYDIR}
|
||||
install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
|
||||
cd ${DEPLOYDIR}
|
||||
ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb
|
||||
cd -
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst_kernel-devicetree () {
|
||||
cd /${KERNEL_IMAGEDEST}
|
||||
for DTB_FILE in ${KERNEL_DEVICETREE}
|
||||
do
|
||||
DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
|
||||
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||
update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postrm_kernel-devicetree () {
|
||||
cd /${KERNEL_IMAGEDEST}
|
||||
for DTB_FILE in ${KERNEL_DEVICETREE}
|
||||
do
|
||||
DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
|
||||
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||
update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
|
||||
done
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# Copyright (C) 2013 NetModule AG
|
||||
|
||||
inherit kernel
|
||||
require linux-dtb.inc
|
||||
|
||||
DESCRIPTION = "Linux kernel for various NetModule hardware"
|
||||
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
||||
|
||||
# Customer repo
|
||||
SRC_URI = "git://git.netmodule.intranet/usr/se/linux;protocol=ssh;user=gitolite;nobranch=1"
|
||||
|
||||
SRCREV ?= "master"
|
||||
PV = "4.5-${SRCPV}"
|
||||
PR = "r0"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
INSANE_SKIP_${PN} += "version-going-backwards"
|
||||
|
||||
#If a KERNEL_DEFCONFIG is specified, the defconfig specified in SRC_URI will be overwritten!
|
||||
do_configure_append(){
|
||||
if [ "${KERNEL_DEFCONFIG}" != "" ]; then
|
||||
oe_runmake ${KERNEL_DEFCONFIG}
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_append(){
|
||||
if [ "${KERNEL_DEVICETREE}" != "" ]; then
|
||||
ln -s devicetree-${DTB_SYMLINK_NAME}.dtb ${D}/${KERNEL_IMAGEDEST}/devicetree.dtb
|
||||
fi
|
||||
if [ "${KERNEL_IMAGETYPE}" = "uImage" ]; then
|
||||
ln -s ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}
|
||||
fi
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue