1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-15 09:48:21 +01:00

initial commit

This commit is contained in:
Dany LE 2021-12-17 20:30:04 +01:00
commit 28c0bca1d6
110 changed files with 909 additions and 0 deletions

17
COPYING.MIT Normal file
View File

@ -0,0 +1,17 @@
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.

41
README Normal file
View File

@ -0,0 +1,41 @@
This README file contains information on the contents of the meta-rpi-pharo 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-rpi-pharo 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-rpi-pharo layer to your build
II. Misc
I. Adding the meta-rpi-pharo layer to your build
=================================================
Run 'bitbake-layers add-layer meta-rpi-pharo'
II. Misc
========
--- replace with specific information about the meta-rpi-pharo layer ---

62
conf/layer.conf Normal file
View File

@ -0,0 +1,62 @@
# 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-rpi-pharo"
BBFILE_PATTERN_meta-rpi-pharo = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-rpi-pharo = "11"
LAYERDEPENDS_meta-rpi-pharo = "core raspberrypi"
LAYERSERIES_COMPAT_meta-rpi-pharo = "honister"
PACKAGE_CLASSES = "package_ipk"
INHERIT += "rm_work"
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
# ssh-server-dropbear
DISTRO_FEATURES:append := " vc4-gfx opengl "
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
MACHINE ?= "raspberrypi4-64"
WKS_FILE="rpi.wks.in"
ROOT_HOME = "/root"
#MACHINE = "raspberrypi3-64"
#MACHINE = "raspberrypi2"
RPI_USE_U_BOOT:raspberrypi = "0"
RPI_USE_U_BOOT ?= "1"
RPI_USE_wS_28_DPI_LCD = "1"
# enable usb boot in uboot
ENABLE_USB_U_BOOT = "0"
ENABLE_UART = "0"
DISABLE_SPLASH = "1"
VIDEO_CAMERA = "1"
DISABLE_RPI_BOOT_LOGO = "1"
ENABLE_SPI_BUS = "0"
ENABLE_I2C = "0"
KERNEL_MODULE_AUTOLOAD:rpi += " i2c-dev "
VC4DTBO:raspberrypi = "vc4-kms-v3d,nocomposite,noaudio"
KERNEL_DEVICETREE:append = " overlays/vc4-kms-dpi-generic.dtbo "
RPI_EXTRA_CONFIG += "${@['','\n\
dtoverlay=vc4-kms-dpi-generic,hactive=480,hfp=26,hsync=16,hbp=10 \n\
dtparam=vactive=640,vfp=25,vsync=10,vbp=15 \n\
dtparam=clock-frequency=32000000,rgb666-padhi \n\
dtoverlay=waveshare-28dpi-3b-4b \n\
dtoverlay=waveshare-28dpi-3b \n\
dtoverlay=waveshare-28dpi-4b \n\
display_rotate=1 #1902: 180 3: 270 \n']['${RPI_USE_wS_28_DPI_LCD}' == '1']}"
RPI_EXTRA_CONFIG += '\n\
start_x=1 # essential \n\
dtparam=audio=on \n\
gpu_mem=128 # at least, or maybe more if you wish \n\
disable_camera_led=1 # optional \n\
'

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,15 @@
DESCRIPTION = "Wifi dongle firmware"
DEPENDS = ""
LICENSE="CLOSED"
LIC_FILES_CHKSUM=""
SRC_URI += "file://firmware"
FILES:${PN} += "/lib/firmware/*"
#FILES_${PN}-dev += "${libdir}/firmware/*"
do_install () {
install -d ${D}/lib/firmware/
cp -rf ${WORKDIR}/firmware/* ${D}/lib/firmware/
}

View File

@ -0,0 +1,4 @@
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
fatload usb 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
if test ! -e usb 0:1 uboot.env; then saveenv; fi;
@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}

View File

@ -0,0 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
BOOT_SRC_FILE = "${@bb.utils.contains('ENABLE_USB_U_BOOT', '1', 'usb-boot.cmd.in', 'boot.cmd.in', d)}"
SRC_URI = "file://${BOOT_SRC_FILE}"
do_configure() {
([ -e "${WORKDIR}/usb-boot.cmd.in" ] && mv "${WORKDIR}/usb-boot.cmd.in" "${WORKDIR}/boot.cmd.in") || true
}

View File

@ -0,0 +1,13 @@
SUMMARY = "Waveshare 2.8 inch DPI"
DESCRIPTION = "support overlay layer for Waveshare 2.8 inch DPI"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
do_deploy () {
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b-4b.dtbo
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b.dtbo
install -m 0755 ${THISDIR}/files/waveshare-28dpi-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-4b.dtbo
# install -m 0755 ${THISDIR}/files/start.mp3 ${DEPLOY_DIR_IMAGE}/start.mp3
}
addtask deploy

View File

@ -0,0 +1 @@
hostname = "diya"

View File

@ -0,0 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://default"
do_install:append () {
rm -rf ${D}/etc/dropbear
install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/dropbear
}

View File

@ -0,0 +1,2 @@
DROPBEAR_EXTRA_ARGS="-w"
DROPBEAR_RSAKEY_DIR=/home/diya/etc/dropbear

View File

@ -0,0 +1,32 @@
#webrtc-audio-processing \
pulseaudio \
pulseaudio-server \
alsa-utils \
pulseaudio-module-alsa-card \
pulseaudio-module-alsa-source \
pulseaudio-module-alsa-sink \
pulseaudio-module-cli \
pulseaudio-module-echo-cancel \
pulseaudio-misc \
i2c-tools \
#tslib
#tslib-tests
#tslib-calibrate
#tslib-uinput
# v4l-utils
evtest
# openvt -v -c 5 -- /usr/bin/weston --tty=/dev/tty5
mesa \
mesa-demos \
libgbm \
dtdebug=1
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dpi-generic,hactive=480,hfp=26,hsync=16,hbp=10
dtparam=vactive=640,vfp=25,vsync=10,vbp=16
dtparam=clock-frequency=32000000,rgb666-padhi
Diyas symbolise goodness and purity, and lighting them denotes dispelling darkness and going into light.

View File

@ -0,0 +1 @@
core-image-minimal.bbappend

View File

@ -0,0 +1,40 @@
inherit extrausers
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
EXTRA_USERS_PARAMS = "usermod -p BJpK8ADNDLsGg root; \
usermod -p 2Pe/4xyFxsokE diya; \
usermod -a -G video diya; \
usermod -a -G tty diya; \
usermod -a -G input diya; \
usermod -a -G dialout diya; \
usermod -a -G audio diya; \
usermod -a -G avahi diya \
"
IMAGE_BOOT_FILES:append = "fs_resize"
# KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/vc4-kms-dpi-generic.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
IMAGE_INSTALL:append = "mpg123 \
libcurl \
libdrm \
libgbm \
libgles2 \
libegl-mesa \
libgl-mesa \
libglapi \
glew \
freeglut \
mesa \
libsdl2 \
libsdl2-ttf \
libsdl2-image \
libsdl2-mixer \
libsdl2-net \
example \
htop \
opensmalltalk-cog-vm \
waveshare-2.8-lcd \
realtekfw \
diya-overlay \
"

View File

@ -0,0 +1,3 @@
do_install:append () {
rm ${D}/etc/network/interfaces
}

View File

@ -0,0 +1,3 @@
SERIAL_CONSOLES_CHECK = ""
CURR_SERIAL_CONSOLES:="${SERIAL_CONSOLES}"
SERIAL_CONSOLES = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', '', '${CURR_SERIAL_CONSOLES}', d)}"

View File

@ -0,0 +1,31 @@
DESCRIPTION = "Auto configuration deployment from media"
DEPENDS = ""
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI += "file://confd \
file://expandfs.sh \
file://80_diya \
file://fs_resize"
inherit update-rc.d useradd
USERADD_PACKAGES = "${PN}"
GROUPADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "-u 1000 -d /home/diya -r -s /bin/sh diya"
INITSCRIPT_NAME = "confd"
INITSCRIPT_PARAMS = "start 80 S ."
do_install() {
install -d ${D}/${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd
install -d ${D}/usr/bin/
install -d ${D}/etc/default/volatiles
install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/bin/expandfs.sh
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
}

View File

@ -0,0 +1,2 @@
l root root 0644 /etc/network/interfaces /home/diya/etc/network/interfaces
l root root 0644 /etc/dropbear /home/diya/etc/dropbear

View File

@ -0,0 +1,39 @@
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC="Auto deployment configuration from media"
case "$1" in
start)
echo -n "Start $DESC: "
if [ -f "/boot/fs_resize" ]; then
/usr/bin/expandfs.sh
touch /boot/home_partition_should_be_formated
rm /boot/fs_resize
reboot
fi
if [ -f "/boot/home_partition_should_be_formated" ]; then
echo "Trying to format the home partition"
umount /dev/mmcblk0p3
yes | mkfs.ext4 /dev/mmcblk0p3
mount /dev/mmcblk0p3 /home
mkdir -p /home/diya/etc/network
mkdir -p /home/diya/etc/dropbear
chown -R diya:diya /home/diya
rm /boot/home_partition_should_be_formated
fi
if [ -e "/boot/install" ];then
cp -rf /boot/install/* /home/diya
rm -rf /boot/install
reboot
fi
# display information
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start}" >&2
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,31 @@
#! /bin/sh
line=$(
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p3
p
q
EOF
)
echo "Partition: $line"
#start_sector=$(echo "$line" | cut -d' ' -f14)
start_sector=$(echo "$line" | cut -d' ' -f15)
echo "Start sector is: $start_sector"
if [ -z "$start_sector" ]; then
echo "Cannot find the start sector"
exit 1
fi
echo "Expanding the partition"
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0
d
3
n # new partition
p # primary partition
3 # partition number 3
$start_sector
# default - end of disk
p # print the in-memory partition table
w # write the partition table
q # and we're done
EOF

View File

@ -0,0 +1 @@
resize the partition

View File

@ -0,0 +1,73 @@
From 7117dbf8b8defcf69f7aac3f7daf97ec00e5e73a Mon Sep 17 00:00:00 2001
From: Xuan Sang LE <xsang.le@gmail.com>
Date: Wed, 15 Dec 2021 02:24:37 +0100
Subject: [PATCH] Update configure
---
platforms/unix/config/configure | 53 ---------------------------------
1 file changed, 53 deletions(-)
diff --git a/platforms/unix/config/configure b/platforms/unix/config/configure
index f9e8c24aa5..85aacaa5e6 100755
--- a/configure
+++ b/configure
@@ -13292,59 +13292,6 @@ fi
-# Check size assumptions of basic data types
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"size of int\"" >&5
-$as_echo_n "checking \"size of int\"... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
- int main(){return(sizeof(int) == 4)?0:1;}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"okay\"" >&5
-$as_echo "\"okay\"" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"bad\"" >&5
-$as_echo "\"bad\"" >&6; }
- as_fn_error $? "\"one or more basic data types has an incompatible size: giving up\"" "$LINENO" 5
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"size of double\"" >&5
-$as_echo_n "checking \"size of double\"... " >&6; }
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
- int main(){return(sizeof(double) == 8)?0:1;}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"okay\"" >&5
-$as_echo "\"okay\"" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"bad\"" >&5
-$as_echo "\"bad\"" >&6; }
- as_fn_error $? "\"one or more basic data types has an incompatible size: giving up\"" "$LINENO" 5
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
# The cast to long int works around a bug in the HP C Compiler

View File

@ -0,0 +1,2 @@
#! /bin/sh
LD_LIBRARY_PATH=/opt/squeak /opt/squeak/squeak $@

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