Bug#922101: grub-efi-arm: does not retrieve device-tree from uefi systab and manual devicetree does not work properly to boot armhf kernel

Da Xue da+debianbug at lessconfused.com
Tue Feb 12 01:59:23 GMT 2019


Package: grub-efi-arm
Version: 2.02~beta3-5+deb9u1
Severity: important

Dear Maintainer,


   * What led up to the situation?
   Install grub (bootarm.efi) and update-grub on armhf system.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   We pass the device tree from u-boot to GRUB2 via UEFI systab. It is
   not automatically used by the current version of grub so we have to
   manually execute "devicetree" and point it to a device tree binary 
   file. However even with this manual intervention, the kernel still 
   hangs. The problem does not occur on arm64 systems or the GRUB2 
   version in Ubuntu 18.04.

   * What was the outcome of this action?
   System hangs trying to boot the kernel.

   * What outcome did you expect instead?
   System boots normally like its arm64 equivalent.

-- Package-specific info:


*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod btrfs
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  18cc3e39-63bd-472e-a499-9502faf91f5c
else
  search --no-floppy --fs-uuid --set=root 18cc3e39-63bd-472e-a499-9502faf91f5c
fi
    font="/@/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_arm-efi-dt-fix ###
insmod fat
search --no-floppy --fs-uuid --set=efi_root D3C2-D27A
devicetree ($efi_root)/dtb/libre-computer/all-h3-cc-h3/board.dtb
### END /etc/grub.d/01_arm-efi-dt-fix ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-18cc3e39-63bd-472e-a499-9502faf91f5c' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_msdos
	insmod btrfs
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  18cc3e39-63bd-472e-a499-9502faf91f5c
	else
	  search --no-floppy --fs-uuid --set=root 18cc3e39-63bd-472e-a499-9502faf91f5c
	fi
	echo	'Loading Linux 4.19.20-02331-g673856cba2f5-dirty ...'
	linux	/@/boot/vmlinuz-4.19.20-02331-g673856cba2f5-dirty root=UUID=18cc3e39-63bd-472e-a499-9502faf91f5c ro rootflags=subvol=@  noquiet
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/initrd.img-4.19.20-02331-g673856cba2f5-dirty
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-18cc3e39-63bd-472e-a499-9502faf91f5c' {
	menuentry 'Debian GNU/Linux, with Linux 4.19.20-02331-g673856cba2f5-dirty' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.20-02331-g673856cba2f5-dirty-advanced-18cc3e39-63bd-472e-a499-9502faf91f5c' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod btrfs
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  18cc3e39-63bd-472e-a499-9502faf91f5c
		else
		  search --no-floppy --fs-uuid --set=root 18cc3e39-63bd-472e-a499-9502faf91f5c
		fi
		echo	'Loading Linux 4.19.20-02331-g673856cba2f5-dirty ...'
		linux	/@/boot/vmlinuz-4.19.20-02331-g673856cba2f5-dirty root=UUID=18cc3e39-63bd-472e-a499-9502faf91f5c ro rootflags=subvol=@  noquiet
		echo	'Loading initial ramdisk ...'
		initrd	/@/boot/initrd.img-4.19.20-02331-g673856cba2f5-dirty
	}
	menuentry 'Debian GNU/Linux, with Linux 4.19.20-02331-g673856cba2f5-dirty (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.20-02331-g673856cba2f5-dirty-recovery-18cc3e39-63bd-472e-a499-9502faf91f5c' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod btrfs
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  18cc3e39-63bd-472e-a499-9502faf91f5c
		else
		  search --no-floppy --fs-uuid --set=root 18cc3e39-63bd-472e-a499-9502faf91f5c
		fi
		echo	'Loading Linux 4.19.20-02331-g673856cba2f5-dirty ...'
		linux	/@/boot/vmlinuz-4.19.20-02331-g673856cba2f5-dirty root=UUID=18cc3e39-63bd-472e-a499-9502faf91f5c ro single rootflags=subvol=@ 
		echo	'Loading initial ramdisk ...'
		initrd	/@/boot/initrd.img-4.19.20-02331-g673856cba2f5-dirty
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg

*********************** END /proc/mdstat
-- System Information:
Debian Release: 9.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 4.19.18-041918-generic (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C), LANGUAGE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages grub-efi-arm depends on:
ii  debconf [debconf-2.0]  1.5.61
ii  dpkg                   1.18.25
ii  grub-common            2.02~beta3-5+deb9u1
ii  grub-efi-arm-bin       2.02~beta3-5+deb9u1
ii  grub2-common           2.02~beta3-5+deb9u1
ii  ucf                    3.0036

grub-efi-arm recommends no packages.

grub-efi-arm suggests no packages.

-- debconf information:
  grub2/device_map_regenerated:
  grub2/kfreebsd_cmdline_default: quiet
  grub2/linux_cmdline_default: quiet
  grub2/linux_cmdline:
  grub2/update_nvram: true
  grub2/kfreebsd_cmdline:
  grub2/force_efi_extra_removable: false



More information about the Pkg-grub-devel mailing list