guowenxue
2026-07-12 b7502990ad6509ff7349cc0ee17e0d7180e85b3d
Add wrynose meta
32 files added
959 ■■■■■ changed files
bsp/yocto/meta-igkboard/.gitignore 2 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/README.md 179 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/conf/layer.conf 17 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/conf/machine/igkboard-imx6ull.conf 58 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/files/readme 1 ●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/files/uboot-logo-igkboard-imx6ull.bmp patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/u-boot-imx_%.bbappend 7 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/uenv_1.0.bb 29 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-core/base-files/base-files_%.bbappend 16 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-core/images/yocto-image-full.bb 116 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-core/images/yocto-image-ml.bb 10 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-core/systemd/systemd_%.bbappend 5 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-fsl/packagegroup/packagegroup-fsl-tools-gpu.bbappend 4 ●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-hello/hello-app/files/src/Makefile 10 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-hello/hello-app/files/src/hello-app.c 22 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-hello/hello-app/hello-app_1.0.bb 25 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/hello-mod/files/src/Makefile 14 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/hello-mod/files/src/hello.c 34 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/hello-mod/hello-mod.bb 26 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/linux/files/readme 1 ●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/linux/linux-imx_%.bbappend 42 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/expand-rootfs/expand-rootfs_1.0.bb 16 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/expand-rootfs/files/expand_rootfs 31 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/ifup-ppp/files/gprs-chat 18 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/ifup-ppp/files/ifup-ppp 175 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/ifup-ppp/ifup-ppp_1.0.bb 19 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/packagegroups/packagegroup-misc-utils.bb 6 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/files/10-eth0.network 11 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/files/20-wlan0.network 11 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/files/wpa-conf.service 11 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/wpa-conf_1.0.bb 31 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/wrynose/recipes-qt/packagegroups/packagegroup-qt6-addons.bbappend 12 ●●●●● patch | view | raw | blame | history
bsp/yocto/meta-igkboard/.gitignore
New file
@@ -0,0 +1,2 @@
uboot-imx-*.patch
linux-imx-*.patch
bsp/yocto/meta-igkboard/wrynose/README.md
New file
@@ -0,0 +1,179 @@
# Brief Introduction
A meta-layer for igkboard series boards
- Yocto Mickledore(4.2) support :    igkboard-imx8mp, igkboard-imx6ull
# Yocto Setup
## Host setup
To get the Yocto Project expected behavior in a Linux Host Machine, and the recommended minimum Ubuntu version is 20.04 or later. An important consideration is the hard disk space required in the host machine.  It is recommended that at least 250 GB is provided, which is enough to compile all backends together.
A Yocto Project build requires that some packages be installed for the build that are documented under the Yocto Project. Go to Yocto Project Quick Start and check for the packages that must be installed for your build machine. Essential Yocto Project host packages are:
```bash
$ sudo apt-get update && sudo apt-get install -y \
wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
pylint3 xterm rsync curl gawk zstd lz4 locales bash-completion
```
## Repo setup
Repo is a tool built on top of Git that makes it easier to manage projects that contain multiple repositories, which do not need to be on the same server. Repo complements very well the layered nature of the Yocto Project, making it easier for users to add their own layers to the BSP.
Install or update **repo** to the latest version.
```bash
$ mkdir -p ~/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH
```
Make sure that Git is set up properly with the following commands:
```bash
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list
```
## Yocto setup
The following example shows how to download the i.MX Yocto Project Community BSP recipe layers. For this example, a directory called imx-yocto-bsp is created for the project. Any name can be used instead of this.
```bash
$ mkdir -p ~/imx-yocto-bsp
$ cd ~/imx-yocto-bsp
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.22-2.0.0.xml
$ repo sync
```
When this process is completed, the source code is checked out into the directory imx-yocto-bsp/sources.  Then we need use following commands to clone this project (meta-igkboard)  to `imx-yocto-bsp/sources` folder.
```bash
$ cd sources/
```
# Yocto Build
## Build configurations
**igkboard** provides a script, ***igkboard-setup.sh***, that simplifies the setup for this board. To use the script, the name of the
specific machine to be built for needs to be specified. The script will sets up a directory and the configuration files for the specified machine.
The syntax for the  ***igkboard-setup.sh*** script is shown below:
```bash
$ MACHINE=<machine name> source sources/meta-igkboard/tools/igkboard-setup.sh -b <build dir>
```
* MACHINE=<machine configuration name> is the machine name which points to the configuration file in conf/machine in
  meta-igkboard.  Which should be  `igkboard-imx8mp`.
