Changeset a73a1453 in mainline for boot


Ignore:
Timestamp:
2019-08-17T12:49:43Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
512579c
Parents:
5b586b9
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-28 17:53:10)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-17 12:49:43)
Message:

arm64 wip

Location:
boot
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm64/Makefile.inc

    r5b586b9 ra73a1453  
    2727#
    2828
    29 BOOT_OUTPUT = image.boot
    30 POST_OUTPUT = $(ROOT_PATH)/image.iso
    31 POSTBUILD = Makefile.grub
    32 GRUB_LOADER = chainloader
    33 
    34 BFD_NAME = elf64-littleaarch64
    35 # Request binary BFD output. The ARM64 port manually prepares the .text
    36 # section to look as a PE file than can be loaded on EFI systems.
    37 BFD_OUTPUT = binary
    38 
    39 BITS = 64
    40 ENDIANESS = LE
    41 
    42 # UEFI binaries should be relocatable, the EFI boot service LoadImage() will
    43 # rebase the boot file using the .reloc information in the image if it cannot
    44 # load the binary at its preferred address. The ARM64 port does not provide this
    45 # information in its PE file (that would require manually creating it) but
    46 # instead the boot code is compiled with the -fpic option and the bootloader
    47 # relocates itself at runtime.
    48 #
    49 # N.B. The UEFI guarantees for AArch64 that during boot time the primary
    50 # processor is in the execution mode that has unaligned access enabled. The
    51 # -mstrict-align option is therefore not needed.
    52 EXTRA_CFLAGS = -fpic -fvisibility=hidden
    53 EXTRA_LDFLAGS = -Wl,-shared
    54 
    55 SOURCES = \
    56         arch/$(BARCH)/src/asm.S \
    57         arch/$(BARCH)/src/main.c \
    58         arch/$(BARCH)/src/relocate.c \
    59         $(COMPS).o \
    60         genarch/src/efi.c \
    61         generic/src/gzip.c \
    62         generic/src/inflate.c \
    63         generic/src/kernel.c \
    64         generic/src/memstr.c \
    65         generic/src/payload.c \
    66         generic/src/printf.c \
    67         generic/src/printf_core.c \
    68         generic/src/str.c \
    69         generic/src/tar.c \
    70         generic/src/version.c \
    71         generic/src/vprintf.c
     29BUILD = Makefile.empty
     30POSTBUILD = Makefile.empty
  • boot/grub/meson.build

    r5b586b9 ra73a1453  
    55dist_dirname = 'grub_dist'
    66
    7 build_dist_text = []
    8 build_dist_deps = []
    9 foreach init : rd_init_binaries
    10         target = 'boot/' + run_command(basename, init[1], check: true).stdout().strip()
     7if GRUB_LOADER == 'multiboot'
     8        build_dist_text = []
     9        build_dist_deps = []
     10        foreach init : rd_init_binaries
     11                target = 'boot/' + run_command(basename, init[1], check: true).stdout().strip()
    1112
    12         build_dist_text += install_snippet.format(init[0].full_path(), target)
    13         build_dist_deps += init[0]
    14 endforeach
     13                build_dist_text += install_snippet.format(init[0].full_path(), target)
     14                build_dist_deps += init[0]
     15        endforeach
     16
     17        LOADS = [ 'echo \'Loading kernel\'' ]
     18        LOADS += [ MULTIBOOT_CMD + ' /boot/kernel.elf' ]
     19
     20        MODULES = rd_init + [ 'boot/initrd.img' ]
     21
     22        foreach module : MODULES
     23                module = '/boot/' + run_command(basename, module, check: true).stdout().strip()
     24                LOADS += 'echo \'Loading @0@\''.format(module)
     25                LOADS += '@0@ @1@ @1@'.format(MODULE_CMD, module)
     26        endforeach
     27endif
     28
     29if GRUB_LOADER == 'chainloader'
     30        # init binaries are already part of the chainloaded boot image.
     31        build_dist_text = [ install_snippet.format(boot_image.full_path(), 'boot/' + boot_image_name) ]
     32        build_dist_deps = [ boot_image ]
     33
     34        LOADS = [
     35                'echo \'Loading ' + boot_image_name + '\'',
     36                'chainloader /boot/' + boot_image_name,
     37                'boot',
     38        ]
     39endif
    1540
    1641build_dist_sh = configure_file(
     
    2045)
    2146
    22 
    23 MODULES = rd_init + [ 'boot/initrd.img' ]
    2447
    2548if GRUB_ARCH == 'pc'
     
    3154        MODULE_CMD = 'module2'
    3255        INSMODS = [ 'insmod efi_gop', 'insmod efi_uga' ]
    33 endif
    34 
    35 if GRUB_LOADER == 'multiboot'
    36         LOADS = [ 'echo \'Loading kernel\'' ]
    37         LOADS += [ MULTIBOOT_CMD + ' /boot/kernel.elf' ]
    38 
    39         foreach module : MODULES
    40                 module = '/boot/' + run_command(basename, module, check: true).stdout().strip()
    41                 LOADS += 'echo \'Loading @0@\''.format(module)
    42                 LOADS += '@0@ @1@ @1@'.format(MODULE_CMD, module)
    43         endforeach
    44 endif
    45 
    46 if GRUB_LOADER == 'chainloader'
    47         LOADS = [
    48                 'echo \'Loading ' + BOOT_OUTPUT + '\'',
    49                 'chainloader /boot/' + BOOT_OUTPUT,
    50                 'boot',
    51         ]
    5256endif
    5357
Note: See TracChangeset for help on using the changeset viewer.