[Buildroot] [PATCH v4 2/5] package/petitboot: prefer UTF-8 support
Reza Arbab
arbab at linux.ibm.com
Wed Nov 15 21:59:28 UTC 2023
The petitboot UI looks much nicer in a Unicode locale:
* Items in the language selection submenu use multibyte Unicode
characters. In other locales, they say "Unable to display text in this
locale".
* The combination of TERM=linux with a UTF-8 locale is required to
trigger a special-case workaround in ncurses code[1]. Without
this, line-drawing characters in the menu look like q's.
Add a reminder that a UTF-8 locale should be generated for things to
look right.
[1] https://invisible-island.net/ncurses/ncurses.faq.html#no_line_drawing
Signed-off-by: Reza Arbab <arbab at linux.ibm.com>
---
package/petitboot/Config.in | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/package/petitboot/Config.in b/package/petitboot/Config.in
index 93ed3642c3c9..46327903ed2e 100644
--- a/package/petitboot/Config.in
+++ b/package/petitboot/Config.in
@@ -3,12 +3,14 @@ config BR2_PACKAGE_PETITBOOT
depends on BR2_PACKAGE_KEXEC_ARCH_SUPPORTS || BR2_PACKAGE_KEXEC_LITE_ARCH_SUPPORTS
depends on BR2_USE_MMU # lvm2
depends on BR2_USE_WCHAR # elfutils
+ depends on BR2_ENABLE_LOCALE
depends on !BR2_STATIC_LIBS # elfutils, lvm2
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, lvm2
depends on BR2_PACKAGE_HAS_UDEV
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_LVM2 # devmapper
select BR2_PACKAGE_NCURSES
+ select BR2_PACKAGE_NCURSES_WCHAR
# run-time dependencies
select BR2_PACKAGE_KEXEC if !BR2_PACKAGE_KEXEC_LITE_ARCH_SUPPORTS
select BR2_PACKAGE_KEXEC_LITE if BR2_PACKAGE_KEXEC_LITE_ARCH_SUPPORTS && !BR2_PACKAGE_KEXEC
@@ -17,12 +19,14 @@ config BR2_PACKAGE_PETITBOOT
help
Petitboot is a small kexec-based bootloader
+ NOTE: petitboot looks best in a UTF-8 locale (BR2_GENERATE_LOCALE)
+
http://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html
-comment "petitboot needs a toolchain w/ wchar, dynamic library, threads, udev /dev management"
+comment "petitboot needs a toolchain w/ wchar, locale, dynamic library, threads, udev /dev management"
depends on BR2_PACKAGE_KEXEC_ARCH_SUPPORTS
depends on BR2_USE_MMU
- depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || \
+ depends on !BR2_USE_WCHAR || !BR2_ENABLE_LOCALE || BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_PACKAGE_HAS_UDEV
--
2.39.3
More information about the buildroot
mailing list