You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/08/23 14:04:49 UTC

[incubator-nuttx] 01/02: sim/host: move host implement to posix directory

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a10add60aece88775c1a8ef5493b4b00ecf39c07
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Aug 23 11:30:33 2022 +0800

    sim/host: move host implement to posix directory
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 arch/sim/src/Makefile                            | 4 +++-
 arch/sim/src/sim/{ => posix}/up_hcisocket_host.c | 2 +-
 arch/sim/src/sim/{ => posix}/up_hostfs.c         | 2 +-
 arch/sim/src/sim/{ => posix}/up_hostirq.c        | 2 +-
 arch/sim/src/sim/{ => posix}/up_hostmemory.c     | 2 +-
 arch/sim/src/sim/{ => posix}/up_hostmisc.c       | 2 +-
 arch/sim/src/sim/{ => posix}/up_hosttime.c       | 2 +-
 arch/sim/src/sim/{ => posix}/up_i2cbus.h         | 0
 arch/sim/src/sim/{ => posix}/up_i2cbuslinux.c    | 2 +-
 arch/sim/src/sim/{ => posix}/up_simsmp.c         | 2 +-
 arch/sim/src/sim/{ => posix}/up_simuart.c        | 2 +-
 arch/sim/src/sim/{ => posix}/up_spi.h            | 0
 arch/sim/src/sim/{ => posix}/up_spilinux.c       | 2 +-
 arch/sim/src/sim/{ => posix}/up_tapdev.c         | 2 +-
 arch/sim/src/sim/{ => posix}/up_testset.c        | 2 +-
 arch/sim/src/sim/{ => posix}/up_usrsock_host.c   | 2 +-
 arch/sim/src/sim/{ => posix}/up_vpnkit.c         | 2 +-
 arch/sim/src/sim/{ => posix}/up_wpcap.c          | 2 +-
 arch/sim/src/sim/{ => posix}/up_x11eventloop.c   | 2 +-
 arch/sim/src/sim/{ => posix}/up_x11framebuffer.c | 2 +-
 20 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index bbfed35b94..2afb1a5a7b 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -75,7 +75,8 @@ CSRCS += up_vfork.c
 endif
 endif
 
-VPATH = sim
+VPATH = :sim
+VPATH += :sim/posix
 DEPPATH = $(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))
 
 CFLAGS += -fvisibility=default
@@ -84,6 +85,7 @@ HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
    -fvisibility=default
 
 HOSTCFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)}
+HOSTCFLAGS += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip}
 ifeq ($(CONFIG_HOST_MACOS),y)
   HOSTCFLAGS += -Wno-deprecated-declarations
 endif
