mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
efI: Allow packaging a kernel in the debugging script
Add an option to package a kernel into the debugging script used for EFI. The name of the kernel must be added to the script. By default it is assumed that the kernel is built in the /tmp/kernel directory. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
1d32eee4fa
commit
ed10008bab
1 changed files with 13 additions and 1 deletions
|
@ -18,12 +18,15 @@
|
||||||
# OVMF-pure-efi.x64.fd at
|
# OVMF-pure-efi.x64.fd at
|
||||||
# https://drive.google.com/file/d/1c39YI9QtpByGQ4V0UNNQtGqttEzS-eFV/view?usp=sharing
|
# https://drive.google.com/file/d/1c39YI9QtpByGQ4V0UNNQtGqttEzS-eFV/view?usp=sharing
|
||||||
|
|
||||||
|
bzimage_fname=/tmp/kernel/arch/x86/boot/bzImage
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [-a | -p] [other opts]" 1>&2
|
echo "Usage: $0 [-a | -p] [other opts]" 1>&2
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
echo " -a - Package up the app" 1>&2
|
echo " -a - Package up the app" 1>&2
|
||||||
|
echo " -k - Add a kernel" 1>&2
|
||||||
echo " -o - Use old EFI app build (before 32/64 split)" 1>&2
|
echo " -o - Use old EFI app build (before 32/64 split)" 1>&2
|
||||||
echo " -p - Package up the payload" 1>&2
|
echo " -p - Package up the payload" 1>&2
|
||||||
echo " -P - Create a partition table" 1>&2
|
echo " -P - Create a partition table" 1>&2
|
||||||
|
@ -52,11 +55,14 @@ serial=
|
||||||
# before the 32/64 split of the app
|
# before the 32/64 split of the app
|
||||||
old=
|
old=
|
||||||
|
|
||||||
|
# package up a kernel as well
|
||||||
|
kernel=
|
||||||
|
|
||||||
# Set ubdir to the build directory where you build U-Boot out-of-tree
|
# Set ubdir to the build directory where you build U-Boot out-of-tree
|
||||||
# We avoid in-tree build because it gets confusing trying different builds
|
# We avoid in-tree build because it gets confusing trying different builds
|
||||||
ubdir=/tmp/b/
|
ubdir=/tmp/b/
|
||||||
|
|
||||||
while getopts "aopPrsw" opt; do
|
while getopts "akopPrsw" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
a)
|
a)
|
||||||
type=app
|
type=app
|
||||||
|
@ -64,6 +70,9 @@ while getopts "aopPrsw" opt; do
|
||||||
p)
|
p)
|
||||||
type=payload
|
type=payload
|
||||||
;;
|
;;
|
||||||
|
k)
|
||||||
|
kernel=1
|
||||||
|
;;
|
||||||
r)
|
r)
|
||||||
run=1
|
run=1
|
||||||
;;
|
;;
|
||||||
|
@ -124,6 +133,9 @@ EOF
|
||||||
# Copy files into the filesystem
|
# Copy files into the filesystem
|
||||||
copy_files() {
|
copy_files() {
|
||||||
sudo cp $TMP/* $MNT
|
sudo cp $TMP/* $MNT
|
||||||
|
if [[ -n "${kernel}" ]]; then
|
||||||
|
sudo cp ${bzimage_fname} $MNT/vmlinuz
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a filesystem on a raw device and copy in the files
|
# Create a filesystem on a raw device and copy in the files
|
||||||
|
|
Loading…
Reference in a new issue