arch/powerpc/boot/wrapper

Source file repositories/reference/linux-study-clean/arch/powerpc/boot/wrapper

File Facts

System
Linux kernel
Corpus path
arch/powerpc/boot/wrapper
Extension
[no extension]
Size
14078 bytes
Lines
579
Domain
Architecture Layer
Bucket
arch/powerpc
Inferred role
Architecture Layer: arch/powerpc
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only

# Copyright (C) 2006 Paul Mackerras, IBM Corporation <paulus@samba.org>

# This script takes a kernel binary and optionally an initrd image
# and/or a device-tree blob, and creates a bootable zImage for a
# given platform.

# Options:
# -o zImage	specify output file
# -p platform	specify platform (links in $platform.o)
# -i initrd	specify initrd file
# -d devtree	specify device-tree blob
# -s tree.dts	specify device-tree source file (needs dtc installed)
# -e esm_blob   specify ESM blob for secure images
# -c		cache $kernel.strip.gz (use if present & newer, else make)
# -C prefix	specify command prefix for cross-building tools
#		(strip, objcopy, ld)
# -D dir	specify directory containing data files used by script
#		(default ./arch/powerpc/boot)
# -W dir	specify working directory for temporary files (default .)
# -z		use gzip (legacy)
# -Z zsuffix    compression to use (gz, xz, lzma, lzo or none)

# Stop execution if any command fails
set -e

export LC_ALL=C

# Allow for verbose output
if [ "$V" = 1 ]; then
    set -x
    map="-Map wrapper.map"
fi

# defaults
kernel=
ofile=zImage
platform=of
initrd=
dtb=
dts=
esm_blob=
cacheit=
binary=
compression=.gz
uboot_comp=gzip
pie=
format=
notext=
rodynamic=

# cross-compilation prefix
CROSS=

# mkimage wrapper script
MKIMAGE=$srctree/scripts/mkuboot.sh

# directory for object and other files used by this script
object=arch/powerpc/boot
objbin=$object
dtc=scripts/dtc/dtc

# directory for working files
tmpdir=.

usage() {
    echo 'Usage: wrapper [-o output] [-p platform] [-i initrd]' >&2
    echo '       [-d devtree] [-s tree.dts] [-e esm_blob]' >&2

Annotation

Implementation Notes