diff --git a/arch/sim/src/sim/up_hcisocket_host.c b/arch/sim/src/sim/posix/up_hcisocket_host.c
similarity index 99%
rename from arch/sim/src/sim/up_hcisocket_host.c
rename to arch/sim/src/sim/posix/up_hcisocket_host.c
index e03284e2cb..ece872896a 100644
--- a/arch/sim/src/sim/up_hcisocket_host.c
+++ b/arch/sim/src/sim/posix/up_hcisocket_host.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_hcisocket_host.c
+ * arch/sim/src/sim/posix/up_hcisocket_host.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_hostfs.c b/arch/sim/src/sim/posix/up_hostfs.c
similarity index 99%
rename from arch/sim/src/sim/up_hostfs.c
rename to arch/sim/src/sim/posix/up_hostfs.c
index 607f04212c..a53320c0fd 100644
--- a/arch/sim/src/sim/up_hostfs.c
+++ b/arch/sim/src/sim/posix/up_hostfs.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_hostfs.c
+ * arch/sim/src/sim/posix/up_hostfs.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_hostirq.c b/arch/sim/src/sim/posix/up_hostirq.c
similarity index 99%
rename from arch/sim/src/sim/up_hostirq.c
rename to arch/sim/src/sim/posix/up_hostirq.c
index 2e05b94f4e..bd8c31f2e2 100644
--- a/arch/sim/src/sim/up_hostirq.c
+++ b/arch/sim/src/sim/posix/up_hostirq.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_hostirq.c
+ * arch/sim/src/sim/posix/up_hostirq.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_hostmemory.c b/arch/sim/src/sim/posix/up_hostmemory.c
similarity index 99%
rename from arch/sim/src/sim/up_hostmemory.c
rename to arch/sim/src/sim/posix/up_hostmemory.c
index 5875c8e828..86e98d8bd0 100644
--- a/arch/sim/src/sim/up_hostmemory.c
+++ b/arch/sim/src/sim/posix/up_hostmemory.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_hostmemory.c
+ * arch/sim/src/sim/posix/up_hostmemory.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_hostmisc.c b/arch/sim/src/sim/posix/up_hostmisc.c
similarity index 97%
rename from arch/sim/src/sim/up_hostmisc.c
rename to arch/sim/src/sim/posix/up_hostmisc.c
index 75b7e665fe..159aea197e 100644
--- a/arch/sim/src/sim/up_hostmisc.c
+++ b/arch/sim/src/sim/posix/up_hostmisc.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_hostmisc.c
+ * arch/sim/src/sim/posix/up_hostmisc.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_hosttime.c b/arch/sim/src/sim/posix/up_hosttime.c
similarity index 98%
rename from arch/sim/src/sim/up_hosttime.c
rename to arch/sim/src/sim/posix/up_hosttime.c
index 4e6e0dbb53..ff148cb9bf 100644
--- a/arch/sim/src/sim/up_hosttime.c
+++ b/arch/sim/src/sim/posix/up_hosttime.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_hosttime.c
+ * arch/sim/src/sim/posix/up_hosttime.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_i2cbus.h b/arch/sim/src/sim/posix/up_i2cbus.h
similarity index 100%
rename from arch/sim/src/sim/up_i2cbus.h
rename to arch/sim/src/sim/posix/up_i2cbus.h
diff --git a/arch/sim/src/sim/up_i2cbuslinux.c b/arch/sim/src/sim/posix/up_i2cbuslinux.c
similarity index 99%
rename from arch/sim/src/sim/up_i2cbuslinux.c
rename to arch/sim/src/sim/posix/up_i2cbuslinux.c
index 09512b4171..9a4574090d 100644
--- a/arch/sim/src/sim/up_i2cbuslinux.c
+++ b/arch/sim/src/sim/posix/up_i2cbuslinux.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_i2cbuslinux.c
+ * arch/sim/src/sim/posix/up_i2cbuslinux.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_simsmp.c b/arch/sim/src/sim/posix/up_simsmp.c
similarity index 99%
rename from arch/sim/src/sim/up_simsmp.c
rename to arch/sim/src/sim/posix/up_simsmp.c
index c802675efb..0cfc35d3ba 100644
--- a/arch/sim/src/sim/up_simsmp.c
+++ b/arch/sim/src/sim/posix/up_simsmp.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_simsmp.c
+ * arch/sim/src/sim/posix/up_simsmp.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_simuart.c b/arch/sim/src/sim/posix/up_simuart.c
similarity index 99%
rename from arch/sim/src/sim/up_simuart.c
rename to arch/sim/src/sim/posix/up_simuart.c
index 5e2aa56db5..dc1ab199fa 100644
--- a/arch/sim/src/sim/up_simuart.c
+++ b/arch/sim/src/sim/posix/up_simuart.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_simuart.c
+ * arch/sim/src/sim/posix/up_simuart.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_spi.h b/arch/sim/src/sim/posix/up_spi.h
similarity index 100%
rename from arch/sim/src/sim/up_spi.h
rename to arch/sim/src/sim/posix/up_spi.h
diff --git a/arch/sim/src/sim/up_spilinux.c b/arch/sim/src/sim/posix/up_spilinux.c
similarity index 99%
rename from arch/sim/src/sim/up_spilinux.c
rename to arch/sim/src/sim/posix/up_spilinux.c
index 488a0bb8be..6504f009ff 100644
--- a/arch/sim/src/sim/up_spilinux.c
+++ b/arch/sim/src/sim/posix/up_spilinux.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_spilinux.c
+ * arch/sim/src/sim/posix/up_spilinux.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_tapdev.c b/arch/sim/src/sim/posix/up_tapdev.c
similarity index 99%
rename from arch/sim/src/sim/up_tapdev.c
rename to arch/sim/src/sim/posix/up_tapdev.c
index f1fcd1aaaa..d56b19286e 100644
--- a/arch/sim/src/sim/up_tapdev.c
+++ b/arch/sim/src/sim/posix/up_tapdev.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_tapdev.c
+ * arch/sim/src/sim/posix/up_tapdev.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_testset.c b/arch/sim/src/sim/posix/up_testset.c
similarity index 98%
rename from arch/sim/src/sim/up_testset.c
rename to arch/sim/src/sim/posix/up_testset.c
index 4716ecfdc7..798331a290 100644
--- a/arch/sim/src/sim/up_testset.c
+++ b/arch/sim/src/sim/posix/up_testset.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_testset.c
+ * arch/sim/src/sim/posix/up_testset.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_usrsock_host.c b/arch/sim/src/sim/posix/up_usrsock_host.c
similarity index 99%
rename from arch/sim/src/sim/up_usrsock_host.c
rename to arch/sim/src/sim/posix/up_usrsock_host.c
index 6494ecb613..a52b78d23b 100644
--- a/arch/sim/src/sim/up_usrsock_host.c
+++ b/arch/sim/src/sim/posix/up_usrsock_host.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_usrsock_host.c
+ * arch/sim/src/sim/posix/up_usrsock_host.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_vpnkit.c b/arch/sim/src/sim/posix/up_vpnkit.c
similarity index 99%
rename from arch/sim/src/sim/up_vpnkit.c
rename to arch/sim/src/sim/posix/up_vpnkit.c
index e144be376c..fc9d3d864b 100644
--- a/arch/sim/src/sim/up_vpnkit.c
+++ b/arch/sim/src/sim/posix/up_vpnkit.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_vpnkit.c
+ * arch/sim/src/sim/posix/up_vpnkit.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_wpcap.c b/arch/sim/src/sim/posix/up_wpcap.c
similarity index 99%
rename from arch/sim/src/sim/up_wpcap.c
rename to arch/sim/src/sim/posix/up_wpcap.c
index 2d0b0e0493..7915aa7d88 100644
--- a/arch/sim/src/sim/up_wpcap.c
+++ b/arch/sim/src/sim/posix/up_wpcap.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_wpcap.c
+ * arch/sim/src/sim/posix/up_wpcap.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_x11eventloop.c b/arch/sim/src/sim/posix/up_x11eventloop.c
similarity index 98%
rename from arch/sim/src/sim/up_x11eventloop.c
rename to arch/sim/src/sim/posix/up_x11eventloop.c
index 4bf95ebf32..6f4fa69750 100644
--- a/arch/sim/src/sim/up_x11eventloop.c
+++ b/arch/sim/src/sim/posix/up_x11eventloop.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_x11eventloop.c
+ * arch/sim/src/sim/posix/up_x11eventloop.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/arch/sim/src/sim/up_x11framebuffer.c b/arch/sim/src/sim/posix/up_x11framebuffer.c
similarity index 99%
rename from arch/sim/src/sim/up_x11framebuffer.c
rename to arch/sim/src/sim/posix/up_x11framebuffer.c
index 3ba4255ca0..cee426b953 100644
--- a/arch/sim/src/sim/up_x11framebuffer.c
+++ b/arch/sim/src/sim/posix/up_x11framebuffer.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/up_x11framebuffer.c
+ * arch/sim/src/sim/posix/up_x11framebuffer.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with