Makefile: allow multiple values for TARGET_SKELETON
Subsystems (2)
PATCH 1/2 Makefile: allow multiple values for TARGET_SKELETON
For platforms that need to provide a target fs skeleton for some files, multiple entries for the the variable TARGET_SKELETON are handy.
A platform code can then contain the target/generic/ skeleton and only provide path to the delta files.
The only thing to take care for is that none of those file names contains spaces, but that's condsidered evil anyway and should not happen.
--- Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Makefile +3 -3
@@ -329,9 +329,9 @@ endif $(PROJECT_BUILD_DIR)/.root: mkdir -p $(TARGET_DIR) if ! [ -d "$(TARGET_DIR)/bin" ]; then \ - if [ -d "$(TARGET_SKELETON)" ]; then \ - cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \ - fi; \ + for dir in $(TARGET_SKELETON); do \ + test -d $$dir && cp -fa $$dir/* $(TARGET_DIR)/; \ + done; \ touch $(STAGING_DIR)/.fakeroot.00000; \ fi -find $(TARGET_DIR) -type d -name CVS -o -name .svn -print0 | xargs -0 rm -rf
Signature · 1 line
1.6.3.1
PATCH 2/2 Add target support for MXC based devices
Devices based on Freescale's MXC SoCs need some extra attention to start the gettys from init. In particular, the /dev/ttymxc0 inode needs to be created and added to inittab and securetty.
--- target/device/ARMLTD/Config.in | 4 + target/device/ARMLTD/Makefile.in | 3 + target/device/ARMLTD/mxc/Makefile.in | 4 + target/device/ARMLTD/mxc/device_table.txt | 176 ++++++++++++++++++++ .../device/ARMLTD/mxc/target_skeleton/etc/inittab | 45 +++++ .../ARMLTD/mxc/target_skeleton/etc/securetty | 14 ++ 6 files changed, 246 insertions(+), 0 deletions(-) create mode 100644 target/device/ARMLTD/mxc/Makefile.in create mode 100644 target/device/ARMLTD/mxc/device_table.txt create mode 100644 target/device/ARMLTD/mxc/target_skeleton/etc/inittab create mode 100644 target/device/ARMLTD/mxc/target_skeleton/etc/securetty
target/device/ARMLTD/Config.in +4 -0
@@ -22,12 +22,16 @@ config BR2_TARGET_ARM_INTEGRATOR_926 config BR2_TARGET_ARM_INTEGRATOR_926_HUGE bool "Integrator arm926 (Huge)" +config BR2_TARGET_ARM_MXC + bool "Freescale MX2/MX3 based modules" + endchoice config BR2_BOARD_NAME string default "integrator926" if BR2_TARGET_ARM_INTEGRATOR_926 default "integrator926_huge" if BR2_TARGET_ARM_INTEGRATOR_926_HUGE + default "freescale-mxc" if BR2_TARGET_ARM_MXC config BR2_BOARD_PATH string "Board Path"
target/device/ARMLTD/Makefile.in +3 -0
@@ -4,6 +4,9 @@ BOARD_NAME=$(strip $(subst ",,$(BR2_BOARD_NAME))) BOARD_PATH=$(strip $(subst ",,$(BR2_BOARD_PATH))) #")) +ifeq ($(BR2_TARGET_ARM_MXC),y) +include target/device/ARMLTD/mxc/Makefile.in +endif # pin some settings BR2_GNU_TARGET_SUFFIX:="linux-uclibcgnueabi"
target/device/ARMLTD/mxc/Makefile.in new file +4 -0
@@ -0,0 +1,4 @@ +# Default target skeleton stuff, may be overridden +TARGET_SKELETON=target/generic/target_skeleton target/device/ARMLTD/mxc/target_skeleton +TARGET_DEVICE_TABLE=target/device/ARMLTD/mxc/device_table.txt +
target/device/ARMLTD/mxc/device_table.txt new file +176 -0
176 lines not on this page · raw message
target/device/ARMLTD/mxc/target_skeleton/etc/inittab new file +45 -0
45 lines not on this page · raw message
target/device/ARMLTD/mxc/target_skeleton/etc/securetty new file +14 -0
@@ -0,0 +1,14 @@ +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +tty7 +tty8 +ttyS0 +ttyS1 +ttyS2 +ttyS3 +ttymxc0 +
Signature · 1 line
1.6.3.1
PATCH 2/2 Add target support for MXC based devices
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Daniel" == Daniel Mack <[email protected]> writes:
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).
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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 Add target support for MXC based devices
Quoted 8 lines · Peter Korsgaard
Daniel> Devices based on Freescale's MXC SoCs need some extra Daniel> attention to start the gettys from init. In particular, the Daniel>
/dev/ttymxc0inode 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.
Quoted 3 lines
On a related note, I think the
/etc/securettyfiles 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
PATCH 2/2 Add target support for MXC based devices
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Daniel" == Daniel Mack <[email protected]> writes:
Hi,
Quoted 1 line
Quoted 1 line
From
3c1b25d96ee33c1d1c8b5b8f6f7a8c48d28cb353Mon Sep 17 00:00:00 2001
Daniel> From: Daniel Mack <[email protected]>
Daniel> Date: Mon, 8 Jun 2009 17:22:04 +0200
Daniel> Subject: [PATCH] Add support for Freescale's MXC serial terminals
Daniel> This patch makes ttymxc0 an option to choose for Daniel> BR2_TARGET_GENERIC_GETTY.
Do all SoCs using the ttymxc driver really all only have 1 uart?
Daniel> +/dev/ttymxc c 666 0 0 207 16 0 1 3
Apparently not as you're here creating 3 nodes.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 Add target support for MXC based devices
Quoted 5 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
From
3c1b25d96ee33c1d1c8b5b8f6f7a8c48d28cb353Mon Sep 17 00:00:00 2001Daniel> From: Daniel Mack <[email protected]>
Daniel> Date: Mon, 8 Jun 2009 17:22:04 +0200
Daniel> Subject: [PATCH] Add support for Freescale's MXC serial terminals
Quoted 8 lines
Daniel> This patch makes ttymxc0 an option to choose for Daniel>
BR2_TARGET_GENERIC_GETTY.Do all SoCs using the ttymxc driver really all only have 1 uart?
Daniel> +/dev/ttymxc c 666 0 0 207 16 0 1 3
Apparently not as you're here creating 3 nodes.
Agreed, they should all be included. New patch below - also rebased upon the current git HEAD.
Thanks,
Daniel
PATCH 2/2 Add target support for MXC based devices
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Daniel" == Daniel Mack <[email protected]> writes:
Daniel> diff --git a/target/generic/Config.in b/target/generic/Config.in Daniel> index cb7ef77..1e1d11f 100644
Daniel> --- a/target/generic/Config.in
Daniel> +++ b/target/generic/Config.in
Daniel> @@ -106,6 +106,14 @@ config BR2_TARGET_GENERIC_GETTY_TTYSAC2
Daniel> depends on BR2_arm Daniel> config BR2_TARGET_GENERIC_GETTY_TTYSAC3 Daniel> bool "ttySAC3"
Daniel> +config BR2_TARGET_GENERIC_GETTY_TTYMXC0
Daniel> + bool "ttymxc0"
Daniel> + depends on BR2_arm
Daniel> +config BR2_TARGET_GENERIC_GETTY_TTYMXC1
Daniel> + bool "ttymxc1"
Daniel> + depends on BR2_arm
Daniel> +config BR2_TARGET_GENERIC_GETTY_TTYMXC2
Daniel> + bool "ttymxc2"
Daniel> depends on BR2_arm
You removed the depends on BR2_arm from TTYSAC3, but I've fixed that and committed - Thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 Add target support for MXC based devices
In reply to Daniel MackQuoted 3 lines · Daniel Mack
Devices based on Freescale's MXC SoCs need some extra attention to start the gettys from init. In particular, the
/dev/ttymxc0inode needs to be created and added to inittab and securetty.
I think it would be easier to just sed them out if it's not a device that has /dev/ttymxc and leave them in inittab and securetty otherwise.
PATCH 2/2 Add target support for MXC based devices
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Bernhard" == Bernhard Reutner-Fischer <[email protected]> writes:
Quoted 3 lines · Daniel Mack
Quoted 3 lines
Devices based on Freescale's MXC SoCs need some extra attention to start the gettys from init. In particular, the
/dev/ttymxc0inode needs to be created and added to inittab and securetty.
Bernhard> I think it would be easier to just sed them out if it's not Bernhard> a device that has /dev/ttymxc and leave them in inittab and Bernhard> securetty otherwise.
Or use the infrastructure we have in target/generic for just this.
Signature · 1 line
Bye, Peter Korsgaard