We are trying to customize the u-boot of verdin am62 for our custom board in which we want to remove the usb boot, ethernet boot as well as booting MMC1.
In usb boot we want to change the usb instance for usb-boot for updating the image in mmcblk0.
currently we have a workspace under build as u-boot-toradex-ti, but we are not finding any device tree files to do so.
and also kindly provide the information on how to test the new u-boot image after building.
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
To customize the U-Boot for your Verdin AM62 module, you’ll need to modify the U-Boot configuration to disable specific boot options like USB, Ethernet, and MMC1. Here’s a step-by-step guide to help you through the process:
Disabling Boot Options:
Navigate to the U-Boot source directory, typically under include/configs/.
Look for configuration macros such as CONFIG_CMD_USB, CONFIG_CMD_NET, and CONFIG_CMD_MMC.
Comment out or undefine these macros to disable the respective boot options.
Changing USB Boot Settings:
Modify the board-specific initialization code, usually found in the board/ directory.
Adjust the USB instance or port settings in the relevant functions to suit your requirements.
Testing the New U-Boot Image:
Build the U-Boot image using the appropriate make commands for your architecture.
Deploy the new U-Boot image to your hardware using a tool like the Toradex Easy Installer or by flashing it directly to the boot media (e.g., eMMC or SD card).
Always keep a backup of the original U-Boot image to revert changes if necessary.
Device trees are mainly for Linux kernel configuration and are not directly involved in U-Boot customization. However, if your changes require hardware configuration adjustments, you might need to update the device tree accordingly.
I hope this helps you customize and test your U-Boot setup for the Verdin AM62 module. If you have further questions, feel free to ask.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
i am able to find the boot order under /include/configs under verdin_am62.h, but unable to find file where usb can be chnged, can you please check this.
Hi @naveenkumar.muthusam ,
Before recompiling the customized u-boot, did you test your modifications in your running image?
You can simply modify the boot options from the u-boot and test and then go for compiling customized u-boot.
I have not yet tested the u-boot. I want to know more about testing u-boot in verdin am62 SOM as well. do we need to place the u-boot files under /boot or can you please let me know the procedure how to boot the latest image of u-boot.
and also i am still looking for file in which usb instance need to be changed. currently in u-boot usb0 is working. but in our board we have provided provision for usb1, so i need to change it to the USB1 and also this usb can work as Host only as per the hardware configuration.
Hi @naveenkumar.muthusam ,
You just need to power ON your board and press space to stop and u-boot. Then modify the u-boot variables as per your requirement.
After stopping at u-boot, run printenv command to see all the currently configured variables.
I think you misunderstood the question. I understood that changes can be done at u-boot after the board is powered on, we have already tested this.
what we are looking is, in u-boot, MMC0 boot only should be available and rest of the boot options like MMC1 and ethernet booting needs to be removed.
currently in u-boot we are able to detect the usb connected under usb0, but we are unable to detect the devices connected to the usb1 instance. we want usb1 instance to be also working from u-boot.
Hi @naveenkumar.muthusam,
I am dividing your question into two parts for better understanding.
u-boot modification for removing all boot options apart from mmc1.
a. You can do that from u-boot by the below command edit boot_targets
b. You can also modify the same in “u-boot-initial-env-sd” (available inside image folder)and flash the image, this will be reflected in your uboot.
c. You can also recompile the uboot
Reading usb0/usb1 from u-boot
There are two usb ports available on verdin AM62.
USB 2.0 Host
USB 2.0 OTG
Are you talking about USB OTG to work as a host and read your USB?
By default, this is in client mode which is required for flashing new images.
Also let me know which carrier board you are using?
currentlly in u boot, only usb1 is working. when i try usb start 0, usb0 is not starting and usb1 is only working. and devices connected on usb1 is only detected.
we are using verdin carrier board with verdin non wifi am62 SOM.
The above is the development Board we are using. What i am trying is to detect the devices connected on the USB-C connector which is connected to the USB0 of the AM62.
Hi @naveenkumar.muthusam,
On verdin development board, there are markings for the connectors. The USB-C connector is X34 (its also mentioned in the datasheet).
Anyways, when you connect the the device(eg USB drive) to USB-C after the image boots up, you will be able to detect the USB drive because the USB-C is configured to acts as dual role i.e as a host or as a client.
The same does not seems to be configured in u-boot, its only acting as a client, thats why you are not able to read your USB in u-boot.
Try configuring it as a host or enable dual role switch as configured in kernel.
Take reference from from /linux-toradex/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi and make the changes in your u-boot.
Also read section 2.7 Verdin USB_1 Port in your Verdin Devlopment board datasheet
/* TODO: role swich using ID pin */
&usb0 {
dr_mode = “host”;
status = “okay”;
};
in u-boot device tree, usb0 is already configured as host. but still we are unable to detect any device connected to it. and yes we are talking about x34.
Please provide steps on how to test the u-boot. we have build an image for testing. but we are not sure how to test it. it will be really helpful if u can share the steps for testing the latest image built using the SD card.
Hi @naveenkumar.muthusam,
After customizing uboot, you can deploy it as mentioned here.
After deploying, you can simply try to read your usb with the commands(usb start, usb scan, usb tree, etc)
from the link provided from above it is mentioned that we can deploy using toradex easy installer.
we are not using toradex easy installer for updating the images such as kernel or may be u-boot.
is there any other way to update and test? because we need other options as we don’t see toradex easy installer as an option to update the images in SOM, once the product is in production.
It would be really helpful if you provide us a way to test it using SD CARD.