Hello NXP team,
I'm trying to build a custom image for my custom board. It is based on iMX91 so I've created a new machine copying configuration from evaluation board. I've also add a copy of the EV board device tree (named ws-hub.dts) to the u-boot-imx recipe and change the model name to something else, just to know it is using it. In addition, I've created succesfully a bbappend to add the custom DT to Makefile under "CONFIG_ARCH_IMX9" option.
Then I've created a "airzone_uboot_defconfig" file for my machine based on imx91_11x11_evk_defconfig and modify on my machine conf the variable "UBOOT_CONFIG_BASENAME" to "airzone_uboot". I can see that it is being compiled succesfully
If I leave it as it is, if flashs correctly and then loads kernel but it is not using my custom DT.
Then, I've modify "CONFIG_DEFAULT_FDT_FILE" from defconfig to ws-hub.dtb and it tells "Failed to load 'ws-hub.dtb' ".
I've checked the command "fdt list" on uboot to see the device tree but it show me this:
u-boot => fdt list
/ {
interrupt-parent = <0x00000001>;
#address-cells = <0x00000002>;
#size-cells = <0x00000002>;
model = "NXP i.MX91 11X11 EVK board";
compatible = "fsl,imx91-11x11-evk", "fsl,imx91";
aliases {
};
cpus {
};
clock-osc-32k {
};
clock-osc-24m {
};
clock-ext1 {
};
pmu {
};
thermal-zones {
};
psci {
};
timer {
};
interrupt-controller@48000000 {
};
usbphynop1 {
};
usbphynop2 {
};
soc@0 {
};
imx93-lpm {
};
se-fw2 {
};
chosen {
};
reserved-memory {
};
regulator-can2-stby {
};
regulator-adc-vref {
};
regulator-usdhc2 {
};
regulator-vdd-12v {
};
regulator-vrpi-3v3 {
};
binman {
};
firmware {
};
backlight {
};
panel {
};
signature {
};
__symbols__ {
};
};
So I don't know where that device tree comes from.
My question is how am I suppose to modify the u-boot to adapt it to my board? Am I on the right way or do I have to modify directly the evaluation board DT?
I post my machine.conf in case that you need for reference:
MACHINEOVERRIDES =. "mx91:"
require conf/machine/include/imx-base.inc
require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
DDR_FIRMWARE_NAME = " \
lpddr4_dmem_1d_v202201.bin \
lpddr4_dmem_2d_v202201.bin \
lpddr4_imem_1d_v202201.bin \
lpddr4_imem_2d_v202201.bin \
"
# Remove unused image types
IMAGE_FSTYPES:remove = "wic.bmap"
IMAGE_FSTYPES:remove = "tar.zst"
MACHINE_FEATURES += "pci wifi bluetooth"
MACHINE_FEATURES:append:use-nxp-bsp = " dpdk optee nxpwifi-all-sdio"
# No cares about kernel device tree right now
# KERNEL_DEVICETREE_BASENAME = "imx91-11x11-evk"
# KERNEL_DEVICETREE = "freescale/${KERNEL_DEVICETREE_BASENAME}.dtb"
# Select NXP U-Boot.
IMX_DEFAULT_BOOTLOADER:use-nxp-bsp = "u-boot-imx"
LOADADDR = ""
UBOOT_SUFFIX = "bin"
UBOOT_MAKE_TARGET = ""
SPL_BINARY = "spl/u-boot-spl.bin"
UBOOT_CONFIG ??= "sd"
#UBOOT_CONFIG_BASENAME = "imx91_11x11_evk"
UBOOT_CONFIG_BASENAME = "airzone_uboot"
UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard"
# Set ATF platform name
ATF_PLATFORM = "imx91"
IMXBOOT_TARGETS = "flash_singleboot"
IMX_BOOT_SOC_TARGET = "iMX91"
IMX_BOOT_SEEK = "32"
# We have to disable SERIAL_CONSOLE due to auto-serial-console
SERIAL_CONSOLES = "115200;ttyLP0"
IMX_DEFAULT_BSP = "nxp"