From 31e6421b839ee84d9c3b99a336da5a976feae640 Mon Sep 17 00:00:00 2001 From: Sparchatus Date: Fri, 25 Mar 2022 08:37:21 +0000 Subject: [PATCH] Added commands for handling Toradex build&run --- .devcontainer/devcontainer.json | 5 +++++ .vscode/tasks.json | 33 ++++++++++++++++++++++++++++++--- hake/menu.lst.armv8_imx8x | 2 +- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 14b64a4..09ddca5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,6 +8,7 @@ "containerEnv": { "BFAOS": "${containerWorkspaceFolder}", "BFBUILD": "${containerWorkspaceFolder}/build", + "BFBUILD_QEMU": "${containerWorkspaceFolder}/build_qemu", }, "extensions": [ @@ -15,6 +16,10 @@ "ms-vscode.cpptools-extension-pack", ], + // allow access to the toradex board + "runArgs": ["--privileged"], + "mounts": ["type=bind,src=/dev/bus/usb,dst=/dev/bus/usb"], + "remoteUser": "vscode", } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 056f65d..ee2776d 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,9 +2,9 @@ "version": "2.0.0", "tasks": [ { - "label": "Initialize Build Directory", + "label": "Initialize QEMU Build Directory", "type": "shell", - "command": "mkdir -p ${BFBUILD} && cd build && ${BFAOS}/hake/hake.sh -s ${BFAOS} && make -j7 QEMU", + "command": "mkdir -p ${BFBUILD_QEMU} && cd ${BFBUILD_QEMU} && ${BFAOS}/hake/hake.sh -s ${BFAOS} && make -j7 QEMU", "group": { "kind": "build", "isDefault": true @@ -13,7 +13,34 @@ { "label": "Build and Run QEMU", "type": "shell", - "command": "cd build && make qemu_a57", + "command": "cd ${BFBUILD_QEMU} && make qemu_a57", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Initialize Toradex Build Directory", + "type": "shell", + "command": "mkdir -p ${BFBUILD} && cd ${BFBUILD} && ${BFAOS}/hake/hake.sh -s ${BFAOS} -a armv8 && make -j7 QEMU", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build and Run Toradex", + "type": "shell", + "command": "cd ${BFBUILD} && make -j7 imx8x && make usbboot_imx8x", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Toradex Console", + "type": "shell", + "command": "if ! picocom -b 115200 -f n /dev/ttyUSB0; then echo; echo !!!Make sure you installed the toradex udev rules to allow user access!!!; fi", "group": { "kind": "build", "isDefault": true diff --git a/hake/menu.lst.armv8_imx8x b/hake/menu.lst.armv8_imx8x index 0448e84..e186353 100644 --- a/hake/menu.lst.armv8_imx8x +++ b/hake/menu.lst.armv8_imx8x @@ -5,4 +5,4 @@ bootdriver /armv8/sbin/boot_armv8_generic cpudriver /armv8/sbin/cpu_imx8x module /armv8/sbin/init -module /armv8/sbin/hello +module /armv8/sbin/hello catch Aurel Jan Sandro