guowenxue
2024-07-26 9cf87703eb60e121b47e6d577ea2bc6b63bd4ac4
commit | author | age
52646c 1 SUMMARY = "A multimedia wth full command image for production"
849fbd 2 LICENSE = "MIT"
G 3
4 inherit core-image
9cf877 5 inherit extrausers
G 6 inherit populate_sdk_qt6_base
849fbd 7
G 8 # additional free disk space created in Kbytes
9 #IMAGE_OVERHEAD_FACTOR = "1.0"
10 #IMAGE_ROOTFS_EXTRA_SPACE = "512000"
11
9cf877 12 CONFLICT_DISTRO_FEATURES = "directfb"
849fbd 13
9cf877 14 # Select Image Features
281a7f 15 IMAGE_FEATURES += " \
G 16     hwcodecs \
17     ssh-server-openssh \
18     package-management \
bf3c1b 19     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'weston', \
G 20        bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11-base x11-sato', '', d), d)} \
281a7f 21 "
G 22
52646c 23 CORE_IMAGE_EXTRA_INSTALL_BASE += " \
281a7f 24     packagegroup-base-wifi \
G 25     packagegroup-imx-isp \
26     packagegroup-imx-security \
27     packagegroup-fsl-tools-audio \
28     packagegroup-core-full-cmdline \
29     packagegroup-tools-bluetooth \
30     packagegroup-core-ssh-openssh \
31     packagegroup-fsl-gstreamer1.0 \
32     packagegroup-fsl-gstreamer1.0-full \
52646c 33     packagegroup-fsl-tools-benchmark \
G 34     packagegroup-fsl-opencv-imx \
9cf877 35     packagegroup-qt6-essentials \
281a7f 36     packagegroup-misc-utils \
9cf877 37     ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'weston-xwayland xterm', '', d)} \
281a7f 38 "
G 39
52646c 40 CORE_IMAGE_EXTRA_INSTALL_BASE += " \
17e726 41     kernel-modules hello-app hello-mod \
a0be3f 42     rtl8188fu rtl8723du \
281a7f 43     firmwared linux-firmware \
G 44     powertop tzdata ppp vim \
45     xz lrzsz rsync dos2unix \
46     gnupg parted inetutils \
47     hostapd wireless-tools iw \
52646c 48     i2c-tools spidev-test spitools \
9cf877 49     libgpiod libgpiod-tools mosquitto \
b96bc1 50     fb-test fbgrab libdrm ffmpeg \
281a7f 51     opencv zbar v4l-utils yavta \
G 52     alsa-state pulseaudio-server \
b89468 53     python3 python3-pip tmux \
281a7f 54     openssh-sftp openssh-sftp-server \
G 55     memtester pcsc-tools stunnel ntp \
b89468 56     curl evtest cpufrequtils iperf3 \
52646c 57     dosfstools ethtool iproute2 modemmanager \
281a7f 58     e2fsprogs-mke2fs e2fsprogs-resize2fs \
52646c 59     cryptodev-module openssl-bin \
87a2bb 60     libsocketcan can-utils canutils \
bf3c1b 61     ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'weston-xwayland xterm', '', d)} \
52646c 62 "
G 63
64 # For machine igkboard-imx6ull
65 CORE_IMAGE_EXTRA_INSTALL = " \
66     ${CORE_IMAGE_EXTRA_INSTALL_BASE} \
67 "
68
69 # For machine igkboard-imx8mp
70 CORE_IMAGE_EXTRA_INSTALL:igkboard-imx8mp = " \
71     ${CORE_IMAGE_EXTRA_INSTALL_BASE} \
72     packagegroup-fsl-tools-gpu \
73     packagegroup-fsl-tools-gpu-external \
74     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'weston-init', '', d)} \
75     git gcc gcc-symlinks binutils automake cmake autoconf freerdp \
281a7f 76 "
G 77
9cf877 78 # Set the root password:  >> mkpasswd -m sha256crypt 123456 -S abcd6789
G 79 # Remember to escape the character $ in the resulting hash
80 #PASSWD="\$5\$abcd6789\$2ayD.ZPdq5xejNiyE3XC3qCpkGZ.brSE5H0zSECVBSB"
81 EXTRA_USERS_PARAMS = "\
82     usermod -p '${PASSWD}' root; \
83 "
84
281a7f 85 modify_rootfs() {
G 86
87     # Modify default environment
88     echo "alias ls='ls --color=auto'" >> ${IMAGE_ROOTFS}/etc/profile
89
90     # Update wpa_supplicant service
91     sed -i "/^After=/d" ${IMAGE_ROOTFS}/lib/systemd/system/wpa_supplicant@.service
92 }
93
94 # Remove unused files in rootfs
95 doclean_rootfs() {
96
97     # remove unsed test apps
98     rm -rf ${IMAGE_ROOTFS}/unit_tests
99
9cf877 100     # remove unused license files
G 101     rm -rf ${IMAGE_ROOTFS}/lib/firmware/LICEN*
102     rm -rf ${IMAGE_ROOTFS}/lib/firmware/*.ucode
103     rm -rf ${IMAGE_ROOTFS}/lib/firmware/*.pnvm
104
281a7f 105     # remove unsed firmware
9cf877 106     rm -rf ${IMAGE_ROOTFS}/lib/firmware/3com*
G 107     rm -rf ${IMAGE_ROOTFS}/lib/firmware/[a-h]*
108     rm -rf ${IMAGE_ROOTFS}/lib/firmware/i[9ns]*
109     rm -rf ${IMAGE_ROOTFS}/lib/firmware/[j-l]*
110     rm -rf ${IMAGE_ROOTFS}/lib/firmware/me[ls]*
111     rm -rf ${IMAGE_ROOTFS}/lib/firmware/m[aiortwy]*
112     rm -rf ${IMAGE_ROOTFS}/lib/firmware/n[ev]*
113     rm -rf ${IMAGE_ROOTFS}/lib/firmware/[o-q]*
114     rm -rf ${IMAGE_ROOTFS}/lib/firmware/r[18aops]*
115     rm -rf ${IMAGE_ROOTFS}/lib/firmware/[s-z]*
281a7f 116 }
G 117
9cf877 118 ROOTFS_POSTPROCESS_COMMAND += " modify_rootfs; doclean_rootfs; "