-
Notifications
You must be signed in to change notification settings - Fork 10
Add complete SW update options #7
base: master
Are you sure you want to change the base?
Conversation
Could you add screenshots here? |
mount /dev/sda1 /mnt | ||
mkdir /temp_fpga | ||
cp /mnt/*.jam /temp_fpga | ||
umount /mnt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to a) mount/umount anything b) require USB drive to be connected and c)copy files around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'The custom update files(.jam and .px4) are present in the connected storage media, which is mounted(Since automounting is absent) and the files are copied to the board(temporary location - temp_fpga and temp_fc_fm directory) for updation, and post that they are removed' - this is the approach that we had taken. Now that you are suggesting that no mounting, unmounting and USB connections are needed, could you please specify where will the custom files be present? If they will reside on the board, could you please specify the path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fpga: /etc/fpga
Bios: /etc/bios
FC: /etc/px4-fw and /etc/ardupilot-fw
If the user wants to flash a custom one, we should give an option for him to choose the file on his computer and upload. The plugin then saves this to a temporary location and proceed with flashing.
Makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are unable to identify any cockpit APIs that help with the uploading mechanism ie transferring of the file to the compute board via a 'browse the file explorer and upload' option. Kindly suggest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. @martinpitt do you have any input or pointer on where to look?
rm -rf /temp_fc_fm | ||
exit $ret_code | ||
fi | ||
rm -rf /temp_fpga |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover?
exit $ret_code | ||
fi | ||
rm -rf /temp_fpga | ||
reboot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't reboot automatically. It's sometimes needed, but not most of the time.
ret_code=$? | ||
if [ $ret_code != 0 ]; then | ||
printf "Error : [%d] when executing command: '$cmnd'" $ret_code | ||
rm -rf /temp_fc_fm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover?
rm -rf /temp_fc_fm | ||
exit $ret_code | ||
fi | ||
rm -rf /temp_fc_fm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Please find the initial version for #202 fix.
Kindly have a look at it and let us know your opinion.