uboot: setup serial tty for qemu

This commit is contained in:
Anton Midyukov 2019-06-13 20:15:41 +07:00
parent 482e11ab9d
commit dc2101a01d
2 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,13 @@
use/uboot: use/kernel ifeq (,$(filter-out qcow2 qcow2c,$(IMAGE_TYPE)))
ifeq (,$(filter-out aarch64 armh,$(ARCH)))
UBOOT_TTY := use/tty/AMA0
else
UBOOT_TTY := /use/tty/S0
endif
endif
use/uboot: use/kernel/initrd-setup $(UBOOT_TTY)
@$(call add_feature) @$(call add_feature)
@$(call add,THE_LISTS,singleboard-tools) @$(call add,THE_LISTS,singleboard-tools)
@$(call try,TTY_DEV,tty1)
@$(call xport,TTY_DEV)

View File

@ -2,6 +2,12 @@
[ "$GLOBAL_BASE_BOOTLOADER" = 'uboot' ] || exit 0 [ "$GLOBAL_BASE_BOOTLOADER" = 'uboot' ] || exit 0
if [ -n "$GLOBAL_TTY_RATE" ] ;then
TTY="$GLOBAL_TTY_DEV","$GLOBAL_TTY_RATE"
else
TTY="$GLOBAL_TTY_DEV"
fi
# installkernel relies on existing extlinux.conf # installkernel relies on existing extlinux.conf
# with filled in `default' label # with filled in `default' label
mkdir -p /boot/extlinux mkdir -p /boot/extlinux
@ -15,5 +21,5 @@ label linux
kernel /boot/vmlinuz kernel /boot/vmlinuz
initrd /boot/initrd.img initrd /boot/initrd.img
fdtdir /boot/dtb fdtdir /boot/dtb
append root=LABEL=ROOT ro cma=192M console=tty1 append root=LABEL=ROOT ro cma=192M console=$TTY
EOF EOF