I am newer , and I try to make new device. there is no uboot, kerner ... on my system. for boot, we just need run cmd on host "echo "reset 1" > /dev/ttyUSB0" , it is the mcu serial port. then I can get boot log from /dev/ttyUSB1 , it is thesoc serial port.
the following is the job device_type: orinshort job_name: for orinshort device
timeouts: job: minutes: 20 action: minutes: 15 priority: medium visibility: public
actions: - deploy: timeout: minutes: 10 to: flasher images: kernel: url: http://10.19.207.190/static/docs/v2/contents.html#contents-first-steps-using
The following is the my device, it is very sample: {# orin test short #} {% extends 'orinshort.jinja2' %} {% set connection_list = ['usb1'] %} {% set connection_tags = {'usb1': ['primary', 'telnet']} %} {% set connection_commands = {'usb1': 'telnet localhost 10009'} %}
{% set flasher_reset_commands = ['/tmp/test.sh'] %}
{% block body %} actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }}
{% endblock body %}
I don't know how to set boot with serial port . 1. about cmd echo "reset 1" > /dev/ttyUSB0 0.1 when I input the cmd on the host shell : echo "reset 1" > /dev/ttyUSB0 , soc can be reset 0.2 when I add it to test.sh and run it with the following code in device, soc can be reset too actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }} 0.3 when I use {% set flasher_reset_commands = ['echo "reset 1" > /dev/ttyUSB0) '] %} , it doesn't work. {% set flasher_reset_commands = ['echo "reset 1" > /dev/ttyUSB0) '] %} , it is doesn't work. So how to echo cmd to /dev/ttyUSB0 by flasher: -> commands?
2. how to set boot with serial port in device jinja2 file? if I add the fowllowing code , the test can't run boot: connections: serial: usb1
3. I think the normal process is to configure deploy boot and other operations in the job. but I don't know how to do with my case. just run cmd on host "echo "reset 1" > /dev/ttyUSB0" to start system, how to select the method? how to run flasher_reset_commands in job yaml file?
4. If the job can't start job state is Submitted and can't start test, how to debug? where is the log?
I am newer and my system is special , it just like docker, there is now uboot kernel, we need special cmd to deploy and boot so it is hard for me, please give me a hand for it.
Hey irreallich,
LAVA assumes the devices to be controlled by a PDU, so LAVA can turn on the device in hardware.
You seem not to have this infrastructure, but you can use this LAVA functionality to issue your reset to the device. Example here: https://docs.lavasoftware.org/lava/first-devices.html?highlight=hard_reset_c...
I guess when you set the 'echo "reset 1"' command as power_on_command and as hard_reset_command, it should already work.
Try this and see if your other questions are answered by this - and re-ask them if not.
Best regards
Stefan
On 2023-10-10 12:47, irreallich@126.com wrote:
I am newer , and I try to make new device. there is no uboot, kerner ... on my system. for boot, we just need run cmd on host "echo "reset 1" > /dev/ttyUSB0" , it is the mcu serial port. then I can get boot log from /dev/ttyUSB1 , it is thesoc serial port.
the following is the job device_type: orinshort job_name: for orinshort device
timeouts: job: minutes: 20 action: minutes: 15 priority: medium visibility: public
actions:
- deploy: timeout: minutes: 10 to: flasher images: kernel: url: http://10.19.207.190/static/docs/v2/contents.html#contents-first-steps-using
The following is the my device, it is very sample: {# orin test short #} {% extends 'orinshort.jinja2' %} {% set connection_list = ['usb1'] %} {% set connection_tags = {'usb1': ['primary', 'telnet']} %} {% set connection_commands = {'usb1': 'telnet localhost 10009'} %}
{% set flasher_reset_commands = ['/tmp/test.sh'] %}
{% block body %} actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }}
{% endblock body %}
I don't know how to set boot with serial port .
- about cmd echo "reset 1" > /dev/ttyUSB0
0.1 when I input the cmd on the host shell : echo "reset 1" > /dev/ttyUSB0 , soc can be reset 0.2 when I add it to test.sh and run it with the following code in device, soc can be reset too actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }} 0.3 when I use {% set flasher_reset_commands = ['echo "reset 1" > /dev/ttyUSB0) '] %} , it doesn't work. {% set flasher_reset_commands = ['echo "reset 1" > /dev/ttyUSB0) '] %} , it is doesn't work. So how to echo cmd to /dev/ttyUSB0 by flasher: -> commands?
- how to set boot with serial port in device jinja2 file?
if I add the fowllowing code , the test can't run boot: connections: serial: usb1
- I think the normal process is to configure deploy boot and other operations in the job. but I don't know how to do with my case.
just run cmd on host "echo "reset 1" > /dev/ttyUSB0" to start system, how to select the method? how to run flasher_reset_commands in job yaml file?
- If the job can't start
job state is Submitted and can't start test, how to debug? where is the log?
I am newer and my system is special , it just like docker, there is now uboot kernel, we need special cmd to deploy and boot so it is hard for me, please give me a hand for it. _______________________________________________ lava-users mailing list -- lava-users@lists.lavasoftware.org To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Hi Stefan, Thanks for the clarification, I'm still very confused. Today I hope to be able to create the simplest device template and job, just reboot the soc, connect to the serial port and print the boot log on the job web. I have tried many times today and they all failed. The following is my device and job code . Nothing except flasher_reset_commands is executed, flasher_reset_commands execution result is invalid, no /tmp/123 be created. could you tell me what's wrong?
log of job web:
Calling: 'echo' '1111111' '>' '/tmp/123'
1111111 > /tmp/123
Returned 0 in 0 seconds end: 1.1 deploy-flasher (duration 00:00:00) [common] end: 1 deploy-flasher-retry (duration 00:00:00) [common] start: 2 finalize (timeout 00:15:00) [common] start: 2.1 power-off (timeout 00:00:10) [common] end: 2.1 power-off (duration 00:00:00) [common] start: 2.2 read-feedback (timeout 00:15:00) [common] No connection for namespace common end: 2.2 read-feedback (duration 00:00:00) [common] end: 2 finalize (duration 00:00:00) [common] Cleaning after the job
my device: {# orin test short #} {% extends 'orinshort.jinja2' %}
{% set connection_commands = 'telnet localhost 10009' %} {% set hard_reset_command = 'echo "tegrareset x1" > /dev/ttyUSB1' %} {% set power_on_command = 'echo "54321" > /tmp/poweron' %} {% set power_off_command = 'echo "12345" > /tmp/poweroff' %}
{% set flasher_reset_commands = ['echo "1111111" > /tmp/123'] %}
{% block body %}
actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }} boot: connections: serial: methods: minimal:
{% endblock body %} /etc/lava-server/dispatcher-config $
my job:
device_type: orinshort job_name: for orinshort device
timeouts: job: minutes: 20 action: minutes: 15 priority: medium visibility: public
actions: - deploy: timeout: minutes: 10 to: flasher images: kernel: url: http://10.19.207.190/static/docs/v2/contents.html#contents-first-steps-using
On Thu, Oct 12, 2023 at 12:01 PM irreallich@126.com wrote:
Hi Stefan, Thanks for the clarification, I'm still very confused. Today I hope to be able to create the simplest device template and job, just reboot the soc, connect to the serial port and print the boot log on the job web. I have tried many times today and they all failed. The following is my device and job code . Nothing except flasher_reset_commands is executed, flasher_reset_commands execution result is invalid, no /tmp/123 be created. could you tell me what's wrong?
log of job web:
Calling: 'echo' '1111111' '>' '/tmp/123'
1111111 > /tmp/123
Returned 0 in 0 seconds end: 1.1 deploy-flasher (duration 00:00:00) [common] end: 1 deploy-flasher-retry (duration 00:00:00) [common] start: 2 finalize (timeout 00:15:00) [common] start: 2.1 power-off (timeout 00:00:10) [common] end: 2.1 power-off (duration 00:00:00) [common] start: 2.2 read-feedback (timeout 00:15:00) [common] No connection for namespace common end: 2.2 read-feedback (duration 00:00:00) [common] end: 2 finalize (duration 00:00:00) [common] Cleaning after the job
This all looks good to me. Your job only does deployment, so this is what should be expected. You need "boot" action in the job to see any more work done by LAVA.
my device: {# orin test short #} {% extends 'orinshort.jinja2' %}
{% set connection_commands = 'telnet localhost 10009' %} {% set hard_reset_command = 'echo "tegrareset x1" > /dev/ttyUSB1' %} {% set power_on_command = 'echo "54321" > /tmp/poweron' %} {% set power_off_command = 'echo "12345" > /tmp/poweroff' %}
{% set flasher_reset_commands = ['echo "1111111" > /tmp/123'] %}
this is what you asked LAVA to do and it was done.
Best Regards, Milosz
{% block body %}
actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }} boot: connections: serial: methods: minimal:
{% endblock body %} /etc/lava-server/dispatcher-config $
my job:
device_type: orinshort job_name: for orinshort device
timeouts: job: minutes: 20 action: minutes: 15 priority: medium visibility: public
actions:
- deploy: timeout: minutes: 10 to: flasher images: kernel: url: http://10.19.207.190/static/docs/v2/contents.html#contents-first-steps-using
lava-users mailing list -- lava-users@lists.lavasoftware.org To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Hi, Milosz, Nice to meet you again :) . I add the following action to the device, deploy will call flasher_reset_commands , so it seems that deploy in device is work. how about the boot action? can we make boot action of device working? anyway , I will try to add boot on job. {% block body %} actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }} boot: connections: serial: methods: minimal: {% endblock body %}
Hi, Milosz, Through your instructions, I can already connect to the serial port. But I found that if I need to add " " to the command, then the command doesn't work. No matter whether I add \ before " . If you write these commands in a script, it will work. how to input the cm e.g echo "pre_os_command start" >> /tmp/minimal e.g my device: {# orin test short #} {% extends 'orinshort.jinja2' %}
{% set connection_list = ['uart0', 'uart1'] %} {% set connection_commands = {'uart0': 'telnet 10.19.206.234 19990', 'uart1': 'telnet 10.19.206.234 19991'} %} {% set connection_tags = {'uart0': ['primary', 'telnet'], 'uart1': ['telnet']} %}
{% set console_device = console_device | default('ttyUSB1') %} {% set baud_rate = baud_rate | default(115200) %}
{% set pre_power_command = 'echo "pre_power_command" >> /tmp/minimal' %} {% set pre_os_command = 'echo "pre_os_command" >> /tmp/minimal' %} {% set hard_reset_command = [ 'echo "hard_reset_command 0" >> /tmp/minimal', 'echo "hard_reset_command 1" >> /tmp/minimal', 'echo "hard_reset_command 2" >> /tmp/minimal'] %} {% set power_on_command = 'echo "power_on_command" >> /tmp/minimal' %} {% set power_off_command = ['echo "power_off_command 0" >> /tmp/minimal', 'echo "power_off_command 1" >> /tmp/minimal'] %}
{% set flasher_reset_commands = ['echo "1111111" > /tmp/123'] %}
{% block body %}
actions: deploy: methods: flasher: commands: {{ flasher_reset_commands }} boot: connections: serial: methods: minimal:
{% endblock body %}
log: start: 3 minimal-boot (timeout 00:01:00) [common] start: 3.1 connect-device (timeout 00:01:00) [common] [common] connect-device Connecting to device using 'telnet 10.19.206.234 19990' Setting prompt string to ['lava-test: # '] end: 3.1 connect-device (duration 00:00:00) [common] start: 3.2 reset-device (timeout 00:01:00) [common] start: 3.2.1 pdu-reboot (timeout 00:01:00) [common] Calling: 'echo' 'hard_reset_command 0' '>>' '/tmp/minimal'
hard_reset_command 0 >> /tmp/minimal
Returned 0 in 0 seconds Calling: 'echo' 'hard_reset_command 1' '>>' '/tmp/minimal'
hard_reset_command 1 >> /tmp/minimal
Returned 0 in 0 seconds Calling: 'echo' 'hard_reset_command 2' '>>' '/tmp/minimal'
hard_reset_command 2 >> /tmp/minimal
Returned 0 in 0 seconds end: 3.2.1 pdu-reboot (duration 00:00:00) [common] case: pdu-reboot definition: lava duration: 0.32 extra: ... level: 3.2.1 namespace: common result: pass end: 3.2 reset-device (duration 00:00:00) [common] end: 3 minimal-boot (duration 00:00:00) [common] start: 4 finalize (timeout 00:15:00) [common] start: 4.1 power-off (timeout 00:00:10) [common] Calling: 'echo' 'power_off_command 0' '>>' '/tmp/minimal'
power_off_command 0 >> /tmp/minimal
Returned 0 in 0 seconds Calling: 'echo' 'power_off_command 1' '>>' '/tmp/minimal'
power_off_command 1 >> /tmp/minimal
Returned 0 in 0 seconds end: 4.1 power-off (duration 00:00:00) [common] case: power-off definition: lava duration: 0.22 extra: ... level: 4.1 namespace: common result: pass start: 4.2 read-feedback (timeout 00:15:00) [common] Trying 10.19.206.234... Connected to 10.19.206.234. Escape character is '^]'. ser2net port 19990 device /dev/ttyUSB0 [115200 N81] (Debian GNU/Linux) Listened to connection for namespace 'common' for up to 1s Finalising connection for namespace 'common' Disconnecting from telnet: Finalise ] quit quit
lava-users@lists.lavasoftware.org