Introduction
(This guide describes Advantech's Yocto 3.0 (Zeus) BSP for NXP i.MX8 platforms, including setup, build, flashing, customization, recovery, and reference lists.)
Getting Started
Building Yocto Image — System Requirements
- CPU Cores: Quad‑core processor (or higher recommended)
- Memory: 8 GB RAM (more recommended)
- Disk Space: 350 GB (SSD recommended for best performance)
Conventions
-
${PREBUILT_IMAGE}— prebuilt image archive (*.img.gz) -
${CONTAINER_NAME}— Docker container name (e.g.,imx8LBVA0016) -
${BSP_TARBALL}— BSP tarball (*.tgz) -
${BSP_HOME}— BSP root directory -
${BDIR}— build directory (e.g.,build_x11) -
${MX8PROC}— i.MX8 SoC short codemx8mqfor i.MX8M Quad/Dualmx8mmfor i.MX8M Minimx8mpfor i.MX8M Plusmx8qmfor i.MX8 QuadMaxmx8qxpfor i.MX8 QuadXPlus
-
${IMX8PROC}— i.MX8 SoC name:imx8mq/imx8mm/imx8mp/imx8qm/imx8qxp -
${BOARD}— target boards:rom5720 rom5721 rom7720 rom5620 rom3620 rom5722 rsb3720 epcr5710 rsb3730 -
${BOARD_REV}— board revision, e.g.,a1 -
${MC}— machine code, combined as${IMX8PROC}${BOARD}${BOARD_REV}
Examples:imx8mqrom5720a1→ ROM‑5720 A1imx8qmrom7720a1→ ROM‑7720 A1imx8qxprom5620a1→ ROM‑5620 A1imx8qxprom3620a1→ ROM‑3620 A1imx8mmrom5721a1→ ROM‑5721 A1imx8mprom5722a1→ ROM‑5722 A1imx8mprsb3720a1→ RSB‑3720 A1imx8mpepcr5710a1→ EPC‑R5710 A1imx8mmrsb3730a2→ RSB‑3730 A2
You can also list supported machines:
$ source setup-environment -
${MEM_SIZE}— memory size, e.g.,2G/4G -
${UC}— U‑Boot config:1G/2G/4G/FSPI_1G/FSPI_2G… -
${SD_DEVICE}— SD device on host Linux, e.g.,/dev/sdf -
${SDCARD_IMAGE}— SD image from bitbake- VA0033–VA0362:
*.wic.bz2 - VA0386–latest:
*.sdcard
- VA0033–VA0362:
-
${WORKSPACE}— host workspace directory -
${UBOOT}— U‑Boot version (e.g.,2016.03) -
${KERNEL}— Linux kernel version (e.g.,5.4.x) -
${TOOLCHAIN}— toolchain directory (e.g.,/opt/fsl-imx-x11/4.1.15-2.0.0)
Debug console / serial console: any serial terminal (minicom/putty/teraterm) at 115200 8N1.
Terminal console: terminal emulator (gnome‑terminal, xfce4‑terminal, etc.)
Docker Install and Setup
If Docker is not installed on your host, please install Docker Engine per your distribution’s instructions.
Pull Ubuntu 18.04 image
docker pull advrisc/u18.04-imx8lbv1
Create a container
docker run --privileged -it --name ${CONTAINER_NAME} -v ${WORKSPACE}:/home/adv/adv-release-bsp -v /dev:/dev -v /lib/modules:/lib/modules -v /usr/src:/usr/src advrisc/u18.04-imx8lbv1 /bin/bash
Get BSP
You can either clone from GitHub (legacy) or unpack an internal BSP tarball.
Download BSP from GitHub (legacy/migrated)
Create project directory and init the manifest (example uses imx8LBVA0428.xml on imx-linux-zeus):
git config --global user.name "Your Name"
git config --global user.email you@example.com
sudo chown adv:adv adv-release-bsp
cd adv-release-bsp
repo init -u git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git -b imx-linux-zeus -m imx8LBVA0428.xml
repo sync
Get the latest BSP (example manifest):
repo init -u git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git -b imx-linux-zeus -m imx-5.4.70-2.3.0.xml
repo sync
Network/protocol tips:
# Disable SSL verification for self-signed endpoints (not recommended globally)
export GIT_SSL_NO_VERIFY=1
git config --global http.sslverify false
# If unauthenticated git:// 9418 is blocked:
git config --global url."https://".insteadOf git://
Important: As of 2023‑03‑31, the public repos were migrated; direct repo sync with some manifests can fail.
- If you use a current (pinned) XML,
repo syncmay still succeed. Example:repo init -u https://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git -b imx-linux-zeus -m imx-5.4.70-2.3.0.xml - If you use a tagged XML and hit errors, follow the internal Yocto3.0_Repo_Fail_SOP to update remotes and manifests.
Copy BSP Tarball to Container
If you have a BSP tarball (e.g., imx8LBVA0029_2020-10-23.tgz):
- Exit container back to host
exit
- Copy tarball to
${WORKSPACE}and fix ownership
cp imx8LBVA0029_2020-10-23.tgz /home/adv/adv-release-bsp
sudo chown adv:adv /home/adv/adv-release-bsp/imx8LBVA0029_2020-10-23.tgz
- Reattach container
docker start ${CONTAINER_NAME}
docker attach ${CONTAINER_NAME}
- Unpack
tar zxvf imx8LBVA0029_2020-10-23.tgz
Downloads Tarball (Optional but Recommended)
During builds Yocto creates a downloads directory of source tarballs; to reduce fetch errors, use a prefilled downloads bundle:
downloads_imx8_5.4.24.tar.gz— md5:648a6aa9d03be61ee21611b729250319downloads_imx8_5.4.70.tar.gz— md5:ec2a0da745e57329a73965f9bd7ff0c9
Steps:
- Exit container
exit
- Copy downloads tarball into
${WORKSPACE}and chown
cp downloads_imx8_5.4.24.tar.gz /home/adv/adv-release-bsp
sudo chown adv:adv /home/adv/adv-release-bsp/downloads_imx8_5.4.24.tar.gz
- Reattach container
docker start ${CONTAINER_NAME}
docker attach ${CONTAINER_NAME}
- Unpack and link
tar zxvf downloads_imx8_5.4.24.tar.gz
cd adv-release-bsp
ln -s /home/adv/adv-release-bsp/downloads_imx8_5.4.24 downloads
Introducing the BSP
Advantech’s BSP builds on the Yocto Project with NXP i.MX8 enhancements and Advantech board support.
sources/— Yocto layers from community, NXP, and Advantechfsl-setup-release.sh— create a new build envsetup-environment— resume existing build env
Naming Rules
- BSP Tarball:
imx8LBVA0010_2019-08-27.tgzLB= Linux BSP,VA0010= Version A.0010
- Yocto Image: e.g.,
5720A1AIM20LIVA0010_iMX8M_2G_2020-08-27.img.gz5720A1board/rev,LI= Linux Image,2GDDR size
BSP Content (Key Paths)
sources/meta-advantech/— Advantech meta layersources/meta-fsl-*— NXP/Freescale layersfsl-setup-release.sh— build env scriptsetup-environment— resume env script
Build Instructions
Create a New Build Environment
cd ${BSP_HOME}
MACHINE=${MC} DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b ${BDIR}
During first run you will be asked to accept the EULA (see screenshot img/Accept_EULA.png).
Resume an Existing Build Environment
cd ${BSP_HOME}
source setup-environment ${BDIR}
Build SD Card Image
bitbake imx-image-full
Output (success):
- VA0033–VA0362:
imx-image-full-${MC}.wic.bz2 - VA0386–latest:
imx-image-full-${MC}.rootfs.sdcard
Location:./tmp/deploy/images/${MC}
Build Toolchain Installer
bitbake meta-toolchain
Output (under ./tmp/deploy/sdk):
fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-${KERNEL}-zeus.sh
Build Bootloader
bitbake imx-boot
Build Linux Kernel
If building inside Docker, install tmux to safely run menuconfig:
sudo apt-get update && sudo apt-get install -y tmux
tmux
bitbake linux-imx -c menuconfig
# exit tmux when done
exit
Build the kernel:
bitbake linux-imx
Outputs: Image and Image-${IMX8PROC}-${BOARD}-${BOARD_REV}.dtb in ./tmp/deploy/images/${MC}.
Creating Boot Media
From Prebuilt Image — Create Bootable SD Card
sudo sh -c 'gunzip -c ${PREBUILT_IMAGE} | dd of=${SD_DEVICE} bs=1M status=progress && sync'
From Built SD Image — Create Bootable SD Card
pushd ${BSP_HOME}/${BDIR}/tmp/deploy/images/${MC}
# choose the proper .wic.bz2 or .sdcard and write to ${SD_DEVICE}
popd
Serial Console Preparation
- Hardware: see your board’s debug port mapping (Debug Port Information).
- Software: use
minicom/putty; set 115200 baud.
One‑Step Build Script (Docker)
Download and execute:
wget https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh
sudo chmod a+x adv_imx8_build.sh
sudo ./adv_imx8_build.sh ${BOARD}
# Example:
sudo ./adv_imx8_build.sh rom5720
Artifacts will be in:
${BDIR}/tmp/deploy/images/${MC}
Then proceed to SD creation as described above.
Customization
Package Addition
Add tcf-agent & openssh-sftp-server
Edit sources/meta-advantech/meta-fsl-imx/recipes-fsl/images/fsl-image-adv.inc:
IMAGE_INSTALL += " tcf-agent openssh-sftp-server "
Add Chromium Browser
Edit ${BDIR}/conf/local.conf:
Method 1 (recommended):
CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland"
Method 2:
IMAGE_INSTALL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' chromium-ozone-wayland libexif', bb.utils.contains('DISTRO_FEATURES','x11', ' chromium-x11 libexif', '', d), d)}"
LICENSE_FLAGS_WHITELIST = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'commercial', bb.utils.contains('DISTRO_FEATURES','x11','commercial','', d), d)}"
Add QtWebEngine
Edit ${BDIR}/conf/local.conf:
IMAGE_INSTALL_append += " packagegroup-qt5-webengine "
Re‑source the env and rebuild the SD image.
Setting Up SDK
Build the toolchain installer (see above), then on host:
cd ${BSP_HOME}/${BDIR}/tmp/deploy/sdk
sudo ./fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-5.4-zeus.sh
Follow prompts to choose install directory and proceed until completion.
Set Cross‑Compile Environment
source ${TOOLCHAIN}/environment-setup-aarch64-poky-linux
Build U‑Boot Standalone
Configure U‑Boot
make ${IMX8PROC}_${BOARD}${BOARD_REV}_${MEM_SIZE}_defconfig
# Example:
make imx8mm_rom5721a1_2G_defconfig
Build U‑Boot
make -j$(nproc)
Build imx-boot with imx-mkimage
Example (ROM‑5721):
tar zxvf 5721A1AIM20LIVA0118_iMX8MM_imx-boot.tgz
cd 5721A1AIM20LIVA0118_iMX8MM_imx-boot/
# Copy necessary files into imx-mkimage
./cp_uboot.sh ${uboot_path} ${IMX8PROC}
# Build imx-boot image
./mk_imx-boot.sh ${IMX8PROC}
# Example:
./cp_uboot.sh ../uboot-imx6 imx8m
./mk_imx-boot.sh imx8mm
Replace imx-boot on eMMC
sudo dd if=flash.bin of=/dev/mmcblk0 bs=1K seek=<offset> conv=fsync
Offsets:
33— i.MX8QM A0, i.MX8QXP A0, i.MX8M Quad/Mini32— i.MX8M Plus, i.MX8QXP B0/C0, i.MX8QM B0
Building & Updating Kernel/Modules/DTB Manually
Assumes SDK env is sourced.
Unpack Kernel Tarball (inside container)
sudo chown adv:adv imx8LBVA0029_2019-10-23_linux-imx.tgz
tar zxvf imx8LBVA0029_2019-10-23_linux-imx.tgz
Configure Kernel
cd linux-imx
make distclean
make imx_v8_adv_defconfig
make menuconfig
Build Kernel Image
make -j$(nproc) Image
If you see linker flags issues, try:
unset LDFLAGS
Kernel image path: ./arch/arm64/boot/Image
Build Modules
make -j$(nproc) modules
make modules_install INSTALL_MOD_PATH=~/temp/rootfs
Build DTB
make -j$(nproc) freescale/${IMX8PROC}-${BOARD}-${BOARD_REV}.dtb
# Example:
make -j$(nproc) freescale/imx8mq-rom5720-a1.dtb
Replace Kernel & DTB
Copy Image and the board DTB into your target’s boot partition (SD/eMMC) as appropriate.
Improve Boot Speed
Bootloader
-
Boot delay
setenv bootdelay 0
env save
reset -
Disable console output (reduces boot log noise)
Kernel quiet:
setenv mmcargs 'setenv bootargs ${jh_clk} console=${console} modprobe.blacklist=${modprobe.blacklist} root=${mmcroot} video=HDMI-A-1:${videores} quiet'
env save
resetDisable debug UART:
- Yocto machine setting: edit
sources/meta-advantech/meta-fsl-imx/conf/machine/${MC}.confSERIAL_CONSOLES = ";" - U‑Boot param (imx8mq/mm/mp):
setenv console disabled
env save
reset - U‑Boot param (imx8qm/qxp):
setenv console disabled
setenv earlycon disabled
setenv mmcargs 'setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} root=${mmcroot}'
env save
reset
- Yocto machine setting: edit
Services
Disable unneeded services:
systemctl disable <service-name>
# Example
systemctl disable boottimes
System Recovery
If the onboard eMMC gets corrupted, recover using SD card or UUU tool.
Recovery by SD Card
- Copy
5720A1AIM20LIVA0022_iMX8M_flash_tool.tgzto your PC. - Insert SD card into PC.
- Make a bootable SD:
tar zxvf 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool.tgz
cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
sudo ./mksd-linux.sh /dev/sdg - Copy
5720A1AIM20LIVA0022_iMX8M_flash_toolto a USB disk. - Insert USB disk and SD card, then boot board from SD.
- Flash eMMC:
cd /run/media/sda1/
cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
sudo ./mksd-linux.sh /dev/mmcblk0
Recovery by UUU Tool
-
Download UUU (v20210429 or later).
-
Run:
- Linux:
sudo ./uuu - Windows:
uuu.exe
- Linux:
-
Prepare a folder containing:
1. uuu
2. imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
3. fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
4. Image_dtb.uuu
5. rootfs.uuu -
Connect OTG cable from PC to device.
-
Set correct boot mode and power on:
- ROM‑5722/5720/5721/5620:
1,2,3 = OFF; 4 = ON - ROM‑7720:
1,2,3,4,5,6 = OFFor1,2,4,5,6 = OFF; 3 = ON
- ROM‑5722/5720/5721/5620:
-
Example burn commands (note u‑boot 2019‑11‑01+ for
mmcblk0path):
# 1. Burn only U‑Boot
# a) to mmcblk0boot0
sudo ./uuu -b emmc imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
# b) to mmcblk0
sudo ./uuu -b emmc_adv imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
# 2. Burn U‑Boot + rootfs
# a) mmcblk0boot0
sudo ./uuu -b emmc_all imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
# b) mmcblk0
sudo ./uuu -b emmc_all_adv imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
-
UUU will write the images to eMMC.
-
Burn parts separately:
# a) Replace Image and DTB
# Step 1: rename files to:
# _Image
# _board.dtb
# Step 2:
sudo ./uuu Image_dtb.uuu
# b) Replace rootfs
# Step 1: rename rootfs tarball to:
# _rootfs.tar.bz2
# Step 2:
sudo ./uuu rootfs.uuu
For more usage, see NXP mfgtools documentation.
Package List
List all packages built into the image:
bitbake -g imx-image-full && cat task-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq
(Example set: 2019‑10‑25)
Show all recipes (incl. non‑installed):
bitbake -s
(Example set: 2019‑10‑25 — version list)
You can also examine:
${BDIR}/tmp/deploy/images/${MC}/fsl-image-qt5-validation-imx-${MC}.manifest
to match target package set (same as rpm on device):
On target device:
rpm -qa --root / --dbpath /var/lib/rpm | sort
Device Tree Selection at Boot
Select different DTBs in U‑Boot to enable display/camera variants, e.g.:
setenv fdt_file adv-imx8mm-rom5721-a1-dsi2dp.dtb
env save
boot
ROM‑5721 (i.MX8MM)
Display
- DSI→LVDS
imx8mm-rom5721-a1.dtb(g070vw01)imx8mm-rom5721-a1-dsi2lvds-g150xgel05.dtb(g150xgel05)imx8mm-rom5721-a1-dsi2lvds-g215hvn01.dtb(g215hvn01)
- DSI→DP
imx8mm-rom5721-a1-dsi2dp.dtb
- DSI→HDMI
imx8mm-rom5721-a1-adv7535.dtb
- DSI
imx8mm-rom5721-a1-auog101uan02.dtb(auog101uan02)
M.2 SDIO
- Adjust CN43–CN48:
imx8mm-rom5721-a1-m2-sdio.dtb
ROM‑5720 (i.MX8MQ)
Display
- DSI→HDMI
imx8mq-rom5720-a1-dcss-adv7535.dtbimx8mq-rom5720-a1-lcdif-adv7535.dtb
Weston UI: edit/etc/xdg/weston/weston.ini→drm-device=card2
- DSI
imx8mq-rom5720-a1-dcss-auog101uan02.dtb
Weston UI:drm-device=card2
- Dual Display (DSI→HDMI + HDMI)
imx8mq-rom5720-a1-dual-display.dtb
Weston UI:drm-device=card1
M.2 SDIO
- Adjust CN43–CN48:
imx8mq-rom5720-a1-m2-sdio.dtb
ROM‑5620 (i.MX8QXP)
Display
- LVDS
imx8qxp-rom5620-a1.dtb(g070vw01)imx8qxp-rom5620-a1-lvds-chimei.dtb(g150xgel05)imx8qxp-rom5620-a1-lvds-dual.dtb(g215hvn01)
- LVDS→HDMI / DSI→HDMI
imx8qxp-rom5620-a1-hdmi-bridge.dtb
- DSI
imx8qxp-rom5620-a1-auog101uan02.dtb
M.2 SDIO
- Adjust CN43–CN48:
imx8qxp-rom5620-a1-m2-sdio.dtb
ROM‑7720 (i.MX8QM)
Display
- HDMI
imx8qm-rom7720-a1.dtb
- LVDS
imx8qm-rom7720-a1-lvds0.dtb(g070vw01)imx8qm-rom7720-a1-lvds1.dtb(g070vw01)imx8qm-rom7720-a1-lvds-dual.dtb(g215hvn01)
- HDMI + LVDS
imx8qm-rom7720-a1-hdmi-lvds0.dtb(HDMI + g070vw01)imx8qm-rom7720-a1-hdmi-lvds1.dtb(HDMI + g070vw01)imx8qm-rom7720-a1-hdmi-lvds-dual.dtb(HDMI + g215hvn01)
- LVDS→HDMI
imx8qm-rom7720-a1-it6263.dtb
Audio Codec
imx8qm-rom7720-a1-sgtl5000.dtb
RSB‑3720 (i.MX8MP)
Display
- HDMI (default):
imx8mp-rsb3720-a1.dtb - LVDS + HDMI
imx8mp-rsb3720-a1-lvds0-auo.dtb(g070vw01 on LVDS0)imx8mp-rsb3720-a1-lvds1-auo.dtb(g070vw01 on LVDS1)imx8mp-rsb3720-a1-lvds-dual.dtb(g215hvn01 dual LVDS)
- DSI
imx8mp-rsb3720-a1-adv7535.dtb(DSI→HDMI + HDMI)imx8mp-rsb3720-a1-auog101uan02.dtb(DSI panel)
Camera
imx8mp-rsb3720-a1.dtb(OV5640 default)imx8mp-rsb3720-a1-basler.dtb(Basler)
ROM‑5722 (i.MX8MP)
Display
- HDMI (default):
imx8mp-rom5722-a1.dtb - LVDS + HDMI
imx8mp-rom5722-a1-lvds0-auo.dtb(g070vw01 on LVDS0)imx8mp-rom5722-a1-lvds1-auo.dtb(g070vw01 on LVDS1)imx8mp-rom5722-a1-lvds-dual.dtb(g215hvn01 dual LVDS)
- DSI
imx8mp-rom5722-a1-adv7535.dtb(DSI→HDMI + HDMI)imx8mp-rom5722-a1-auog101uan02.dtb(DSI panel)
Camera
imx8mp-rom5722-a1.dtb(OV5640 default)imx8mp-rom5722-a1-basler.dtb(Basler)
ROM‑3620 (i.MX8QXP)
Display
- LVDS
imx8qxp-rom3620-a1.dtb(g070vw01)imx8qxp-rom3620-a1-lvds-chimei.dtb(g150xgel05)imx8qxp-rom3620-a1-lvds-dual.dtb(g215hvn01)
- DSI→HDMI
imx8qxp-rom3620-a1-hdmi-bridge.dtb
- DSI
imx8qxp-rom3620-a1-auog101uan02.dtb
RSB‑3730 (i.MX8MM)
Display
- HDMI:
imx8mm-rsb3730-a2.dtb - LVDS
imx8mm-rsb3730-a2-dsi2lvds-800x480.dtb(g070vw01)imx8mm-rsb3730-a2-dsi2lvds-1920x1080.dtb(g215hv01)
- DSI
imx8mm-rsb3730-a2-dsi-auog101uan02.dtb(g101uan2.0)
Burn‑in Test
Bottom Board Settings
Disable Pin of PCIe
Configure the GPIO disable pin to match your carrier board:
&pcie0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie0>;
// disable-gpio = <&tca9538 0 GPIO_ACTIVE_LOW>; /* example */
// reset-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>; /* example */
ext_osc = <1>;
status = "okay";
};
Fix Intermittent No‑Sound When HDMI Plug In/Out
Apply the following patch (imx865 HDMI overflow workaround):
0001-imx865-hdmi-enable-overflow-workaround-for-imx865hdmi.patch
(Patch body omitted for brevity; ensure it adds case 0x213a in dw_hdmi_clear_overflow().)
QSPI: Read MAC / Serial / MFG Date
Adjust offsets to match your production layout. Commands below read from
/dev/mtdblock0.
MAC 0
READ_DATA=$(dd if=/dev/mtdblock0 bs=1 skip=$((0xd0000)) count=6 2>/dev/null | hexdump -v -e '1/1 "%02x:"' | sed 's/:$//' )
echo "${READ_DATA}"
MAC 1
READ_DATA=$(dd if=/dev/mtdblock0 bs=1 skip=$((0xd0400)) count=6 2>/dev/null | hexdump -v -e '1/1 "%02x:"' | sed 's/:$//' )
echo "${READ_DATA}"
Serial Number
READ_DATA=$(dd if=/dev/mtdblock0 bs=1 skip=$((0xd0006)) count=10 2>/dev/null)
echo "${READ_DATA}"
Manufacture Date (YYYY-MM-DD_hh-mm-ss)
(Assumes ASCII digits at the given offset; adapt as needed.)
RAW=$(dd if=/dev/mtdblock0 bs=1 skip=$((0xd0010)) count=14 2>/dev/null)
printf -v DATE "%s-%s-%s_%s-%s-%s" "${RAW:0:4}" "${RAW:4:2}" "${RAW:6:2}" "${RAW:8:2}" "${RAW:10:2}" "${RAW:12:2}"
echo "${DATE}"
Notes
- Paths, offsets, and device nodes may vary by board revision.
- Always back up critical partitions before flashing.
- Use
sudowith caution and confirm target devices (e.g.,/dev/sdXvs/dev/mmcblkY).