scripts: sync with master

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
v3.10: rebase

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>