Set Date via Uboot

Hello again,

i am trying to reset/set the date of my device via U-boot.
I found the Manual of all Uboot commands here:

However when i look in the U-Boot console in the help command i only get this list:

Apalis iMX8 # help
? - alias for ‘help’
askenv - get environment variables from stdin
base - print or set address offset
bdinfo - print Board Info structure
blkcache - block cache diagnostics and control
bmp - manipulate BMP image data
boot - boot default, i.e., run ‘bootcmd’
bootaux - Start auxiliary core
bootd - boot default, i.e., run ‘bootcmd’
bootefi - Boots an EFI payload from memory
bootelf - Boot from an ELF image in memory
booti - boot Linux kernel ‘Image’ format from memory
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
cfgblock - Toradex config block handling commands
check_fips_mode- Display the FIPS mode of the SoC by reading fuse 0xA, bit 3
clk - CLK sub-system
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
cpu - display information about CPUs
crc32 - checksum calculation
dcache - enable or disable data cache
dhcp - boot image via network using DHCP/TFTP protocol
dm - Driver model low level access
echo - echo args to console
editenv - edit environment variable
env - environment handling commands
exit - exit script
ext2load - load binary file from a Ext2 filesystem
ext2ls - list files in a directory (default /)
ext4load - load binary file from a Ext4 filesystem
ext4ls - list files in a directory (default /)
ext4size - determine a file’s size
ext4write - create a file in the root directory
false - do nothing, unsuccessfully
fastboot - run as a fastboot usb or udp device
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
fatmkdir - create a directory
fatrm - delete a file
fatsize - determine a file’s size
fatwrite - write file into a dos filesystem
fdt - flattened device tree utility commands
fstype - Look up a filesystem type
fuse - Fuse sub-system
go - start application at address ‘addr’
gpio - query and control gpio pins
gpio_conf - gpio configuration
gpt - GUID Partition Table
guid - GUID - generate Globally Unique Identifier based on random UUID
gzwrite - unzip and write memory to block device
hdp - load hdmi firmware
hdprx - load hdmi rx firmware
help - print command description/usage
i2c - I2C sub-system
icache - enable or disable instruction cache
iminfo - print header information for application image
imxtract - extract a part of a multi-image
itest - return true/false on integer compare
lcdputs - print string on video framebuffer
ln - Create a symbolic link
load - load binary file from a filesystem
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
lzmadec - lzma uncompress a memory region
md - memory display
mdio - MDIO utility commands
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mmc - MMC sub system
mmcinfo - display MMC info
mtest - simple RAM read/write test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
part - disk partition related commands
pci - list and access PCI Configuration Space
ping - send ICMP ECHO_REQUEST to network host
pinmux - show pin-controller muxing
printenv - print environment variables
pxe - commands to get and boot from pxe files
random - fill memory with random pattern
reset - Perform RESET of the CPU
run - run commands in an environment variable
save - save file to a filesystem
saveenv - save environment variables to persistent storage
scsi - SCSI sub-system
scsiboot - boot from SCSI device
scu_rm - scu partition function
select_dt_from_module_version-

set_fips_mode- Set FIPS mode
setcurs - set cursor position within screen
setenv - set environment variables
setexpr - set environment variable as the result of eval expression
showvar - print local hushshell variables
size - determine a file’s size
sleep - delay execution for some time
snvs_cfg - Security violation configuration
snvs_clear_status- snvs clear status
snvs_dgo_cfg- SNVS DGO configuration
snvs_sec_status- tamper pin configuration
source - run script from memory
sysboot - command to get and boot from syslinux files
tamper_pin_cfg- tamper pin configuration
test - minimal test like /bin/sh
tftpboot - boot image via network using TFTP protocol
true - do nothing, successfully
ums - Use the UMS [USB Mass Storage]
unzip - unzip a memory region
usb - USB sub-system
usbboot - boot from USB device
uuid - UUID - generate random Universally Unique Identifier
version - print monitor, compiler and linker version

Where the date method is missing. I would prefer to not cook my own uboot version. Is there no way to set the date with the standard torizon uboot?

Hi @busssard !

Looking for the date command seems like we do not have it enabled in U-boot.

We will ask internally if it is possible to enable it.

Best regards,

1 Like

Hi @busssard !

Could you please elaborate on why you need the date command? It would be great if you could share details of your use case.

Also, which version of TorizonCore are you using? Please share the output of cat /etc/os-release.

And which exact module are you using? Please share its full name and version.

Best regards,

Hi Henrique,
we found a workaround with a startup script that sets the date, without needing to go via uboot.
its good from our side.

Hi @busssard !

Thanks for the feedback.

Could you please share your solution?

So other users looking for date in U-boot could benefit from this topic you created :slight_smile:

Best regards,