Skip to content
Snippets Groups Projects
Verified Commit 0e48d5b3 authored by Qiyang Sun's avatar Qiyang Sun :speech_balloon:
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 319 additions and 0 deletions
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
README 0 → 100644
This README file contains information on the contents of the meta-marfb layer.
Please see the corresponding sections below for details.
Dependencies
============
URI: <first dependency>
branch: <branch name>
URI: <second dependency>
branch: <branch name>
.
.
.
Patches
=======
Please submit any patches against the meta-marfb layer to the xxxx mailing list (xxxx@zzzz.org)
and cc: the maintainer:
Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
Table of Contents
=================
I. Adding the meta-marfb layer to your build
II. Misc
I. Adding the meta-marfb layer to your build
=================================================
Run 'bitbake-layers add-layer meta-marfb'
II. Misc
========
--- replace with specific information about the meta-marfb layer ---
DISTRO = "marfb"
DISTRO_NAME = "MAR Autonomous Rover Fastboot Linux System (MARS by University of Southampton)"
DISTRO_VERSION = "0.0.5"
MAINTAINER = "Qiyang Sun <qs2g22@soton.ac.uk>"
LOCALCONF_VERSION = "1"
PACKAGE_CLASSES ?= "package_deb"
DISTRO_FEATURES = "acl ipv4 kbd multiarch pci polkit usbhost usrmerge vfat wifi xattr zeroconf"
EXTRA_RDEPENDS = "packagegroup-core-boot"
EXTRA_RRECOMMENDS = "kernel-module-af-packet"
# use sysvinit instead of systemd
INIT_MANAGER ?= "sysvinit"
# https://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html
# enable uart
ENABLE_UART = "1"
# disable gpu splash screen
DISABLE_SPLASH = "1"
# do not delay to wait for sd card ready
BOOT_DELAY = "0"
BOOT_DELAY_MS = "0"
# enable support for the video camera (Linux 3.12.4+ required)
VIDEO_CAMERA = "1"
DISABLE_RPI_BOOT_LOGO = "1"
#ENABLE_DWC2_PERIPHERAL = "1"
DISABLE_VC4GRAPHICS = "1"
#RPI_KERNEL_DEVICETREE_OVERLAYS:append = " overlays/uart0.dtbo"
RPI_KERNEL_DEVICETREE_OVERLAYS:append = " overlays/uart1.dtbo"
#RASPBERRYPI_CAMERA_V2 = "1"
#RASPBERRYPI_CAMERA_V3 = "1"
# 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 += "meta-marfb"
BBFILE_PATTERN_meta-marfb = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-marfb = "9"
LAYERDEPENDS_meta-marfb = "core"
LAYERSERIES_COMPAT_meta-marfb = "scarthgap"
IMAGE_INSTALL += " mar-image-minimal"
# enable early console
# https://www.raspberrypi.com/documentation/computers/configuration.html#enabling-early-console-for-linux
CMDLINE:append = " modules.load=dwc2,g_serial"
CMDLINE:append = " earlycon=uart8250,mmio32,0x20215040"
#CMDLINE:append = " earlycon=pl011,mmio32,0x20201000"
do_deploy:append() {
echo "dtoverlay=uart1" >> $CONFIG
echo "dtoverlay=dwc2" >> $CONFIG
# echo "dtoverlay=uart0" >> $CONFIG
}
hostname = "marlinux"
SUMMARY = "A small image just capable of allowing a device to boot."
IMAGE_INSTALL = "packagegroup-core-boot \
packagegroup-base-extended \
zeromq \
python3 \
python3-pyzmq \
python3-pyserial \
connman \
connman-client \
screen \
serial-usb \
usb-modeswitch \
serial-usb \
${CORE_IMAGE_EXTRA_INSTALL}"
COMPATIBLE_MACHINE = "^rpi$"
LICENSE = "MIT"
inherit core-image
IMAGE_ROOTFS_SIZE ?= "8192"
#!/bin/sh
#
# serial-getty Start the serial-getty@ttyGS0 service
#
# chkconfig: 2345 20 80
# description: Enable and start serial-getty@ttyGS0 service at boot
. /etc/init.d/functions
LOG_TAG="serial-getty-init"
log_to_kernel() {
echo "<4>serial-getty-init: $1" > /dev/kmsg
#logger -t $LOG_TAG "Starting serial-getty@ttyGS0 service"
}
case "$1" in
start)
log_to_kernel "Starting serial-getty@ttyGS0 service"
#/sbin/start-stop-daemon --start --exec /sbin/getty -- -L ttyGS0 115200 vt100
#log_to_kernel "Started serial-getty@ttyGS0, return value is $?"
#su root -c "getty -L 115200 /dev/ttyGS0 vt100"
#log_to_kernel "Direct getty return value is $?"
echo "T0:23:respawn:/sbin/getty -L ttyGS0 115200 vt100" >> /etc/inittab
log_to_kernel "edit inittab value is $?"
init q
log_to_kernel "init reload value is $?"
ls -la /dev/tty* 1>&2
ls -la /dev/tty* 2>&1
;;
stop)
log_to_kernel "Stopping serial-getty@ttyGS0 service"
/sbin/start-stop-daemon --stop --exec /sbin/getty -- -L ttyGS0 115200 vt100
log_to_kernel "Stopped serial-getty@ttyGS0, return value is $?"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
log_to_kernel "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0
SUMMARY = "Enable and start serial-getty@ttyGS0 service"
LICENSE = "CLOSED"
SRC_URI = "file://serial-getty-init"
S = "${WORKDIR}"
inherit update-rc.d
INITSCRIPT_NAME = "serial-getty"
INITSCRIPT_PARAMS = "defaults"
do_install() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/serial-getty-init ${D}${sysconfdir}/init.d/serial-getty
}
FILES:${PN} = "${sysconfdir}/init.d"
SUMMARY = "bitbake-layers recipe"
DESCRIPTION = "Recipe created by bitbake-layers"
LICENSE = "MIT"
python do_display_banner() {
bb.plain("***********************************************");
bb.plain("* *");
bb.plain("* Example recipe created by bitbake-layers *");
bb.plain("* *");
bb.plain("***********************************************");
}
addtask display_banner before do_build
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://myconfig.cfg"
do_configure_prepend() {
cat ${WORKDIR}/myconfig.cfg >> ${B}/.config
yes '' | make oldconfig
}
do_clean() {
kernel_do_clean
rm -f ${B}/.config
rm -rf ${B}/modules
}
CONFIG_IPV6=n
CONFIG_USB_SERIAL_CONSOLE=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_G_SERIAL=y
CONFIG_USB_SERIAL=y
# Disable bluetooth, copied from diff of menuconfig
CONFIG_BT=n
CONFIG_BT_BREDR=n
CONFIG_BT_RFCOMM=n
CONFIG_BT_RFCOMM_TTY=n
CONFIG_BT_BNEP=n
CONFIG_BT_BNEP_MC_FILTER=n
CONFIG_BT_BNEP_PROTO_FILTER=n
CONFIG_BT_HIDP=n
CONFIG_BT_HS=n
CONFIG_BT_LE=n
CONFIG_BT_LE_L2CAP_ECRED=n
CONFIG_BT_6LOWPAN=n
CONFIG_BT_LEDS=n
CONFIG_BT_MSFTEXT=n
CONFIG_BT_AOSPEXT=n
CONFIG_BT_DEBUGFS=n
CONFIG_BT_SELFTEST=n
CONFIG_BT_FEATURE_DEBUG=n
#
# Bluetooth device drivers
#
CONFIG_BT_INTEL=n
CONFIG_BT_BCM=n
CONFIG_BT_RTL=n
CONFIG_BT_HCIBTUSB=n
CONFIG_BT_HCIBTUSB_AUTOSUSPEND=n
CONFIG_BT_HCIBTUSB_POLL_SYNC=n
CONFIG_BT_HCIBTUSB_BCM=n
CONFIG_BT_HCIBTUSB_MTK=n
CONFIG_BT_HCIBTUSB_RTL=n
CONFIG_BT_HCIBTSDIO=n
CONFIG_BT_HCIUART=n
CONFIG_BT_HCIUART_SERDEV=n
CONFIG_BT_HCIUART_H4=n
CONFIG_BT_HCIUART_NOKIA=n
CONFIG_BT_HCIUART_BCSP=n
CONFIG_BT_HCIUART_ATH3K=n
CONFIG_BT_HCIUART_LL=n
CONFIG_BT_HCIUART_3WIRE=n
CONFIG_BT_HCIUART_INTEL=n
CONFIG_BT_HCIUART_BCM=n
CONFIG_BT_HCIUART_RTL=n
CONFIG_BT_HCIUART_QCA=n
CONFIG_BT_HCIUART_AG6XX=n
CONFIG_BT_HCIUART_MRVL=n
CONFIG_BT_HCIBCM203X=n
CONFIG_BT_HCIBPA10X=n
CONFIG_BT_HCIBFUSB=n
CONFIG_BT_HCIVHCI=n
CONFIG_BT_MRVL=n
CONFIG_BT_MRVL_SDIO=n
CONFIG_BT_ATH3K=n
CONFIG_BT_MTKSDIO=n
CONFIG_BT_MTKUART=n
CONFIG_BT_NXPUART=n
# end of Bluetooth device drivers
FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto-custom:"
SRC_URI:append = " file://myconfig.cfg"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment