[Buildroot] [PATCH 2/2] Add target support for MXC based devices

Daniel Mack daniel at caiaq.de
Mon Jun 8 15:26:48 UTC 2009


On Mon, Jun 08, 2009 at 05:07:13PM +0200, Peter Korsgaard wrote:
>  Daniel> Devices based on Freescale's MXC SoCs need some extra
>  Daniel> attention to start the gettys from init. In particular, the
>  Daniel> /dev/ttymxc0 inode needs to be created and added to inittab
>  Daniel> and securetty.
> 
> Why are you using the armltd stuff with a freescale board? It would
> imho be nicer to just add the ttymxcX nodes to the serial console
> selection of target/generic (BR2_TARGET_GENERIC_GETTY).

Ok, that's also possible.

> On a related note, I think the /etc/securetty files are more trouble
> than they are worth - We should probably remove the feature from the
> default busybox configs.

... or add ttymxc0 unconditionally to securetty. It doesn't really harm
others.

I didn't want to touch any generic files in my first approach, but
you're right - the changeset looks much cleaner now.

Thanks,
Daniel

>From 3c1b25d96ee33c1d1c8b5b8f6f7a8c48d28cb353 Mon Sep 17 00:00:00 2001
From: Daniel Mack <daniel at caiaq.de>
Date: Mon, 8 Jun 2009 17:22:04 +0200
Subject: [PATCH] Add support for Freescale's MXC serial terminals

This patch makes ttymxc0 an option to choose for
BR2_TARGET_GENERIC_GETTY.

It also adds ttymxc0 to the generic device table and to securetty.

Signed-off-by: Daniel Mack <daniel at caiaq.de>
---
 target/generic/Config.in                     |    4 ++++
 target/generic/device_table.txt              |    1 +
 target/generic/target_skeleton/etc/securetty |    1 +
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/target/generic/Config.in b/target/generic/Config.in
index 3520939..6075e4e 100644
--- a/target/generic/Config.in
+++ b/target/generic/Config.in
@@ -95,6 +95,9 @@ config BR2_TARGET_GENERIC_GETTY_TTYAMA2
 config BR2_TARGET_GENERIC_GETTY_TTYAMA3
 	bool "ttyAMA3"
 	depends on BR2_arm
+config BR2_TARGET_GENERIC_GETTY_TTYMXC0
+	bool "ttymxc0"
+	depends on BR2_arm
 config BR2_TARGET_GENERIC_GETTY_TTYUL0
 	bool "ttyUL0"
 	depends on BR2_powerpc
@@ -144,6 +147,7 @@ config BR2_TARGET_GENERIC_GETTY_PORT
 	default "ttyAMA1"	if BR2_TARGET_GENERIC_GETTY_TTYAMA1
 	default "ttyAMA2"	if BR2_TARGET_GENERIC_GETTY_TTYAMA2
 	default "ttyAMA3"	if BR2_TARGET_GENERIC_GETTY_TTYAMA3
+	default "ttymxc0"	if BR2_TARGET_GENERIC_GETTY_TTYMXC0
 	default "ttyUL0"	if BR2_TARGET_GENERIC_GETTY_TTYUL0
 	default "ttyUL1"	if BR2_TARGET_GENERIC_GETTY_TTYUL1
 	default "ttyUL2"	if BR2_TARGET_GENERIC_GETTY_TTYUL2
diff --git a/target/generic/device_table.txt b/target/generic/device_table.txt
index d009f18..f2a529a 100644
--- a/target/generic/device_table.txt
+++ b/target/generic/device_table.txt
@@ -76,6 +76,7 @@
 /dev/ttyAMA	c	666	0	0	204	64	0	1	4
 /dev/ttyPSC	c	666	0	0	204	148	0	1	4
 /dev/ttyUL	c	666	0	0	204	187	0	1	4
+/dev/ttymxc	c	666	0	0	207	16	0	1	3
 
 # Input stuff
 /dev/input		d	755	0	0	-	-	-	-	-
diff --git a/target/generic/target_skeleton/etc/securetty b/target/generic/target_skeleton/etc/securetty
index 793a4af..8928dd5 100644
--- a/target/generic/target_skeleton/etc/securetty
+++ b/target/generic/target_skeleton/etc/securetty
@@ -26,3 +26,4 @@ ttyCPM0
 ttyCPM1
 ttyCPM2
 ttyCPM3
+ttymxc0
-- 
1.6.3.1




More information about the buildroot mailing list