mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 22:16:58 +02:00
Remove arm64 from supported board operations
This commit is contained in:
parent
8e8d07f9a0
commit
2467923d56
@ -103,8 +103,6 @@ generate_update() {
|
|||||||
run_ldconfig() {
|
run_ldconfig() {
|
||||||
local root_fs_dir=$1
|
local root_fs_dir=$1
|
||||||
case ${ARCH} in
|
case ${ARCH} in
|
||||||
arm64)
|
|
||||||
sudo qemu-aarch64 "${root_fs_dir}"/usr/sbin/ldconfig -r "${root_fs_dir}";;
|
|
||||||
x86|amd64)
|
x86|amd64)
|
||||||
sudo ldconfig -r "${root_fs_dir}";;
|
sudo ldconfig -r "${root_fs_dir}";;
|
||||||
*)
|
*)
|
||||||
@ -115,8 +113,6 @@ run_ldconfig() {
|
|||||||
run_localedef() {
|
run_localedef() {
|
||||||
local root_fs_dir="$1" loader=()
|
local root_fs_dir="$1" loader=()
|
||||||
case ${ARCH} in
|
case ${ARCH} in
|
||||||
arm64)
|
|
||||||
loader=( qemu-aarch64 -L "${root_fs_dir}" );;
|
|
||||||
amd64)
|
amd64)
|
||||||
loader=( "${root_fs_dir}/usr/lib64/ld-linux-x86-64.so.2" \
|
loader=( "${root_fs_dir}/usr/lib64/ld-linux-x86-64.so.2" \
|
||||||
--library-path "${root_fs_dir}/usr/lib64" );;
|
--library-path "${root_fs_dir}/usr/lib64" );;
|
||||||
@ -460,7 +456,6 @@ finish_image() {
|
|||||||
# Only enable rootfs verification on supported boards.
|
# Only enable rootfs verification on supported boards.
|
||||||
case "${FLAGS_board}" in
|
case "${FLAGS_board}" in
|
||||||
amd64-usr) verity_offset=64 ;;
|
amd64-usr) verity_offset=64 ;;
|
||||||
arm64-usr) verity_offset=512 ;;
|
|
||||||
*) disable_read_write=${FLAGS_FALSE} ;;
|
*) disable_read_write=${FLAGS_FALSE} ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -532,7 +527,6 @@ EOF
|
|||||||
# Magic alert! Root hash injection works by writing the hash value to a
|
# Magic alert! Root hash injection works by writing the hash value to a
|
||||||
# known unused SHA256-sized location in the kernel image.
|
# known unused SHA256-sized location in the kernel image.
|
||||||
# For amd64 the rdev error message is used.
|
# For amd64 the rdev error message is used.
|
||||||
# For arm64 an area between the EFI headers and the kernel text is used.
|
|
||||||
# Our modified GRUB extracts the hash and adds it to the cmdline.
|
# Our modified GRUB extracts the hash and adds it to the cmdline.
|
||||||
printf %s "$(cat ${BUILD_DIR}/${image_name%.bin}_verity.txt)" | \
|
printf %s "$(cat ${BUILD_DIR}/${image_name%.bin}_verity.txt)" | \
|
||||||
sudo dd of="${root_fs_dir}/boot/coreos/vmlinuz-a" conv=notrunc \
|
sudo dd of="${root_fs_dir}/boot/coreos/vmlinuz-a" conv=notrunc \
|
||||||
@ -570,9 +564,6 @@ EOF
|
|||||||
if [[ "${install_grub}" -eq 1 ]]; then
|
if [[ "${install_grub}" -eq 1 ]]; then
|
||||||
local target
|
local target
|
||||||
local target_list="i386-pc x86_64-efi x86_64-xen"
|
local target_list="i386-pc x86_64-efi x86_64-xen"
|
||||||
if [[ ${BOARD} == "arm64-usr" ]]; then
|
|
||||||
target_list="arm64-efi"
|
|
||||||
fi
|
|
||||||
local grub_args=()
|
local grub_args=()
|
||||||
if [[ ${disable_read_write} -eq ${FLAGS_TRUE} ]]; then
|
if [[ ${disable_read_write} -eq ${FLAGS_TRUE} ]]; then
|
||||||
grub_args+=(--verity)
|
grub_args+=(--verity)
|
||||||
|
@ -29,32 +29,10 @@ IGNORE_MISSING = {
|
|||||||
SonameAtom("x86_64", "libc.so.6")],
|
SonameAtom("x86_64", "libc.so.6")],
|
||||||
|
|
||||||
# RPATHs and symlinks apparently confuse the perl-5.24 package
|
# RPATHs and symlinks apparently confuse the perl-5.24 package
|
||||||
"dev-lang/perl": [SonameAtom("arm_64", "libperl.so.5.24.1"),
|
"dev-lang/perl": [SonameAtom("x86_64", "libperl.so.5.24.1")],
|
||||||
SonameAtom("x86_64", "libperl.so.5.24.1")],
|
|
||||||
|
|
||||||
# https://bugs.gentoo.org/show_bug.cgi?id=554582
|
# https://bugs.gentoo.org/show_bug.cgi?id=554582
|
||||||
"net-firewall/ebtables": [SonameAtom("arm_64", "libebt_802_3.so"),
|
"net-firewall/ebtables": [SonameAtom("x86_64", "libebt_802_3.so"),
|
||||||
SonameAtom("arm_64", "libebt_among.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_arp.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_arpreply.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_ip.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_ip6.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_limit.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_log.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_mark.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_mark_m.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_nat.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_nflog.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_pkttype.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_redirect.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_standard.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_stp.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_ulog.so"),
|
|
||||||
SonameAtom("arm_64", "libebt_vlan.so"),
|
|
||||||
SonameAtom("arm_64", "libebtable_broute.so"),
|
|
||||||
SonameAtom("arm_64", "libebtable_filter.so"),
|
|
||||||
SonameAtom("arm_64", "libebtable_nat.so"),
|
|
||||||
SonameAtom("x86_64", "libebt_802_3.so"),
|
|
||||||
SonameAtom("x86_64", "libebt_among.so"),
|
SonameAtom("x86_64", "libebt_among.so"),
|
||||||
SonameAtom("x86_64", "libebt_arp.so"),
|
SonameAtom("x86_64", "libebt_arp.so"),
|
||||||
SonameAtom("x86_64", "libebt_arpreply.so"),
|
SonameAtom("x86_64", "libebt_arpreply.so"),
|
||||||
@ -77,14 +55,7 @@ IGNORE_MISSING = {
|
|||||||
SonameAtom("x86_64", "libebtable_nat.so")],
|
SonameAtom("x86_64", "libebtable_nat.so")],
|
||||||
|
|
||||||
# Ignore the Rust libraries in their own libdir.
|
# Ignore the Rust libraries in their own libdir.
|
||||||
"dev-libs/rustlib": [SonameAtom("arm_64", "librustc_data_structures.so"),
|
"dev-libs/rustlib": [SonameAtom("x86_64", "librustc_data_structures.so"),
|
||||||
SonameAtom("arm_64", "librustc_errors.so"),
|
|
||||||
SonameAtom("arm_64", "libserialize.so"),
|
|
||||||
SonameAtom("arm_64", "libstd.so"),
|
|
||||||
SonameAtom("arm_64", "libsyntax.so"),
|
|
||||||
SonameAtom("arm_64", "libsyntax_pos.so"),
|
|
||||||
SonameAtom("arm_64", "libterm.so"),
|
|
||||||
SonameAtom("x86_64", "librustc_data_structures.so"),
|
|
||||||
SonameAtom("x86_64", "librustc_errors.so"),
|
SonameAtom("x86_64", "librustc_errors.so"),
|
||||||
SonameAtom("x86_64", "libserialize.so"),
|
SonameAtom("x86_64", "libserialize.so"),
|
||||||
SonameAtom("x86_64", "libstd.so"),
|
SonameAtom("x86_64", "libstd.so"),
|
||||||
|
@ -40,7 +40,6 @@ ebuild_aci_write_manifest() {
|
|||||||
|
|
||||||
case "${BOARD}" in
|
case "${BOARD}" in
|
||||||
amd64-usr) appc_arch=amd64 ;;
|
amd64-usr) appc_arch=amd64 ;;
|
||||||
arm64-usr) appc_arch=aarch64 ;;
|
|
||||||
*) die_notrace "Cannot map \"${BOARD}\" to an appc arch" ;;
|
*) die_notrace "Cannot map \"${BOARD}\" to an appc arch" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -91,32 +91,21 @@ if [ -z "$linux_console" ]; then
|
|||||||
terminal_input console serial_com0
|
terminal_input console serial_com0
|
||||||
terminal_output console serial_com0
|
terminal_output console serial_com0
|
||||||
elif [ "$grub_platform" = efi ]; then
|
elif [ "$grub_platform" = efi ]; then
|
||||||
if [ "$grub_cpu" = arm64 ]; then
|
set linux_console="console=ttyS0,115200n8 console=tty0"
|
||||||
set linux_console="console=ttyAMA0,115200n8"
|
|
||||||
else
|
|
||||||
set linux_console="console=ttyS0,115200n8 console=tty0"
|
|
||||||
fi
|
|
||||||
elif [ "$grub_platform" = xen ]; then
|
elif [ "$grub_platform" = xen ]; then
|
||||||
set linux_console="console=hvc0"
|
set linux_console="console=hvc0"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set extra_options=""
|
|
||||||
if [ "$grub_cpu" = arm64 ]; then
|
|
||||||
set extra_options="acpi=force"
|
|
||||||
fi
|
|
||||||
|
|
||||||
set suf=""
|
set suf=""
|
||||||
|
|
||||||
# UEFI uses linuxefi/initrdefi instead of linux/initrd except for arm64
|
# UEFI uses linuxefi/initrdefi instead of linux/initrd
|
||||||
if [ "$grub_platform" = efi ]; then
|
if [ "$grub_platform" = efi ]; then
|
||||||
if [ "$grub_cpu" != arm64 ]; then
|
set suf="efi"
|
||||||
set suf="efi"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Assemble the options applicable to all the kernels below
|
# Assemble the options applicable to all the kernels below
|
||||||
set linux_cmdline="rootflags=rw mount.usrflags=ro consoleblank=0 $linux_root $linux_console $first_boot $randomize_disk_guid $extra_options $oem $linux_append"
|
set linux_cmdline="rootflags=rw mount.usrflags=ro consoleblank=0 $linux_root $linux_console $first_boot $randomize_disk_guid $oem $linux_append"
|
||||||
|
|
||||||
# Re-implement grub_abort() since no command exposes it.
|
# Re-implement grub_abort() since no command exposes it.
|
||||||
function abort {
|
function abort {
|
||||||
|
@ -48,10 +48,6 @@ CORE_MODULES=( normal search test fat part_gpt search_fs_uuid gzio search_part_l
|
|||||||
# Name of the core image, depends on target
|
# Name of the core image, depends on target
|
||||||
CORE_NAME=
|
CORE_NAME=
|
||||||
|
|
||||||
# Whether the SDK's grub or the board root's grub is used. Once amd64 is
|
|
||||||
# fixed up the board root's grub will always be used.
|
|
||||||
BOARD_GRUB=0
|
|
||||||
|
|
||||||
case "${FLAGS_target}" in
|
case "${FLAGS_target}" in
|
||||||
i386-pc)
|
i386-pc)
|
||||||
CORE_MODULES+=( biosdisk serial )
|
CORE_MODULES+=( biosdisk serial )
|
||||||
@ -64,21 +60,11 @@ case "${FLAGS_target}" in
|
|||||||
x86_64-xen)
|
x86_64-xen)
|
||||||
CORE_NAME="core.elf"
|
CORE_NAME="core.elf"
|
||||||
;;
|
;;
|
||||||
arm64-efi)
|
|
||||||
CORE_MODULES+=( serial linux efi_gop getenv smbios efinet verify http tftp )
|
|
||||||
CORE_NAME="core.efi"
|
|
||||||
BOARD_GRUB=1
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
die_notrace "Unknown GRUB target ${FLAGS_target}"
|
die_notrace "Unknown GRUB target ${FLAGS_target}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ $BOARD_GRUB -eq 1 ]]; then
|
|
||||||
info "Updating GRUB in ${BOARD_ROOT}"
|
|
||||||
emerge-${BOARD} --nodeps --select -qugKN sys-boot/grub
|
|
||||||
GRUB_SRC="${BOARD_ROOT}/usr/lib/grub/${FLAGS_target}"
|
|
||||||
fi
|
|
||||||
[[ -d "${GRUB_SRC}" ]] || die "GRUB not installed at ${GRUB_SRC}"
|
[[ -d "${GRUB_SRC}" ]] || die "GRUB not installed at ${GRUB_SRC}"
|
||||||
|
|
||||||
# In order for grub-setup-bios to properly detect the layout of the disk
|
# In order for grub-setup-bios to properly detect the layout of the disk
|
||||||
@ -230,18 +216,6 @@ case "${FLAGS_target}" in
|
|||||||
sudo cp "${BUILD_LIBRARY_DIR}/menu.lst" \
|
sudo cp "${BUILD_LIBRARY_DIR}/menu.lst" \
|
||||||
"${ESP_DIR}/boot/grub/menu.lst"
|
"${ESP_DIR}/boot/grub/menu.lst"
|
||||||
;;
|
;;
|
||||||
arm64-efi)
|
|
||||||
info "Installing default arm64 UEFI bootloader."
|
|
||||||
sudo mkdir -p "${ESP_DIR}/EFI/boot"
|
|
||||||
#FIXME(andrejro): shim not ported to aarch64
|
|
||||||
sudo cp "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" \
|
|
||||||
"${ESP_DIR}/EFI/boot/bootaa64.efi"
|
|
||||||
if [[ -n "${FLAGS_copy_efi_grub}" ]]; then
|
|
||||||
# copying from vfat so ignore permissions
|
|
||||||
cp --no-preserve=mode "${ESP_DIR}/EFI/boot/bootaa64.efi" \
|
|
||||||
"${FLAGS_copy_efi_grub}"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
@ -74,7 +74,6 @@ oem_aci_write_manifest() {
|
|||||||
|
|
||||||
case "${BOARD}" in
|
case "${BOARD}" in
|
||||||
amd64-usr) appc_arch=amd64 ;;
|
amd64-usr) appc_arch=amd64 ;;
|
||||||
arm64-usr) appc_arch=aarch64 ;;
|
|
||||||
*) die_notrace "Cannot map \"${BOARD}\" to an appc arch" ;;
|
*) die_notrace "Cannot map \"${BOARD}\" to an appc arch" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ create_prod_image() {
|
|||||||
|
|
||||||
# Assert that if this is supposed to be an official build that the
|
# Assert that if this is supposed to be an official build that the
|
||||||
# official update keys have been used.
|
# official update keys have been used.
|
||||||
if [[ ${COREOS_OFFICIAL:-0} -eq 1 && "${BOARD}" != arm64-usr ]]; then
|
if [[ ${COREOS_OFFICIAL:-0} -eq 1 ]]; then
|
||||||
grep -q official \
|
grep -q official \
|
||||||
"${root_fs_dir}"/var/db/pkg/coreos-base/coreos-au-key-*/USE \
|
"${root_fs_dir}"/var/db/pkg/coreos-base/coreos-au-key-*/USE \
|
||||||
|| die_notrace "coreos-au-key is missing the 'official' use flag"
|
|| die_notrace "coreos-au-key is missing the 'official' use flag"
|
||||||
@ -141,11 +141,8 @@ EOF
|
|||||||
"${BUILD_DIR}/${image_kernel}"
|
"${BUILD_DIR}/${image_kernel}"
|
||||||
"${BUILD_DIR}/${image_pcr_policy}"
|
"${BUILD_DIR}/${image_pcr_policy}"
|
||||||
"${BUILD_DIR}/${image_grub}"
|
"${BUILD_DIR}/${image_grub}"
|
||||||
|
"${BUILD_DIR}/${image_shim}"
|
||||||
"${BUILD_DIR}/${image_kconfig}"
|
"${BUILD_DIR}/${image_kconfig}"
|
||||||
)
|
)
|
||||||
# FIXME(bgilbert): no shim on arm64
|
|
||||||
if [[ -f "${BUILD_DIR}/${image_shim}" ]]; then
|
|
||||||
to_upload+=("${BUILD_DIR}/${image_shim}")
|
|
||||||
fi
|
|
||||||
upload_image -d "${BUILD_DIR}/${image_name}.bz2.DIGESTS" "${to_upload[@]}"
|
upload_image -d "${BUILD_DIR}/${image_name}.bz2.DIGESTS" "${to_upload[@]}"
|
||||||
}
|
}
|
||||||
|
@ -153,10 +153,6 @@ else
|
|||||||
set -- -machine accel=kvm -cpu host -smp "${VM_NCPUS}" "$@" ;;
|
set -- -machine accel=kvm -cpu host -smp "${VM_NCPUS}" "$@" ;;
|
||||||
amd64-usr+*)
|
amd64-usr+*)
|
||||||
set -- -machine pc-q35-2.8 -cpu kvm64 -smp 1 -nographic "$@" ;;
|
set -- -machine pc-q35-2.8 -cpu kvm64 -smp 1 -nographic "$@" ;;
|
||||||
arm64-usr+aarch64)
|
|
||||||
set -- -machine virt,accel=kvm,gic-version=3 -cpu host -smp "${VM_NCPUS}" -nographic "$@" ;;
|
|
||||||
arm64-usr+*)
|
|
||||||
set -- -machine virt -cpu cortex-a57 -smp 1 -nographic "$@" ;;
|
|
||||||
*)
|
*)
|
||||||
die "Unsupported arch" ;;
|
die "Unsupported arch" ;;
|
||||||
esac
|
esac
|
||||||
@ -177,10 +173,6 @@ if [ -n "${VM_IMAGE}" ]; then
|
|||||||
case "${VM_BOARD}" in
|
case "${VM_BOARD}" in
|
||||||
amd64-usr)
|
amd64-usr)
|
||||||
set -- -drive if=virtio,file="${SCRIPT_DIR}/${VM_IMAGE}" "$@" ;;
|
set -- -drive if=virtio,file="${SCRIPT_DIR}/${VM_IMAGE}" "$@" ;;
|
||||||
arm64-usr)
|
|
||||||
set -- -drive if=none,id=blk,file="${SCRIPT_DIR}/${VM_IMAGE}" \
|
|
||||||
-device virtio-blk-device,drive=blk "$@"
|
|
||||||
;;
|
|
||||||
*) die "Unsupported arch" ;;
|
*) die "Unsupported arch" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -223,15 +215,6 @@ case "${VM_BOARD}" in
|
|||||||
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
|
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
|
||||||
"$@"
|
"$@"
|
||||||
;;
|
;;
|
||||||
arm64-usr)
|
|
||||||
qemu-system-aarch64 \
|
|
||||||
-name "$VM_NAME" \
|
|
||||||
-m ${VM_MEMORY} \
|
|
||||||
-netdev user,id=eth0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
|
|
||||||
-device virtio-net-device,netdev=eth0 \
|
|
||||||
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
|
|
||||||
"$@"
|
|
||||||
;;
|
|
||||||
*) die "Unsupported arch" ;;
|
*) die "Unsupported arch" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -30,12 +30,7 @@ OS_CODENAME="Rhyolite"
|
|||||||
OS_ID="coreos"
|
OS_ID="coreos"
|
||||||
OS_PRETTY_NAME="$OS_NAME $COREOS_VERSION (${OS_CODENAME})"
|
OS_PRETTY_NAME="$OS_NAME $COREOS_VERSION (${OS_CODENAME})"
|
||||||
|
|
||||||
# temporarily point arm at a different appid until update support
|
|
||||||
# is completed in update_engine and the CoreUpdate service.
|
|
||||||
COREOS_APPID="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}"
|
COREOS_APPID="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}"
|
||||||
if [[ "${FLAGS_board}" == arm64-* ]]; then
|
|
||||||
COREOS_APPID="{103867da-e3a2-4c92-b0b3-7fbd7f7d8b71}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DISTRIB_* are the standard lsb-release names
|
# DISTRIB_* are the standard lsb-release names
|
||||||
sudo mkdir -p "${ROOT_FS_DIR}/usr/share/coreos" "${ROOT_FS_DIR}/etc/coreos"
|
sudo mkdir -p "${ROOT_FS_DIR}/usr/share/coreos" "${ROOT_FS_DIR}/etc/coreos"
|
||||||
|
@ -303,9 +303,6 @@ get_default_vm_type() {
|
|||||||
amd64-usr)
|
amd64-usr)
|
||||||
echo "qemu"
|
echo "qemu"
|
||||||
;;
|
;;
|
||||||
arm64-usr)
|
|
||||||
echo "qemu_uefi"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
@ -622,7 +619,6 @@ _write_cpio_disk() {
|
|||||||
local grub_arch
|
local grub_arch
|
||||||
case $BOARD in
|
case $BOARD in
|
||||||
amd64-usr) grub_arch="x86_64-efi" ;;
|
amd64-usr) grub_arch="x86_64-efi" ;;
|
||||||
arm64-usr) grub_arch="arm64-efi" ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cp "${base_dir}/boot/coreos/grub/${grub_arch}/core.efi" "${dst_dir}/${grub_name}"
|
cp "${base_dir}/boot/coreos/grub/${grub_arch}/core.efi" "${dst_dir}/${grub_name}"
|
||||||
@ -719,19 +715,6 @@ _write_qemu_uefi_conf() {
|
|||||||
cp "/usr/share/edk2/OVMF_CODE.fd" "$(_dst_dir)/${flash_ro}"
|
cp "/usr/share/edk2/OVMF_CODE.fd" "$(_dst_dir)/${flash_ro}"
|
||||||
cp "/usr/share/edk2/OVMF_VARS.fd" "$(_dst_dir)/${flash_rw}"
|
cp "/usr/share/edk2/OVMF_VARS.fd" "$(_dst_dir)/${flash_rw}"
|
||||||
;;
|
;;
|
||||||
arm64-usr)
|
|
||||||
# Get edk2 files into local build workspace.
|
|
||||||
info "Updating edk2 in /build/${BOARD}"
|
|
||||||
emerge-${BOARD} --nodeps --select -qugKN sys-firmware/edk2
|
|
||||||
# Create 64MiB flash device image files.
|
|
||||||
dd if=/dev/zero bs=1M count=64 of="$(_dst_dir)/${flash_rw}" \
|
|
||||||
status=none
|
|
||||||
cp "/build/${BOARD}/usr/share/edk2/QEMU_EFI.fd" \
|
|
||||||
"$(_dst_dir)/${flash_ro}.work"
|
|
||||||
truncate --reference="$(_dst_dir)/${flash_rw}" \
|
|
||||||
"$(_dst_dir)/${flash_ro}.work"
|
|
||||||
mv "$(_dst_dir)/${flash_ro}.work" "$(_dst_dir)/${flash_ro}"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
sed -e "s%^VM_PFLASH_RO=.*%VM_PFLASH_RO='${flash_ro}'%" \
|
sed -e "s%^VM_PFLASH_RO=.*%VM_PFLASH_RO='${flash_ro}'%" \
|
||||||
|
@ -67,11 +67,11 @@ def process_emerge_output(eout):
|
|||||||
|
|
||||||
|
|
||||||
def get_board_packages(board):
|
def get_board_packages(board):
|
||||||
""" gets a list of packages used by a board. valid boards are {arm,amd}64-usr, sdk, and bootstrap"""
|
""" gets a list of packages used by a board. valid boards are amd64-usr, sdk, and bootstrap"""
|
||||||
emerge_args = "--emptytree --pretend --verbose --unordered-display"
|
emerge_args = "--emptytree --pretend --verbose --unordered-display"
|
||||||
if board == "sdk":
|
if board == "sdk":
|
||||||
cmd = "emerge {} @system sdk-depends sdk-extras".format(emerge_args)
|
cmd = "emerge {} @system sdk-depends sdk-extras".format(emerge_args)
|
||||||
elif board == "amd64-usr" or board == "arm64-usr":
|
elif board == "amd64-usr":
|
||||||
cmd = "emerge-{} {} @system board-packages".format(board, emerge_args)
|
cmd = "emerge-{} {} @system board-packages".format(board, emerge_args)
|
||||||
elif board == "bootstrap":
|
elif board == "bootstrap":
|
||||||
pkgs = exec_command_strict("/usr/lib64/catalyst/targets/stage1/build.py")
|
pkgs = exec_command_strict("/usr/lib64/catalyst/targets/stage1/build.py")
|
||||||
@ -92,7 +92,6 @@ def print_table(report, head, line_head, line_tail, tail, joiner, pkg_joiner):
|
|||||||
"upstream": ["Upstream"],
|
"upstream": ["Upstream"],
|
||||||
"tag": "Tag",
|
"tag": "Tag",
|
||||||
"sdk": ["sdk"],
|
"sdk": ["sdk"],
|
||||||
"arm64-usr": ["arm64-usr"],
|
|
||||||
"amd64-usr": ["amd64-usr"],
|
"amd64-usr": ["amd64-usr"],
|
||||||
"bootstrap": ["bootstrap"],
|
"bootstrap": ["bootstrap"],
|
||||||
"modified": "Modified"})
|
"modified": "Modified"})
|
||||||
@ -103,7 +102,6 @@ def print_table(report, head, line_head, line_tail, tail, joiner, pkg_joiner):
|
|||||||
pkg_joiner.join(entry.get("upstream",[])),
|
pkg_joiner.join(entry.get("upstream",[])),
|
||||||
entry.get("tag",""),
|
entry.get("tag",""),
|
||||||
pkg_joiner.join(entry.get("sdk", [])),
|
pkg_joiner.join(entry.get("sdk", [])),
|
||||||
pkg_joiner.join(entry.get("arm64-usr", [])),
|
|
||||||
pkg_joiner.join(entry.get("amd64-usr", [])),
|
pkg_joiner.join(entry.get("amd64-usr", [])),
|
||||||
pkg_joiner.join(entry.get("bootstrap", [])),
|
pkg_joiner.join(entry.get("bootstrap", [])),
|
||||||
entry.get("modified","")]) + line_tail)
|
entry.get("modified","")]) + line_tail)
|
||||||
@ -140,7 +138,7 @@ def main():
|
|||||||
subprocess.check_call(["git", "-C", args.upstream_path, "pull"])
|
subprocess.check_call(["git", "-C", args.upstream_path, "pull"])
|
||||||
|
|
||||||
pkg_lists = {}
|
pkg_lists = {}
|
||||||
sources = ["sdk", "bootstrap", "amd64-usr", "arm64-usr", "image"]
|
sources = ["sdk", "bootstrap", "amd64-usr", "image"]
|
||||||
for i in sources:
|
for i in sources:
|
||||||
pkg_lists[i] = get_board_packages(i)
|
pkg_lists[i] = get_board_packages(i)
|
||||||
|
|
||||||
|
16
common.sh
16
common.sh
@ -928,19 +928,10 @@ BOAT
|
|||||||
}
|
}
|
||||||
|
|
||||||
# The binfmt_misc support in the kernel is required.
|
# The binfmt_misc support in the kernel is required.
|
||||||
# The aarch64 binaries should be executed through
|
|
||||||
# "/usr/bin/qemu-aarch64-static"
|
|
||||||
setup_qemu_static() {
|
setup_qemu_static() {
|
||||||
local root_fs_dir="$1"
|
local root_fs_dir="$1"
|
||||||
case "${BOARD}" in
|
case "${BOARD}" in
|
||||||
amd64-usr) return 0;;
|
amd64-usr) return 0;;
|
||||||
arm64-usr)
|
|
||||||
if [[ -f "${root_fs_dir}/sbin/ldconfig" ]]; then
|
|
||||||
sudo cp /usr/bin/qemu-aarch64 "${root_fs_dir}"/usr/bin/qemu-aarch64-static
|
|
||||||
else
|
|
||||||
die "Missing basic layout in target rootfs"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*) die "Unsupported arch" ;;
|
*) die "Unsupported arch" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -949,13 +940,6 @@ clean_qemu_static() {
|
|||||||
local root_fs_dir="$1"
|
local root_fs_dir="$1"
|
||||||
case "${BOARD}" in
|
case "${BOARD}" in
|
||||||
amd64-usr) return 0;;
|
amd64-usr) return 0;;
|
||||||
arm64-usr)
|
|
||||||
if [[ -f "${root_fs_dir}/usr/bin/qemu-aarch64-static" ]]; then
|
|
||||||
sudo rm "${root_fs_dir}"/usr/bin/qemu-aarch64-static
|
|
||||||
else
|
|
||||||
die "File not found"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*) die "Unsupported arch" ;;
|
*) die "Unsupported arch" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -77,11 +77,9 @@ if [[ -n "${FLAGS_kernel_path}" ]]; then
|
|||||||
do_copy "${FLAGS_kernel_path}" "/boot/coreos/vmlinuz-a"
|
do_copy "${FLAGS_kernel_path}" "/boot/coreos/vmlinuz-a"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME(bgilbert): no shim on arm64
|
|
||||||
if [[ -n "${FLAGS_efi_grub_path}" ]]; then
|
if [[ -n "${FLAGS_efi_grub_path}" ]]; then
|
||||||
case "${BOARD}" in
|
case "${BOARD}" in
|
||||||
amd64-usr) image_name="grub.efi" ;;
|
amd64-usr) image_name="grub.efi" ;;
|
||||||
arm64-usr) image_name="bootaa64.efi" ;;
|
|
||||||
*) die "GRUB filename not known for this board" ;;
|
*) die "GRUB filename not known for this board" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -34,9 +34,6 @@ while [[ $# -gt 0 ]]; do
|
|||||||
amd64|amd64-usr)
|
amd64|amd64-usr)
|
||||||
board="amd64-usr"
|
board="amd64-usr"
|
||||||
;;
|
;;
|
||||||
arm64|arm64-usr)
|
|
||||||
board="arm64-usr"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
echo "Error: Unknown arg: $1"
|
echo "Error: Unknown arg: $1"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -59,7 +59,7 @@ DEFINE_string variant "" \
|
|||||||
"Board variant."
|
"Board variant."
|
||||||
|
|
||||||
|
|
||||||
# builds wrappers like equery-arm-generic.
|
# builds wrappers like equery-amd64-usr.
|
||||||
# args:
|
# args:
|
||||||
# $1: command to wrap
|
# $1: command to wrap
|
||||||
# rest: extra arguments to pass to the command
|
# rest: extra arguments to pass to the command
|
||||||
|
Loading…
Reference in New Issue
Block a user