File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ Read_Settings()
2929 then
3030 read -ra cmdline < /boot/firmware/cmdline.txt
3131
32+ # Odroid C1/XU4
33+ elif (( $G_HW_MODEL == 10 || $G_HW_MODEL == 11 ))
34+ then
35+ read -ra cmdline < <( sed -En ' /^[[:blank:]]*setenv[[:blank:]]+bootargs[[:blank:]]/{s/^[[:blank:]]*setenv[[:blank:]]+bootargs[[:blank:]]+"(.*)"/\1/p;q}' /boot/boot.ini)
36+
3237 # U-Boot environment file
3338 elif [[ $uenv ]]
3439 then
@@ -180,6 +185,20 @@ Apply_Settings()
180185 done
181186 [[ ${cmdline[i]} == " video=$DISPLAY :" * ]] || cmdline+=(" $arg " )
182187 G_EXEC eval " echo '${cmdline[*]} ' > /boot/firmware/cmdline.txt"
188+
189+ # Odroid C1/XU4
190+ elif (( $G_HW_MODEL == 10 || $G_HW_MODEL == 11 ))
191+ then
192+ local cmdline=() i
193+ read -ra cmdline < <( sed -En ' /^[[:blank:]]*setenv[[:blank:]]+bootargs[[:blank:]]/{s/^[[:blank:]]*setenv[[:blank:]]+bootargs[[:blank:]]+"(.*)"/\1/p;q}' /boot/boot.ini)
194+ for i in " ${! cmdline[@]} "
195+ do
196+ [[ ${cmdline[i]} == " video=$DISPLAY :" * ]] || continue
197+ cmdline[i]=$arg
198+ break
199+ done
200+ [[ ${cmdline[i]} == " video=$DISPLAY :" * ]] || cmdline+=(" $arg " )
201+ G_CONFIG_INJECT ' setenv[[:blank:]]+bootargs[[:blank:]]' " setenv bootargs \" ${cmdline[*]} \" " /boot/boot.ini
183202 fi
184203
185204 # U-Boot environment file
You can’t perform that action at this time.
0 commit comments