From 78ac727d7bb5477bf76be06c3bfddf127e531e04 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Wed, 2 Aug 2017 17:16:14 +0300 Subject: [PATCH] e2k: initial implementation Elbrus 2000 only takes us a few lines to get up and running ;-) --- features.in/e2k/README | 1 + features.in/e2k/config.mk | 3 +++ features.in/e2k/rootfs/files/boot/boot.conf | 7 +++++++ features.in/e2k/rootfs/image-scripts.d/50-e2k-serial | 9 +++++++++ 4 files changed, 20 insertions(+) create mode 100644 features.in/e2k/README create mode 100644 features.in/e2k/config.mk create mode 100644 features.in/e2k/rootfs/files/boot/boot.conf create mode 100755 features.in/e2k/rootfs/image-scripts.d/50-e2k-serial diff --git a/features.in/e2k/README b/features.in/e2k/README new file mode 100644 index 00000000..9275877a --- /dev/null +++ b/features.in/e2k/README @@ -0,0 +1 @@ +Эта фича содержит необходимое для поддержки систем архитектуры "Эльбрус". diff --git a/features.in/e2k/config.mk b/features.in/e2k/config.mk new file mode 100644 index 00000000..2b723bcf --- /dev/null +++ b/features.in/e2k/config.mk @@ -0,0 +1,3 @@ +use/e2k: + @$(call add_feature) + @$(call set,KFLAVOURS,mcst-def) diff --git a/features.in/e2k/rootfs/files/boot/boot.conf b/features.in/e2k/rootfs/files/boot/boot.conf new file mode 100644 index 00000000..4e9653a3 --- /dev/null +++ b/features.in/e2k/rootfs/files/boot/boot.conf @@ -0,0 +1,7 @@ +default=auto + +label=auto + partition=0 + image=/image-@KVER@ + initrd=/initrd-@KVER@.img + cmdline=console=tty0 consoleblank=0 hardreset root=UUID=@ROOTUUID@ diff --git a/features.in/e2k/rootfs/image-scripts.d/50-e2k-serial b/features.in/e2k/rootfs/image-scripts.d/50-e2k-serial new file mode 100755 index 00000000..ab00b209 --- /dev/null +++ b/features.in/e2k/rootfs/image-scripts.d/50-e2k-serial @@ -0,0 +1,9 @@ +#!/bin/sh + +CFG="/boot/boot.conf" + +[ -f "$CFG" ] || exit 1 +[ -n "$GLOBAL_TTY_DEV" -a -n "$GLOBAL_TTY_RATE" ] || exit 0 + +# tty0 first +sed -i "s/console=tty0 /console=$GLOBAL_TTY_DEV,$GLOBAL_TTY_RATE &/" "$CFG"