---
# System prepended metadata

title: temp

---

temp
===
```
#!/bin/bash

export PATH=/XXX/bin/:$PATH
TOOLCHAIN=riscv64-linux-

INITRAMFS=
INITRAMFS_DEVNODES=${INITRAMFS}/dev/initramfs.devnodes
export CFLAGS=-g
export ARCH=riscv
export CROSS_COMPILE=${TOOLCHAIN}


edit_conf()
{
    rm -f .config
    make $1
    ./scripts/config --set-str CONFIG_INITRAMFS_SOURCE "${INITRAMFS} ${INITRAMFS_DEVNODES}"
}

case "$1" in
    "defconfig")
        # edit_conf defconfig
        make defconfig
        ;;
    "vmlinux")
        make vmlinux ${OPTIONS}
        ;;
    "image")
        make Image ${OPTIONS}
        ;;
    "modules")
        make modules ${OPTIONS}
        ;;
    "modules_install")
        rm -rf ${INITRAMFS}/lib/modules/*
        make modules_install INSTALL_MOD_PATH=${INITRAMFS}
        ;;
    "allmodconfig")
        make allmodconfig
        ;;
    "clean")
        make clean
        ;;
    "distclean")
        make distclean
        ;;
    "menuconfig")
        make menuconfig
        ;;
    "savedefconfig")
        make savedefconfig
        ;;
    "kselftest-merge")
        make kselftest-merge
        ;;
    "kselftest")
        make -C tools/testing/selftests
        ;;
    "kselftest-clean")
        make clean -C tools/testing/selftests
        ;;
    "kselftest-install")
        cd tools/testing/selftests
        ./kselftest_install.sh
        ;;
    "tags")
        make tags ${OPTIONS}
        ;;
    *"M="*)
        make $1
        ;;
    *)
        echo "Nothing to do"
        ;;
esac


```