Bug#824954: flash-kernel: please provide a way to integrate with GRUB

2019-09-26 Thread Heinrich Schuchardt

Since a while we have exit /etc/flash-kernel/ubootenv.d for
flash-kernel. A script can be added here to launch GRUB.

Another possibility is to create /boot/boot.scr.uimg using mkimage from
a text file with a content like the following lines:

load mmc 0:2 $fdt_addr_r dtb
load mmc 0:1 $kernel_addr_r efi/debian/grubaa64.efi
bootefi $kernel_addr_r $fdt_addr_r

So I suggest to close this issue.

Best regards

Heinrich Schuchardt



Bug#824954: flash-kernel: please provide a way to integrate with GRUB

2018-01-19 Thread Heinrich Schuchardt

Let's assume U-Boot uses distroboot as described in doc/README.distro.

Environment variable boot_scripts decides which boot scripts are loaded.

The default value is

boot_scripts=boot.scr.uimg boot.scr

So if you create a boot script named boot.scr.uimg, it will override the 
boot.scr created by flash-kernel.


flash-kernel creates a link /boot/dtb to the actual dtb.

So we do not need any variable part for calling grub.

Create a text file boot.txt like

# Booting Odroid C2 with grub
load mmc 0:2 0x100 dtb
load mmc 0:1 0x1300 efi/debian/grubaa64.efi
bootefi 0x1300 0x100

or

# Booting Odroid XU3/4 with grub
load mmc 0:2 0x4300 dtb
load mmc 0:1 0x4200 efi/debian/grubarm.efi
bootefi 0x4200 0x4300

Here I assumed that /boot/efi is partition 1 and /boot is partition 2.

Please, carefully verify the script for XU3/4. I have only tested on 
Odroid C2.


Execute
mkimage -T script -d boot.txt uboot.scr.uimg

Copy file uboot.scr.uimg to the boot partition.

Now U-Boot will boot using uboot.scr.uimg and ignore the boot.scr that 
flash-kernel keeps updating.


Best regards

Heinrich Schuchardt



Bug#824954: flash-kernel: please provide a way to integrate with GRUB

2016-05-21 Thread Steinar H. Gunderson
Package: flash-kernel
Version: 3.66
Severity: wishlist

Hi,

I have an ODROID XU4 (a SBC based on Exynos5422). Since I'm one of those
PC people that would like everything to work like my PC does, I use GRUB
on it (plus, it gives me a nice boot menu when I can choose older kernels
or rescue mode, which is great when you're trying new and different things).

However, there's one thing GRUB doesn't know how to, and that is how to
find the right device tree file and put it in /boot. flash-kernel knows
(by virtue of having its database), but if I install flash-kernel, the first
thing it does is to make a boot.scr, which has higher priority than my GRUB
install (which is in /boot/EFI, lowest in the list of places U-Boot is looking
during boot), essentially overwriting it.

It would be really nice with some way of integrating this. As some sort
of minimal interaction, having some way of installing flash-kernel without
actually flashing (just having the kernel hooks copy the DTB into /boot)
would probably be the easiest; perhaps split into a separate package?

The more advanced integration would probably be if flash-kernel somehow
could flash GRUB (ie., running grub-install and then having its own
boot.scr boot GRUB instead of the kernels), but this sounds like it would
involve policy issues.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: armhf (armv7l)

Kernel: Linux 4.6.0 (SMP w/8 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)