Skip to content

Commit af02368

Browse files
committed
tools: labs: qemu: Fix console for ARM platform
Prepare support for our first ARM platform: i.MX6ul. First we need to fix the console file name. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
1 parent 7705fdf commit af02368

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tools/labs/qemu/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ gdb: $(ZIMAGE)
6060

6161
$(YOCTO_IMAGE):
6262
wget $(YOCTO_URL)/$(YOCTO_IMAGE)
63-
sudo qemu/prepare-image.sh $(YOCTO_IMAGE)
63+
sudo ARCH=$(ARCH) qemu/prepare-image.sh $(YOCTO_IMAGE)
6464

6565
tap0:
6666
qemu/create_net.sh $@

tools/labs/qemu/prepare-image.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ TMP=$(mktemp -d)
1111
mount -t ext4 -o loop $1 $TMP
1212

1313
# add console
14-
echo "hvc0:12345:respawn:/sbin/getty 115200 hvc0" >> $TMP/etc/inittab
14+
if [ "$ARCH" = "x86" ]; then
15+
echo "hvc0:12345:respawn:/sbin/getty 115200 hvc0" >> $TMP/etc/inittab
16+
else
17+
echo "mxc0:12345:respawn:/sbin/getty 115200 ttymxc0" >> $TMP/etc/inittab
18+
fi
1519

1620
# add more vty
1721
cat >> $TMP/etc/inittab <<EOF

0 commit comments

Comments
 (0)