mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
calculate LAR size dynamically from .config settings
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@205 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
cb997b0095
commit
d8e330ef72
1 changed files with 4 additions and 2 deletions
|
@ -47,6 +47,8 @@ $(obj)/linuxbios.rom: $(patsubst %,$(obj)/%,$(LINUXBIOS_COMPONENTS))
|
|||
# of stages, payloads and option ROMs.
|
||||
#
|
||||
|
||||
LAR_SIZE := $(shell expr \( $(CONFIG_LINUXBIOS_ROMSIZE_KB) - 16 \) \* 1024 )
|
||||
|
||||
$(obj)/linuxbios.lar: $(obj)/util/lar/lar lzma $(obj)/linuxbios.initram $(obj)/linuxbios.stage2 payload
|
||||
$(Q)printf "Building LinuxBIOS archive... \n"
|
||||
$(Q)rm -rf $(obj)/lar.tmp
|
||||
|
@ -57,9 +59,9 @@ $(obj)/linuxbios.lar: $(obj)/util/lar/lar lzma $(obj)/linuxbios.initram $(obj)/l
|
|||
$(Q)cp $(CONFIG_PAYLOAD) $(obj)/lar.tmp/normal/payload
|
||||
$(Q)printf " "
|
||||
$(Q)cd $(obj)/lar.tmp && ../util/lar/lar c ../linuxbios.lar.pre normal/initram normal/stage2 normal/payload
|
||||
$(Q)# TODO: Dynamically pad the LAR archive. bs is image size - bootblock size (16k)
|
||||
$(Q)# Padding the LAR archive to image size - 16k (bootblock size)
|
||||
$(Q)dd if=$(obj)/linuxbios.lar.pre of=$(obj)/linuxbios.lar \
|
||||
bs=245760 count=1 conv=sync $(SILENT)
|
||||
bs=$(LAR_SIZE) count=1 conv=sync $(SILENT)
|
||||
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue