Trying to build linux kernal with the HSRdriver enabled

Hello ,

i am getting error , Followed the setps as mentioned in HSR_demo.pdf

cytech@ubuntu:~/Downloads/rzn1_linux$ make rzn1_defconfig
***
*** Can't find default configuration "arch/x86/configs/rzn1_defconfig"!
***
scripts/kconfig/Makefile:104: recipe for target 'rzn1_defconfig' failed
make[1]: *** [rzn1_defconfig] Error 1
Makefile:534: recipe for target 'rzn1_defconfig' failed

Please help in in solving the error

with regards

Chandan Kumar Sabat

  • I don't really know anything about that RZ/N1 code, but the fact that your error message has "arch/x86/" tells me that you did not set your ARCH to build for ARM before you ran make.

    As in....

    $ export ARCH=arm

    $ make rzn1_defconfig

  • hello chris, with you suggestion the command got executed.  but i am getting another error as below   make LOADADDR=80008000 uImage
                                                                                                                                                                               

  • I don't see any error message

  • I AM NOT ABLE TO PUT THE MESSAGE

  • cytech@ubuntu:~/Downloads/rzn1_linux$ make LOADADDR=80008000 uImage
    CC kernel/bounds.s
    gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
    gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
    gcc: error: unrecognized command line option ‘-mlittle-endian’
    gcc: error: unrecognized command line option ‘-mfpu=vfp’
    Kbuild:21: recipe for target 'kernel/bounds.s' failed
    make[1]: *** [kernel/bounds.s] Error 1
    Makefile:1103: recipe for target 'prepare0' failed
    make: *** [prepare0] Error 2

  • cytech@ubuntu:~/Downloads/rzn1_linux$ make rzn1_defconfig
    #
    # configuration written to .config
    #
    cytech@ubuntu:~/Downloads/rzn1_linux$ make menuconfig
    scripts/kconfig/mconf Kconfig


    *** End of the configuration.
    *** Execute 'make' to start the build or try 'make help'.

    cytech@ubuntu:~/Downloads/rzn1_linux$

  • This looks like your CROSS_COMPILER is not set up correctly because you are using the gcc from your host machine. (your PC). I would go back and check your instructions again because none of this looks correct.

  • Please guide me the steps to resolve the issue. i followed the RZ/N1 Liniux user manual also to set up cross -compiler.

  • hello chris, can you please help me on this .

    i tried with build root also as suggested by carl

    We have a script-package based on file BUILD.SH. Should make things much easier for you; without Yocto.. Please check it out.

    Go to, and download
    https://github.com/renesas-rz/rzn1_linux-4.19_bsp

    Unzip rzn1_linux_bsp
    $cd ~/rzn1_linux_bsp

    The first time you build in a directory you should do (If you want git; strongly recommended!)
    $git init
    $./build.sh config

    Set root file system defaults for RZ/N.
    $./build.sh buildroot rzn1_defconfig

    To add something you want to root file system (RFS) but you can use default for now.
    $./build.sh buildroot menuconfig

    To add your own files to the linux root file system, put them in.
    $mkdir output/buildroot-2017.02/output/rootfs_overlay
    You must create this directory in order to build, even if empty.

    Build root file system
    $./build.sh buildroot

    $./build.sh kernel rzn1_defconfig
    Exit and save. After this your configuration will be in the local .config file, and you will subsequently only need do the standard
    $./build.sh kernel menuconfig

    If you need to, change your kernel the way you want it (default is fine for the kernel, and you really should start out using the binary from the DVD).
    $./build.sh kernel uImage

    This is all documented. PLEASE SEE THE DOC folder for more details on doing all sorts of things, like loading the RFS to an SD-card and booting f

     

    i am getting stuck at below ::

    cytech@ubuntu:~/Downloads/rzn1_linux-4.19_bsp-rzn1-stable-v4.19$ ./build.sh buildroot
    ls: cannot access '*gnueabi*-gcc': No such file or directory
    CROSS_COMPILE =
    /home/cytech/Downloads/rzn1_linux-4.19_bsp-rzn1-stable-v4.19
    Build Environment set
    ============== Building buildroot ==============
    >>> toolchain-external-custom  Configuring
    Cannot execute cross-compiler '/home/cytech/Downloads/rzn1_linux-4.19_bsp-rzn1-stable-v4.19/output/buildroot-2019.02.6/output/host/opt/ext-toolchain/bin/arm-linux-gnueabihf-gcc'
    package/pkg-generic.mk:228: recipe for target '/home/cytech/Downloads/rzn1_linux-4.19_bsp-rzn1-stable-v4.19/output/buildroot-2019.02.6/output/build/toolchain-external-custom/.stamp_configured' failed
    make[1]: *** [/home/cytech/Downloads/rzn1_linux-4.19_bsp-rzn1-stable-v4.19/output/buildroot-2019.02.6/output/build/toolchain-external-custom/.stamp_configured] Error 1
    Makefile:84: recipe for target '_all' failed
    make: *** [_all] Error 2
    ============== Buildroot Build failed. Exiting build script. ==============

  • It built OK for me.

    This was my procedure.

    $ git clone https://github.com/renesas-rz/rzn1_linux-4.19_bsp

    $ cd rzn1_linux-4.19_bsp

    $ ./build.sh config

    $ ./build.sh buildroot

    Chris

  • Any version of linux it depend