mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Added ability to specify device tree to flash-sd. It also will generate the device tree files inside the specified buildroot directory
This commit is contained in:
parent
2bf6207919
commit
acc303fbf1
@ -30,6 +30,7 @@ help() {
|
|||||||
echo "Usage: $0 [OPTIONS] <device>"
|
echo "Usage: $0 [OPTIONS] <device>"
|
||||||
echo " -z wipes card with zeros"
|
echo " -z wipes card with zeros"
|
||||||
echo " -b <path/to/buildroot> get images from given buildroot"
|
echo " -b <path/to/buildroot> get images from given buildroot"
|
||||||
|
echo " -d <device tree name> specify device tree to use"
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +39,7 @@ help() {
|
|||||||
# parameters list.
|
# parameters list.
|
||||||
ARGS=()
|
ARGS=()
|
||||||
while [ $OPTIND -le "$#" ] ; do
|
while [ $OPTIND -le "$#" ] ; do
|
||||||
if getopts "hzb:" arg ; then
|
if getopts "hzb:d:" arg ; then
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
h) help
|
h) help
|
||||||
;;
|
;;
|
||||||
@ -46,6 +47,8 @@ while [ $OPTIND -le "$#" ] ; do
|
|||||||
;;
|
;;
|
||||||
b) BUILDROOT=${OPTARG}
|
b) BUILDROOT=${OPTARG}
|
||||||
;;
|
;;
|
||||||
|
d) DEVICE_TREE=$IMAGES/${OPTARG}
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
ARGS+=("${!OPTIND}")
|
ARGS+=("${!OPTIND}")
|
||||||
@ -83,7 +86,8 @@ fi
|
|||||||
|
|
||||||
# Ensure device tree binaries exist
|
# Ensure device tree binaries exist
|
||||||
if [ ! -e $DEVICE_TREE ] ; then
|
if [ ! -e $DEVICE_TREE ] ; then
|
||||||
echo -e '$ERRORTEXT Missing device tree files'
|
echo -e "$NAME $ERRORTEXT Missing device tree files"
|
||||||
|
echo -e "$NAME generating all device tree files into buildroot"
|
||||||
make -C ../ generate BUILDROOT=$BUILDROOT
|
make -C ../ generate BUILDROOT=$BUILDROOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user