4 Commits (65f821adf8f2be6a48830ad4fb63f78e2160c84a)

Author SHA1 Message Date
Adam Joseph 9dd5bdf298 eliminate "magic numbers", support 8mbyte single-image flash chips
Prior to this commit, ownerboot had quite a lot of "magic addresses"
and flash chip layouts.  This commit eliminates all of them.

All flash chip geometry is now computed from first principles and
two parameters:

  1. The flash chip size
  2. The number of images per chip (two means NORMAL/FALLBACK)

If (flash-chip-size / num-images) is too small, coreboot's build
process will notice this and fail.

It should be possible to build a single-image (i.e. no FALLBACK)
ownerboot for use on 8mbyte flash chips, which lets people try this
out without having to buy a new flash chip or (in the case of the
rk3399-gru-kevin laptop) doing any soldering.
1 year ago
Adam Joseph 0e0ab73687 src/image: fix ability to boot from NORMAL region
commit fa3da49c84 "coreboot: update
patch to add master header in both images" still isn't causing
coreboot to put a master header into the NORMAL region.  As a
result, images built after that commit but before this one will
always use the FALLBACK region.

This commit adds the master header explicitly, since I still can't
seem to get coreboot to do that on its own.
2 years ago
Adam Joseph 01549c9400 src/image: rename parameter initramfs_image -> initramfs
This allows to have the argument automatically populated by
`callPackage`.
2 years ago
Adam Joseph 2c30620ed2 coreboot: separate compilation from payload installation
This commit causes the coreboot payload (i.e. the Linux kernel,
initramfs, and any necessary DTBs) to be inserted into the coreboot
image as part of a separate derivation from the one which compiles
coreboot.

As a result, changing the contents of the initramfs is extremely
fast -- it can now be done without any recompilation.

As a result of this, the attribute name for the final image to be
flashed has changed from `coreboot` to `image`.  The `coreboot`
attribute now builds a payloadless `coreboot.rom`.
2 years ago