# app-fstoolkit **Repository Path**: crazykev/app-fstoolkit ## Basic Information - **Project Name**: app-fstoolkit - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-12-19 - **Last Updated**: 2023-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # A Toolkit Application for testing filesystem on Unikraft ## Usage Type `help` to see detail usage. ```text Powered by o. .o _ _ __ _ Oo Oo ___ (_) | __ __ __ _ ' _) :_ oO oO ' _ `| | |/ / _)' _` | |_| _) oOo oOO| | | | | (| | | (_) | _) :_ OoOoO ._, ._:_:_,\_._, .__,_:_, \___) Pandora 0.15.0~513cb161 =====================Filesystem testing toolkit====================== => Please input the command: help * This is a tool for testing filesystem funcitonality in Unikraft when we don't have a tool like busybox or shell to test with. * It is a simple program always running in a loop, which takes a command and specified arguments, executes it, prints the result and wait for the next command. * We have the following commands: * - ls: list the files and print all the names in the current directory. `ls` * - cd: change the current directory to the specified directory. `cd {your_dir}` * - mkdir: create a new directory with the specified name. `mkdir {your_dir}` * - touch: create a new file with the specified name and content if file is not present, otherwise update the content. `touch {your_file} {your_content}` * - rm: remove the specified file or directory. `rm {your_file_or_dir}` * - cat: print the content of the specified file. `cat {your_file}` * - pwd: print the current working directory. `pwd` * - exit: exit the program. ``` ## Configure, Build and Run Supported architectures are x86_64 and AArch64. Use the corresponding the configuration files (`defconfigs/*`), according to your choice of platform and architecture. ### QEMU x86_64 Use the `defconfigs/qemu-x86_64` configuration file together with `make defconfig` to create the configuration file: ```console UK_DEFCONFIG=$(pwd)/defconfigs/qemu-x86_64 make defconfig ``` This results in the creation of the `.config` file: ```console ls .config .config ``` The `.config` file will be used in the build step. **Build** ```console make clean make -j $(nproc) ``` Run with qemu(default config build with initrd) ```console qemu-system-x86_64 -kernel .unikraft/build/app-fstoolkit_qemu-x86_64 -initrd initrd.img -nographic ``` ### QEMU AArch64 Use the `defconfigs/qemu-arm64` configuration file together with `make defconfig` to create the configuration file: ```console UK_DEFCONFIG=$(pwd)/defconfigs/qemu-arm64 make defconfig ``` Similar to the x86_64 configuration, this results in the creation of the `.config` file that will be used in the build step. **Build** ```console make clean make -j $(nproc) ``` Run with qemu(default config build with ramfs) ```console qemu-system-aarch64 -cpu cortex-a53 -machine virt -kernel .unikraft/build/app-fstoolkit_qemu-arm64 -nographic ``` ### Raspi Use the `defconfigs/raspi-arm64` configuration file together with `make defconfig` to create the configuration file: ```console UK_DEFCONFIG=$(pwd)/defconfigs/raspi-arm64 make defconfig ``` Default config use initrd, use `make menuconfig` to enable other filesystem if you need. Similar to the x86_64 configuration, this results in the creation of the `.config` file that will be used in the build step. **Build** ```console make clean make -j $(nproc) ``` Run with qemu ```console qemu-system-aarch64 -cpu cortex-a53 -machine raspi3b -kernel .unikraft/build/kernel8.img -initrd ./initrd.img -dtb $(pwd)/.unikraft/unikraft/plat/raspi/bootfiles/bcm2710-rpi-3-b-plus.dtb -nographic ``` Run with raspi board. (default config build with initrd) Add this line at the end of `config` file ```text initramfs initrd.img 0x1F800000 ```