On 18 December 2017 at 10:12, Philippe BEGNIC philippe.begnic@st.com wrote:
Hello Lava Team,
I have created some Lava jobs that use our proprietary Flasher, based on a DFU connection. As our flasher is not a "standard" flasher, I have adapted the boot process to be able to use our flasher.
Sounds like you need to use LXC instead. Put the flashing tool inside the LXC.
I use the boot method "minimal" to achieve this.
To call our flasher script, I have used the script called by the method "power_on". This is defined in the device configuration.
*Find below an extract of the device content :* ............................................................ ........................... .. .. {% set hard_reset_command = '/usr/bin/pduclient --daemon localhost --hostname lava_pdu_01.lme.st.com --command reboot --port 1' %} {% set power_off_command = '/usr/bin/pduclient --daemon localhost --hostname lava_pdu_01.lme.st.com --command off --port 1' %} {% *set power_on_command* = '/root/git/lava-config/scripts/ *flash_stm32_programmer.sh* -u lava_pdu_01.lme.st.com -p 1 -d usb1 -b ds378_2.lme.st.com -s 4_5_6 -f /tmp/test' %} {% set connection_command = 'telnet localhost 2001' %} .. .. ............................................................ ...........................
This works correctly for a "static" configuration. The settings for the flasher are defined outside Lava by a script that configure the flashing parameters. The "power_on" script reads these parameters, and launch the flashing on the board.
My problem now, is when I launch simultaneously jobs on several boards that requires different flashing binaries version. I am unable to indicate to each boards which binary version to be used by our flasher.
So each needs to set up their own in a container.
The best way would be to pass parameters in the job to indicate which binary version has to be used by the flasher.
No, that is a very bad way.
This could be done in the "deploy action" and pass to the "power_on" command, but I don't know how to implement it.
I don't know also if it is possible to do that easily ?
Find below my job definition.
###### Job definition ############## actions:
- deploy:
timeout: minutes: 5 to: ssh os: oe device:
- boot:
method: minimal failure_retry: 2 auto_login: login_prompt: 'login:' username: root prompts:
- 'root@stm32mp1'
timeout: minutes: 10 transfer_overlay: download_command: sync && sleep 15 && wget unpack_command: tar -C / -xzf
- test: ... #############################
Thanks to support me.
BR
Philippe
Lava-users mailing list Lava-users@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lava-users