@@ -6,7 +6,7 @@ export PATH=/empty
66for i in @path@; do PATH=$PATH:$i/bin; done
77
88usage() {
9− echo "usage: $0 -t <timeout> -c <path-to-default-configuration> [-d <boot-dir>] [-g <num-generations>] [-n <dtbName>]" >&2
9+ echo "usage: $0 -t <timeout> -c <path-to-default-configuration> [-d <boot-dir>] [-g <num-generations>] [-n <dtbName>] [-r]" >&2
1010 exit 1
1111}
1212
@@ -15,7 +15,7 @@ default= # Default configuration
1515target=/boot # Target directory
1616numGenerations=0 # Number of other generations to include in the menu
1717
18−while getopts "t:c:d:g:n:" opt; do
18+while getopts "t:c:d:g:n:r" opt; do
1919 case "$opt" in
2020 t) # U-Boot interprets '0' as infinite and negative as instant boot
2121 if [ "$OPTARG" -lt 0 ]; then
@@ -30,6 +30,7 @@ while getopts "t:c:d:g:n:" opt; do
3030 d) target="$OPTARG" ;;
3131 g) numGenerations="$OPTARG" ;;
3232 n) dtbName="$OPTARG" ;;
33+ r) noDeviceTree=1 ;;
3334 \?) usage ;;
3435 esac
3536done
@@ -96,6 +97,12 @@ addEntry() {
9697 fi
9798 echo " LINUX ../nixos/$(basename $kernel)"
9899 echo " INITRD ../nixos/$(basename $initrd)"
100+ echo " APPEND init=$path/init $extraParams"
101+
102+ if [ -n "$noDeviceTree" ]; then
103+ return
104+ fi
105+
99106 if [ -d "$dtbDir" ]; then
100107 # if a dtbName was specified explicitly, use that, else use FDTDIR
101108 if [ -n "$dtbName" ]; then
@@ -109,7 +116,6 @@ addEntry() {
109116 exit 1
110117 fi
111118 fi
112− echo " APPEND init=$path/init $extraParams"
113119}
114120
115121tmpFile="$target/extlinux/extlinux.conf.tmp.$$"