added my Recipes
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Enable FLASH utilities
|
||||
CONFIG_FLASHCP=y
|
||||
CONFIG_FLASH_LOCK=y
|
||||
CONFIG_FLASH_UNLOCK=y
|
||||
CONFIG_FLASH_ERASEALL=y
|
||||
|
||||
# Enable tools to fill ARP table (991 cameras)
|
||||
CONFIG_ARP=y
|
||||
CONFIG_ARPING=y
|
||||
|
||||
# enable ether_wake tools
|
||||
CONFIG_ETHER_WAKE=y
|
||||
@@ -0,0 +1,3 @@
|
||||
FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
|
||||
|
||||
SRC_URI:append = " file://busybox-openstlinux.cfg "
|
||||
@@ -0,0 +1,2 @@
|
||||
echo "Linux version <KERNEL_VERSION> - NO TRACE"
|
||||
echo
|
||||
26
meta-st/meta-st-openstlinux/recipes-core/notrace/notrace.bb
Normal file
26
meta-st/meta-st-openstlinux/recipes-core/notrace/notrace.bb
Normal file
@@ -0,0 +1,26 @@
|
||||
# Copyright (C) 2023, STMicroelectronics - All Rights Reserved
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
SUMMARY = "Add script in case no trace was asked"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
SRC_URI = "file://${NOTRACE_SCRIPT}"
|
||||
|
||||
NOTRACE_SCRIPT = "notrace.sh"
|
||||
|
||||
inherit linux-kernel-base
|
||||
KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}") or '0.0'}"
|
||||
|
||||
do_configure[depends] += "virtual/kernel:do_shared_workdir"
|
||||
do_configure() {
|
||||
cp "${WORKDIR}/${NOTRACE_SCRIPT}" "${S}/${NOTRACE_SCRIPT}"
|
||||
sed -i 's/<KERNEL_VERSION>/'"${KERNEL_VERSION}"'/' "${S}/${NOTRACE_SCRIPT}"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sysconfdir}/profile.d
|
||||
if ${@bb.utils.contains('ST_DEBUG_TRACE','0','true','false',d)}; then
|
||||
install -m 0755 ${S}/${NOTRACE_SCRIPT} ${D}${sysconfdir}/profile.d/
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# Due to GPLv3 limitation, gdbserver are removed of package group
|
||||
#
|
||||
RDEPENDS:${PN}:remove = "\
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'gplv3', '', 'gdbserver', d)} \
|
||||
"
|
||||
@@ -0,0 +1,5 @@
|
||||
RDEPENDS:${PN}:remove = "${LTTNGMODULES}"
|
||||
|
||||
RRECOMMENDS:${PN}:remove = "${@bb.utils.contains('DISTRO_FEATURES', 'gplv3', '', '${PERF}', d)}"
|
||||
|
||||
#RDEPENDS:append += "oprofile"
|
||||
@@ -0,0 +1,47 @@
|
||||
# Copyright (C) 2014, STMicroelectronics - All Rights Reserved
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
SUMMARY = "Basic splash screen which display a picture on DRM/KMS"
|
||||
LICENSE = "MIT"
|
||||
DEPENDS = "libdrm pkgconfig-native libpng pixman"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
SRC_URI = " \
|
||||
file://image_header.h \
|
||||
file://basic_splash_drm.c \
|
||||
file://Makefile \
|
||||
file://psplash-drm-quit \
|
||||
"
|
||||
|
||||
SRC_URI += " file://psplash-drm-start.service "
|
||||
|
||||
PROVIDES = "virtual/psplash"
|
||||
RPROVIDES:${PN} = "virtual-psplash virtual-psplash-support"
|
||||
|
||||
inherit systemd
|
||||
|
||||
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
|
||||
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','psplash-drm-start.service ','',d)}"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
|
||||
do_compile() {
|
||||
bbnote "EXTRA_OEMAKE=${EXTRA_OEMAKE}"
|
||||
oe_runmake clean
|
||||
oe_runmake psplash
|
||||
}
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 755 ${WORKDIR}/psplash-drm ${D}${bindir}
|
||||
|
||||
install -m 755 ${WORKDIR}/psplash-drm-quit ${D}${bindir}
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 644 ${WORKDIR}/*.service ${D}/${systemd_unitdir}/system
|
||||
fi
|
||||
}
|
||||
FILES:${PN} += "${systemd_unitdir}/system "
|
||||
@@ -0,0 +1,16 @@
|
||||
SPLASH_IMG ?= OpenSTLinux_background_480x272.png
|
||||
SPLASH_IMG_ROT ?= OpenSTLinux_background_480x272_rotation.png
|
||||
|
||||
all: modeset
|
||||
|
||||
generate_header: $(SPLASH_IMG) $(SPLASH_IMG_ROT)
|
||||
@gdk-pixbuf-csource --macros $(SPLASH_IMG) > image_header.tmp
|
||||
@(sed -e "s/MY_PIXBUF/SPLASH_IMG/g" -e "s/guint8/uint8_t/g" image_header.tmp > image_header.h && rm image_header.tmp)
|
||||
@gdk-pixbuf-csource --macros $(SPLASH_IMG_ROT) > image_header.tmp
|
||||
@(sed -e "s/MY_PIXBUF/SPLASH_IMG_ROT/g" -e "s/guint8/uint8_t/g" image_header.tmp >> image_header.h && rm image_header.tmp)
|
||||
|
||||
psplash:
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o psplash-drm basic_splash_drm.c -I. `pkg-config --cflags --libs libdrm pixman-1 libpng` -Wall -Os
|
||||
|
||||
clean:
|
||||
rm -rf psplash-drm
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
PSPLASH_PID=`pidof psplash-drm`
|
||||
if [[ ! -z $PSPLASH_PID ]]; then
|
||||
echo -n "Stop psplash: "
|
||||
echo QUIT > /tmp/splash_fifo
|
||||
#kill -9 $PSPLASH_PID
|
||||
echo "done."
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Starts Psplash Boot screen
|
||||
#Wants=systemd-remount-fs.service
|
||||
#After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
|
||||
After=systemd-remount-fs.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
KillMode=mixed
|
||||
SendSIGKILL=no
|
||||
ExecStart=/usr/bin/psplash-drm -w
|
||||
|
||||
[Install]
|
||||
WantedBy=local-fs.target
|
||||
@@ -0,0 +1,3 @@
|
||||
[Coredump]
|
||||
Storage=external
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI:append = " \
|
||||
file://coredump-custom.conf \
|
||||
"
|
||||
|
||||
do_install:prepend() {
|
||||
install -d ${D}${sysconfdir}/systemd/coredump.conf.d/
|
||||
install -m 644 ${WORKDIR}/coredump-custom.conf ${D}${sysconfdir}/systemd/coredump.conf.d/
|
||||
|
||||
# ignore poweroff key on logind
|
||||
install -d ${D}${systemd_unitdir}/logind.conf.d/
|
||||
echo "[Login]" > ${D}${systemd_unitdir}/logind.conf.d/01-openstlinux.conf
|
||||
echo "HandlePowerKey=ignore" >> ${D}${systemd_unitdir}/logind.conf.d/01-openstlinux.conf
|
||||
|
||||
# Journal, do not store journald on filesystem (syslog make it already)
|
||||
install -d ${D}${systemd_unitdir}/journald.conf.d/
|
||||
echo "[Journal]" > ${D}${systemd_unitdir}/journald.conf.d/01-openstlinux.conf
|
||||
echo "Storage=volatile" >> ${D}${systemd_unitdir}/journald.conf.d/01-openstlinux.conf
|
||||
}
|
||||
FILES:${PN} += " ${sysconfdir}/systemd/coredump.conf.d/ "
|
||||
@@ -0,0 +1,80 @@
|
||||
# Copyright (C) 2018, STMicroelectronics - All Rights Reserved
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
SUMMARY = "Mount partitions"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
RDEPENDS:${PN} += " util-linux "
|
||||
|
||||
MOUNT_BASENAME = "mount-partitions"
|
||||
|
||||
SRC_URI = " \
|
||||
file://${MOUNT_BASENAME}.service \
|
||||
file://${MOUNT_BASENAME}.sh \
|
||||
"
|
||||
|
||||
inherit systemd update-rc.d
|
||||
|
||||
INITSCRIPT_NAME = "${MOUNT_BASENAME}.sh"
|
||||
INITSCRIPT_PARAMS = "start 22 5 3 ."
|
||||
|
||||
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
|
||||
SYSTEMD_SERVICE:${PN} = "${MOUNT_BASENAME}.service"
|
||||
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
|
||||
|
||||
# This list should be set with partition label and associated mountpoint
|
||||
# <partition_label1>,<partition_mountpoint1> <partition_label2>,<partition_mountpoint2>
|
||||
MOUNT_PARTITIONS_LIST ?= ""
|
||||
PARTITIONS_IMAGES ?= ""
|
||||
|
||||
# Update MOUNT_PARTITIONS_LIST var with input from PARTITIONS_IMAGES enabled
|
||||
python set_partitions_list() {
|
||||
partitionsconfig = (d.getVar('PARTITIONS_IMAGES') or "").split()
|
||||
|
||||
if len(partitionsconfig) > 0:
|
||||
partitionsconfigflags = d.getVarFlags('PARTITIONS_IMAGES')
|
||||
# The "doc" varflag is special, we don't want to see it here
|
||||
partitionsconfigflags.pop('doc', None)
|
||||
|
||||
for config in partitionsconfig:
|
||||
for f, v in partitionsconfigflags.items():
|
||||
if config == f:
|
||||
items = v.split(',')
|
||||
# Make sure a mount point is available
|
||||
if len(items) > 2 and items[1] and items[2]:
|
||||
bb.debug(1, "Appending '%s,%s' to MOUNT_PARTITIONS_LIST." % (items[1], items[2]))
|
||||
d.appendVar('MOUNT_PARTITIONS_LIST', ' ' + items[1] + ',' + items[2])
|
||||
break
|
||||
}
|
||||
do_install[prefuncs] += "set_partitions_list"
|
||||
|
||||
do_install() {
|
||||
if [ -n "${MOUNT_PARTITIONS_LIST} " ] ; then
|
||||
for part in ${MOUNT_PARTITIONS_LIST}
|
||||
do
|
||||
part_label=$(echo ${part} | cut -d',' -f1)
|
||||
mountpoint=$(echo ${part} | cut -d',' -f2)
|
||||
# Check that list is properly feed
|
||||
[ -z "${part_label}" ] && bbfatal "MOUNT_PARTITIONS_LIST parsing error: ${part} does not contain partition label"
|
||||
[ -z "${mountpoint}" ] && bbfatal "MOUNT_PARTITIONS_LIST parsing error: ${part} does not contain partition mountpoint"
|
||||
done
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
install -d ${D}${systemd_unitdir}/system ${D}/${base_sbindir}
|
||||
install -m 644 ${WORKDIR}/${MOUNT_BASENAME}.service ${D}/${systemd_unitdir}/system
|
||||
install -m 755 ${WORKDIR}/${MOUNT_BASENAME}.sh ${D}/${base_sbindir}/
|
||||
|
||||
# Update script
|
||||
sed 's:^MOUNT_PARTITIONS_LIST=.*$:MOUNT_PARTITIONS_LIST=\"'"${MOUNT_PARTITIONS_LIST}"'\":' -i ${D}/${base_sbindir}/${MOUNT_BASENAME}.sh
|
||||
fi
|
||||
install -d ${D}/${INIT_D_DIR}
|
||||
install -m 755 ${WORKDIR}/${MOUNT_BASENAME}.sh ${D}/${INIT_D_DIR}/
|
||||
# Update script
|
||||
sed 's:^MOUNT_PARTITIONS_LIST=.*$:MOUNT_PARTITIONS_LIST=\"'"${MOUNT_PARTITIONS_LIST}"'\":' -i ${D}/${INIT_D_DIR}/${MOUNT_BASENAME}.sh
|
||||
else
|
||||
bbfatal "Please set MOUNT_PARTITIONS_LIST with expected partition labels and mount point."
|
||||
fi
|
||||
}
|
||||
|
||||
FILES:${PN} += " ${systemd_unitdir} ${base_sbindir} ${INIT_D_DIR}"
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Mount partitions
|
||||
DefaultDependencies=false
|
||||
Before=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=Yes
|
||||
StandardOutput=syslog
|
||||
TimeoutSec=0
|
||||
ExecStart=-/sbin/mount-partitions.sh start
|
||||
ExecStop=/sbin/mount-partitions.sh stop
|
||||
|
||||
[Install]
|
||||
WantedBy=local-fs.target
|
||||
@@ -0,0 +1,148 @@
|
||||
#!/bin/sh -
|
||||
#===============================================================================
|
||||
#
|
||||
# FILE: mount-partitions.sh
|
||||
#
|
||||
# USAGE: ./mount-partitions.sh [start|stop]
|
||||
#
|
||||
# DESCRIPTION: mount partitions
|
||||
|
||||
# ORGANIZATION: STMicroelectronics
|
||||
# COPYRIGHT: Copyright (C) 2018, STMicroelectronics - All Rights Reserved
|
||||
# CREATED: 01/09/2018 13:36
|
||||
# REVISION: ---
|
||||
#===============================================================================
|
||||
|
||||
MOUNT_PARTITIONS_LIST=""
|
||||
|
||||
get_type() {
|
||||
local __resultvar=$1
|
||||
ROOT_TYPE="unknown"
|
||||
if [ -f /usr/bin/findmnt ];
|
||||
then
|
||||
ROOT_DEVICE=$(findmnt --noheadings --output=SOURCE / | cut -d'[' -f1)
|
||||
case $ROOT_DEVICE in
|
||||
ubi*)
|
||||
ROOT_TYPE="nand"
|
||||
;;
|
||||
/dev/mmcblk0*)
|
||||
ROOT_TYPE="sdmmc"
|
||||
;;
|
||||
/dev/mmcblk1*)
|
||||
ROOT_TYPE="mmc"
|
||||
;;
|
||||
/dev/disk/by-*)
|
||||
LINK=$(/usr/bin/readlink $ROOT_DEVICE | tr '/' ' ' | tr '.' ' ' | sed "s/ //g")
|
||||
case $LINK in
|
||||
ubi*)
|
||||
ROOT_TYPE="nand"
|
||||
;;
|
||||
mmcblk0*)
|
||||
ROOT_TYPE="sdmmc"
|
||||
;;
|
||||
mmcblk1*)
|
||||
ROOT_TYPE="mmc"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
else
|
||||
if [ `cat /proc/cmdline | sed "s/.*mmcblk0.*/mmcblk0/" ` == "mmcblk0" ]; then
|
||||
ROOT_TYPE="sdmmc"
|
||||
elif [ `cat /proc/cmdline | sed "s/.*mmcblk1.*/mmcblk1/" ` == "mmcblk1" ]; then
|
||||
ROOT_TYPE="mmc"
|
||||
elif [ `cat /proc/cmdline | sed "s/.*ubi0.*/ubi0/" ` == "ubi0" ]; then
|
||||
ROOT_TYPE="nand"
|
||||
fi
|
||||
fi
|
||||
eval $__resultvar="'$ROOT_TYPE'"
|
||||
}
|
||||
|
||||
found_devices() {
|
||||
local __resultvar=$1
|
||||
local __resultopt=$2
|
||||
local _type=$3
|
||||
local _search=$4
|
||||
local _device="unknown"
|
||||
local _option=" "
|
||||
case $_type in
|
||||
nand)
|
||||
# for the nand, fs can be not present in partition name
|
||||
_search="($_search|$(echo $_search | sed 's,fs$,,'))"
|
||||
local ubi_volumes=$(ls -1 -d /sys/class/ubi/ubi0_*)
|
||||
for f in $ubi_volumes;
|
||||
do
|
||||
if [ -r $f/name ];
|
||||
then
|
||||
cat $f/name | grep -sq -E "^${_search}$"
|
||||
if [ "$?" -eq 0 ];
|
||||
then
|
||||
_device="/dev/$(basename $f)"
|
||||
_option="-t ubifs"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
sdmmc)
|
||||
local sdmmc_parts=$(ls -1 -d /sys/block/mmcblk0/mmcblk0p*)
|
||||
for f in $sdmmc_parts;
|
||||
do
|
||||
if [ -r $f/uevent ];
|
||||
then
|
||||
cat $f/uevent | grep PARTNAME | sed "s/PARTNAME=//" | grep -sq "^${_search}"
|
||||
if [ "$?" -eq 0 ];
|
||||
then
|
||||
_device="/dev/$(basename $f)"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
mmc)
|
||||
local mmc_parts=$(ls -1 -d /sys/block/mmcblk1/mmcblk1p*)
|
||||
for f in $mmc_parts;
|
||||
do
|
||||
if [ -r $f/uevent ];
|
||||
then
|
||||
cat $f/uevent | grep PARTNAME | sed "s/PARTNAME=//" | grep -sq "^${_search}"
|
||||
if [ "$?" -eq 0 ];
|
||||
then
|
||||
_device="/dev/$(basename $f)"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
eval $__resultvar="'$_device'"
|
||||
eval $__resultopt="'$_option'"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
# mount partitions
|
||||
get_type TYPE
|
||||
echo "TYPE of support detected: $TYPE"
|
||||
for part in $MOUNT_PARTITIONS_LIST
|
||||
do
|
||||
part_label=$(echo $part | cut -d',' -f1)
|
||||
mountpoint=$(echo $part | cut -d',' -f2)
|
||||
found_devices DEVICE DEVICE_OPTION $TYPE $part_label
|
||||
echo "$part_label device: $DEVICE"
|
||||
[ -d $mountpoint ] || mkdir -p $mountpoint
|
||||
[ -e $DEVICE ] && mount $DEVICE_OPTION $DEVICE $mountpoint
|
||||
done
|
||||
;;
|
||||
stop)
|
||||
# umount partitions
|
||||
for part in $MOUNT_PARTITIONS_LIST
|
||||
do
|
||||
mountpoint=$(echo $part | cut -d',' -f2)
|
||||
umount $mountpoint
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [start|stop]"
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,33 @@
|
||||
# Copyright (C) 2017, STMicroelectronics - All Rights Reserved
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
SUMMARY = "Basic networkd configuration"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
DEPENDS = "systemd"
|
||||
|
||||
SRC_URI = " \
|
||||
file://50-wired-nfs.network \
|
||||
file://52-static.network.static \
|
||||
file://51-wireless.network.sample \
|
||||
\
|
||||
file://98-net-alias-stm32mp.rules \
|
||||
file://stm32mp-net-alias-udev.sh \
|
||||
file://stm32mp-net-alias-wlan-udev.sh \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${systemd_unitdir}/network
|
||||
install -m 644 ${WORKDIR}/50-wired-nfs.network ${D}${systemd_unitdir}/network
|
||||
install -m 644 ${WORKDIR}/52-static.network.static ${D}${systemd_unitdir}/network
|
||||
install -m 644 ${WORKDIR}/51-wireless.network.sample ${D}${systemd_unitdir}/network
|
||||
|
||||
# install link creation
|
||||
install -d ${D}${sysconfdir}/udev/rules.d/
|
||||
install -m 0644 ${WORKDIR}/98-net-alias-stm32mp.rules ${D}${sysconfdir}/udev/rules.d/
|
||||
install -d ${D}${sbindir}/
|
||||
install -m 0755 ${WORKDIR}/stm32mp-net-alias-udev.sh ${D}${sbindir}/
|
||||
install -m 0755 ${WORKDIR}/stm32mp-net-alias-wlan-udev.sh ${D}${sbindir}/
|
||||
}
|
||||
|
||||
FILES:${PN} += "${systemd_unitdir}/network"
|
||||
@@ -0,0 +1,11 @@
|
||||
[Match]
|
||||
Name=eth* en*
|
||||
KernelCommandLine=nfsroot
|
||||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
|
||||
[DHCP]
|
||||
RouteMetric=10
|
||||
ClientIdentifier=mac
|
||||
CriticalConnection=true
|
||||
@@ -0,0 +1,30 @@
|
||||
[Match]
|
||||
Name=wlan*
|
||||
|
||||
[Network]
|
||||
DHCP=ipv4
|
||||
|
||||
# Documentation to activate manually wireless interface
|
||||
# 1. generate the specific wpa_supplicant file
|
||||
# mkdir -p /etc/wpa_supplicant/
|
||||
# echo "ctrl_interface=/var/run/wpa_supplicant" > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||
# echo "eapol_version=1" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||
# echo "ap_scan=1" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||
# echo "fast_reauth=1" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||
# echo "" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||
# wpa_passphrase SSID_OF_NETWORK PASSWORD_OF_NETWORK >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||
# or
|
||||
# wpa_passphrase ssid_of_network >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
|
||||
# 2. put in place network configuration
|
||||
# rename file 51-wireless.network.sample to 51-wireless.network on /usr/lib/systemd/network/
|
||||
# 3. restart/start service
|
||||
# systemctl enable systemd-networkd.service
|
||||
# systemctl enable wpa_supplicant@wlan0.service
|
||||
# systemctl restart systemd-networkd.service
|
||||
# systemctl restart wpa_supplicant@wlan0.service
|
||||
# info:
|
||||
# How to list SSID available
|
||||
# ifconfig wlan0 up
|
||||
# iw dev wlan0 scan | grep SSID
|
||||
# or
|
||||
# iwlist wlan0 scanning | grep ESSID
|
||||
@@ -0,0 +1,12 @@
|
||||
[Match]
|
||||
Name=end0
|
||||
|
||||
[Network]
|
||||
DNS=192.168.72.254
|
||||
Address=192.168.72.2/24
|
||||
Gateway=192.168.72.254
|
||||
|
||||
# to enable static IP on eth0/end0:
|
||||
# $> cp 80-wired.network 80-wired.network.notused
|
||||
# $> cp 52-static.network.static 52-static.network
|
||||
# $> systemctl restart systemd-networkd.service
|
||||
@@ -0,0 +1,8 @@
|
||||
[Match]
|
||||
Name=!eth0 !end0
|
||||
|
||||
[Network]
|
||||
DHCP=ipv4
|
||||
|
||||
[DHCP]
|
||||
CriticalConnection=true
|
||||
@@ -0,0 +1,7 @@
|
||||
#store kernel alias
|
||||
ACTION=="add", SUBSYSTEM=="platform", ENV{OF_ALIAS_0}=="ethernet*", RUN+="/usr/sbin/stm32mp-net-alias-udev.sh alias $env{OF_ALIAS_0} %p"
|
||||
#store link between path and interface name
|
||||
ACTION=="add", SUBSYSTEM=="net", RUN+="/usr/sbin/stm32mp-net-alias-udev.sh interface $env{ID_NET_NAME} %p"
|
||||
|
||||
# for wlan
|
||||
ACTION=="add", SUBSYSTEM=="net", RUN+="/usr/sbin/stm32mp-net-alias-wlan-udev.sh $env{DEVTYPE} $env{ID_NET_NAME}"
|
||||
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh -
|
||||
# COPYRIGHT: Copyright (C) 2021, STMicroelectronics - All Rights Reserved
|
||||
|
||||
DEBUG=0
|
||||
debug() {
|
||||
if [ $DEBUG -eq 1 ]; then
|
||||
echo $@ >> /tmp/stm32mp-net-alias-udev.log
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $# -eq 2 ]; then
|
||||
action=$1
|
||||
devpath=$(echo $2 | sed "s/;//")
|
||||
param1=""
|
||||
else
|
||||
action=$1
|
||||
param1=$2
|
||||
devpath=$(echo $3 | sed "s/;//")
|
||||
fi
|
||||
debug "Parameter: $1"
|
||||
debug "Parameter: $2"
|
||||
debug "Parameter: $3"
|
||||
|
||||
case $1 in
|
||||
alias)
|
||||
debug "--------ALIAS--------"
|
||||
debug "devpath=$devpath"
|
||||
debug "param1=$param1"
|
||||
if [ -n "$devpath" ]; then
|
||||
mkdir -p /tmp/net_alias/
|
||||
if [ -n "$param1" ]; then
|
||||
echo "$devpath" > /tmp/net_alias/$param1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
interface)
|
||||
if [ -n "$devpath" ]; then
|
||||
for talias in $(ls -1 /tmp/net_alias/*);
|
||||
do
|
||||
tmp_alias_path=$(cat $talias)
|
||||
if $(echo $devpath | grep -q $tmp_alias_path) ; then
|
||||
alias=$(basename $talias)
|
||||
interface=$(basename $devpath)
|
||||
soc_interface=$(basename $tmp_alias_path | sed 's/\(.*\)\.\(.*\)/\2/' )
|
||||
debug "===> FOUND for $alias"
|
||||
debug "' ' alias=$alias"
|
||||
debug "' ' interface=$interface"
|
||||
debug "' ' soc_interface=$soc_interface"
|
||||
debug "ip link property add dev $interface altname $alias"
|
||||
ip link property add dev $interface altname $alias
|
||||
debug "ip link property add dev $interface altname $alias.$soc_interface"
|
||||
ip link property add dev $interface altname $alias.$soc_interface
|
||||
fi
|
||||
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh -
|
||||
# COPYRIGHT: Copyright (C) 2022, STMicroelectronics - All Rights Reserved
|
||||
|
||||
TYPE=$1
|
||||
INTERFACE=$2
|
||||
if [ "$TYPE" = "wlan" ]; then
|
||||
ip links show wlan0 > /dev/null 2> /dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
ip link property add dev $INTERFACE altname wlan0
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
@@ -0,0 +1,44 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Serial Getty on %I
|
||||
Documentation=man:agetty(8) man:systemd-getty-generator(8)
|
||||
Documentation=http://0pointer.de/blog/projects/serial-console.html
|
||||
PartOf=dev-%i.device
|
||||
ConditionPathExists=/dev/%i
|
||||
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
|
||||
After=rc-local.service
|
||||
|
||||
# If additional gettys are spawned during boot then we should make
|
||||
# sure that this is synchronized before getty.target, even though
|
||||
# getty.target didn't actually pull it in.
|
||||
Before=getty.target
|
||||
IgnoreOnIsolate=yes
|
||||
|
||||
# IgnoreOnIsolate causes issues with sulogin, if someone isolates
|
||||
# rescue.target or starts rescue.service from multi-user.target or
|
||||
# graphical.target.
|
||||
Conflicts=rescue.service
|
||||
Before=rescue.service
|
||||
|
||||
[Service]
|
||||
Environment="TERM=xterm"
|
||||
ExecStart=-/sbin/agetty -8 --autologin root -L --keep-baud %I @BAUDRATE@ $TERM
|
||||
Type=idle
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
UtmpIdentifier=%I
|
||||
TTYPath=/dev/%I
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
KillMode=process
|
||||
IgnoreSIGPIPE=no
|
||||
SendSIGHUP=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=getty.target
|
||||
@@ -0,0 +1,18 @@
|
||||
PACKAGECONFIG:append = " \
|
||||
firstboot \
|
||||
coredump \
|
||||
iptc \
|
||||
"
|
||||
|
||||
PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'polkit', '', 'polkit_hostnamed_fallback', d)} "
|
||||
|
||||
WATCHDOG_TIMEOUT = "32"
|
||||
|
||||
NTP_SERVERS ??= ""
|
||||
EXTRA_OEMESON += " ${@ '-Dntp-servers="${NTP_SERVERS}"' if '${NTP_SERVERS}' else ''}"
|
||||
|
||||
do_install:append() {
|
||||
#Remove this service useless for our needs
|
||||
rm -f ${D}/${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user