Multi Source Translation Content

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi Source Translation Content

Discussions

Sort by:
Ara240 Runtime Support on x86 Linux Hi NXP Team, I am evaluating the possibility of running an Ara240 module directly on an x86 Linux host over PCIe for validation and performance testing. During my investigation, I found indications that x86 runtime support may exist: dvapi.py contains references to: art/linux/x86/lib/libaraclient_x86_64.so Optimum-Ara documentation references: $DV_TGT_ROOT/art/linux/x86/proxy/ The UIO DMA driver repository includes x86 support. Historical Kinara runtime recipes package architecture-specific runtime components using: art/linux/${TARGET_ARCH}/... However, the current imx-nxp-ara2 runtime package available through the i.MX BSP contains only AArch64 runtime binaries:   1 libaraclient_aarch64.so 2 proxy_ara240 3 nnapp 4 hardware utilities   I could not locate the corresponding x86 runtime artifacts. Could you please clarify: Is direct Ara240 runtime execution on an x86 Linux host officially supported? Is there an x86 Runtime SDK package available? Where can I obtain the following x86 runtime components? libaraclient_x86_64.so x86 proxy binary x86 dvapi runtime package Is there an integration guide or reference flow for: x86 Host ↓ UIODMA Driver ↓ Ara240 PCIe ↓ Runtime SDK ↓ Inference Execution Any guidance on obtaining the required x86 runtime components would be appreciated. Thanks, Yuvraj Solanki Re: Ara240 Runtime Support on x86 Linux Hi Yuvraj, I can confirm that Ara240 can actually run on a standard x86_64 Linux host over PCIe. I am currently using an Ara240 in a Lenovo ThinkCentre with Intel x86_64 Linux. My working stack is: x86_64 Linux → UIODMA → Ara240 PCIe → proxy_x86_64 → libaraclient / DVAPI → DVM model → inference I obtained the x86_64 runtime components from an older Geniatech/Kinara "customerReadyPackage_v3". I have also developed a native Ara240 detector integration for Frigate NVR, and inference works correctly with the YOLOv8n DVM supplied with that package. However, I have run into another compatibility problem which may be directly related to what you are investigating. The old supplied DVM works correctly with the old x86_64 runtime, but DVM models generated with the newer Kinara/Geniatech compiler and with NXP Ara SDK 2.1.1 fail during "dv_model_load_from_file". So in my case: old DVM + old x86_64 runtime = WORKS new DVM + old x86_64 runtime = FAILS I am therefore also looking for a newer Ara240 Runtime SDK for x86_64, preferably the runtime generation with proxy 1.3.x / support for cnn_model 2.1.x, or alternatively an older compiler capable of generating DVMs compatible with the existing x86_64 runtime. So x86_64 Ara240 execution definitely exists and works — the missing piece appears to be access to a current x86_64 runtime package compatible with models generated by the newer SDK. I would also be very interested in any response from NXP regarding availability of the current x86_64 runtime. Regards, Jacek Re: Ara240 Runtime Support on x86 Linux Hi Jorge, Thank you — this confirms exactly what I was looking for. My problem is obtaining the rt-sdk-ara2_x86_64.deb package. I do not currently have an assigned NXP FAE, and unfortunately I am also unable to create a technical support case because my NXP account is not associated with a company. I previously contacted NXP support, but I was redirected to the technical Cases portal, which I cannot access for this reason. Is there another way for an individual developer/researcher to request access to rt-sdk-ara2_x86_64.deb? I already have a fully working Ara240 PCIe setup on x86_64 Linux using the older Geniatech/Kinara runtime, including a working native Frigate detector integration. I specifically need the current x86_64 Runtime SDK to test DVM models generated with Ara SDK 2.1.1. If the package requires an NDA or another access procedure, I would be happy to follow it. Thank you, Jacek Re: Ara240 Runtime Support on x86 Linux Hello, The software stack architecture is the next: User Application ├── Optimum-Ara (Python, HuggingFace integration for LLM/VLM) ├── GStreamer Plugins (gstdvInf, for vision pipelines) └── dvapi.py (Python bindings for direct inference) │ ▼ libaraclient.so (Client library) │ ▼ Proxy Daemon (rt-sdk-ara2.service) │ ▼ uiodma.ko (UIO DMA kernel driver, PCIe only) │ ▼ ARA-240 NPU Hardware ARM64 or x86 Linux host with PCIe should work, provided the uiodma.ko driver can be compiled for that kernel. Platform Package Notes x86 Linux rt-sdk-ara2_x86_64.deb Requires building  uiodma.ko  for the host kernel ARM64 Linux (non-i.MX) RT-SDK ARM64  .deb  + platform-specific  uiodma.ko Demonstrated on NXP S32G3 and S32N79 (ARM Cortex-A cores, not i.MX) The  uiodma.ko  driver source code is open (GPL-2.0) and available on GitHub. It has two variants: uiodma/  — for x86 (cache-coherent systems) uiodma_cache_management/  — for ARM (explicit cache management) The imx-nxp-ara2 package distributed through the i.MX Embedded Linux BSP is intentionally built for AArch64, as it is integrated into the i.MX platform. To get access into missing binaries, please contact your FAE. Best regards Re: Ara240 Runtime Support on x86 Linux Hello, Thank you for the update. Unfortunately, we do not have access to these files and cannot be shared through this support channel. I suggest you check it directly with your sales-person. Best regards.
View full article
Android System Fast Boot Solution - Study and Summary of Hibernate Market Demand: Due to the inclusion of the Linux Kernel, Android Framework, Vehicle HAL, CarService, and numerous IVI applications, the traditional cold start time of the Android Automotive system is typically long, making it difficult to meet the user experience requirements of "power on and ready to use" in automobiles. Proposed Solution: The Hibernate (Suspend-to-Disk) solution significantly shortens startup time by saving a snapshot of the system's runtime and restoring it to its running state upon the next power-on, while preserving the state of applications such as navigation,music, and Bluetooth. Hardware and software platforms for implementing Hibernate : HW: i.MX95 B0 19*19 EVK SW: Android auto imx-automotive-15.0.0_2.1.0 Lunch device : lunch evk_95_car2-nxp_stable-userdebug IMX95EVK
View full article
Install kernel-headers on target - flexbuild Linux Debian 6.12.49 Hi, I am developing a custom out-of-tree Linux module for my IMX8MP-EVK board running Debian Linux (built using the latest version of flexbuild). Currently, to build my module, I added it to the Linux sources, modifying the corresponding Kconfig and Makefile. However, I would like to be able to build my module on-target to make the process faster but there are no kernel-headers installed and I can't seem to find how to get them on target.  Could anyone guide me on how to build my Debian Linux with kernel-headers installed ? Thanks. Benjamin. i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: Install kernel-headers on target - flexbuild Linux Debian 6.12.49 Hi, Yes I quickly figured that trying apt install linux-headers-$(uname -r) would not give me the right headers. Thank you for your quick response, I should be able to adopt a workflow that works for me. Re: Install kernel-headers on target - flexbuild Linux Debian 6.12.49 For the i.MX8MP-EVK Debian image built with Flexbuild, the practical answer is: do not rely on apt install linux-headers-$(uname -r) on the target . The retrieved NXP material shows Flexbuild builds the kernel, DTBs, modules, boot image, and rootfs, but I did not find an i.MX8MP-specific Flexbuild option that generates and preinstalls a matching linux-headers-* package into the Debian rootfs. The supported/clean workflow is to build your out-of-tree module against the same compiled kernel tree used by Flexbuild, then copy the .ko to the board. Recommended workflow: cd flexbuild . setup.env bld docker . setup.env bld host-dep # Full image, or at least the kernel LOG_LEVEL=0 bld -m imx8mpevk # or: LOG_LEVEL=0 bld linux -m imx8mpevk The Debian SDK guide lists bld -m imx8mpevk as the full build command and bld linux -m imx8mpevk as the separate kernel build command; it also says the kernel-related source is under components_lsdk2512/linux/ , and the compiled output is under build_lsdk2512/linux/linux/arm64/IMX for the i.MX platform example. Then build your external module on the host against that compiled/prepared kernel tree, for example: obj-m += my_driver.o KERNEL_SRC ?= /path/to/flexbuild/components_lsdk2512/linux all:               $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules clean:               $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean For external modules, NXP’s current i.MX Linux 6.12 guide says the requirements are a compiled kernel, a board running the same kernel version, and a toolchain; it also notes that a full kernel compilation is required to generate the headers and symbol files needed for external module compilation. The same guide uses the standard external-module form: make -C $(KERNEL_SRC) M=$(PWD) modules and then copies the resulting .ko to the board for insmod . If you specifically want on-target builds, you can manually install a matching prepared kernel tree on the target, but treat it as a manual workaround rather than a documented i.MX8MP Flexbuild “install headers” feature: # on target sudo mkdir -p /usr/src/linux-headers-$(uname -r) sudo ln -sfn /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/build Copy the matching Flexbuild kernel source/build artifacts from the host into that directory, including the generated files and Module.symvers . Then on the target: cd /usr/src/linux-headers-$(uname -r) make oldconfig make prepare # or, for module builds: make modules_prepare The important points are: The kernel source/build tree must match the exact kernel running on the board: check uname -r . Module.symvers should be present; otherwise module versioning/dependency information may be missing. make oldconfig && make prepare / make modules_prepare is the usual step to prepare the tree for external module builds. Native builds on the board are usually slower; NXP guidance generally recommends host-side cross-compilation for i.MX external modules. So the short answer is: Flexbuild can build the matching kernel, but for i.MX8MP Debian I would build the module on the host against the Flexbuild kernel tree, not try to install distro-style linux-headers on the board. If you need on-target iteration, copy the matching prepared kernel tree to /usr/src/linux-headers-$(uname -r) and point /lib/modules/$(uname -r)/build at it. Use the Flexbuild-compiled kernel tree as your “headers” source; a packaged, apt-installable linux-headers-$(uname -r) flow is not documented for i.MX8MP Flexbuild Debian in the material retrieved.
View full article
IMX8MP ISP 摄像头自动对焦 你好。最新的 Yocto Kirkstone 版本(Linux 5.15.32-2.0.0)使用了 kernel-module-isp-vvcam 4.2.2.18.0。该ISP提供了一个使用AR1335传感器的示例,其中使用了自动对焦功能。但在 Linux 系统中,没有提到这个传感器(没有 dts)。我们需要测试该平台的自动对焦性能,特别是镜头调节性能。据我了解,在 dts 中,你需要对传感器和镜头进行描述。我的 dts: /dts-v1/; #include "imx8mp-evk.dts" &i2c2 { /delete-node/ov5640_mipi@3c; imx258_0: imx258_mipi@1a { 兼容 = "索尼,IMX258"; reg =<0x1a> �; 状态 = "正常"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; clock-names = "mclk"; 时钟频率<24000000> <180>=; 旋转角度 = ; 方向 =<2> ; 分配时钟 = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; 已分配时钟父级 = <&clk IMX8MP_CLK_24M>; 分配的时钟速率<24000000> <0> <1 2 3 4> <0> <500000000> =; csi_id =; resetb-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; 镜头焦点 = <&dw9714>; 港口 { imx258_mipi_0_ep:端点 { 数据通道 =; 时钟通道 =; 最大像素频率 = /bits/ 64; 远程端点 = <&mipi_csi0_ep>; }; }; }; dw9714: dac@c { 兼容 = "dongwoon,dw9714"; reg =<0x0c> �; }; }; &i2c3 { 时钟频率 = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; 状态 = "正常"; ov5640_1: ov5640_mipi@3c { 状态 = "已禁用"; }; }; &cameradev { 状态 = "正常"; }; &isi_0 { 状态 = "已禁用"; }; &isi_1 { 状态 = "已禁用"; }; &isp_0 { 状态 = "正常"; }; &dewarp { 状态 = "正常"; }; &mipi_csi_0 { 状态 = "正常"; port@0 { 终点 { 远程端点 = <&imx258_mipi_0_ep>; 数据通道 = <4>; csis-hs-settle = <16>; }; }; }; &mipi_csi_1 { 状态 = "已禁用"; }; 传感器工作正常,但是如何在DTS中正确描述自动对焦?ISP驱动程序需要镜头ID和名称。 你能写出例如ar1335传感器镜头的正确dts吗? 谢谢 Re: IMX8MP ISP camera autofocus 各位同事,根据这次讨论,旧版本的 AR1335 是支持 AF VCM 驱动程序的。请问有人可以分享一下ar1335的AF代码库吗?是否有支持自动对焦驱动的相机传感器代码库? Re: IMX8MP ISP camera autofocus 您好, @malik_cisse您能否分享一下您的传感器ISP驱动程序?ISP 仓库中提供的示例 OS08a20 驱动程序中 IsiFocus 函数的实现是空白的(参见Re: iMX8M Plus ISP on Android - 如何启用自动对焦功能? - NXP 社区) Re: IMX8MP ISP camera autofocus imx8 isp 负责通过分析输入数据来聚焦图像。如果 ISP 支持 PDAF 技术就太好了,但这款芯片现在不支持,将来也不会支持。我在 XML 中设置了自动对焦: 2 Re: IMX8MP ISP camera autofocus 谢谢 VoVan, 我试用了你修改后的驱动程序,它能正常工作。ISP逻辑根据图像内容自动控制VCM电机运动。 谢谢你提供的代码。这至少为我节省了一天的工作时间。 不过,正如您在附带的视频中看到的那样,自动对焦的反应并不十分流畅。可以听到 VCM 马达快速咔哒作响,并瞬间调整焦距。 你的设置也是这样吗?还是说你成功地实现了平稳的马达运动,从而实现了平稳的自动对焦? 谢谢 Re: IMX8MP ISP camera autofocus 啊,这很有意思。我现在就去测试一下。 谢谢 Re: IMX8MP ISP camera autofocus 因此,在内核加载过程中,通过 i2c 检测到 dw9714,并创建设备 |dev|v4l-subdev 来与该镜头配合使用。 接下来,在 isp 驱动程序中,OpenMotorDevice 函数检测到该设备并使用 ioctl 对其进行对焦。 很简单,祝你工作顺利 Re: IMX8MP ISP camera autofocus VoVan,谢谢你的反馈。 您之前已经发送过DTS文件了。 对于 DW9714,我还发现该驱动程序是 Linux 内核自带的。但是,要使 i.MX8MP ISP 控制 VMC,还需要添加额外的 API IOCTL。 显然,你的设备没有实现自动对焦功能,对吗? BR,马利克 Re: IMX8MP ISP camera autofocus 我还必须重写内核中的 dw9714 驱动程序,使其与 isp 兼容。我以驱动程序 dw9790 为基础(vvcam/v4l2/focus/vcm_dw9790)。我附上了dw9714镜头的驱动程序 Re: IMX8MP ISP camera autofocus 我基于imx258相机和dw9714镜头制作了自动对焦装置。为此,我为 imx258 传感器编写了自己的驱动程序(内核模块),并将其放置在 vvcam/v4l2/sensor/imx258 路径下。我还为 isp 编写了用户空间驱动程序 imx258,并将其放置在 isp-imx/units/isi/drv/imx258 中。为该传感器添加了广角鱼眼畸变校正 json 文件和 xml 调谐文件。dw9714 的驱动程序在内核中,我只需将其添加到内核配置中即可。我无法发布传感器 imx258 的源代码,但我可以发布 dts 文件。我为基于 ar1335 的 imx258 传感器编写了驱动程序(该传感器支持与镜头配合使用)。 &i2c2 { imx258_0: imx258_mipi@1a { 兼容 = "sony,imx258-pdaf"; reg =<0x1a> �; 状态 = "正常"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; clock-names = "mclk"; 时钟频率<24000000> <180>=; 旋转角度 = ; 方向 =<2> ; 分配时钟 = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; 已分配时钟父级 = <&clk IMX8MP_CLK_24M>; 分配的时钟速率<24000000> <0> <1 2 3 4> <0> <500000000> =; csi_id =; resetb-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; 镜头焦点 = <&dw9714>; 港口 { imx258_mipi_0_ep:端点 { 数据通道 =; 时钟通道 =; 最大像素频率 = /bits/ 64; 远程端点 = <&mipi_csi0_ep>; }; }; }; dw9714: dw9714@c { 兼容 = "dongwoon,dw9714"; id<9714> =; reg =<0x0c> �; }; }; &cameradev { 状态 = "正常"; }; &isi_0 { 状态 = "已禁用"; }; &isi_1 { 状态 = "已禁用"; }; &isp_0 { 状态 = "正常"; }; &isp_1 { 状态 = "正常"; }; &dewarp { 状态 = "正常"; }; &mipi_csi_0 { 状态 = "正常"; port@0 { 终点 { 远程端点 = <&imx258_mipi_0_ep>; 数据通道 = <4>; csis-hs-settle = <16>; }; }; }; Re: IMX8MP ISP camera autofocus 嗨 VoVan, 你成功让DW9714 VCM与ar1335一起工作了吗? 能否分享一下DTS和驱动程序? 谢谢, Re: IMX8MP ISP camera autofocus 没有找到这样的计划 Re: IMX8MP ISP camera autofocus 我们已经完成了自动对焦并检查了其运行情况(传感器:IMX258 镜头:dw9714)。对比度自动对焦功能运行良好。是否计划为 ISP 添加对 PDAF(相位检测自动对焦)的支持? Re: IMX8MP ISP camera autofocus dts 文件中未定义自动对焦,ISP v4l2 API 应该支持此功能,您可以参考以下文档: " https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8m-plus-arm-cortex-a53-machine-learning-vision-multimedia-and-industrial-iot:IMX8MPLUS " 如需了解更多详细信息,请联系专业服务支持团队。 “ https://www.nxp.com/support/support/nxp-engineering-services/professional-support-for-processors-and-microcontrollers:PREMIUM-SUPPORT ”
View full article
[i.MX8MM] DDR PHY Training Firmware Log Level: Value for "Maximal Debug" and Integration into U-Boot Dear NXP Support Team, We are currently debugging DDR training issues on our custom i.MX 8M Mini platform using the MSC DDR Tool / DDR Test Tool and would like to clarify PHY log level configurations. 1. Regarding the Configuration Value In the DDR Tool GUI, the PHY Log Level dropdown includes the following options: Firmware complete Assertion messages Stage completion Coarse debug Detailed debug Maximal debug We check the generated .ds script, we noticed comments documenting several TrainInfo settings: # The following is for internal factory use, it is strongly recommended not to change this ddrparam set TrainInfo 0x04 # 0x05 = Detailed debug (e.g. eye delays) # 0x0A = Coarse debug info (e.g. rank information) # 0xC8 = Stage completion # 0xC9 = Assertion messages # 0xFF = Firmware complete # others = reserved We would like to configure this PHY log verbosity directly in U-Boot SPL to capture full training logs via UART during early boot. 2. Porting PHY Log Level into U-Boot / SPL (lpddr4_timing.c) Can the TrainInfo  log verbosity parameter be defined within the DDR timing structures (e.g., in lpddr4_timing.c or the DDR PHY initialization sequence in SPL)? If so, could you kindly guide us on how to properly incorporate ddrparam set TrainInfo 0x04 into our U-Boot codebase? We would appreciate it if you could point out the specific structure or register in lpddr4_timing.c (or the PHY message block) where this parameter should be mapped Thank you for your assistance. Re: [i.MX8MM] DDR PHY Training Firmware Log Level: Value for "Maximal Debug" and Integrati Hello, Train Info is a PHY firmware parameter, not normally part of the LPDDR4 timing structure. I would not add 0x04 directly. Re: [i.MX8MM] DDR PHY Training Firmware Log Level: Value for "Maximal Debug" and Integrati HI, Thank you for your response. During our recent testing, we need to enable DDR training debug information using the following PHY firmware parameter: ddrparam set TrainInfo 0x04 Could you guide us on how to convert or integrate this command into C code within the U-Boot SDK (e.g., specific driver structs, APIs, or config definitions)? Thanks a lot.
View full article
SSO(シングルサインオン)について理解しようとしています。どのように安全性が向上するのですか? SSOが、アカウントごとに固有のパスワードとMFAを強制するよりも安全だという考え方が、私には理解しがたい。 パスワードを再利用しないという長年の論理的な助言に真っ向から反していないのが理解できません。なぜなら、パスワードは認証情報の詰め込みを可能にしているからです。 私たちの経験では、アカウントの侵害はほとんどの場合、ユーザーがフィッシングされたことが原因です。単一のアカウントがフィッシングされて完全なユーザー侵害に発展するのを防ぐ唯一の防御は、フィッシングされたパスワードが他の場所では通用しないという事実です。SSOはそうした保護機能を奪い去り、情報漏洩による潜在的な被害を大幅に拡大させるように思われる。 仕組みを誤解しているのでしょうか?私が知らないだけで、共有パスワードを使ったクレデンシャルスタッフィング攻撃に対する何らかの組み込みの保護機能があるのでしょうか? Re: Trying to understand SSO. How is it more secure? こんにちは、@ragnar21 さん。 この質問を提起していただきありがとうございます。この話題は一般的なSSO/MFAのセキュリティ実践に関連しているようですが、さらにコメントする前に、 この 質問 が 特定の NXP 製品 や ソリューション に関連して いる のか 教えていただけます か?もしそうでなければ、 SSO と 別々 の認証情報 の 一般的な セキュリティ 概念 や トレードオフ について 議論 することもできます 。   すてきな一日を、 カン ------------------------------------------------------------------------------- 注記: この投稿があなたの質問への回答になっている場合は、「正解としてマーク」ボタンをクリックしてください。ありがとうございます! - 前回の投稿から7週間Threadをフォローしており、その後の返信は無視しています もし後で関連する質問があれば、新しいThreadを開き、閉じたThreadを参照してください。 -------------------------------------------------------------------------------
View full article
[i.MX8MM] DDR PHY 训练固件日志级别:“最大调试”值并集成到 U-Boot 中 尊敬的恩智浦技术支持团队: 我们目前正在使用 MSC DDR 工具/DDR 测试工具调试我们定制的 i.MX 8M Mini 平台上的 DDR 训练问题,并希望澄清 PHY 日志级别配置。 1. 关于配置值 在 DDR 工具 GUI 中, “PHY 日志级别”下拉菜单包含以下选项: 固件已完成 断言消息 阶段完成 粗略调试 详细调试 最大调试 我们检查生成的 .ds 文件。我们注意到脚本中包含一些关于 TrainInfo 设置的注释: # 以下内容仅供工厂内部使用,强烈建议不要更改。 ddrparam 设置 TrainInfo 0x04 # 0x05 = 详细调试(例如眼部延迟) # 0x0A = 粗略调试信息(例如排名信息) # 0xC8 = 阶段完成 # 0xC9 = 断言消息 # 0xFF = 固件完成 # 其他 = 已预留 我们希望直接在 U-Boot SPL 中配置此 PHY 日志详细程度,以便在启动初期通过 UART 捕获完整的训练日志。 2. 将 PHY 日志级别移植到 U-Boot / SPL (lpddr4_timing.c) TrainInfo 日志详细程度参数能否在 DDR 时序结构中定义(例如,在 lpddr4_timing.c 或 SPL 中的 DDR PHY 初始化序列中)? 如果可以,能否请您指导我们如何将 `ddrparam set TrainInfo 0x04` 正确地集成到我们的 U-Boot 代码库中?如果您能指出 lpddr4_timing.c (或 PHY 消息块)中应该映射此参数的具体结构或寄存器,我们将不胜感激。 谢谢你的帮助。 Re: [i.MX8MM] DDR PHY Training Firmware Log Level: Value for "Maximal Debug" and Integrati 你好, Train Info 是一个 PHY 固件参数,通常不是 LPDDR4 时序结构的一部分。我不会直接添加 0x04。 Re: [i.MX8MM] DDR PHY Training Firmware Log Level: Value for "Maximal Debug" and Integrati 你好, 感谢您的回复。 在最近的测试中,我们需要使用以下PHY固件参数启用DDR训练调试信息: ddrparam 设置 TrainInfo 0x04 能否指导我们如何将此命令转换为 U-Boot SDK 中的 C 代码或将其集成到 U-Boot SDK 中(例如,特定的驱动程序结构、API 或配置定义)? 多谢。
View full article
正在尝试了解单点登录(SSO)。它为什么更安全? 我很难理解为什么单点登录 (SSO) 比强制使用唯一密码和多因素身份验证 (MFA) 更安全。 我实在想不明白,这怎么不直接违背长期以来人们普遍认同的、合乎逻辑的建议——不要重复使用密码,因为这会导致凭证填充攻击。 根据我们的经验,账户被盗几乎总是用户遭遇网络钓鱼的结果。我们防止单个账户被钓鱼导致用户账户完全被盗用的唯一保障是,被钓鱼者窃取的密码在其他任何地方都无法使用。单点登录似乎会剥夺这种保护,并大大扩大这种安全漏洞可能造成的危害。 是我理解错了吗?是否存在我不知道的、针对共享密码凭证填充攻击的内置保护措施? Re: Trying to understand SSO. How is it more secure? 嗨@ragnar21 , 感谢您提出这个问题。该主题似乎与一般的 SSO/MFA 网络安全实践有关,但在我们进一步评论之前,您能否 与我们联系 该 问题 是否 与 NXP 的 特定 产品 或 解决 方案 有关 ?如果 不行, 我们 仍然 可以 讨论 SSO 与 独立 凭证的 一般 网络安全 概念 和 权衡 取舍 。   祝你有美好的一天, 坎 ------------------------------------------------------------------------------- 笔记: - 如果此回复解答了您的问题,请点击“标记为正确答案”按钮。谢谢你! - 我们会持续关注帖子,从最后一条回复发出后持续7周,之后的回复将被忽略。 如果您之后有相关问题,请另开新帖并引用已关闭的帖子。 -------------------------------------------------------------------------------
View full article
[i.MX8MM]DDR PHYトレーニングファームウェアログレベル:「最大デバッグ」およびU-Bootへの統合の値 親愛なるNXPサポートチームへ、 現在、MSC DDRツール/DDRテストツールを使ってカスタム i.MX 8M Miniプラットフォーム上でDDRトレーニングの問題をデバッグしており、PHYログレベルの構成について明確にしたいと考えています。 1. 設定値について DDRツールのGUIでは、 PHYログレベルのドロップダウンメニューに以下のオプションが含まれています。 ファームウェアのインストールが完了しました アサーションメッセージ ステージ完了 大まかなデバッグ 詳細デバッグ 最大限のデバッグ 生成された.dsファイルを確認しますスクリプトを確認したところ、TrainInfoの設定に関するコメントがいくつか記載されていることに気づきました。 # 以下は工場内部での使用を目的としており、変更しないことを強くお勧めします。 ddrparam set TrainInfo 0x04 # 0x05 = 詳細デバッグ (例)眼の発達遅延) # 0x0A = 粗いデバッグ情報 (例:ランキング情報) # 0xC8 = ステージ完了 # 0xC9 = アサーションメッセージ # 0xFF = ファームウェア完了 # その他 = 予約済み このPHYログの詳細をU-Boot SPLで直接設定し、早期起動時にUART経由で完全なトレーニングログをキャプチャしたいと考えています。 2. PHYログレベルをU-Boot / SPLに移植する(lpddr4_timing.c) TrainInfoのログ詳細パラメータはDDRのタイミング構造(例:lpddr4_timing.cやSPLのDDR PHY初期化シーケンス)内で定義できますか? もしそうなら、ddrparam set TrainInfo 0x04をU-Bootコードベースに正しく組み込む方法についてご案内いただけますか?このパラメータをマッピングするべき特定の構造やレジスタをlpddr4_timing.c (またはPHYメッセージブロック)でご指摘いただけるとありがたいです ご協力ありがとうございました。 Re: [i.MX8MM] DDR PHY Training Firmware Log Level: Value for "Maximal Debug" and Integrati こんにちは、 Train InfoはPHYのファームウェアパラメータであり、通常LPDDR4のタイミング構造には含まれていません。私は0x04を直接加算しません。 Re: [i.MX8MM] DDR PHY Training Firmware Log Level: Value for "Maximal Debug" and Integrati こんにちは、 ご回答ありがとうございます。 最近のテストでは、以下のPHYファームウェアパラメータを使ってDDRトレーニングデバッグ情報を有効にする必要があります。 ddrparam set TrainInfo 0x04 U-Boot SDK内でこのコマンドをCコードに変換・統合する方法(例:特定のドライバー構造、API、設定定義など)について教えていただけますか? どうもありがとう。
View full article
Licensing and open-source status for MR-VMU-TROPIC GitHub repository Hello,   I am having a look at the MR-VMU-TROPIC FMU base board. The documentation on GitBook explicitly states: "They are both opensource designs and may be copied and recreated as you wish."   However, the official GitHub repository currently lacks a LICENSE file, despite being described as an "Open-Source FMU base board" also there, which makes it difficult to use or adapt the design files safely.   I noticed there have been recent updates in the repository. Could the team add a standard open-source license file (such as the BSD-3-Clause license used on the TropicCommunityVMU) to the GitHub repository?   Thank you!   Re: Licensing and open-source status for MR-VMU-TROPIC GitHub repository Thank you for highlighting that issue. I will adress that internally. Re: Licensing and open-source status for MR-VMU-TROPIC GitHub repository A license file has been added to the github repo GitHub - NXP-Robotics/MR-VMU-TROPIC: Preview of TROPIC VMU single board RT106X · GitHub https://github.com/NXP-Robotics/MR-VMU-TROPIC/blob/main/LICENSE Thanx again for highlighting that! With kind regards, Gerald
View full article
MR-VMU-TROPIC GitHub 仓库的许可和开源状态 你好,   我正在查看 MR-VMU-TROPIC FMU 底板。GitBook 上的文档明确指出:“它们都是开源设计,您可以随意复制和重新创建。”   然而,尽管官方 GitHub 仓库中也将其描述为“开源 FMU 底板”,但目前却缺少 LICENSE 文件,这使得安全地使用或修改设计文件变得困难。   我注意到代码库最近有更新。团队能否将标准开源许可证文件(例如TropicCommunityVMU上使用的 BSD-3-Clause 许可证)添加到 GitHub 存储库中?   谢谢!   Re: Licensing and open-source status for MR-VMU-TROPIC GitHub repository 感谢您指出这个问题。我会内部处理此事。 Re: Licensing and open-source status for MR-VMU-TROPIC GitHub repository GitHub 仓库中已添加许可证文件:GitHub - NXP-Robotics/MR-VMU-TROPIC:TROPIC VMU 单板 RT106X 预览 · GitHub https://github.com/NXP-Robotics/MR-VMU-TROPIC/blob/main/LICENSE 再次感谢您指出这一点! 此致敬礼, 杰拉尔德
View full article
MR-VMU-TROPIC GitHubリポジトリのライセンスとオープンソースステータス こんにちは、   MR-VMU-TROPIC FMUベースボードを調べています。GitBookのドキュメントには明確に「どちらもオープンソースのデザインであり、希望する形でコピー・再作成可能です」と明記されています。   しかし、 公式GitHub リポジトリには「オープンソースFMUベースボード」と説明されているにもかかわらず、現在LICENSEファイルがなく、設計ファイルの安全な利用や適応が困難になっています。   リポジトリに最近更新があったことに気づきました。チームは、 TropicCommunityVMUで使われているBSD-3-Clauseライセンスのような標準的なオープンソースライセンスファイルをGitHubリポジトリに追加することは可能でしょうか?   ご回答をお待ちしています。   Re: Licensing and open-source status for MR-VMU-TROPIC GitHub repository その問題を指摘していただきありがとうございます。社内で対応します。 Re: Licensing and open-source status for MR-VMU-TROPIC GitHub repository ライセンスファイルがGitHubリポジトリに追加されました。GitHub - NXP-Robotics/MR-VMU-TROPIC: TROPIC VMUシングルボードRT106Xのプレビュー · GitHub https://github.com/NXP-Robotics/MR-VMU-TROPIC/blob/main/LICENSE 指摘していただき、改めてありがとうございます! 敬具 ジェラルド
View full article
Trying to understand SSO. How is it more secure? I'm struggling to understand this notion of SSO being more secure than enforcing unique passwords and MFA on accounts. I can't figure out how this isn't going directly against the long held and logical advice of not re-using passwords because it enables credential stuffing. In our experience, account compromises are almost always the result of a user being phished. The only protection we have against a single account being phished turning into a total user compromise is the fact that the phished password won't work anywhere else. SSO seems to strip away that protection and greatly expand the potential harm of the compromise. Am I misunderstanding how it works? Are there some baked in protections against shared password credential stuffing that I am not aware of? Re: Trying to understand SSO. How is it more secure? Hi @ragnar21 , Thank you for raising this question. The topic appears to be related to general SSO/MFA security practices, but before we comment further, could you let us know whether this question is associated with a specific NXP product or solution? If not, we can still discuss the general security concepts and trade-offs of SSO versus separate credentials.   Have a great day, Kan ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
View full article
在目标系统上安装内核头文件 - flexbuild Linux Debian 6.12.49 您好, 我正在为我的 IMX8MP-EVK 板开发一个自定义的外部 Linux 模块,该板运行 Debian Linux(使用最新版本的 flexbuild 构建)。目前,为了构建我的模块,我将其添加到 Linux 源代码中,并修改了相应的 Kconfig 和 Makefile。但是,我希望能够在目标系统上直接构建我的模块以加快速度,但目标系统上没有安装内核头文件,我也找不到安装它们的方法。 请问有人可以指导我如何构建安装了内核头文件的 Debian Linux 系统吗? 谢谢。 本杰明。 i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: Install kernel-headers on target - flexbuild Linux Debian 6.12.49 您好, 是的,我很快就意识到尝试使用 apt install linux-headers-$(uname -r)无法获得正确的头文件。 感谢您的快速回复,我应该能够找到适合自己的工作流程。 Re: Install kernel-headers on target - flexbuild Linux Debian 6.12.49 对于使用 Flexbuild 构建的 i.MX8MP-EVK Debian 镜像,实际的解决方法是:不要依赖目标上的 apt install linux-headers-$(uname -r) 命令。检索到的 NXP 资料显示 Flexbuild 构建内核、DTB、模块、启动映像和根文件系统,但我没有找到 i.MX8MP 特有的 Flexbuild 选项,该选项可以生成匹配的 linux-headers-* 软件包并将其预安装到 Debian 根文件系统中。支持的/干净的工作流程是:使用 Flexbuild 使用的相同编译内核树构建树外模块,然后将 .ko 文件复制到开发板。 推荐工作流程: cd flexbuild setup.env bld 容器 setup.env bld 主机依赖 # 完整镜像,或者至少是内核。 LOG_LEVEL=0 bld -m imx8mpevk # 或者: LOG_LEVEL=0 bld linux -m imx8mpevk Debian SDK 指南将 bld -m imx8mpevk 列为完整的构建命令,将 bld linux -m imx8mpevk 列为单独的内核构建命令;它还指出,内核相关的源代码位于 components_lsdk2512/linux/ 下,编译后的输出位于 build_lsdk2512/linux/linux/arm64/IMX 下(针对 i.MX 平台示例)。 然后,在主机上基于已编译/准备好的内核树构建外部模块,例如: obj-m += my_driver.o KERNEL_SRC ?= /path/to/flexbuild/components_lsdk2512/linux 全部: $(MAKE) -C $(KERNEL_SRC) M=$(PWD) 模块 干净的: $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean 对于外部模块,NXP 当前的 i.MX Linux 6.12 指南指出,其要求包括已编译的内核、运行相同内核版本的板以及工具链;指南还指出,需要完整编译内核才能生成外部模块编译所需的头文件和符号文件。该指南使用了标准的外部模块形式: make -C $(KERNEL_SRC) M=$(PWD) modules 然后将生成的 .ko 文件复制到板子上供 insmod 使用。 如果您特别想要目标平台上的版本,您可以手动在目标平台上安装匹配的预编译内核树,但请将其视为一种手动变通方法,而不是 i.MX8MP Flexbuild 文档中记录的“安装头文件”功能: # 目标 sudo mkdir -p /usr/src/linux-headers-$(uname -r) sudo ln -sfn /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/build 将主机上匹配的 Flexbuild 内核源代码/版本工件复制到该目录中,包括生成的文件和 Module.symvers。然后瞄准目标: cd /usr/src/linux-headers-$(uname -r) 执行旧配置 准备 # 或者,对于模块版本: 准备模块 要点如下: 内核源代码/构建树必须与板上运行的内核完全匹配:检查 uname -r。 Module.symvers 文件必须存在;否则,模块版本控制/依赖关系信息可能缺失。 make oldconfig && make prepare / make modules_prepare 是为外部模块构建准备树的常用步骤。 在板上进行本地构建通常速度较慢;NXP 指南通常建议对 i.MX 外部模块进行主机端交叉编译。 简而言之: Flexbuild 可以构建匹配的内核,但对于 i.MX8MP Debian,我会在主机上针对 Flexbuild 内核树构建模块,而不是尝试在板上安装发行版风格的 linux-headers。如果需要目标迭代,请将匹配的已准备好的内核树复制到 /usr/src/linux-headers-$(uname -r) 并将 /lib/modules/$(uname -r)/build 指向它。 使用 Flexbuild 编译的内核树作为“headers”源;在检索到的资料中,没有关于 i.MX8MP Flexbuild Debian 的打包的、apt 安装的 linux-headers-$(uname -r) 流程的文档。
View full article
IMX8MP ISPカメラのオートフォーカス こんにちは。前回のYoctoでは、Kirkstone(Linux 5.15.32-2.0.0)はkernel-module-isp-vvcam 4.2.2.18.0を使用しています。このISPにはAR1335センサを使った作業例があり、そこではオートフォーカス機能が使われています。しかしLinuxではこのセンサー(DTS)についての記述はありません。このプラットフォームでのオートフォーカス性能、特にレンズ調整のテストが必要です。私の理解では、DTSではセンサとレンズの説明が必要です。私のdts: /dts-v1/; #include "imx8mp-evk.dts" &i2c2 { /delete-node/ov5640_mipi@3c; imx258_0: imx258_mipi@1a { compatible = "sony,imx258"; reg =<0x1a> �; ステータス = "正常"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>; クロック = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; 時計名 = "mclk"; クロック周波数<24000000> =; <180> 回転角度 =; 向き<2> =; 割り当てられたクロック = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; 割り当てられたクロック親 = <&clk IMX8MP_CLK_24M>; 割り当てられたクロックレート<24000000> =; csi_id<0> =; resetb-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; レンズフォーカス = <&dw9714>; ポート { imx258_mipi_0_ep: エンドポイント<1 2 3 4> <0> <500000000> { データレーン数 =; 時計レーン =; max-pixel-frequency = /bits/ 64; リモートエンドポイント = <&mipi_csi0_ep>; }; }; }; dw9714: dac@c { compatible = "dongnwoon,dw9714"; reg =<0x0c> �; }; }; &i2c3 { クロック周波数 = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; ステータス = "正常"; ov5640_1: ov5640_mipi@3c { ステータス = "無効"; }; }; &cameradev { ステータス = "正常"; }; &isi_0 { ステータス = "無効"; }; &isi_1 { ステータス = "無効"; }; &isp_0 { ステータス = "正常"; }; &dewarp { ステータス = "正常"; }; &mipi_csi_0 { ステータス = "正常"; ポート@0 { 終点 { リモートエンドポイント = <&imx258_mipi_0_ep>; データレーン数 = <4>; csis-hs-settle = <16>; }; }; }; &mipi_csi_1 { ステータス = "無効"; }; センサーは問題なく動作しますが、DTSでオートフォーカスを正しく説明するにはどうすればいいのでしょうか?ISPドライバーにはレンズIDと名前が必要です。 例えばAR1335センサーレンズのDTSを正しく書けますか? よろしくお願い申し上げます。 Re: IMX8MP ISP camera autofocus こんにちは、チームの皆さん。この会話によると、旧ビルドのAR1335ではAF VCMドライバーがサポートされていました。どなたかAR1335のAFコードベースを共有してもらえますか?AFドライバーをサポートするカメラセンサーのコードベースはありますか? Re: IMX8MP ISP camera autofocus こんにちは、 @malik_cisseセンサのISPドライバを共有できますか?ISPリポジトリに提供されている例のOS08a20ドライバには、IsiFocus関数の実装が空白されています(参照:AndroidのiMX8M Plus ISP - AutoFocus機能を有効にする方法?- NXPコミュニティ参照) Re: IMX8MP ISP camera autofocus imx8のISPは、入力データを解析することで画像の焦点を合わせる役割を担っています。ISPがPDAF技術をサポートしていればとても良いのですが、このチップにはそれがありませんし、これからもありません。XMLでは、オートフォーカス用に以下のように設定しました。 2 Re: IMX8MP ISP camera autofocus VoVanさん、ありがとうございます。 あなたの修正ドライバを試しましたが、動作しました。ISPロジックは、画像の内容に応じてVCMモーターを自動的に動かします。 コードをありがとうございます。これで少なくとも1日分の作業時間を節約できた。 ただし、その結果のオートフォーカスの反応はあまりスムーズではありません。添付の動画で確認できます。VCMモーターのカチッという音が非常に速く聞こえ、瞬時にフォーカスを調整できます。 あなたのセットアップも同じようなものですか?それともスムーズなモーター動作ができて、オートフォーカスもスムーズになれましたか? THX Re: IMX8MP ISP camera autofocus ああ、これはとても興味深いですね。今から試してみます。 ありがとう Re: IMX8MP ISP camera autofocus そのため、カーネルのロード処理中に、dw9714がi2c経由で検出され、このレンズと連携するためのデバイス|dev|v4l-subdevが作成されます。 次にISPドライバーのOpenMotorDevice関数がこのデバイスを検出し、ioctlを使ってフォーカスします。 簡単だよ、仕事頑張ってね Re: IMX8MP ISP camera autofocus VoVanさん、フィードバックありがとうございます。 DTSファイルは既に以前送信済みです。 DW9714の場合、このドライバーがLinuxの標準カーネルの一部であることも見かけました。ただし、i.MX8MP ISPがVMCを制御するには、追加のAPI IOCTLを追加する必要があります。 明らかにあなたの場合はオートフォーカスは実装されていませんよね? BR、マリク Re: IMX8MP ISP camera autofocus また、dw9714のドライバーをカーネル内で書き直してISPと互換性を持たせる必要がありました。ベースにはdw9790ドライバ(vvcam/v4l2/focus/vcm_dw9790)を使いました。DW9714レンズ用のドライバーを取り付けます Re: IMX8MP ISP camera autofocus 私はimx258カメラとdw9714レンズをベースにオートフォーカスを実装しました。そのために、IMX258センサー用の自分でドライバー(カーネルモジュール)を作成し、vvcam/v4l2/sensor/imx258パスに配置しました。また、ISP用のuserspaceドライバーimx258も書き、isp-imx/units/isi/drv/imx258に配置しました。このセンサ用にデワープJSONファイルとXMLチューニングファイルを追加しました。dw9714のドライバはカーネルに入っていて、カーネル設定に追加しています。センサーの情報源はIMX258で公開できませんが、DTSは投稿できます。ar1335をベースにしたセンサーIMX258のドライバーを作成しました(このセンサーはレンズ操作に対応しています)。 &i2c2 { imx258_0: imx258_mipi@1a { compatible = "sony,imx258-pdaf"; reg =<0x1a> �; ステータス = "正常"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>; クロック = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; 時計名 = "mclk"; クロック周波数<24000000> =; <180> 回転角度 =; 向き<2> =; 割り当てられたクロック = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; 割り当てられたクロック親 = <&clk IMX8MP_CLK_24M>; 割り当てられたクロックレート<24000000> =; csi_id<0> =; resetb-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; レンズフォーカス = <&dw9714>; ポート { imx258_mipi_0_ep: エンドポイント<1 2 3 4> <0> <500000000> { データレーン数 =; 時計レーン =; max-pixel-frequency = /bits/ 64; リモートエンドポイント = <&mipi_csi0_ep>; }; }; }; dw9714: dw9714@c { compatible = "dongnwoon,dw9714"; id<9714> =; reg =<0x0c> �; }; }; &cameradev { ステータス = "正常"; }; &isi_0 { ステータス = "無効"; }; &isi_1 { ステータス = "無効"; }; &isp_0 { ステータス = "正常"; }; &isp_1 { ステータス = "正常"; }; &dewarp { ステータス = "正常"; }; &mipi_csi_0 { ステータス = "正常"; ポート@0 { 終点 { リモートエンドポイント = <&imx258_mipi_0_ep>; データレーン数 = <4>; csis-hs-settle = <16>; }; }; }; Re: IMX8MP ISP camera autofocus こんにちは、VoVanさん。 DW9714 VCMをar1335で動作させることに成功しましたか? DTSとドライバを共有してもらえますか? ありがとう、 Re: IMX8MP ISP camera autofocus そのような計画は見つかりません Re: IMX8MP ISP camera autofocus すでにオートフォーカスを試し、動作も確認しました(センサ:IMX258 レンズ:dw9714)。コントラストオートフォーカスに関しては、問題なく動作します。ISPにPDAF(位相検出オートフォーカス)のサポートを追加する予定はありますか? Re: IMX8MP ISP camera autofocus オートフォーカスはDTSファイルに定義されていませんが、ISP v4l2 APIでサポートされているはずです。以下のドキュメントを参照してください: " https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8m-plus-arm-cortex-a53-machine-learning-vision-multimedia-and-industrial-iot:IMX8MPLUS " 詳細については、プロフェッショナルサービスサポートチームまでお問い合わせください " https://www.nxp.com/support/support/nxp-engineering-services/professional-support-for-processors-and-microcontrollers:PREMIUM-SUPPORT "
View full article
ターゲットにkernel-headersをインストールしてください - flexbuild Linux Debian 6.12.49 こんにちは、 私は、Debian Linuxの最新バージョンを使って構築されたIMX8MP-EVKボード用にカスタムのツリー外Linuxモジュールを開発しています。現在、モジュールを構築するためにLinuxソースに追加し、対応するKconfigとMakefileを修正しました。しかし、モジュールをターゲットに構築してプロセスを速くしたいのですが、カーネルヘッダーがインストールされておらず、ターゲットに設定する方法が見つかりません。 どなたか、カーネルヘッダーをインストールしたDebian Linuxのビルド方法を教えていただけませんか? ありがとうございます。 ベンジャミン。 i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: Install kernel-headers on target - flexbuild Linux Debian 6.12.49 こんにちは、 はい、apt install linux-headers-$(uname -r)を試しても正しいヘッダーが出ないとすぐに気づきました。 迅速なご対応ありがとうございます。おかげさまで、自分に合ったワークフローを採用できそうです。 Re: Install kernel-headers on target - flexbuild Linux Debian 6.12.49 Flexbuildで構築されたi.MX8MP-EVKデビアンイメージの場合、実用的な答えは、apt install linux-headers-$(uname -r)に頼らないことです。取得したNXPの資料ではFlexbuildがカーネル、DTB、モジュール、ブートイメージ、rootfsをビルドしていますが、debian rootfsにLinuxヘッダー*パッケージを生成・事前インストールするi.MX8MP特有のFlexbuildオプションは見つかりませんでした。推奨される/クリーンなワークフローは、Flexbuildで使用されるコンパイル済みカーネルツリーと同じものに対してツリー外モジュールをビルドし、.koファイルをボードにコピーすることです。 推奨されるワークフロー: CDフレックスビルド . setup.env bld docker . setup.env bld ホスト依存 # 完全なイメージ、または少なくともカーネル LOG_LEVEL=0 bld -m imx8mpevk # または: LOG_LEVEL=0 bld linux -m imx8mpevk Debian SDKのガイドでは、bld -m imx8mpevkが完全なビルドコマンド、bld linux -m imx8mpevkが別のカーネルビルドコマンドとして記載されています。また、カーネル関連ソースはcomponents_lsdk2512/linux/にあり、コンパイルされた出力は i.MX プラットフォームの例としてbuild_lsdk2512/linux/linux/arm64/IMXにあると記載されています。 次に、コンパイル/準備済みのカーネルツリーに対して、ホスト上で外部モジュールをビルドします。例えば、次のようになります。 obj-m += my_driver.o KERNEL_SRC ?= /path/to/flexbuild/components_lsdk2512/linux 全て:                  $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules クリーン:               $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean 外部モジュールについては、NXPの現在の i.MX Linux 6.12ガイドでは、コンパイル済みカーネル、同じカーネルバージョンのボード、ツールチェーンが必要とされています。また、外部モジュールコンパイルに必要なヘッダーやシンボルファイルを生成するには完全なカーネルコンパイルが必要だとも記載されています。同じガイドでは、標準的な外部モジュール形式を使用しています。 make -C $(KERNEL_SRC) M=$(PWD) modules そして、結果として生成された .ko を insmod 用のボードにコピーします。 オンターゲットビルドを特に望む場合は、ターゲットに対応する準備済みカーネルツリーを手動でインストールできますが、これはi.MX8MP Flexbuildの「ヘッダーインストール」機能のドキュメント化ではなく、手動の回避策として扱ってください。 # 目標通り Sudo MKDIR -p /USR/SRC/Linux-Headers-$(uName -r) sudo LN -sfn /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/build ホストから、生成されたファイルとModule.symversを含む、対応するFlexbuildカーネルソース/ビルド成果物をそのディレクトリにコピーします。そして標的へ: CD /USR/SRC/LINUX-HEADERS-$(UNAME -R) make Oldconfig 準備する # または、モジュールビルドの場合: モジュールを準備する 重要なポイントは以下のとおりです。 カーネルソース/ビルドツリーは、ボード上で実行されているカーネルと完全に一致する必要があります。 uname -r を確認してください。 Module.symvers が存在する必要があります。存在しない場合、モジュールのバージョン情報や依存関係情報が欠落している可能性があります。 make oldconfig && make prepare / make modules_prepare は、外部モジュールのビルド用にツリーを準備するための通常の手順です。 ボード上でのネイティブビルドは通常、処理速度が遅くなります。NXPのガイダンスでは、i.MX外部モジュールについてはホスト側でのクロスコンパイルを推奨しています。 簡単に言うと、Flexbuildは対応するカーネルをビルドできますが、i.MX8MP Debianの場合はホスト上でFlexbuildカーネルツリーに対してモジュールをビルドし、ディストリビューション風のLinuxヘッダーをボードにインストールしようとはしません。 オンターゲットの反復が必要な場合は、対応する準備済みカーネルツリーを /usr/src/linux-headers-$(uname -r)にコピーし、そこを /lib/modules/$(uname -r)/build に指してください。 Flexbuildでコンパイルされたカーネルツリーを「ヘッダー」ソースとして使用してください。パッケージ化されたaptインストール可能なlinux-headers-$(uname -r)フローは、i.MX8MPのFlexbuild Debianに関して取得した資料には記載されていません。
View full article
IMX8MP ISP camera autofocus Hello. In last yocto kirkstone (Linux 5.15.32-2.0.0) uses kernel-module-isp-vvcam 4.2.2.18.0. This isp has an example for working with a sensor AR1335 and autofocus functions are used there. But in Linux there is no mention of this sensor(no dts). We need to test the autofocus performance on this platform, in particular the lens adjustment. For this, as I understand it, in dts you need a description of the sensor and lens. My dts: /dts-v1/; #include "imx8mp-evk.dts" &i2c2 { /delete-node/ov5640_mipi@3c; imx258_0: imx258_mipi@1a { compatible = "sony,imx258"; reg = <0x1a>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; clock-names = "mclk"; clock-frequency = <24000000>; rotation = <180>; orientation = <2>; assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; assigned-clock-parents = <&clk IMX8MP_CLK_24M>; assigned-clock-rates = <24000000>; csi_id = <0>; resetb-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; lens-focus = <&dw9714>; port { imx258_mipi_0_ep: endpoint { data-lanes = <1 2 3 4>; clock-lanes = <0>; max-pixel-frequency = /bits/ 64 <500000000>; remote-endpoint = <&mipi_csi0_ep>; }; }; }; dw9714: dac@c { compatible = "dongwoon,dw9714"; reg = <0x0c>; }; }; &i2c3 { clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; ov5640_1: ov5640_mipi@3c { status = "disabled"; }; }; &cameradev { status = "okay"; }; &isi_0 { status = "disabled"; }; &isi_1 { status = "disabled"; }; &isp_0 { status = "okay"; }; &dewarp { status = "okay"; }; &mipi_csi_0 { status = "okay"; port@0 { endpoint { remote-endpoint = <&imx258_mipi_0_ep>; data-lanes = <4>; csis-hs-settle = <16>; }; }; }; &mipi_csi_1 { status = "disabled"; }; Sensor work fine, but how to describe autofocus correctly in dts?? ISP driver need lens id and name. Can you write the correct dts for example for the ar1335 sensor lens? Thank you Re: IMX8MP ISP camera autofocus Hi Team, As per this conversation the AF VCM driver was supported on AR1335 on old build.  Could anyone share the AF code base for ar1335 ? Any camera sensor code base with AF driver support? Re: IMX8MP ISP camera autofocus Hi, @malik_cisse Would you be able to share your sensor ISP driver? The example OS08a20 driver provided in the ISP repo has blank implementations for the IsiFocus functions (see Re: iMX8M Plus ISP on Android - how to enable AutoFocus function ? - NXP Community) Re: IMX8MP ISP camera autofocus The imx8 isp is responsible for focusing the image by analyzing the input data. It would be very good if the ISP had support for PDAF technology, but this chip does not and will not have it. In XML i set for autofocus: 2 Re: IMX8MP ISP camera autofocus Thank you VoVan,  I tried your modified driver and it works. ISP logic is moving the VCM motor automatically according to image content. Thank you for the code. This saved me at least one day of work. The resulting autofocus reacts not very smoothly though as can you can see in attached video. One can hear the VCM motor clicking very quickly and adjust the focus in an instant. Is this also the case for your setup or did you manage to have smooth motor movements and thus smooth auto-focus ? Thx Re: IMX8MP ISP camera autofocus ah, this is very interesting. I am going to test it right now. Thank you Re: IMX8MP ISP camera autofocus Thus, during the kernel loading process, dw9714 is detected via i2c and the device |dev|v4l-subdev is created to work with this lens. Next in the isp driver, the OpenMotorDevice function detects this device and uses an ioctl to focus it. It's simple, good luck in job Re: IMX8MP ISP camera autofocus Thank you for the feedback VoVan, You had already sent the DTS file earlier. For the DW9714 I have also seen that this driver ist part of the stock Linux kernel. However for the i.MX8MP ISP to steer the VMC, there are additional API IOCTLs to be added. Obviously in your case, there is no Autofocus implemented, is it? BR, Malik Re: IMX8MP ISP camera autofocus I also had to rewrite the dw9714 driver in the kernel to make it compatible with isp. I used driver dw9790 as the base(vvcam/v4l2/focus/vcm_dw9790). I attach driver for dw9714 lens Re: IMX8MP ISP camera autofocus I made autofocus based on an imx258 camera and a dw9714 lens. For this I wrote my own driver(kernel module) for imx258 sensor and placed it to vvcam/v4l2/sensor/imx258 path. I also wrote userspace driver imx258 for isp and place it to isp-imx/units/isi/drv/imx258. Added dewarp json files and xml tuning files for this sensor. Driver for dw9714 is in the kernel, i just add it in kernel config. I can’t post the sources for the sensor imx258, but I can post the dts. I wrote drivers for the sensor imx258 based on ar1335 (this sensor has support for working with a lens). &i2c2 { imx258_0: imx258_mipi@1a { compatible = "sony,imx258-pdaf"; reg = <0x1a>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>; clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; clock-names = "mclk"; clock-frequency = <24000000>; rotation = <180>; orientation = <2>; assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; assigned-clock-parents = <&clk IMX8MP_CLK_24M>; assigned-clock-rates = <24000000>; csi_id = <0>; resetb-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; lens-focus = <&dw9714>; port { imx258_mipi_0_ep: endpoint { data-lanes = <1 2 3 4>; clock-lanes = <0>; max-pixel-frequency = /bits/ 64 <500000000>; remote-endpoint = <&mipi_csi0_ep>; }; }; }; dw9714: dw9714@c { compatible = "dongwoon,dw9714"; id = <9714>; reg = <0x0c>; }; }; &cameradev { status = "okay"; }; &isi_0 { status = "disabled"; }; &isi_1 { status = "disabled"; }; &isp_0 { status = "okay"; }; &isp_1 { status = "okay"; }; &dewarp { status = "okay"; }; &mipi_csi_0 { status = "okay"; port@0 { endpoint { remote-endpoint = <&imx258_mipi_0_ep>; data-lanes = <4>; csis-hs-settle = <16>; }; }; }; Re: IMX8MP ISP camera autofocus Hi VoVan, did you succeed making DW9714 VCM work with ar1335 ? Would you share the DTS and driver? Thanks, Re: IMX8MP ISP camera autofocus don't find such plan Re: IMX8MP ISP camera autofocus We have already done autofocus and checked its operation(sensor: IMX258 lens:dw9714). Works fine, as for contrast autofocus. Is it planned to add support for PDAF (Phase Detection Autofocus) to ISP? Re: IMX8MP ISP camera autofocus auto focus doesn't defined in the dts file, should support in the ISP v4l2 API, you can refer to the document as below: "https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8m-plus-arm-cortex-a53-machine-learning-vision-multimedia-and-industrial-iot:IMX8MPLUS" for more detailed information, pls contact professional service support team "https://www.nxp.com/support/support/nxp-engineering-services/professional-support-for-processors-and-microcontrollers:PREMIUM-SUPPORT"
View full article
LPC microcontroller help I was wondering is someone familiar with the LPC rage of microcontrollers could give me hand with a design I’m working on. General Re: LPC microcontroller help Hello, To better assist with your design; Could you help us share more information about your design? Could you help us share if you are looking for specific features to be included in the LPC? Do you have a LPC in mind that you want to compare or know about? If you have a design in mind, NXP offers LPC evaluation boards that could be a starting point, as they come with examples. The more details you can share about your design goals and requirements, the better for us to provide a recommendation that fits the intended characteristics. Best Regards, Luis
View full article
IMX95 v4l2h264enc エンコードされたフレームが破損しています 私はIMX95のv4l2h264encエンコーダーを使用して、H264ビデオエンコードをテストしています。テストコマンドラインは以下のとおりです。 gst-launch-1.0-v videotestsrc pattern=ball num-buffers=150 !video/x-raw、format=NV12、width=1280、height=720、framerate=30/1 !v4l2h264enc !filesink location=enc_test.h264 動画ファイルは正常に生成されましたが、ffplayで再生しようとすると失敗し、以下のエラーが表示されます。 ffplay バージョン 4.2.7-0ubuntu0.1著作権 (c) 2003-2022 FFmpeg 開発者 GCC 9(Ubuntu 9.4.0-1UBuntu1~20.04.1)で構築されました。 構成: --prefix =/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjp --enable-libopenmpt --enable-libbops --enable-libpulse --enable-librband --enable-libsnand --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvppx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared264 リバヴティル 56。31.100 / 56。31.100 libavcodec 58。54.100 / 58。54.100 libavformat 58。29.100 / 58。29.100 libavdevice 58。8.100 / 58。8.100 libavfilter 7.57.100 / 7.57.100 libavresample 4.0.0 / 4.0.0 libswscale 5.5.100 / 5.5.100 libswresample 3.5.100 / 3.5.100 libpostproc 55.5.100 / 55.5.100 [h264 @ 0x7fbea4002840] VUIを7ビットオーバーリードしました [h264 @ 0x7fbea4002840] sps_id 0 が範囲外です [h264 @ 0x7fbea4002840] 存在しない PPS 0 が参照されました 最後のメッセージが2回繰り返されました [h264 @ 0x7fbea4002840] VUIを8ビットオーバーリード 0KB sq= 0B f=0/0 [h264 @ 0x7fbea4002840] VUIを7ビットオーバーリードしました [h264 @ 0x7fbea4002840] VUIを8ビットオーバーリードしました [h264 @ 0x7fbea4002840] 存在しない PPS 0 が参照されました 最後のメッセージが26回繰り返されました [h264 @ 0x7fbea4002840] VUIを7ビットオーバーリードしました [h264 @ 0x7fbea4002840] sps_id 0 が範囲外です [h264 @ 0x7fbea4002840] 存在しない PPS 0 が参照されました 最後のメッセージが29回繰り返されました [h264 @ 0x7fbea4002840] VUIを7ビットオーバーリードしました [h264 @ 0x7fbea4002840] sps_id 0 が範囲外です [h264 @ 0x7fbea4002840] 存在しない PPS 0 が参照されました 最後のメッセージが29回繰り返されました [h264 @ 0x7fbea4002840] VUIを7ビットオーバーリードしました [h264 @ 0x7fbea4002840] sps_id 0 が範囲外です [h264 @ 0x7fbea4002840] 存在しない PPS 0 が参照されました 最後のメッセージが29回繰り返されました [h264 @ 0x7fbea4002840] VUIを7ビットオーバーリードしました [h264 @ 0x7fbea4002840] sps_id 0 が範囲外です [h264 @ 0x7fbea4002840] 存在しない PPS 0 が参照されました 最後のメッセージが29回繰り返されました 入力#0、h264、'enc_test.h264'より: 再生時間:該当なし、ビットレート:該当なし ストリーム #0:0: ビデオ: h264 (ベースライン)、yuv420p、1280x720、25.17 fps、25 tbr、1200k tbn、50 tbc [h264 @ 0x7fbea4007f00] VUIを8ビットオーバーリードしました ファイル「enc_test.h264」を開けませんでした。またはフィルターグラフを設定する 上記のログから判断すると、ビデオヘッドが破損しているようです。 次に、gstreamerのデバッグ機能を使ってみたところ、以下のログが見つかりました。 0:00:05.727025935 13024 0xffffa0000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: 入力フレームが消えたためメタデータをコピーできません 私のシステム情報:Linux imx95-19x19-lpddr5-evk 6.12.49+ #9 SMP PREEMPT 2026年7月22日(水)11:47:53 UTC aarch64 GNU/Linux Re: IMX95 v4l2h264enc encoded frame corrupted AEチームと話し合っています。 Re: IMX95 v4l2h264enc encoded frame corrupted あなたのヒントに従って、あなたが提供してくれた2つのコマンドラインを実行してみました。しかし、どれも効果がない。エンコードされた動画はまだ再生できません。 コマンドの場合: gst-launch-1.0 -e -v videotestsrc pattern=ball num-buffers=150 ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! v4l2h264enc ! h264parse config-interval=-1 ! filesink location=enc_test.h264 エンコードされたビデオファイルを再生しようとすると、以下のエラーが表示されます。 ffprobe version 4.2.7-0ubuntu0.1 Copyright (c) 2007-2022 the FFmpeg developers built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 [h264 @ 0x557b5dc1e980] Format h264 detected only with low score of 1, misdetection possible! [h264 @ 0x557b5dc20380] sps_id 0 out of range Last message repeated 1 times [h264 @ 0x557b5dc20380] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x557b5dc20380] sps_id 0 out of range Last message repeated 1 times [h264 @ 0x557b5dc20380] non-existing PPS 0 referenced [h264 @ 0x557b5dc20380] decode_slice_header error [h264 @ 0x557b5dc20380] no frame! [h264 @ 0x557b5dc20380] non-existing PPS 0 referenced [h264 @ 0x557b5dc20380] decode_slice_header error ...... Last message repeated 1 times [h264 @ 0x557b5dc20380] decode_slice_header error [h264 @ 0x557b5dc20380] no frame! [h264 @ 0x557b5dc1e980] decoding for stream 0 failed [h264 @ 0x557b5dc1e980] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, h264, from 'enc_test.h264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264, none, 25.17 fps, 25 tbr, 1200k tbn, 50 tbc デバッグを試みたところ、以下のような警告が表示されました。 0:00:00.129727669 2003 0xffffa8000b70 WARN v4l2bufferpool gstv4l2bufferpool.c:884:gst_v4l2_buffer_pool_start: Uncertain or not enough buffers, enabling copy threshold 0:00:00.152626502 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.153013002 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:435:gst_h264_parse_vui_parameters: failed to read uint8 for 'vui->aspect_ratio_idc', nbits: 8 0:00:00.153052211 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:516:gst_h264_parse_vui_parameters: error parsing "VUI Parameters" 0:00:00.153071752 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2155:gst_h264_parse_sps: error parsing "Sequence parameter set" 0:00:00.153092044 2003 0xffffa8000d00 WARN h264parse gsth264parse.c:993:gst_h264_parse_process_nal: failed to parse SPS: 0:00:00.153120336 2003 0xffffa8000d00 WARN h264parse gsth264parse.c:1529:gst_h264_parse_handle_frame: broken/invalid nal Type: 7 SPS, Size: 9 will be dropped 0:00:00.153205086 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2284:gst_h264_parse_pps: couldn't find associated sequence parameter set with id: 0 0:00:00.153230627 2003 0xffffa8000d00 WARN h264parse gsth264parse.c:1026:gst_h264_parse_process_nal: failed to parse PPS: 0:00:00.153418211 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.153690127 2003 0xffffa8000d00 WARN v4l2bufferpool gstv4l2bufferpool.c:491:gst_v4l2_buffer_pool_alloc_buffer: newly allocated buffer 0 is not free Pipeline is PREROLLED ... Setting pipeline to PLAYING ... Redistribute latency... New clock: GstSystemClock 0:00:00.180972628 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.181182169 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.211927795 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.212148128 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.242748712 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.242969462 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 コマンドの場合: gst-launch-1.0 -e -v videotestsrc pattern=ball num-buffers=150 ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! v4l2h264enc ! h264parse config-interval=-1 ! mp4mux ! filesink location=enc_test.mp4 動画ファイルをエンコードできませんでした。以下のようなエラーが表示されます。 root@imx95-19x19-lpddr5-evk:~# GST_DEBUG=3 gst-launch-1.0 -e -v videotestsrc pattern=ball num-buffers=150 ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! v4l2h264enc ! h264parse config-interval=-1 ! mp4mux ! filesink location=enc_test.mp4 Setting pipeline to PAUSED ... ====== V4L2ENC: 1.24.7 build on Jan 2 2025 07:23:23. ====== 0:00:00.078378376 2059 0xaaaadecda320 WARN v4l2 gstv4l2object.c:5350:gst_v4l2_object_probe_caps: Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument 0:00:00.079377793 2059 0xffffa8000b70 WARN aggregator gstaggregator.c:2283:gst_aggregator_query_latency_unlocked: Latency query failed Pipeline is PREROLLING ... 0:00:00.079857126 2059 0xffffa8000d00 FIXME default gstutils.c:4089:gst_element_decorate_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono Redistribute latency... /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 0:00:00.140337252 2059 0xffffa8000d00 WARN v4l2bufferpool gstv4l2bufferpool.c:884:gst_v4l2_buffer_pool_start: Uncertain or not enough buffers, enabling copy threshold 0:00:00.165691544 2059 0xffffa8000e90 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.166079919 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:435:gst_h264_parse_vui_parameters: failed to read uint8 for 'vui->aspect_ratio_idc', nbits: 8 0:00:00.166119002 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:516:gst_h264_parse_vui_parameters: error parsing "VUI Parameters" 0:00:00.166138877 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:2155:gst_h264_parse_sps: error parsing "Sequence parameter set" 0:00:00.166159335 2059 0xffffa8000e90 WARN h264parse gsth264parse.c:993:gst_h264_parse_process_nal: failed to parse SPS: 0:00:00.166187127 2059 0xffffa8000e90 WARN h264parse gsth264parse.c:1529:gst_h264_parse_handle_frame: broken/invalid nal Type: 7 SPS, Size: 9 will be dropped 0:00:00.166277252 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:2284:gst_h264_parse_pps: couldn't find associated sequence parameter set with id: 0 0:00:00.166301710 2059 0xffffa8000e90 WARN h264parse gsth264parse.c:1026:gst_h264_parse_process_nal: failed to parse PPS: 0:00:00.166486835 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.166826460 2059 0xffffa8000b70 WARN qtmux gstqtmux.c:6357:gst_qt_mux_video_sink_set_caps: no codec_data in h264 caps 0:00:00.166923502 2059 0xffffa8000b70 WARN qtmux gstqtmux.c:6856:gst_qt_mux_video_sink_set_caps: pad video_0 refused caps video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, i/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true nterlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true 0:00:00.166977794 2059 0xffffa8000e90 WARN v4l2bufferpool gstv4l2bufferpool.c:491:gst_v4l2_buffer_pool_alloc_buffer: newly allocated buffer 0 is not free /GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstQTMuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true 0:00:00.167488335 2059 0xffffa8000b70 FIXME basesink gstbasesink.c:3399:gst_base_sink_default_event: stream-start event without group-id. Consider implementing group-id handling in the upstream elements /GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstAggregatorPad:src: caps = video/quicktime, variant=(string)iso /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)iso Pipeline is PREROLLED ... Setting pipeline to PLAYING ... 0:00:00.168202544 2059 0xffffa8000b70 WARN qtmux gstqtmux.c:5415:gst_qt_mux_add_buffer: error: format wasn't negotiated before buffer flow on pad video_0 Redistribute latency... ERROR: from element /GstPipeline:pipeline0/GstMP4Mux:mp4mux0: GStreamer error: negotiation problem. Additional debug info: /usr/src/debug/gstreamer1.0-plugins-good/1.24.7.imx/gst/isomp4/gstqtmux.c(5415): gst_qt_mux_add_buffer (): /GstPipeline:pipeline0/GstMP4Mux:mp4mux0: format wasn't negotiated before buffer flow on pad video_0 0:00:00.168413044 2059 0xffffa8000b70 FIXME aggregator gstaggregator.c:1478:gst_aggregator_loop: Subclass should call gst_aggregator_selected_samples() from its aggregate implementation. Execution ended after 0:00:00.000556000 Setting pipeline to NULL ... 0:00:00.174238335 2059 0xaaaadecda320 WARN bufferpool gstbufferpool.c:1429:gst_buffer_pool_set_flushing: can't change flushing state of inactive pool 0:00:00.199404961 2059 0xaaaadecda320 WARN bufferpool gstbufferpool.c:1429:gst_buffer_pool_set_flushing: can't change flushing state of inactive pool Freeing pipeline ... Re: IMX95 v4l2h264enc encoded frame corrupted エンコーダの出力はテストソースからの「ビデオヘッダー破損」ではない可能性が高いです。パイプラインにはNXPの i.MX Linuxガイダンスで期待されるH.264パーサーステージが欠けており、i.MX 8 / i.MX 95 VPUエンコーダパイプラインに期待されています。i.MX 95 v4l2h264encの出力はH.264 stream-format=byte-stream / alignment=auであり、NXPのドキュメントではVPUが i.MX 8および95でバイトストリーム出力のみをサポートするため、h264parse/h265parseを追加すべき i.MX あります。 まずはこちらをお使いください: gst-launch-1.0-e -v \   videotestsrc パターン=ball num-buffers=150 !\   video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 !\   v4l2h264enc !\   h264parse config-interval=-1 !\   filesink location=enc_test.h264 次に、それを生のH.264として明示的に再生します。 ffplay -f h264 enc_test.h264 通常の再生可能なコンテナファイルが必要な場合は、マルチプレクサを使用してください。 gst-launch-1.0-e -v \   videotestsrc パターン=ball num-buffers=150 !\   video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 !\   v4l2h264enc !\ h264parse !\ mp4mux !\   filesink location=enc_test.mp4 または: gst-launch-1.0-e -v \   videotestsrc パターン=ball num-buffers=150 !\   video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 !\   v4l2h264enc !\ h264parse !\   matroskamux !\   filesink location=enc_test.mkv NXPの録画例では、h264parseをエンコーダーとmuxer/filesinkパスの間に配置しています。例:$videoEncoderPlugin ![h264parse] !$MUXER !ファイルシンク... 。MP4の場合、-eオプションが重要で、GStreamerはEOSを送り、マクサがファイルを正しく最終化できるようにします。 GStreamerメッセージ: FIXME videoencoder ...入力フレームが消えたためメタデータをコピーできません それ自体では、H.264ビットストリームヘッダーが破損していることの証明にはなりません。これは、v4l2h264enc パイプラインで確認されている GStreamer ビデオエンコーダーのメタデータコピー警告/FIXME です。ffplayのエラー(Overread VUI、sps_id 0 が範囲外、非存在のPPS 0が参照)は、特にSPS/PPSの処理に関して、ダウンストリームのリーダーが期待どおりに正規化/解析されていないH.264ストリームを見ているという状況とより一致しています。 解析済みの生の.h264ファイルでも失敗する場合は、最初のバイトを確認してください。 xxd -l 64 enc_test.h264 Annex-BバイトストリームH.264の場合、以下のような開始コードが表示されます。 00000001 冒頭付近に続いて、スライスの前にSPS/PPS NALユニットが続きます。 推奨される修正: v4l2h264enc の後に h264parse を挿入します。一般的な再生には、h264parse を推奨します。mp4mux !filesink location=enc_test.mp4エンコーダーの出力を直接生の.h264ファイルに書き込むのではなく。 Re: IMX95 v4l2h264enc encoded frame corrupted gstreamerを使ってh264の動画を再生でき、とても快適に再生できます: gst-launch-1.0filesrc location=enc_test.h264 !decodebin !グルプロード!自動ビデオシンク なので、v4l2h264encの問題ではないと思います。
View full article
IMX95 v4l2h264enc 编码帧损坏 我正在使用 IMX95 的 v4l2h264enc 编码器来测试 H264 视频编码。测试命令行如下: gst-用上市,不用发布-1.0-v videotestsrc pattern=ball num-buffers=150 !video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 !v4l2h264enc!文件接收器位置=enc_test.h264 视频文件已成功生成,但当我尝试使用 ffplay 播放时,播放失败并显示以下错误: ffplay 版本 4.2.7-0ubuntu0.1版权所有 (c) 2003-2022 FFmpeg 开发人员 使用 gcc 9 构建(Ubuntu 9.4.0-1ubuntu1~20.04.1) 配置:--prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --启用 nvenc --启用 chromaprint --启用 frei0r --启用 libx264 --启用共享 libavutil 56。31.100 / 56。31.100 libavcodec 58。54.100 / 58.54.100 libavformat 58。29.100 / 58。29.100 libavdevice 58。8.100 / 58。8.100 libavfilter 7.57.100 / 7.57.100 libavresample 4.0.0 / 4.0.0 libswscale 5.5.100 / 5.5.100 libswresample 3.5.100 / 3.5.100 libpostproc 55.5.100 / 55.5.100 [h264 @ 0x7fbea4002840] 读取 VUI 时超出 7 位 [h264 @ 0x7fbea4002840] sps_id 0 超出范围 [h264 @ 0x7fbea4002840] 引用了不存在的 PPS 0 最后一条消息重复了 2 次 [h264 @ 0x7fbea4002840] 超读 VUI 8 位 0KB 平方 = 0B f = 0/0 [h264 @ 0x7fbea4002840] 读取 VUI 时超出 7 位 [h264 @ 0x7fbea4002840] 读取 VUI 时超出 8 位 [h264 @ 0x7fbea4002840] 引用了不存在的 PPS 0 最后一条消息重复了26次 [h264 @ 0x7fbea4002840] 读取 VUI 时超出 7 位 [h264 @ 0x7fbea4002840] sps_id 0 超出范围 [h264 @ 0x7fbea4002840] 引用了不存在的 PPS 0 最后一条消息重复了 29 次 [h264 @ 0x7fbea4002840] 读取 VUI 时超出 7 位 [h264 @ 0x7fbea4002840] sps_id 0 超出范围 [h264 @ 0x7fbea4002840] 引用了不存在的 PPS 0 最后一条消息重复了 29 次 [h264 @ 0x7fbea4002840] 读取 VUI 时超出 7 位 [h264 @ 0x7fbea4002840] sps_id 0 超出范围 [h264 @ 0x7fbea4002840] 引用了不存在的 PPS 0 最后一条消息重复了 29 次 [h264 @ 0x7fbea4002840] 读取 VUI 时超出 7 位 [h264 @ 0x7fbea4002840] sps_id 0 超出范围 [h264 @ 0x7fbea4002840] 引用了不存在的 PPS 0 最后一条消息重复了 29 次 输入 #0,h264,来自'enc_test.h264': 时长:不适用,比特率:不适用 流 #0:0:视频:h264(基线),yuv420p,1280x720,25.17 fps,25 tbr,1200k tbn,50 tbc [h264 @ 0x7fbea4007f00] 读取 VUI 时超出 8 位 无法打开文件“enc_test.h264”或配置滤光图 从上面的日志来看,视频磁头似乎已损坏。 然后我尝试使用 gstreamer debug,并发现了以下日志: 0:00:05.727025935 13024 0xffffa0000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: 由于输入帧消失,无法复制元数据。 我的系统信息:Linux imx95-19x19-lpddr5-evk 6.12.49+ #9 SMP PREEMPT Wed Jul 22 11:47:53 UTC 2026 aarch64 GNU/Linux Re: IMX95 v4l2h264enc encoded frame corrupted 与AE团队讨论。 Re: IMX95 v4l2h264enc encoded frame corrupted 根据您的提示,我尝试执行您提供的两条命令行。但它们都不管用。编码后的视频仍然无法播放。 命令如下: gst-launch-1.0 -e -v videotestsrc pattern=ball num-buffers=150 ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! v4l2h264enc ! h264parse config-interval=-1 ! filesink location=enc_test.h264 当我尝试播放编码后的视频文件时,出现以下错误: ffprobe version 4.2.7-0ubuntu0.1 Copyright (c) 2007-2022 the FFmpeg developers built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 [h264 @ 0x557b5dc1e980] Format h264 detected only with low score of 1, misdetection possible! [h264 @ 0x557b5dc20380] sps_id 0 out of range Last message repeated 1 times [h264 @ 0x557b5dc20380] non-existing PPS 0 referenced Last message repeated 2 times [h264 @ 0x557b5dc20380] sps_id 0 out of range Last message repeated 1 times [h264 @ 0x557b5dc20380] non-existing PPS 0 referenced [h264 @ 0x557b5dc20380] decode_slice_header error [h264 @ 0x557b5dc20380] no frame! [h264 @ 0x557b5dc20380] non-existing PPS 0 referenced [h264 @ 0x557b5dc20380] decode_slice_header error ...... Last message repeated 1 times [h264 @ 0x557b5dc20380] decode_slice_header error [h264 @ 0x557b5dc20380] no frame! [h264 @ 0x557b5dc1e980] decoding for stream 0 failed [h264 @ 0x557b5dc1e980] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, h264, from 'enc_test.h264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264, none, 25.17 fps, 25 tbr, 1200k tbn, 50 tbc 我尝试调试,结果出现了如下警告: 0:00:00.129727669 2003 0xffffa8000b70 WARN v4l2bufferpool gstv4l2bufferpool.c:884:gst_v4l2_buffer_pool_start: Uncertain or not enough buffers, enabling copy threshold 0:00:00.152626502 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.153013002 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:435:gst_h264_parse_vui_parameters: failed to read uint8 for 'vui->aspect_ratio_idc', nbits: 8 0:00:00.153052211 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:516:gst_h264_parse_vui_parameters: error parsing "VUI Parameters" 0:00:00.153071752 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2155:gst_h264_parse_sps: error parsing "Sequence parameter set" 0:00:00.153092044 2003 0xffffa8000d00 WARN h264parse gsth264parse.c:993:gst_h264_parse_process_nal: failed to parse SPS: 0:00:00.153120336 2003 0xffffa8000d00 WARN h264parse gsth264parse.c:1529:gst_h264_parse_handle_frame: broken/invalid nal Type: 7 SPS, Size: 9 will be dropped 0:00:00.153205086 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2284:gst_h264_parse_pps: couldn't find associated sequence parameter set with id: 0 0:00:00.153230627 2003 0xffffa8000d00 WARN h264parse gsth264parse.c:1026:gst_h264_parse_process_nal: failed to parse PPS: 0:00:00.153418211 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.153690127 2003 0xffffa8000d00 WARN v4l2bufferpool gstv4l2bufferpool.c:491:gst_v4l2_buffer_pool_alloc_buffer: newly allocated buffer 0 is not free Pipeline is PREROLLED ... Setting pipeline to PLAYING ... Redistribute latency... New clock: GstSystemClock 0:00:00.180972628 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.181182169 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.211927795 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.212148128 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.242748712 2003 0xffffa8000d00 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.242969462 2003 0xffffa8000d00 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 命令如下: gst-launch-1.0 -e -v videotestsrc pattern=ball num-buffers=150 ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! v4l2h264enc ! h264parse config-interval=-1 ! mp4mux ! filesink location=enc_test.mp4 视频文件无法编码,显示如下错误: root@imx95-19x19-lpddr5-evk:~# GST_DEBUG=3 gst-launch-1.0 -e -v videotestsrc pattern=ball num-buffers=150 ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! v4l2h264enc ! h264parse config-interval=-1 ! mp4mux ! filesink location=enc_test.mp4 Setting pipeline to PAUSED ... ====== V4L2ENC: 1.24.7 build on Jan 2 2025 07:23:23. ====== 0:00:00.078378376 2059 0xaaaadecda320 WARN v4l2 gstv4l2object.c:5350:gst_v4l2_object_probe_caps: Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument 0:00:00.079377793 2059 0xffffa8000b70 WARN aggregator gstaggregator.c:2283:gst_aggregator_query_latency_unlocked: Latency query failed Pipeline is PREROLLING ... 0:00:00.079857126 2059 0xffffa8000d00 FIXME default gstutils.c:4089:gst_element_decorate_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono Redistribute latency... /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fraction)1/1 0:00:00.140337252 2059 0xffffa8000d00 WARN v4l2bufferpool gstv4l2bufferpool.c:884:gst_v4l2_buffer_pool_start: Uncertain or not enough buffers, enabling copy threshold 0:00:00.165691544 2059 0xffffa8000e90 FIXME videoencoder gstvideoencoder.c:2408:gst_video_encoder_transform_meta_unlocked: Can't copy metadata because input frame disappeared 0:00:00.166079919 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:435:gst_h264_parse_vui_parameters: failed to read uint8 for 'vui->aspect_ratio_idc', nbits: 8 0:00:00.166119002 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:516:gst_h264_parse_vui_parameters: error parsing "VUI Parameters" 0:00:00.166138877 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:2155:gst_h264_parse_sps: error parsing "Sequence parameter set" 0:00:00.166159335 2059 0xffffa8000e90 WARN h264parse gsth264parse.c:993:gst_h264_parse_process_nal: failed to parse SPS: 0:00:00.166187127 2059 0xffffa8000e90 WARN h264parse gsth264parse.c:1529:gst_h264_parse_handle_frame: broken/invalid nal Type: 7 SPS, Size: 9 will be dropped 0:00:00.166277252 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:2284:gst_h264_parse_pps: couldn't find associated sequence parameter set with id: 0 0:00:00.166301710 2059 0xffffa8000e90 WARN h264parse gsth264parse.c:1026:gst_h264_parse_process_nal: failed to parse PPS: 0:00:00.166486835 2059 0xffffa8000e90 WARN codecparsers_h264 gsth264parser.c:2473:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 0 0:00:00.166826460 2059 0xffffa8000b70 WARN qtmux gstqtmux.c:6357:gst_qt_mux_video_sink_set_caps: no codec_data in h264 caps 0:00:00.166923502 2059 0xffffa8000b70 WARN qtmux gstqtmux.c:6856:gst_qt_mux_video_sink_set_caps: pad video_0 refused caps video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, i/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true nterlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true 0:00:00.166977794 2059 0xffffa8000e90 WARN v4l2bufferpool gstv4l2bufferpool.c:491:gst_v4l2_buffer_pool_alloc_buffer: newly allocated buffer 0 is not free /GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstQTMuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true 0:00:00.167488335 2059 0xffffa8000b70 FIXME basesink gstbasesink.c:3399:gst_base_sink_default_event: stream-start event without group-id. Consider implementing group-id handling in the upstream elements /GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstAggregatorPad:src: caps = video/quicktime, variant=(string)iso /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)iso Pipeline is PREROLLED ... Setting pipeline to PLAYING ... 0:00:00.168202544 2059 0xffffa8000b70 WARN qtmux gstqtmux.c:5415:gst_qt_mux_add_buffer: error: format wasn't negotiated before buffer flow on pad video_0 Redistribute latency... ERROR: from element /GstPipeline:pipeline0/GstMP4Mux:mp4mux0: GStreamer error: negotiation problem. Additional debug info: /usr/src/debug/gstreamer1.0-plugins-good/1.24.7.imx/gst/isomp4/gstqtmux.c(5415): gst_qt_mux_add_buffer (): /GstPipeline:pipeline0/GstMP4Mux:mp4mux0: format wasn't negotiated before buffer flow on pad video_0 0:00:00.168413044 2059 0xffffa8000b70 FIXME aggregator gstaggregator.c:1478:gst_aggregator_loop: Subclass should call gst_aggregator_selected_samples() from its aggregate implementation. Execution ended after 0:00:00.000556000 Setting pipeline to NULL ... 0:00:00.174238335 2059 0xaaaadecda320 WARN bufferpool gstbufferpool.c:1429:gst_buffer_pool_set_flushing: can't change flushing state of inactive pool 0:00:00.199404961 2059 0xaaaadecda320 WARN bufferpool gstbufferpool.c:1429:gst_buffer_pool_set_flushing: can't change flushing state of inactive pool Freeing pipeline ... Re: IMX95 v4l2h264enc encoded frame corrupted 编码器输出可能不是来自测试源的“视频头损坏”;该管道缺少 NXP 的 i.MX Linux 指南中针对 i.MX 8 / i.MX 95 VPU 编码器管道所期望的 H.264 解析器阶段。i.MX 95 v4l2h264enc 输出为 H.264 stream-format=byte-stream / alignment=au,NXP 文档指出应该添加 h264parse/h265parse,因为 VPU 在 i.MX 8 和 i.MX 95 上仅支持字节流输出。 请先使用此方法: gst-用上市,不用发布-1.0-e -v \ videotestsrc pattern=ball num-buffers=150 !\ video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 !\ v4l2h264enc!\ h264parse 配置间隔=-1!\ filesink location=enc_test.h264 然后直接以原始 H.264 格式播放: ffplay -f h264 enc_test.h264 如果你想要一个普通的可播放容器文件,请使用复用器: gst-用上市,不用发布-1.0-e -v \ videotestsrc pattern=ball num-buffers=150 !\ video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 !\ v4l2h264enc!\ h264解析!\ mp4mux!\ filesink location=enc_test.mp4 或者: gst-用上市,不用发布-1.0-e -v \ videotestsrc pattern=ball num-buffers=150 !\ video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 !\ v4l2h264enc!\ h264解析!\ matroskamux!\ filesink location=enc_test.mkv NXP的录制示例将h264parse置于编码器和复用器/文件接收器路径之间,例如:$videoEncoderPlugin![h264解析]!$MUXER!filesink ...对于 MP4 格式,-e 选项非常重要,这样 GStreamer 才能发送 EOS 并让复用器正确地完成文件。 GStreamer 消息: 视频编码器待修复……由于输入帧消失,无法复制元数据 这本身并不能证明 H.264 比特流头已损坏。这是在 v4l2h264enc 管道中发现的 GStreamer 视频编码器元数据复制警告/FIXME。ffplay 错误——过度读取 VUI、sps_id 0 超出范围、引用不存在的 PPS 0——与下游读取器看到的 H.264 流未按预期规范化/解析的情况更为一致,尤其是在 SPS/PPS 处理方面。 如果解析后的原始 .h264 文件仍然失败,请检查前几个字节: xxd -l 64 enc_test.h264 对于 Annex-B 字节流 H.264,您应该会看到如下起始代码: 00000001 接近开头,然后是 SPS/PPS NAL 单元,之后是切片。 推荐的解决方法:在 v4l2h264enc 之后插入 h264parse;对于一般播放,建议使用 h264parse!mp4mux!filesink location=enc_test.mp4而不是将编码器输出直接写入原始的 .h264 文件。 Re: IMX95 v4l2h264enc encoded frame corrupted 我们可以使用gstreamer播放h264视频,播放效果很好: gst-launch-1.0filesrc location=enc_test.h264 !decodebin!glupload!自动视频接收器 所以我觉得这不是 v4l2h264enc 的问题。
View full article