hanni76 Posted July 29, 2017 Posted July 29, 2017 Hello guys is there a way to customize boot.cmd without changing any git-controlled files ? For example, I would like to setenv console to null. I found the file lib/config/bootenv/sunxi-default.txt but I have no idea how to override it in my userpaches folder. Thanks
zador.blood.stained Posted July 29, 2017 Posted July 29, 2017 20 minutes ago, ssuloev said: I found the file lib/config/bootenv/sunxi-default.txt but I have no idea how to override it in my userpaches folder. In customize-image.sh you can use echo or sed -i to add/change the environment file (/boot/armbianEnv.txt) or the boot script itself (/boot/boot.cmd). I would not recommend to try to change the whole boot script, but it's possible - if you put your version in userpatches/overlay/ it will be accessible from /tmp/overlay from customize-image.sh
hanni76 Posted July 29, 2017 Author Posted July 29, 2017 Thanks for the answer.. But it seems like I can't go that way. I need to disable console and I thought I would be able to do that by setting console=null but after analyzing boot.cmd I see that it is not possible. So now the question is: how can I disable console so that boot messages are not displayed and login prompt is not visible ? I should be able to only login by ssh. I need to run a linuxfb application and so I don't need the console.
martinayotte Posted July 29, 2017 Posted July 29, 2017 Although I've never tried it myself, for U-Boot, there is the CONFIG_SILENT_CONSOLE compile config.
hanni76 Posted July 29, 2017 Author Posted July 29, 2017 1 hour ago, zador.blood.stained said: In customize-image.sh you can use echo or sed -i to add/change the environment file (/boot/armbianEnv.txt) or the boot script itself (/boot/boot.cmd). I would not recommend to try to change the whole boot script, but it's possible - if you put your version in userpatches/overlay/ it will be accessible from /tmp/overlay from customize-image.sh If I replace boot.cmd in customize-image.sh will *.scr file be built too ?
zador.blood.stained Posted July 29, 2017 Posted July 29, 2017 1 minute ago, ssuloev said: If I replace boot.cmd in customize-image.sh will *.scr file be built too ? Yes, it's compiled later during the image creation.
Igor Posted July 29, 2017 Posted July 29, 2017 You only need to enable this patch: https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/remove-boot-messages-from-hdmi.patch.disabled recompile u-boot and there will be nothing on the screen, but serial it's enabled. You can disable that to - it's self explanatory.
hanni76 Posted September 11, 2017 Author Posted September 11, 2017 I have finally ended up with the following patch: diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 9b514ff..a09a3da 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -518,6 +518,7 @@ extern int soft_i2c_gpio_scl; #endif #define CONFIG_EXTRA_ENV_SETTINGS \ + "silent=1\0" \ CONSOLE_ENV_SETTINGS \ MEM_LAYOUT_ENV_SETTINGS \ DFU_ALT_INFO_RAM \ @@ -532,4 +533,8 @@ extern int soft_i2c_gpio_scl; #define CONFIG_EXTRA_ENV_SETTINGS #endif +#define CONFIG_SILENT_CONSOLE +#define CONFIG_SYS_DEVICE_NULLDEV +#define CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC + #endif /* _SUNXI_COMMON_CONFIG_H */
Recommended Posts