From 0e488db34a64c49be27627df51e050b6e06bacf4 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: May 06 2021 13:24:28 +0000 Subject: Don't add a console param for target none Currently, if the --addconsole option and used along with --target=none, the default "ttyS0,115200" console kernel command line paramter is added. = No console listed for none, adding default ttyS0,115200 But if the user choses "none" as the target, the image shouldn't make any assumptions about the platform. Using "ttyS0,115200" as a heuristic if the console is not set for a particular platform makes sense. But no for none, in that case it should be provided either by the platform or by the user. This may even be counterproductive. For example boards that already define a "stdout-path" property in their "chosen" node, don't even need a console parameter and adding one will have higher precedence and won't be used the one that was defined in the Device Tree. Signed-off-by: Javier Martinez Canillas --- diff --git a/arm-image-installer b/arm-image-installer index 408a8e8..5e54ac2 100755 --- a/arm-image-installer +++ b/arm-image-installer @@ -281,7 +281,12 @@ if [ "$RESIZEFS" != "" ]; then fi # Console to be added if [ "$CONSOLE" != "" ]; then - echo "= Console for $TARGET will be added." + # don't add a console param for target none + if echo "$TARGET" | grep -q 'none'; then + CONSOLE=0 + else + echo "= Console for $TARGET will be added." + fi fi # User ssh key if [ "$SSH_KEY" != "" ]; then