RC1
This commit is contained in:
parent
b693730c7d
commit
feed7a2137
2
LICENSE
2
LICENSE
@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright 2024 Jackrabbit-Labs-LLC
|
||||
Copyright 2024 Jackrabbit-Founders-LLC
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
20
Makefile
20
Makefile
@ -13,12 +13,14 @@
|
||||
# ******************************************************************************
|
||||
|
||||
CC=gcc
|
||||
CFLAGS= -g3 -O0 -Wall -Wextra
|
||||
MACROS=-D JACK_VERBOSE
|
||||
INCLUDE_DIR=/usr/local/include
|
||||
LIB_DIR=/usr/local/lib
|
||||
INCLUDE_PATH=-I $(INCLUDE_DIR) -I /usr/include/glib-2.0 -I /usr/lib/`uname -m`-linux-gnu/glib-2.0/include/
|
||||
LIB_PATH=-L $(LIB_DIR)
|
||||
CFLAGS?= -g3 -O0 -Wall -Wextra
|
||||
MACROS?=-D JACK_VERBOSE
|
||||
INCLUDE_DIR?=/usr/local/include
|
||||
LIB_DIR?=/usr/local/lib
|
||||
LOCAL_INCLUDE_DIR?=./include
|
||||
LOCAL_LIB_DIR?=./lib
|
||||
INCLUDE_PATH=-I $(LOCAL_INCLUDE_DIR) -I $(INCLUDE_DIR) -I /usr/include/glib-2.0 -I /usr/lib/`uname -m`-linux-gnu/glib-2.0/include/ -I /usr/lib64/glib-2.0/include
|
||||
LIB_PATH=-L $(LOCAL_LIB_DIR) -L $(LIB_DIR)
|
||||
LIBS=-l mctp -l fmapi -l emapi -l ptrqueue -l arrayutils -l uuid -l timeutils -l cxlstate -l pciutils
|
||||
TARGET=jack
|
||||
|
||||
@ -52,8 +54,12 @@ install: jack
|
||||
sudo cp $(TARGET) /usr/local/bin/
|
||||
sudo cp completion.bash /etc/bash_completion.d/$(TARGET)-completion.bash
|
||||
|
||||
uninstall:
|
||||
sudo rm /usr/local/bin/$(TARGET)
|
||||
sudo rm /etc/bash_completion.d/$(TARGET)-completion.bash
|
||||
|
||||
# List all non file name targets as PHONY
|
||||
.PHONY: all clean doc install
|
||||
.PHONY: all clean doc install uninstall
|
||||
|
||||
# Variables
|
||||
# $^ Will expand to be all the sensitivity list
|
||||
|
||||
103
README.md
103
README.md
@ -1,2 +1,103 @@
|
||||
# Jack-release
|
||||
# Overview
|
||||
|
||||
Jack is a CLI tool that implements the CXL 2.0 Fabric Management API
|
||||
specification. It is intended to be used to configure and monitor CXL
|
||||
compliant hardware devices such as switches, accelerators or memory controllers.
|
||||
|
||||
# Supported Operating System Versions
|
||||
|
||||
- Ubuntu 23.10
|
||||
- Fedora 38, 39
|
||||
|
||||
> Note: Ubuntu 22.04 is not supported. This is due to some newer PCI features that
|
||||
> are missing from the 5.15 Linux kernel that ships with Ubuntu 22.04.
|
||||
|
||||
# Building
|
||||
|
||||
1. Install OS libraries
|
||||
|
||||
Install the following build packages to compile the software on the following
|
||||
operating systems.
|
||||
|
||||
**Ubuntu:**
|
||||
|
||||
```bash
|
||||
apt install build-essential libglib2.0-dev libyaml-dev libpci-dev
|
||||
```
|
||||
|
||||
**Fedora:**
|
||||
|
||||
```bash
|
||||
```
|
||||
|
||||
2. Build Dependencies
|
||||
|
||||
To clone and build dependencies run:
|
||||
|
||||
```bash
|
||||
./builddeps.bash
|
||||
```
|
||||
|
||||
3. Build
|
||||
|
||||
After building the required dependencies run:
|
||||
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Jack connects to a target device using MCTP over TCP. When using Jack with an
|
||||
endpoint such as
|
||||
[CSE (CXL Switch Emulator)](https://github.com/JackrabbitLabs/cse), the user
|
||||
first starts the CSE application using a config file that defines a
|
||||
virtualized CXL switch environment with the following command.
|
||||
|
||||
```bash
|
||||
cse -lc config.yaml
|
||||
```
|
||||
|
||||
Once the target endpoint is running, Jack can be used to query or configure
|
||||
the CXL endpoint.
|
||||
|
||||
# Example Commands
|
||||
|
||||
To obtain identity information about the endpoint:
|
||||
|
||||
```bash
|
||||
jack show id
|
||||
```
|
||||
|
||||
To obtain information about the capabilities of the endpoint:
|
||||
|
||||
```bash
|
||||
jack show switch
|
||||
```
|
||||
|
||||
To show the status of the ports of the endpoint use `show port`. This displays
|
||||
the devices that are connected to the endpoint.
|
||||
|
||||
```bash
|
||||
jack show port
|
||||
```
|
||||
|
||||
To show information about what ports are connected to a Virtual CXL Switch
|
||||
(VCS).
|
||||
|
||||
```bash
|
||||
jack show vcs 0
|
||||
```
|
||||
|
||||
To unbind a port (or a Logical Device) from a VCS:
|
||||
|
||||
```bash
|
||||
jack port unbind -c 0 -b 4
|
||||
```
|
||||
|
||||
To bind a port (or a Logical Device) to a VCS:
|
||||
|
||||
```bash
|
||||
jack port bind -p 4 -l 0 -c 0 -b 4
|
||||
```
|
||||
|
||||
|
||||
62
builddeps.bash
Executable file
62
builddeps.bash
Executable file
@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
# ******************************************************************************
|
||||
#
|
||||
# @file builddeps.bash
|
||||
#
|
||||
# @brief script to clone and build dependencies
|
||||
#
|
||||
# @copyright Copyright (C) 2024 Jackrabbit Founders LLC. All rights reserved.
|
||||
#
|
||||
# @date Apr 2024
|
||||
# @author Barrett Edwards <code@jrlabs.io>
|
||||
#
|
||||
# ******************************************************************************
|
||||
|
||||
ARG=$1
|
||||
CUR=`pwd`
|
||||
HOST=https://github.com/
|
||||
ORG=JackrabbitLabs
|
||||
REPOS="array_utils time_utils pci_utils ptr_queue emapi fmapi cxl_state mctp"
|
||||
|
||||
SRC=src
|
||||
INC=include
|
||||
LIB=lib
|
||||
|
||||
if [ "${ARG}" = "clean" ] ; then
|
||||
echo "Removing build dependencies"
|
||||
rm -rf ${SRC}
|
||||
rm -rf ${INC}
|
||||
rm -rf ${LIB}
|
||||
exit
|
||||
fi
|
||||
|
||||
# Create source directory if not present
|
||||
if [ ! -d ${SRC} ] ; then
|
||||
mkdir ${SRC}
|
||||
fi
|
||||
# Create include directory if not present
|
||||
if [ ! -d ${INC} ] ; then
|
||||
mkdir ${INC}
|
||||
fi
|
||||
# Create lib directory if not present
|
||||
if [ ! -d ${LIB} ] ; then
|
||||
mkdir ${LIB}
|
||||
fi
|
||||
|
||||
# Clone sub module repos into DST directory
|
||||
for REPO in $REPOS ; do
|
||||
echo "Cloning build dependencies"
|
||||
git clone ${HOST}${ORG}/${REPO}.git ${SRC}/${REPO}
|
||||
done
|
||||
|
||||
# Build sub modules
|
||||
for REPO in $REPOS ; do
|
||||
echo "Building dependencies"
|
||||
cd ${SRC}/${REPO}/
|
||||
make INCLUDE_DIR=${CUR}/${INC} LIB_DIR=${CUR}/${LIB} CFLAGS="-g3 -O0" install
|
||||
cd ${CUR}
|
||||
done
|
||||
|
||||
# Issue completion message
|
||||
echo "Completed building dependencies"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user