nebula.uart module
- nebula.uart.escape_ansi(line)
- class nebula.uart.uart(address=None, tftpserverip=None, fmc='fmcomms2', baudrate=115200, logfilename='uart.log', bootargs='console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlycon earlyprintk rootfstype=ext4 rootwait', dhcp=False, yamlfilename=None, board_name=None, period=30)
Bases:
utils
- UART Interface Handler
This class enables monitoring and sending commands over a UART interface. Monitoring is done using threads so monitor will not block.
Attributes
- address
File descriptor of serial/COM interface
- tftpserverip
IP address of TFTP server
- logfilename
Filename to save output log of console
- bootargs
Kernel bootargs
- baudrate
Baudrate of UART interface in bits per second (default is 115200)
- print_to_console
Print output of UART console. Output will appear in log file as well
- boot()
Boot kernel from uboot menu
- copy_reference(reference='BOOT.BIN.ORG', target='BOOT.BIN', done_string=None)
Using reference files
- get_ip_address()
Read IP address of DUT using ip command from UART
- get_local_mac_usbdev()
Read MAC Address of enumerated NIC on host from DUT (Pluto/M2K only)
- get_uart_boot_message()
Read UART boot message on no-OS builds.
- get_uart_command_for_linux(cmd, findstring)
Write command to UART and wait for a specific string
- is_open()
- load_system_uart(system_top_bit_filename, devtree_filename, kernel_filename)
Load complete system (bitstream, devtree, kernel) during uboot from UART (XMODEM)
- load_system_uart_copy_to_sdcard(bootbin, devtree_filename, kernel_filename)
Load complete system (BOOT.BIN, devtree, kernel) during uboot from UART (XMODEM) and to SD card
- load_system_uart_from_tftp()
Load complete system (bitstream, devtree, kernel) during uboot from TFTP
- pipe_to_log_file(data, logappend=True, force=False)
Write data to log file
- reinitialize_uart()
- request_ip_dhcp(nic='eth0')
- set_ip_static(address, nic='eth0')
- start_log(logappend=False, force=False)
Trigger monitoring with UART interface
- stop_log(force=False)
Stop monitoring with UART interface
- update_boot_args()
Update kernel boot arguments during uboot
- update_boot_files_from_running(system_top_bit_filename, devtree_filename, kernel_filename)
Load complete system (bitstream, devtree, kernel) during uboot from UART (XMODEM) from a running system
- update_dev_tree()
Transfter devicetree over TFTP to system during uboot
- update_fpga(skip_tftpload=False)
Transfter and load system_top.bit over TFTP to system during uboot
- update_kernel()
Transfter kernel image over TFTP to system during uboot