* -b <build dir> specifies the name of the build directory created by the ***igkboard-setup.sh*** script.
Take igkboard-imx8mp board as example, we can use following command to setup the Yocto build environment.
```bash
$ cd ~/imx-yocto-bsp
$ MACHINE=igkboard-imx8mp source sources/meta-igkboard/tools/igkboard-setup.sh -b igkboard-imx8mp
```
If a new terminal window is opened or the machine is rebooted after a build directory is set up, the setup environment script should
be used to set up the environment variables and run a build again. The full ***igkboard-setup.sh*** is not needed.
```bash
$ cd ~/imx-yocto-bsp
$ source sources/poky/oe-init-build-env igkboard-imx8mp
```
## Build an image
The Yocto Project build uses the bitbake command. For example, bitbake <component> builds the named component. Each component build has multiple tasks, such as fetching, configuration, compilation, packaging, and deploying to the target rootfs.
The bitbake image build gathers all the components required by the image and build in order of the dependency per task. The first build is the toolchain along with the tools required for the components to build.  The following command is an example on how to build an image:
```bash
$ bitbake yocto-image-full
```
After building, the output system images are located in `tmp/deploy/images/igkboard`  :
* ***yocto-image-full.wic***         Yocto system image will be flashed into SD card or eMMC.
* ***imx-boot***                     Bootloader u-boot image
## Build a SDK
After building Yocto BSP, if you want to continue to build the toolchain installer and populate the SDK image, use the following command:
```bash
$ bitbake yocto-image-full -c populate_sdk
```
When building finished, you can get the yocto-image-full based SDK at  *`tmp/deploy/sdk/fsl-imx-wayland-lite-glibc-x86_64-yocto-image-full-armv8a-igkboard-toolchain-6.1-mickledore.sh`*. Later, if you want to to install the SDK, just run:
```bash
$ sudo bash tmp/deploy/sdk/fsl-imx-wayland-lite-glibc-x86_64-yocto-image-full-armv8a-igkboard-toolchain-6.1-mickledore.sh
NXP i.MX Release Distro SDK installer version 6.1-mickledore
============================================================
Enter target directory for SDK (default: /opt/fsl-imx-wayland-lite/6.1-mickledore):
You are about to install the SDK to "/opt/fsl-imx-wayland-lite/6.1-mickledore". Proceed [Y/n]? y
Extracting SDK.............................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
```
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
```bash
$ . /opt/fsl-imx-wayland-lite/6.1-mickledore/environment-setup-armv8a-poky-linux
```
bsp/yocto/meta-igkboard/wrynose/conf/layer.conf
New file
@@ -0,0 +1,17 @@
# Add this layer to BBPATH
BBPATH .= ":${LAYERDIR}"
# Search recipes and bbappend files
BBFILES += " \
    ${LAYERDIR}/recipes-*/*/*.bb \
    ${LAYERDIR}/recipes-*/*/*.bbappend \
"
BBFILE_COLLECTIONS += "meta-igkboard"
BBFILE_PATTERN_meta-igkboard = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-igkboard = "9"
LAYERVERSION_meta-igkboard = "1"
LAYERSERIES_COMPAT_meta-igkboard = "mickledore nanbield scarthgap styhead walnascar whinlatter wrynose"
LAYERDEPENDS_meta-igkboard = "core freescale-layer"
bsp/yocto/meta-igkboard/wrynose/conf/machine/igkboard-imx6ull.conf
New file
@@ -0,0 +1,58 @@
#@TYPE       : Machine
#@NAME       : LingYun IoT Gatway Kits Boards based on i.MX6ULL
#@SOC        : i.MX6ULL
#@DESCRIPTION: Machine configuration for LingYun IGKBoard-IMX6ULL
#@MAINTAINER : Wenxue Guo <guowenxue@gmail.com>
#@REFERENCE  : meta-imx/meta-bsp/conf/machine/imx6ull9x9evk.conf
# Add new machine igkboard-imx6ull
MACHINEOVERRIDES =. "mx6:mx6ul:mx6ull:igkboardbase:igkboard-imx6ull"
include conf/machine/include/imx-base.inc
include conf/machine/include/arm/armv7a/tune-cortexa7.inc
# Device tree file generated during kernel compilation
KERNEL_DEVICETREE = "nxp/imx/${MACHINE}.dtb"
# Device tree overlay files generated during kernel compilation
KERNEL_DTOVERLAY = " \
    nxp/imx/${MACHINE}/adc.dtbo \
    nxp/imx/${MACHINE}/cam.dtbo \
    nxp/imx/${MACHINE}/can1.dtbo \
    nxp/imx/${MACHINE}/can2.dtbo \
    nxp/imx/${MACHINE}/i2c1.dtbo \
    nxp/imx/${MACHINE}/lcd.dtbo \
    nxp/imx/${MACHINE}/nbiot-4g.dtbo \
    nxp/imx/${MACHINE}/pwm7.dtbo \
    nxp/imx/${MACHINE}/pwm8.dtbo \
    nxp/imx/${MACHINE}/spi1.dtbo \
    nxp/imx/${MACHINE}/uart2.dtbo \
    nxp/imx/${MACHINE}/uart3.dtbo \
    nxp/imx/${MACHINE}/uart4.dtbo \
    nxp/imx/${MACHINE}/uart7.dtbo \
    nxp/imx/${MACHINE}/w1.dtbo \
"
# Uboot configuration
UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG[sd] = "${MACHINE}_defconfig,sdcard"
# Add wic image in deploy folder
SOC_DEFAULT_IMAGE_FSTYPES:append = " wic"
# Define the kernel boot file
WKS_FILE_DEPENDS:append = " uenv"
IMAGE_BOOT_FILES = " \
    ${KERNEL_IMAGETYPE} \
    ${MACHINE}.dtb \
    overlays/*;overlays/ \
    config.txt \
"
# Remove unused optee bcm4339 bcm43455
MACHINE_FEATURES += "wifi bluetooth"
# Refer to linux-imx/drivers/tty/serial/imx.c
SERIAL_CONSOLES = "115200;ttymxc0"
# /etc/hostname (uname -a)
hostname:pn-base-files = "igkboard"
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/files/readme
New file
@@ -0,0 +1 @@
Please copy u-boot patch file to here
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/files/uboot-logo-igkboard-imx6ull.bmp
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/u-boot-imx_%.bbappend
New file
@@ -0,0 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " file://uboot-imx-lf-6.18.20-2.0.0.patch "
addtask copy_logo after do_unpack before do_configure
do_copy_logo(){
    cp ${BSPDIR}/sources/meta-igkboard/recipes-bsp/u-boot/files/uboot-logo-${MACHINE}.bmp ${S}/tools/logos/lingyun.bmp
}
bsp/yocto/meta-igkboard/wrynose/recipes-bsp/u-boot/uenv_1.0.bb
New file
@@ -0,0 +1,29 @@
DESCRIPTION = "U-boot Env from config.txt"
SECTION = "app"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
FILES:${PN} = "/boot"
S = "${UNPACKDIR}/conf"
SRC_URI = " "
SRC_URI = " \
    file://conf/config-${MACHINE}.txt \
"
do_install() {
    install -d ${D}/boot
    install -m 0644 ${S}/config-${MACHINE}.txt ${D}/boot/config.txt
}
inherit deploy
addtask deploy after do_install
do_deploy () {
    install -m 0644 ${D}/boot/config.txt ${DEPLOYDIR}
}
COMPATIBLE_MACHINE = "(igkboardbase)"
PACKAGE_ARCH = "${MACHINE_ARCH}"
bsp/yocto/meta-igkboard/wrynose/recipes-core/base-files/base-files_%.bbappend
New file
@@ -0,0 +1,16 @@
SUMMARY = "Update system configure files"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
do_install_basefilesissue:append() {
    # Overwrite /etc/issue with a custom string
    printf "Welcome to LingYun IoT Gateway Kits Board GNU/Linux Yocto System!\n" > ${D}${sysconfdir}/issue
    # Overwrite /etc/issue.net with a custom string
    printf "Welcome to LingYun IoT Gateway Kits Board GNU/Linux Yocto System!\n" > ${D}${sysconfdir}/issue.net
}
do_install:append() {
    # add alias for ls with color display
    printf "alias ls='ls --color=auto'\n" >> ${D}${sysconfdir}/profile
}
bsp/yocto/meta-igkboard/wrynose/recipes-core/images/yocto-image-full.bb
New file
@@ -0,0 +1,116 @@
SUMMARY = "A multimedia wth full command image for production"
LICENSE = "MIT"
inherit core-image
inherit extrausers
inherit populate_sdk_qt6_base
# additional free disk space created in Kbytes
#IMAGE_OVERHEAD_FACTOR = "1.0"
#IMAGE_ROOTFS_EXTRA_SPACE = "512000"
CONFLICT_DISTRO_FEATURES = "directfb"
# Select Image Features
IMAGE_FEATURES += " \
    hwcodecs \
    ssh-server-openssh \
    package-management \
    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'weston', \
       bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11-base x11-sato', '', d), d)} \
"
CORE_IMAGE_EXTRA_INSTALL_BASE += " \
    packagegroup-base-wifi \
    packagegroup-imx-isp \
    packagegroup-imx-security \
    packagegroup-fsl-tools-audio \
    packagegroup-core-full-cmdline \
    packagegroup-tools-bluetooth \
    packagegroup-core-ssh-openssh \
    packagegroup-fsl-gstreamer1.0 \
    packagegroup-fsl-gstreamer1.0-full \
    packagegroup-fsl-tools-benchmark \
    packagegroup-fsl-opencv-imx \
    packagegroup-qt6-essentials \
    packagegroup-misc-utils \
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'weston-xwayland xterm', '', d)} \
"
CORE_IMAGE_EXTRA_INSTALL_BASE += " \
    kernel-modules hello-app hello-mod \
    firmwared linux-firmware \
    powertop tzdata ppp vim \
    xz lrzsz rsync dos2unix \
    gnupg parted inetutils \
    hostapd iw openssl-bin \
    i2c-tools spidev-test spitools \
    libgpiod libgpiod-tools mosquitto \
    fb-test fbgrab libdrm \
    opencv zbar v4l-utils yavta \
    alsa-state pulseaudio-server \
    python3 python3-pip tmux \
    openssh-sftp openssh-sftp-server \
    memtester pcsc-tools stunnel ntp \
    curl evtest cpufrequtils iperf3 \
    dosfstools ethtool iproute2 modemmanager \
    e2fsprogs-mke2fs e2fsprogs-resize2fs \
    libsocketcan can-utils canutils \
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'weston-xwayland xterm', '', d)} \
"
# For machine igkboard-imx6ull
IMAGE_INSTALL = " \
    ${CORE_IMAGE_EXTRA_INSTALL_BASE} \
"
# For machine igkboard-imx8mp
IMAGE_INSTALL:igkboard-imx8mp = " \
    ${CORE_IMAGE_EXTRA_INSTALL_BASE} \
    packagegroup-fsl-tools-gpu \
    packagegroup-fsl-tools-gpu-external \
    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'weston-init', '', d)} \
    git gcc gcc-symlinks binutils automake cmake autoconf freerdp \
"
# Set the root password:  >> mkpasswd -m sha256crypt 123456 -S abcd6789
# Remember to escape the character $ in the resulting hash
#PASSWD="\$5\$abcd6789\$2ayD.ZPdq5xejNiyE3XC3qCpkGZ.brSE5H0zSECVBSB"
EXTRA_USERS_PARAMS = "\
    usermod -p '${PASSWD}' root; \
"
modify_rootfs() {
    # Modify default environment
    echo "alias ls='ls --color=auto'" >> ${IMAGE_ROOTFS}/etc/profile
    # Update wpa_supplicant service
    sed -i "/^After=/d" ${IMAGE_ROOTFS}/lib/systemd/system/wpa_supplicant@.service
}
# Remove unused files in rootfs
doclean_rootfs() {
    # remove unsed test apps
    rm -rf ${IMAGE_ROOTFS}/unit_tests
    # remove unused license files
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/LICEN*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/*.ucode
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/*.pnvm
    # remove unsed firmware
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/3com*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/[a-h]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/i[9ns]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/[j-l]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/me[ls]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/m[aiortwy]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/n[ev]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/[o-q]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/r[18aops]*
    rm -rf ${IMAGE_ROOTFS}/lib/firmware/[s-z]*
}
ROOTFS_POSTPROCESS_COMMAND += " modify_rootfs; doclean_rootfs; "
bsp/yocto/meta-igkboard/wrynose/recipes-core/images/yocto-image-ml.bb
New file
@@ -0,0 +1,10 @@
# This image extends yocto-image-full with additional machine learning features
require yocto-image-full.bb
CORE_IMAGE_EXTRA_INSTALL:igkboard-imx8mp:append = " \
    packagegroup-imx-ml \
    nodejs nodejs-npm \
"
bsp/yocto/meta-igkboard/wrynose/recipes-core/systemd/systemd_%.bbappend
New file
@@ -0,0 +1,5 @@
do_install:append() {
    sed -i "s|^#NTP=.*|NTP=pool.ntp.org|g" ${D}/etc/systemd/timesyncd.conf
}
bsp/yocto/meta-igkboard/wrynose/recipes-fsl/packagegroup/packagegroup-fsl-tools-gpu.bbappend
New file
@@ -0,0 +1,4 @@
SOC_TOOLS_GPU:append:imxgpu   = " gputop"
SOC_TOOLS_GPU:remove:imxgpu   = " imx-gpu-sdk"
SOC_TOOLS_GPU:remove:imxgpu3d = "imx-gpu-apitrace-bin"
SOC_TOOLS_GPU:append:imxdrm = " libdrm-tests"
bsp/yocto/meta-igkboard/wrynose/recipes-hello/hello-app/files/src/Makefile
New file
@@ -0,0 +1,10 @@
APP_NAME=hello-app
# Must add LDFLAGS, or Yocto will complain about missing GNU_HASH
${APP_NAME}:
    ${CC} -o $@ $@.c ${LDFLAGS}
.PHONY: clean
clean:
    rm -rf ${APP_NAME}
bsp/yocto/meta-igkboard/wrynose/recipes-hello/hello-app/files/src/hello-app.c
New file
@@ -0,0 +1,22 @@
/*********************************************************************************
 *      Copyright:  (C) 2024 LingYun IoT System Studio.
 *                  All rights reserved.
 *
 *       Filename:  hello.c
 *    Description:  This file is hello example application build in yocto
 *
 *        Version:  1.0.0(2024/07/14)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "2024/07/14 10:34:45"
 *
 ********************************************************************************/
#include <stdio.h>
int main (int argc, char **argv)
{
    printf("Hello, LingYun IoT System Studio!\n");
    return 0;
}
bsp/yocto/meta-igkboard/wrynose/recipes-hello/hello-app/hello-app_1.0.bb
New file
@@ -0,0 +1,25 @@
SUMMARY = "My Custom Hello Example Application"
# Linces file is in poky/meta/files/common-licenses/ and use `md5sum` command to get the MD5 value
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
# recipe version
PV = "1.0"
PR = "r0"
# There is /usr/bin/hello link to hello.lmbench, so can not use application name 'hello' here
SRC_URI = "file://src/hello-app.c \
           file://src/Makefile \
          "
S = "${UNPACKDIR}/src"
do_compile() {
    make
}
do_install() {
    install -d ${D}${bindir}
    install -m 0755 hello-app ${D}${bindir}/
}
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/hello-mod/files/src/Makefile
New file
@@ -0,0 +1,14 @@
obj-m := hello.o
SRC := $(shell pwd)
all:
    $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
    $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
    rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
    rm -f Module.markers Module.symvers modules.order
    rm -rf .tmp_versions Modules.symvers
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/hello-mod/files/src/hello.c
New file
@@ -0,0 +1,34 @@
/*********************************************************************************
 *      Copyright:  (C) 2024 LingYun IoT System Studio.
 *                  All rights reserved.
 *
 *       Filename:  hello.c
 *    Description:  This file is hello example kernel module build in yocto
 *
 *        Version:  1.0.0(2024/07/14)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "2024/07/14 10:34:45"
 *
 ********************************************************************************/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
int hello_init(void)
{
    printk("Hello, hello-module loaded!\n");
    return 0;
}
void hello_exit(void)
{
    printk("Goodbye, hello-module unloaded!\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Guo Wenxue");
MODULE_DESCRIPTION("A Simple Hello Kernel Module");
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/hello-mod/hello-mod.bb
New file
@@ -0,0 +1,26 @@
SUMMARY = "My Custom Linux Kernel Hello Module"
DESCRIPTION = "${SUMMARY}"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
SRC_URI = "file://src/Makefile \
           file://src/hello.c \
          "
S = "${UNPACKDIR}/src"
inherit module
KERNEL_MODULE_AUTOLOAD = "hello"
do_compile() {
    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
    oe_runmake -C ${STAGING_KERNEL_DIR} M=${S}
}
do_install() {
    install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
    install -m 0644 ${S}/hello.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra/
}
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/linux/files/readme
New file
@@ -0,0 +1 @@
Please copy linux kernel patch file to here
bsp/yocto/meta-igkboard/wrynose/recipes-kernel/linux/linux-imx_%.bbappend
New file
@@ -0,0 +1,42 @@
require recipes-kernel/linux/linux-yocto.inc
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += " file://linux-imx-lf-6.18.20-2.0.0.patch "
PATCHTOOL = "patch"
KERNEL_DANGLING_FEATURES_WARN_ONLY="1"
KERNEL_DTC_FLAGS = "-@"
KERNEL_DTOVERLAY ?= ""
do_copy_defconfig:append() {
    if [ "${TARGET_ARCH}" = "arm" ]; then
        cp ${S}/arch/arm/configs/${MACHINE}_defconfig ${WORKDIR}/defconfig
        cp ${S}/arch/arm/configs/${MACHINE}_defconfig ${B}/.config
    else
        cp ${S}/arch/arm64/configs/${MACHINE}_defconfig ${WORKDIR}/defconfig
        cp ${S}/arch/arm64/configs/${MACHINE}_defconfig ${B}/.config
    fi
}
do_compile:append() {
    if [ -n "${KERNEL_DTC_FLAGS}" ]; then
        export DTC_FLAGS="${KERNEL_DTC_FLAGS}"
    fi
    for dtbf in ${KERNEL_DTOVERLAY}; do
        dtb=`normalize_dtb "$dtbf"`
        oe_runmake $dtb CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
    done
}
do_deploy:append(){
    install -d ${DEPLOYDIR}/overlays
    if [ "${TARGET_ARCH}" = "arm" ]; then
        dtbo_path="${B}/arch/arm/boot/dts/nxp/imx/${MACHINE}"
    else
        dtbo_path="${B}/arch/arm64/boot/dts/freescale/${MACHINE}"
    fi
    cp $dtbo_path/*.dtbo ${DEPLOYDIR}/overlays/
}
bsp/yocto/meta-igkboard/wrynose/recipes-misc/expand-rootfs/expand-rootfs_1.0.bb
New file
@@ -0,0 +1,16 @@
DESCRIPTION = "Expand rootfs space on MMC"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI = "file://expand_rootfs"
FILES:${PN} += "${sbindir}/expand_rootfs"
do_install() {
    install -d ${D}/${sbindir}/
    install -m 0755 ${UNPACKDIR}/expand_rootfs ${D}/${sbindir}/
}
RDEPENDS:expand-rootfs = "bash"
bsp/yocto/meta-igkboard/wrynose/recipes-misc/expand-rootfs/files/expand_rootfs
New file
@@ -0,0 +1,31 @@
#!/bin/bash
set -e
set -u
# find the root partition information
ROOT_PART="$(mount | sed -n 's|^/dev/\(.*\) on / .*|\1|p')"
ROOT_DEV="/dev/$(lsblk -no pkname /dev/${ROOT_PART})"
PART_NUM="$(echo $ROOT_PART | grep -o "[[:digit:]]*$")"
# Get the starting offset of the root partition
PART_START=$(fdisk -l $ROOT_DEV | grep $ROOT_PART | awk '{print $2}')
[ "$PART_START" ] || return 1 ;
fdisk "$ROOT_DEV" > /dev/null 2>&1 <<EOF
p
d
$PART_NUM
n
p
$PART_NUM
$PART_START
p
w
EOF
resize2fs /dev/$ROOT_PART > /dev/null 2>&1
echo "Expand rootfs size successfully, it will be enlarged upon the next reboot."
bsp/yocto/meta-igkboard/wrynose/recipes-misc/ifup-ppp/files/gprs-chat
New file
@@ -0,0 +1,18 @@
# FILE:/etc/ppp/gprs-chat
# Copyright (C) 2011 GuoWenxue <guowenxue@gmail.com>
# This is second part of the ppp dial script. It will perform the connection
# protocol for the desired connection by chat with modem.
#
        ABORT           'BUSY'
        ABORT           'NO ANSWER'
        ABORT           'NO CARRIER'
        ABORT           'NO DIALTONE'
        ABORT           'ERROR'
        ABORT           '\nRING\r\n\r\nRING\r'
        TIMEOUT         20
        ''              ATE0
        OK              AT+CGDCONT=1,"IP","$APN"
        OK              ATD$DIALNUM
        SAY             " + requesting data connection\n"
        CONNECT         ''
        SAY             " + connected\n"
bsp/yocto/meta-igkboard/wrynose/recipes-misc/ifup-ppp/files/ifup-ppp
New file
@@ -0,0 +1,175 @@
#!/bin/sh
# FILE:/usr/sbin/ifup-ppp
# Copyright (C) 2011 GuoWenxue <guowenxue@gmail.com>
# This file used to do PPP dial up.
#--------------------------------------------------
#     Function definition here
#--------------------------------------------------
usage()
{
   prog=`basename $0`
   echo "$prog Usage: $prog [-d /dev/ttyUSB0] [-a apn] [-u username] [-p password] [-v chap/pap] [-i ipaddr] pppXX"
   echo ""
   echo " This shell script used to do pppd dial up on GPRS/3G modem, if no options gived, it"
   echo "will use the default configure file \"$network_cfg_dir/ifcfg-pppXX\". If get options"
   echo "in this command, it will use the option from the command line, and be careful the -d"
   echo "option must be given to specify the modem device."
   echo ""
   echo "pppXX: Required, specify the dial up generated PPP device, such as ppp10."
   echo "-d: Required, if use command line options, specify the modem TTY device."
   echo "-a: Option, APN(Access Point Name) for the SIM card provider."
   echo "-u: Option, username for the GPRS login if needed."
   echo "-p: Option, password for the GPRS login if needed."
   echo "-v: Option, authenticate method, pap or chap."
   echo "-i: Option, <local_IP_address>:<remote_IP_address> such as 0.0.0.0:0.0.0.0 "
   echo "Example: ifup-ppp -d /dev/ttyUSB0 -a 3gnet -u uid -p pwd ppp10"
   echo ""
   echo "Copyright (C) 2011 GuoWenxue <guowenxue@gmail.com>"
   exit
}
#===============================
#   Global variable declare    =
#===============================
modem=
inf=
apn=
uid=
pwd=
# Configure file
if [ -z "$network_cfg_dir" ];  then
   export network_cfg_dir=/apps/etc/network
fi
#===============================
#    Shell body start here     =
#===============================
if [ $# -lt 1 ] ; then
   usage;
elif [ $# -eq 1 ] ; then
   inf=$1
   conf=ifcfg-$inf
   cd $network_cfg_dir
   if [ ! -f $conf ]; then
     echo "================================================================================="
     echo "ERROR: $inf dial up configure file \"$network_cfg_dir/$conf\" not found!"
     echo "================================================================================="
     echo ""
     usage;
     exit;
   fi
   . $conf
   modem=$MODEM
   apn=$APN
   uid=$USERNAME
   pwd=$PASSWORD
   vrfy=$VERIFY
   ipaddr=$IPADDR
   cd -
else
   while getopts "a:d:u:p:v:hi:" Option
   do
      case $Option in
         d) modem=$OPTARG ;;
         i) ipaddr=$OPTARG ;;
         a) apn=$OPTARG ;;
         u) uid=$OPTARG ;;
         p) pwd=$OPTARG ;;
         v) vrfy=$OPTARG ;;
         h) pwd=$OPTARG;   usage ;;
      esac
   done
   shift $(($OPTIND - 1))
   inf=$*
fi
if [ -z "$modem" ] ; then
   usage;
   exit;
fi
if [ ! -c "$modem" ] ; then
   echo "ERROR: Modem device $modem doesn't exist!"
   exit
fi
inf=$( echo $inf | tr -cd '[0-9]\n' )
# Chat script need these two variable
export APN=$apn
export DIALNUM="*99***1#"
chat_script="/etc/ppp/gprs-chat"
#======================
#  The pppd options   #
#======================
options="$modem 115200"
if [ -n "$uid" -a -n "pwd" ]; then
  options=$options" name $uid"
  options=$options" password $pwd"
fi
if [ -n "$inf" ] ; then
  options=$options" unit $inf"
fi
if [ "$vrfy" == "chap" ] ; then
   options=$options" require-chap"
else
   options=$options" require-pap"
fi
# Restart after idle X second
options=$options" idle 86400"
options=$options" refuse-mschap refuse-mschap-v2 refuse-eap"
options=$options" nodefaultroute updetach"
options=$options" debug"
options=$options" lcp-echo-failure 3 lcp-echo-interval 5"
options=$options" ipcp-accept-local ipcp-accept-remote ipcp-restart 50"
options=$options" modem crtscts"
if [ -n "$ipaddr" ] ; then
  options=$options" $ipaddr"
fi
# Let the phone figure out all the IP addresses
options=$options" noipdefault"
options=$options" noauth"
# No ppp compression
options=$options" novj noccp novjccomp"
# For sanity, keep a lock on the serial line
options=$options" lock"
#=================================
#  PPP dial up command start up  #
#=================================
set -x
#chat option should can be: -v -E -V -f
pppd $options connect "/usr/sbin/chat -v -E -f $chat_script"
if [ -d /sys/class/net/ppp$inf ] ; then
   ip route add default dev ppp$inf metric 10
   #ip route add default dev ppp$inf
   /apps/tools/gatewayD > /dev/null 2>&1
fi
bsp/yocto/meta-igkboard/wrynose/recipes-misc/ifup-ppp/ifup-ppp_1.0.bb
New file
@@ -0,0 +1,19 @@
DESCRIPTION = "4G Modem ppp dial up tools"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += " file://ifup-ppp "
SRC_URI += " file://gprs-chat "
FILES:${PN} += "${sbindir}/ifup-ppp"
FILES:${PN} += "${sysconfdir}/ppp/gprs-chat"
do_install() {
    install -d ${D}/${sbindir}/
    install -d ${D}/${sysconfdir}/ppp
    install -m 0755 ${UNPACKDIR}/ifup-ppp ${D}/${sbindir}/
    install -m 0755 ${UNPACKDIR}/gprs-chat ${D}/${sysconfdir}/ppp
}
RDEPENDS:expand-rootfs = "bash"
bsp/yocto/meta-igkboard/wrynose/recipes-misc/packagegroups/packagegroup-misc-utils.bb
New file
@@ -0,0 +1,6 @@
SUMMARY = "OpenSSH SSH client/server"
PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = "expand-rootfs wpa-conf ifup-ppp"
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/files/10-eth0.network
New file
@@ -0,0 +1,11 @@
[Match]
Name=eth0
[Network]
DHCP=yes
#[Network]
#Address=192.168.1.188/24
#Gateway=192.168.1.1
#DNS=8.8.8.8
#DNS=4.2.2.2
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/files/20-wlan0.network
New file
@@ -0,0 +1,11 @@
[Match]
Name=wlan0
[Network]
DHCP=yes
#[Network]
#Address=192.168.5.188/24
#Gateway=192.168.5.1
#DNS=8.8.8.8
#DNS=4.2.2.2
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/files/wpa-conf.service
New file
@@ -0,0 +1,11 @@
[Unit]
Description=Enable wpa_supplicant service
Requires=sys-subsystem-net-devices-wlan0.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c "systemctl enable --now wpa_supplicant@wlan0"
[Install]
WantedBy=multi-user.target
bsp/yocto/meta-igkboard/wrynose/recipes-misc/wpa-conf/wpa-conf_1.0.bb
New file
@@ -0,0 +1,31 @@
DESCRIPTION = "Default eth0 and wlan0 network service"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
inherit systemd
SYSTEMD_AUTO_ENABLE = "enable"
SYSTEMD_SERVICE:${PN} = "wpa-conf.service"
WLAN_DEV ?= "wlan0"
SRC_URI += " file://10-eth0.network "
SRC_URI += " file://20-wlan0.network "
SRC_URI += " file://wpa-conf.service "
FILES:${PN} += "${sysconfdir}/systemd/network/10-eth0.network"
FILES:${PN} += "${sysconfdir}/systemd/network/20-wlan0.network"
FILES:${PN} += "${systemd_unitdir}/system/wpa-conf.service"
do_install() {
    install -d ${D}/${systemd_unitdir}/system
    install -d ${D}${sysconfdir}/systemd/network
    install -m 0644 ${UNPACKDIR}/10-eth0.network ${D}${sysconfdir}/systemd/network
    install -m 0644 ${UNPACKDIR}/20-wlan0.network ${D}${sysconfdir}/systemd/network
    sed -i "s|wlan0|${WLAN_DEV}|g" ${D}${sysconfdir}/systemd/network/20-wlan0.network
    install -m 0644 ${UNPACKDIR}/wpa-conf.service ${D}/${systemd_unitdir}/system
    sed -i "s|wlan0|${WLAN_DEV}|g" ${D}/${systemd_unitdir}/system/wpa-conf.service
}
bsp/yocto/meta-igkboard/wrynose/recipes-qt/packagegroups/packagegroup-qt6-addons.bbappend
New file
@@ -0,0 +1,12 @@
RDEPENDS:${PN}:remove = " \
    qt3d \
    qtdatavis3d \
    qtquick3d \
    qtquick3dphysics \
    qtopcua \
    qthttpserver \
    qtlocation \
    qtlottie \
    qtpositioning \
    qtspeech \
"