Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defconfig not working #75

Open
ElevatedEuphoria opened this issue Dec 27, 2024 · 3 comments
Open

defconfig not working #75

ElevatedEuphoria opened this issue Dec 27, 2024 · 3 comments

Comments

@ElevatedEuphoria
Copy link

Hi,

after running:

git clone https://github.com/sipeed/LicheeRV-Nano-Build --depth=1
cd LicheeRV-Nano-Build
git clone https://github.com/sophgo/host-tools --depth=1

To then:
source build/cvisetup.sh
I get this error:

source build/cvisetup.sh
+zsh:183> source build/cvisetup.sh
+build/cvisetup.sh:3> [ -z 1 ']'
+build/cvisetup.sh:916> TOP_DIR=+build/cvisetup.sh:916> gettop
+gettop:2> local TOPFILE=build/envsetup_soc.sh
+gettop:3> [ -n '' -a -f /build/envsetup_soc.sh ']'
+gettop:7> [ -f build/envsetup_soc.sh ']'
+gettop:11> PWD='' /bin/pwd
+build/cvisetup.sh:916> TOP_DIR=/root/LicheeRV-Nano-Build 
+build/cvisetup.sh:917> BUILD_PATH=/root/LicheeRV-Nano-Build/build 
+build/cvisetup.sh:918> export TOP_DIR BUILD_PATH
+build/cvisetup.sh:919> /root/LicheeRV-Nano-Build/build/scripts/boards_scan.py --gen-build-kconfig
+build/cvisetup.sh:920> /root/LicheeRV-Nano-Build/build/scripts/gen_sensor_config.py
+build/cvisetup.sh:921> /root/LicheeRV-Nano-Build/build/scripts/gen_panel_config.py
+build/cvisetup.sh:925> source /root/LicheeRV-Nano-Build/build/common_functions.sh
+/root/LicheeRV-Nano-Build/build/common_functions.sh:445> _gen_build_env
+_gen_build_env:2> local _tmp ret
+_gen_build_env:3> _tmp=+_gen_build_env:3> python3 /root/LicheeRV-Nano-Build/build/scripts/boards_scan.py --scan-boards-config
/root/LicheeRV-Nano-Build/build/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig:12: warning: FLASH_SIZE_SHRINK (defined at /root/LicheeRV-Nano-Build/build/Kconfig:226) set more than once. Old value "y", new value "n".
+_gen_build_env:3> _tmp=$'chip_cv180x=(cv1800b)\nchip_cv181x=(cv1812cp cv1812h cv1813h)\nchip_sg200x=(sg2000 sg2002)\nchip_cv=(cv1800b cv1812cp cv1812h cv1813h sg2000 sg2002)\nchip_sel=(cv1800b cv1812cp cv1812h cv1813h sg2000 sg2002)\nsubtype_sel=(palladium fpga asic)\ncv1800b_board_sel[0]="sophpi_duo_sd"\ncv1800b_board_info[0]=""\ncv1800b_board_ddr_cfg[0]="ddr2_1333_x16"\ncv1812h_board_sel[0]="wevb_0007a_emmc"\ncv1812h_board_info[0]=""\ncv1812h_board_ddr_cfg[0]="ddr3_1866_x16"\ncv1812h_board_sel[1]="wevb_0007a_spinand"\ncv1812h_board_info[1]=""\ncv1812h_board_ddr_cfg[1]="ddr3_1866_x16"\ncv1812h_board_sel[2]="wevb_0007a_spinor"\ncv1812h_board_info[2]=""\ncv1812h_board_ddr_cfg[2]="ddr3_1866_x16"\ncv1813h_board_sel[0]="wevb_0007a_emmc"\ncv1813h_board_info[0]=""\ncv1813h_board_ddr_cfg[0]="ddr3_1866_x16"\ncv1813h_board_sel[1]="wevb_0007a_spinand"\ncv1813h_board_info[1]=""\ncv1813h_board_ddr_cfg[1]="ddr3_1866_x16"\ncv1813h_board_sel[2]="wevb_0007a_spinor"\ncv1813h_board_info[2]=""\ncv1813h_board_ddr_cfg[2]="ddr3_1866_x16"\nsg2000_board_sel[0]="duo_sd"\nsg2000_board_info[0]=""\nsg2000_board_ddr_cfg[0]="ddr3_1866_x16"\nsg2000_board_sel[1]="wevb_sd"\nsg2000_board_info[1]=""\nsg2000_board_ddr_cfg[1]="ddr3_1866_x16"\nsg2002_board_sel[0]="duo_sd"\nsg2002_board_info[0]=""\nsg2002_board_ddr_cfg[0]="ddr3_1866_x16"\nsg2002_board_sel[1]="licheea53nano_sd"\nsg2002_board_info[1]=""\nsg2002_board_ddr_cfg[1]="ddr3_1866_x16"\nsg2002_board_sel[2]="licheervnano_sd"\nsg2002_board_info[2]=""\nsg2002_board_ddr_cfg[2]="ddr3_1866_x16"' 
+_gen_build_env:4> ret=0 
+_gen_build_env:5> [[ 0 == 0 ]]
+_gen_build_env:7> source /tmp/zshojBAF6
+_gen_build_env:7> echo $'chip_cv180x=(cv1800b)\nchip_cv181x=(cv1812cp cv1812h cv1813h)\nchip_sg200x=(sg2000 sg2002)\nchip_cv=(cv1800b cv1812cp cv1812h cv1813h sg2000 sg2002)\nchip_sel=(cv1800b cv1812cp cv1812h cv1813h sg2000 sg2002)\nsubtype_sel=(palladium fpga asic)\ncv1800b_board_sel[0]="sophpi_duo_sd"\ncv1800b_board_info[0]=""\ncv1800b_board_ddr_cfg[0]="ddr2_1333_x16"\ncv1812h_board_sel[0]="wevb_0007a_emmc"\ncv1812h_board_info[0]=""\ncv1812h_board_ddr_cfg[0]="ddr3_1866_x16"\ncv1812h_board_sel[1]="wevb_0007a_spinand"\ncv1812h_board_info[1]=""\ncv1812h_board_ddr_cfg[1]="ddr3_1866_x16"\ncv1812h_board_sel[2]="wevb_0007a_spinor"\ncv1812h_board_info[2]=""\ncv1812h_board_ddr_cfg[2]="ddr3_1866_x16"\ncv1813h_board_sel[0]="wevb_0007a_emmc"\ncv1813h_board_info[0]=""\ncv1813h_board_ddr_cfg[0]="ddr3_1866_x16"\ncv1813h_board_sel[1]="wevb_0007a_spinand"\ncv1813h_board_info[1]=""\ncv1813h_board_ddr_cfg[1]="ddr3_1866_x16"\ncv1813h_board_sel[2]="wevb_0007a_spinor"\ncv1813h_board_info[2]=""\ncv1813h_board_ddr_cfg[2]="ddr3_1866_x16"\nsg2000_board_sel[0]="duo_sd"\nsg2000_board_info[0]=""\nsg2000_board_ddr_cfg[0]="ddr3_1866_x16"\nsg2000_board_sel[1]="wevb_sd"\nsg2000_board_info[1]=""\nsg2000_board_ddr_cfg[1]="ddr3_1866_x16"\nsg2002_board_sel[0]="duo_sd"\nsg2002_board_info[0]=""\nsg2002_board_ddr_cfg[0]="ddr3_1866_x16"\nsg2002_board_sel[1]="licheea53nano_sd"\nsg2002_board_info[1]=""\nsg2002_board_ddr_cfg[1]="ddr3_1866_x16"\nsg2002_board_sel[2]="licheervnano_sd"\nsg2002_board_info[2]=""\nsg2002_board_ddr_cfg[2]="ddr3_1866_x16"'
+/tmp/zshojBAF6:1> chip_cv180x=( cv1800b ) 
+/tmp/zshojBAF6:2> chip_cv181x=( cv1812cp cv1812h cv1813h ) 
+/tmp/zshojBAF6:3> chip_sg200x=( sg2000 sg2002 ) 
+/tmp/zshojBAF6:4> chip_cv=( cv1800b cv1812cp cv1812h cv1813h sg2000 sg2002 ) 
+/tmp/zshojBAF6:5> chip_sel=( cv1800b cv1812cp cv1812h cv1813h sg2000 sg2002 ) 
+/tmp/zshojBAF6:6> subtype_sel=( palladium fpga asic ) 
/tmp/zshojBAF6:7: cv1800b_board_sel: assignment to invalid subscript range
+/tmp/zshojBAF6:7> cv1800b_board_sel[0]=sophpi_duo_sd 
+/root/LicheeRV-Nano-Build/build/common_functions.sh:445> return 126
+build/cvisetup.sh:927> source /root/LicheeRV-Nano-Build/build/riscv_functions.sh
+build/cvisetup.sh:929> print_usage
+print_usage:2> printf '  -------------------------------------------------------------------------------------------------------\n'
  -------------------------------------------------------------------------------------------------------
+print_usage:3> printf '    Usage:\n'
    Usage:
+print_usage:4> printf '    (1)\33[94m menuconfig \33[0m- Use menu to configure your board.\n'
    (1) menuconfig - Use menu to configure your board.
+print_usage:5> printf '        ex: $ menuconfig\n\n'
        ex: $ menuconfig

+print_usage:6> printf '    (2)\33[96m defconfig $CHIP_ARCH \33[0m- List EVB boards($BOARD) by CHIP_ARCH.\n'
    (2) defconfig $CHIP_ARCH - List EVB boards($BOARD) by CHIP_ARCH.
+print_usage:7> /root/LicheeRV-Nano-Build/build/scripts/boards_scan.py --list-chip-arch
       ** sg200x ** -> ['sg2000', 'sg2002']
       ** cv181x ** -> ['cv1812cp', 'cv1812h', 'cv1813h']
       ** cv180x ** -> ['cv1800b']
+print_usage:8> printf '        ex: $ defconfig cv181x\n\n'
        ex: $ defconfig cv181x

+print_usage:9> printf '    (3)\33[92m defconfig $BOARD\33[0m - Choose EVB board settings.\n'
    (3) defconfig $BOARD - Choose EVB board settings.
+print_usage:10> printf '        ex: $ defconfig cv1813h_wevb_0007a_spinor\n'
        ex: $ defconfig cv1813h_wevb_0007a_spinor
+print_usage:11> printf '        ex: $ defconfig cv1812cp_wevb_0006a_spinor\n'
        ex: $ defconfig cv1812cp_wevb_0006a_spinor
+print_usage:12> printf '  -------------------------------------------------------------------------------------------------------\n'
  -------------------------------------------------------------------------------------------------------

then running:
defconfig sg2002_licheervnano_sd
getting:

defconfig sg2002_licheervnano_sd
+zsh:185> defconfig sg2002_licheervnano_sd
+defconfig:2> local chip_arch
+defconfig:3> local board
+defconfig:5> board=sg2002_licheervnano_sd 
+defconfig:6> chip_arch=+defconfig:6> /root/LicheeRV-Nano-Build/build/scripts/boards_scan.py --get-chip-arch --board_name sg2002_licheervnano_sd
+defconfig:6> chip_arch=sg200x 
+defconfig:9> [ sg200x '!=' '' ']'
+defconfig:10> _call_kconfig_script '' /root/LicheeRV-Nano-Build/build/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
+_call_kconfig_script:2> local ret script
+_call_kconfig_script:4> script='' 
+_call_kconfig_script:5> shift
+_call_kconfig_script:7> print_notice 'Run  function'
+print_notice:2> printf '\e[1;34;47m %s \e[0m\n' 'Run  function'
 Run  function 
+_call_kconfig_script:9> set -e
+_call_kconfig_script:10> cd /root/LicheeRV-Nano-Build/build
+_call_kconfig_script:11> /root/LicheeRV-Nano-Build/build/scripts/.py /root/LicheeRV-Nano-Build/build/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
_call_kconfig_script:11: no such file or directory: /root/LicheeRV-Nano-Build/build/scripts/.py
+_call_kconfig_script:14> ret=127 
+_call_kconfig_script:14> [ 127 -ne 0 ']'
+_call_kconfig_script:14> return 127
@scpcom
Copy link

scpcom commented Dec 30, 2024

The scripts may not be tested with zsh. Please try using bash as shell.

@ElevatedEuphoria
Copy link
Author

ElevatedEuphoria commented Jan 4, 2025

get a new error on bash using freebsd after doing all as said on readme.

the tip of new message:

make: "/root/LicheeRV-Nano-Build/build/Makefile" line 9: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 10: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 12: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 13: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 14: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 17: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 19: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 21: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 22: Variable/Value missing from "export"
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 24: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 26: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 38: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 39: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 40: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 42: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 43: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 44: Invalid line type
make: "/root/LicheeRV-Nano-Build/build/Makefile" line 45: Invalid line type

@scpcom
Copy link

scpcom commented Jan 4, 2025

Maybe you need a gnu make?
The build system is intended for Linux, the best way would be to create a VM/Container with a minimal Ubuntu (or Debian).
You can also use my script to install all requirements inside Debian/Ubuntu:
https://raw.githubusercontent.com/scpcom/LicheeRV-Nano-Build/refs/heads/develop/host/prepare-host.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants