From 281a7fcd5924e749a96967393828421caea68e93 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Fri, 22 Dec 2023 18:59:19 +0800 Subject: [PATCH] Add meta-igkboard for igkboard-imx8mp in yocto --- yocto/meta-igkboard/images/yocto-image-full.bb | 134 +++++++++++++++++++++++++------------------- 1 files changed, 76 insertions(+), 58 deletions(-) diff --git a/yocto/meta-igkboard/images/yocto-image-full.bb b/yocto/meta-igkboard/images/yocto-image-full.bb index c87830a..dec0f09 100644 --- a/yocto/meta-igkboard/images/yocto-image-full.bb +++ b/yocto/meta-igkboard/images/yocto-image-full.bb @@ -7,68 +7,86 @@ #IMAGE_OVERHEAD_FACTOR = "1.0" #IMAGE_ROOTFS_EXTRA_SPACE = "512000" -## Select Image Features -IMAGE_FEATURES += " \ - ssh-server-openssh \ - hwcodecs \ - package-management \ -" - -CORE_IMAGE_EXTRA_INSTALL += " \ - packagegroup-base-wifi \ - packagegroup-core-full-cmdline \ - packagegroup-tools-bluetooth \ - packagegroup-fsl-tools-audio \ - packagegroup-imx-isp \ - packagegroup-imx-security \ - packagegroup-fsl-gstreamer1.0 \ - packagegroup-fsl-gstreamer1.0-full \ - packagegroup-core-ssh-openssh \ - openssh-sftp openssh-sftp-server \ - firmwared \ -" - -inherit populate_sdk_qt6_base - -CONFLICT_DISTRO_FEATURES = "directfb" -CORE_IMAGE_EXTRA_INSTALL:append = " packagegroup-qt6-imx tzdata " - -CORE_IMAGE_EXTRA_INSTALL:append = " \ - opencv zbar \ - gnupg \ - parted \ - v4l-utils \ - inetutils \ - hostapd \ - wireless-tools \ - spitools \ - alsa-state \ - expand-rootfs \ - wpa-conf \ - pulseaudio-server \ - xz lrzsz \ - yavta \ - libgpiod libgpiod-tools \ - powertop \ - dos2unix \ - rsync \ - python3 \ - python3-pip \ -" - -# Modify default environment -modify_env() { - echo "alias ls='ls --color=auto'" >> ${IMAGE_ROOTFS}/etc/profile -} -ROOTFS_POSTPROCESS_COMMAND += "modify_env; " - inherit extrausers # Create the password hash with following command on host: -# >> mkpasswd -m sha256crypt igkboard -S abcd6789 +# >> mkpasswd -m sha256crypt password -S abcd6789 # Remember to escape the character $ in the resulting hash -# Set the root password: igkboard -#PASSWD="\$5\$abcd6789\$vlMo5CC1IJlipoXWQifbiMJ8fZqRIV26EXIi97RxPjC" +# Set the root password: +#PASSWD="\$5\$abcd6789\$Vuv1aLz04ZwhxgsB3lOQbwy1XUS6PJ.8h2A7.9HoUd3" EXTRA_USERS_PARAMS = "\ usermod -p '${PASSWD}' root; \ " + +## Select Image Features +IMAGE_FEATURES += " \ + hwcodecs \ + ssh-server-openssh \ + package-management \ +" + +CONFLICT_DISTRO_FEATURES = "directfb" + +CORE_IMAGE_EXTRA_INSTALL += " \ + 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-qt6-modules \ + packagegroup-misc-utils \ +" + +CORE_IMAGE_EXTRA_INSTALL += " \ + kernel-modules \ + firmwared linux-firmware \ + powertop tzdata ppp vim \ + xz lrzsz rsync dos2unix \ + gnupg parted inetutils \ + hostapd wireless-tools iw \ + i2c-tools spidev-test \ + libgpiod libgpiod-tools \ + opencv zbar v4l-utils yavta \ + alsa-state pulseaudio-server \ + python3 python3-pip \ + openssh-sftp openssh-sftp-server \ + memtester pcsc-tools stunnel ntp \ + curl evtest cpufrequtils \ + dosfstools ethtool iproute2 \ + e2fsprogs-mke2fs e2fsprogs-resize2fs \ +" + +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 unsed firmware + mkdir -p ${IMAGE_ROOTFS}/lib/firmware/.bak + + mv ${IMAGE_ROOTFS}/lib/firmware/imx* ${IMAGE_ROOTFS}/lib/firmware/.bak + mv ${IMAGE_ROOTFS}/lib/firmware/nxp* ${IMAGE_ROOTFS}/lib/firmware/.bak + mv ${IMAGE_ROOTFS}/lib/firmware/mediatek ${IMAGE_ROOTFS}/lib/firmware/.bak + mv ${IMAGE_ROOTFS}/lib/firmware/mt76* ${IMAGE_ROOTFS}/lib/firmware/.bak + mv ${IMAGE_ROOTFS}/lib/firmware/rtl* ${IMAGE_ROOTFS}/lib/firmware/.bak + + rm -rf ${IMAGE_ROOTFS}/lib/firmware/* + mv ${IMAGE_ROOTFS}/lib/firmware/.bak/* ${IMAGE_ROOTFS}/lib/firmware/ + rm -rf ${IMAGE_ROOTFS}/lib/firmware/.bak +} + +ROOTFS_POSTPROCESS_COMMAND += "modify_rootfs; doclean_rootfs; " -- Gitblit v1.9.1