1
0
Fork 0
forked from nuttx/nuttx-update
local-nuttx-update/net
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
..
arp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
bluetooth build: add initial cmake build system 2023-07-08 13:50:48 +08:00
can build: add initial cmake build system 2023-07-08 13:50:48 +08:00
devif build: add initial cmake build system 2023-07-08 13:50:48 +08:00
icmp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
icmpv6 build: add initial cmake build system 2023-07-08 13:50:48 +08:00
ieee802154 build: add initial cmake build system 2023-07-08 13:50:48 +08:00
igmp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
inet build: add initial cmake build system 2023-07-08 13:50:48 +08:00
ipforward build: add initial cmake build system 2023-07-08 13:50:48 +08:00
ipfrag build: add initial cmake build system 2023-07-08 13:50:48 +08:00
local build: add initial cmake build system 2023-07-08 13:50:48 +08:00
mld build: add initial cmake build system 2023-07-08 13:50:48 +08:00
nat build: add initial cmake build system 2023-07-08 13:50:48 +08:00
neighbor build: add initial cmake build system 2023-07-08 13:50:48 +08:00
netdev build: add initial cmake build system 2023-07-08 13:50:48 +08:00
netfilter build: add initial cmake build system 2023-07-08 13:50:48 +08:00
netlink build: add initial cmake build system 2023-07-08 13:50:48 +08:00
pkt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
procfs build: add initial cmake build system 2023-07-08 13:50:48 +08:00
route build: add initial cmake build system 2023-07-08 13:50:48 +08:00
rpmsg build: add initial cmake build system 2023-07-08 13:50:48 +08:00
sixlowpan build: add initial cmake build system 2023-07-08 13:50:48 +08:00
socket build: add initial cmake build system 2023-07-08 13:50:48 +08:00
tcp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
udp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
usrsock build: add initial cmake build system 2023-07-08 13:50:48 +08:00
utils build: add initial cmake build system 2023-07-08 13:50:48 +08:00
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig net: Limit max value for Send/Recv bufsize 2023-07-05 13:57:08 +08:00
Makefile Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00
net_initialize.c net: Reoder the initialize sequence(mac->ip->tcp/udp) 2022-03-12 19:24:17 +02:00
README.txt Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00

README
======

Directory Structure
===================

  nuttx/
   |
   `- net/
       |
       +- arp        - Address resolution protocol (IPv4)
       +- bluetooth  - PF_BLUETOOTH socket interface
       +- devif      - Stack/device interface layer
       +- ipfrag     - Fragmentation and reassembly
       +- icmp       - Internet Control Message Protocol (IPv4)
       +- icmpv6     - Internet Control Message Protocol (IPv6)
       +- ieee802154 - PF_IEEE802154 socket interface
       +- inet       - PF_INET/PF_INET6 socket interface
       +- ipforward  - IP forwarding logic
       +- local      - Unix domain (local) sockets
       +- mld        - Multicast Listener Discovery (MLD)
       +- neighbor   - Neighbor Discovery Protocol (IPv6)
       +- netdev     - Socket network device interface
       +- netlink    - Netlink IPC socket interface
       +- pkt        - "Raw" packet socket support
       +- sixlowpan  - 6LoWPAN implementation
       +- socket     - BSD socket interface
       +- route      - Routing table support
       +- tcp        - Transmission Control Protocol
       +- udp        - User Datagram Protocol
       +- usrsock    - User socket API for user-space networking stack
       `- utils      - Miscellaneous utility functions

    +-------------------------------------------------------------------++------------------------+
    |                     Application layer                             || usrsock daemon         |
    +-------------------------------------------------------------------++------------------------+
    +-------------------------------------------------------------------++----------------+ +-----+
    |                   Socket layer (socket/)                          || /dev/usrsock   | |     |
    +-------------------------------------------------------------------++----------------+ |     |
    +------------++--------------------------------------------------++-------------------+ |     |
    |  Network   || Protocol stacks (arp, ipv6, icmp, pkt, tcp, udp) || usrsock/          | |     |
    |   Device   |+--------------------------------------------------++-------------------+ |     |
    | Interface  |+------------------------------------++---------------------------------+ |     |
    | (netdev/)  ||  Network Device Interface (devif/) || Utilities                       | |     |
    +------------++------------------------------------++---------------------------------+ |     |
    +----------------------------------------------------------------+                      |     |
    |                    Network Device Drivers                      |                      | HAL |
    +----------------------------------------------------------------+                      +-----+
    +----------------------------------------------------------------+ +--------------------------+
    |                    Networking Hardware                         | |  Hardware TCP/IP Stack   |
    +----------------------------------------------------------------+ +--------------------------+