OSLL / ntb-cxl

NTB/CXL Bridge
MIT License
4 stars 0 forks source link

Unknow flag build, aborting #108

Open burlito opened 3 months ago

burlito commented 3 months ago

When I run:

$ ./run_container.sh

I've got following output:

--> c73d6aa3d53e
STEP 12/17: RUN mkdir -p $BUILD_PATH
--> b357f8f4b5f3
STEP 13/17: WORKDIR $PROJECT_PATH
--> fe9745c3b95d
STEP 14/17: ADD ./scripts $PROJECT_PATH/scripts 
--> 6627452a0108
STEP 15/17: ADD ./yocto_files $PROJECT_PATH/yocto_files
--> daded2cf41c2
STEP 16/17: ENTRYPOINT ["/home/user/project/scripts/dispatch_docker_command.sh"]
--> 71f1b0cc6bf1
STEP 17/17: CMD ["build"]
COMMIT yocto
--> fa5315b70047
Successfully tagged localhost/yocto:latest
fa5315b7004741e5f394b69678da72a005903774a3b81af29392cf0f4fcb4118
Unknow flag build, aborting

Usage: parse_args.sh [OPTIONS]...

    -h, --help : show this help
    --command : global target to execute, e.g. 'build'
    --build-dir : the absolute path to the build directory. By default,
                  the value from BUILD_PATH environment variable is used
    --build : specifies what is to be built. Possible values are 'qemu',
              'image' and 'all'. By default is 'all'

---

QEMU options:
    --ivshmem-common-opts=ARGS : ARGS are used to define ivshmem device
    --cmdline-common=ARGS : ARGS are used to define (?)
    --common-opts=ARGS : ARGS are used to define qemu machine parameters (such as cpu, mem, etc)
    --vm1-opts=ARGS : ARGS are used to define additional arguments for VM1 only
    --vm2-opts=ARGS : ARGS are used to define additional arguments for VM2 only

All options are appended to the default parameters. To override default arguments,
use extended flags with the suffix '-override', e.g. '--vm1-opts-override'

I'm also attaching full output in attachement. I also have to note that I'm using podman instead docker.

Version on which I'm getting this: e20a83ae75e1d6d5bdfe30292fa8b7acf2aa30c3

Patch I'm having on top of it:

diff --git a/run_container.sh b/run_container.sh
index 0d050fe..09c4b35 100755
--- a/run_container.sh
+++ b/run_container.sh
@@ -8,10 +8,10 @@ for ARG in "$@"; do
         --host-build-dir=*)
             BUILD_FOLDER_NAME=${ARG#*=}
             ;;
-        --docker-no-cache*)
+        --podman-no-cache*)
             BUILD_NO_CACHE="--no-cache"
             ;;
-        --docker-shm-size*)
+        --podman-shm-size*)
             DOCKER_SHM_SIZE="${ARG#*=}"
             ;;
         *)
@@ -32,8 +32,8 @@ fi
 BUILD_PATH="$PWD"/"$BUILD_FOLDER_NAME"

 mkdir -p "$BUILD_FOLDER_NAME"
-docker build . --build-arg user_id="$(id -u)" -t yocto $BUILD_NO_CACHE
-docker run -it --rm -p 7001:7001 -p 7002:7002 -p 8001:8001 -p 8002:8002 \
+podman build . --build-arg user_id="$(id -u)" -t yocto $BUILD_NO_CACHE
+podman run -it --rm -p 7001:7001 -p 7002:7002 -p 8001:8001 -p 8002:8002 \
     --shm-size="$DOCKER_SHM_SIZE" \
     -v "$BUILD_PATH":/home/user/project/build_dir \
     -v "$PWD"/qemu_src:/home/user/project/qemu_src \

It's possible this is podman related issue. in that case, you can close it and I'm appologizing for filing incorrect bug.

run_container-out.log

mxkrsv commented 3 months ago

Default command in the Dockerfile was invalid, a fix is uploaded.

Nevertheless, the command mentonied in the examples works:

./run_container.sh --command=build