configure: Look for .otf fonts
PATCH 1/6 configure: Look for .otf fonts
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
@@ -1875,7 +1875,7 @@ AC_ARG_WITH([unifont], if test "x$with_unifont" = x; then # search in well-known directories - for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do + for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz otf otf.gz; do for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc /usr/pkg/share/fonts/X11/misc /usr/local/share/fonts/gnu-unifont /usr/local/share/fonts/unifont; do if test -f "$dir/unifont.$ext"; then md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')"
Signature · 7 lines
2.39.2 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 2/6 erofs: Replace 64-bit modulo with bitwise operations
Otherwise depending on compiler we end up with umoddi3 reference and failed module dependency resolution
--- grub-core/fs/erofs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
grub-core/fs/erofs.c +2 -2
@@ -357,13 +357,13 @@ erofs_map_blocks_flatmode (grub_fshelp_node_t node, {if (grub_add (erofs_iloc (node),erofs_inode_size (node), &map->m_pa) ||grub_add (map->m_pa,erofs_inode_xattr_ibody_size (node), &map->m_pa) || -grub_add (map->m_pa, map->m_la % blocksz, &map->m_pa)) +grub_add (map->m_pa, map->m_la & (blocksz -1 ), &map->m_pa))return grub_error (GRUB_ERR_OUT_OF_RANGE ,"m_pa overflow when handling tailpacking" );if (grub_sub (file_size, map->m_la, &map->m_plen))return grub_error (GRUB_ERR_OUT_OF_RANGE ,"m_plen overflow when handling tailpacking" );/* No overflow as map->m_plen <= UINT64_MAX - blocksz + 1. */ -if (((map->m_pa % blocksz) + map->m_plen) > blocksz) +if (((map->m_pa & (blocksz -1 )) + map->m_plen) > blocksz)return grub_error (GRUB_ERR_BAD_FS ,"inline data cross block boundary @ inode %" PRIuGRUB_UINT64_T, node->ino);
Signature · 7 lines
2.39.2 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH 2/6] erofs: Replace 64-bit modulo with bitwise operations
Quoted 4 lines · Vladimir Serbinenko
Otherwise depending on compiler we end up with umoddi3 reference and failed module dependency resolution
Signed-off-by Vladimir Serbinenko <[email protected]>
Thanks,
Gao Xiang
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 3/6 xzembed: Silence warning when no BCJ is available
In reply to Vladimir SerbinenkoBCJ is not available for all platforms hence arguments may end up unused
--- grub-core/lib/xzembed/xz_dec_bcj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/lib/xzembed/xz_dec_bcj.c +1 -1
@@ -353,7 +353,7 @@ static noinline_for_stack size_t bcj_sparc(* avoid pointers to static data (at least on x86). */ static void bcj_apply (struct xz_dec_bcj *s, -uint8_t *buf,size_t *pos,size_t size) +uint8_t *buf __attribute__((unused)),size_t *pos,size_t size __attribute__((unused))) {size_t filtered;
Signature · 7 lines
2.39.2 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 4/6 configure: Add -mno-gpopt option
In reply to Vladimir SerbinenkoWithout it compiler generates GPREL16 references which do not work with our memory layout
--- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+)
configure.ac +12 -0
@@ -802,9 +802,21 @@ if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then if test "x$grub_cv_cc_mflush_func" = xyes; then TARGET_CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring" fi + + AC_CACHE_CHECK([whether -mno-gpopt works], [grub_cv_cc_mno_gpopt], [ + CFLAGS="$TARGET_CFLAGS -mno-gpopt -Werror" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_mno_gpopt=yes], + [grub_cv_cc_mno_gpopt=no]) + ]) + + if test "x$grub_cv_cc_mno_gpopt" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -mno-gpopt" + fi fi + # Force no alignment to save space on i386. if test "x$target_cpu" = xi386; then TARGET_CFLAGS="$TARGET_CFLAGS -falign-functions=1"
Signature · 7 lines
2.39.2 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 5/6 mkimage: Fix section_align for Loongson
In reply to Vladimir SerbinenkoCorrect value has been 4 fromthe beginning but it started mattering only recently whether because of compiler or because of code reshuffling
--- util/mkimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
util/mkimage.c +1 -1
@@ -335,7 +335,7 @@ static const struct grub_install_image_target_desc image_targets[] = .decompressor_compressed_size = GRUB_DECOMPRESSOR_MIPS_LOONGSON_COMPRESSED_SIZE, .decompressor_uncompressed_size = GRUB_DECOMPRESSOR_MIPS_LOONGSON_UNCOMPRESSED_SIZE, .decompressor_uncompressed_addr = GRUB_DECOMPRESSOR_MIPS_LOONGSON_UNCOMPRESSED_ADDR, - .section_align = 1, + .section_align = 4, .vaddr_offset = 0, .link_addr = GRUB_KERNEL_MIPS_LOONGSON_LINK_ADDR, .elf_target = EM_MIPS,
Signature · 7 lines
2.39.2 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 6/6 gentpl: Put startup_raw.S into beginning of the image
In reply to Vladimir SerbinenkoOtherwise it breaks the decompressors for mips platforms
--- gentpl.py | 4 ++-- grub-core/Makefile.core.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
gentpl.py +2 -2
@@ -634,7 +634,7 @@ def extra_dist(defn): def extra_dep(defn): return foreach_value(defn, "depends", lambda value: value + " ") -def platform_sources(defn, p): return platform_values(defn, p, "") +def platform_sources(defn, p): return platform_values(defn, p, "_head") + platform_values(defn, p, "") def platform_nodist_sources(defn, p): return platform_values(defn, p, "_nodist") def platform_startup(defn, p): return platform_specific_values(defn, p, "_startup", "startup")
@@ -660,7 +660,7 @@ def first_time(defn, snippet): def is_platform_independent(defn): if 'enable' in defn: return False - for suffix in [ "", "_nodist" ]: + for suffix in [ "", "_head", "_nodist" ]: template = platform_values(defn, GRUB_PLATFORMS[0], suffix) for platform in GRUB_PLATFORMS[1:]: if template != platform_values(defn, platform, suffix):
grub-core/Makefile.core.def +2 -2
@@ -536,7 +536,7 @@ image = { image = { name = xz_decompress; - mips = boot/mips/startup_raw.S; + mips_head = boot/mips/startup_raw.S; common = boot/decompressor/minilib.c; common = boot/decompressor/xz.c; common = lib/xzembed/xz_dec_bcj.c;
@@ -554,7 +554,7 @@ image = { image = { name = none_decompress; - mips = boot/mips/startup_raw.S; + mips_head = boot/mips/startup_raw.S; common = boot/decompressor/none.c; cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1';
Signature · 7 lines
2.39.2 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel