mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
build_kernel_image: turn off earlyprintk and make options common on ARM/x86
Also move the creation of config.txt to common code and add some of the options that both platform should use to it. BUG=chrome-os-partner:11403 TEST=build, boot Change-Id: I9c6eed3bf05c9f0744063c1baf321bf6d24dc9cc Reviewed-on: https://gerrit.chromium.org/gerrit/28914 Tested-by: Olof Johansson <olofj@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org> Commit-Ready: Olof Johansson <olofj@chromium.org>
This commit is contained in:
parent
cee2386caf
commit
1eafb5a351
@ -132,23 +132,27 @@ EOF
|
|||||||
WORK="${WORK} ${FLAGS_working_dir}/boot.config"
|
WORK="${WORK} ${FLAGS_working_dir}/boot.config"
|
||||||
info "Emitted cross-platform boot params to ${FLAGS_working_dir}/boot.config"
|
info "Emitted cross-platform boot params to ${FLAGS_working_dir}/boot.config"
|
||||||
|
|
||||||
if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then
|
# Add common boot options first.
|
||||||
# Legacy BIOS will use the kernel in the rootfs (via syslinux), as will
|
cat <<EOF | cat - "${FLAGS_working_dir}/boot.config" \
|
||||||
# standard EFI BIOS (via grub, from the EFI System Partition). Chrome OS
|
|
||||||
# BIOS will use a separate signed kernel partition, which we'll create now.
|
|
||||||
# FIXME: remove serial output, debugging messages.
|
|
||||||
cat <<EOF | cat - "${FLAGS_working_dir}/boot.config" \
|
|
||||||
> "${FLAGS_working_dir}/config.txt"
|
> "${FLAGS_working_dir}/config.txt"
|
||||||
quiet
|
quiet
|
||||||
loglevel=0
|
loglevel=0
|
||||||
console=tty2
|
console=tty2
|
||||||
init=/sbin/init
|
init=/sbin/init
|
||||||
|
cros_secure
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then
|
||||||
|
# Legacy BIOS will use the kernel in the rootfs (via syslinux), as will
|
||||||
|
# standard EFI BIOS (via grub, from the EFI System Partition). Chrome OS
|
||||||
|
# BIOS will use a separate signed kernel partition, which we'll create now.
|
||||||
|
cat <<EOF | cat - "${FLAGS_working_dir}/boot.config" \
|
||||||
|
>> "${FLAGS_working_dir}/config.txt"
|
||||||
add_efi_memmap
|
add_efi_memmap
|
||||||
boot=local
|
boot=local
|
||||||
noresume
|
noresume
|
||||||
noswap
|
noswap
|
||||||
i915.modeset=1
|
i915.modeset=1
|
||||||
cros_secure
|
|
||||||
tpm_tis.force=1
|
tpm_tis.force=1
|
||||||
tpm_tis.interrupts=0
|
tpm_tis.interrupts=0
|
||||||
nmi_watchdog=panic,lapic
|
nmi_watchdog=panic,lapic
|
||||||
@ -158,10 +162,6 @@ EOF
|
|||||||
bootloader_path="/lib64/bootstub/bootstub.efi"
|
bootloader_path="/lib64/bootstub/bootstub.efi"
|
||||||
kernel_image="${FLAGS_vmlinuz}"
|
kernel_image="${FLAGS_vmlinuz}"
|
||||||
elif [[ "${FLAGS_arch}" = "arm" ]]; then
|
elif [[ "${FLAGS_arch}" = "arm" ]]; then
|
||||||
cat <<EOF | cat - "${FLAGS_working_dir}/boot.config" \
|
|
||||||
> "${FLAGS_working_dir}/config.txt"
|
|
||||||
earlyprintk
|
|
||||||
EOF
|
|
||||||
WORK="${WORK} ${FLAGS_working_dir}/config.txt"
|
WORK="${WORK} ${FLAGS_working_dir}/config.txt"
|
||||||
|
|
||||||
# arm does not need/have a bootloader in kernel partition
|
# arm does not need/have a bootloader in kernel partition
|
||||||
|
Loading…
Reference in New Issue
Block a user