04-02-2015 07:18 AM
Hi,
I have installed requirements to my virtual machine (64bit ubuntu 12.04);
apt-get update && apt-get upgrade
apt-get install build-essential
apt-get install squashfs-tools
Then downloaded the kernel source for the ARMV7-A (http://download.ni.com/ni-linux-rt/src/) and applied patches successfully, I have exactly seen the output you showedat the previous post.
Downloaded the toolchain for ARMV7-A from http://www.ni.com/download/labview-real-time-module-2014/4957/en/ and followed these steps:
chmod +x oecore-x86_64-armv7a-vfp-neon-toolchain-2.0.sh
./oecore-x86_64-armv7a-vfp-neon-toolchain-2.0.sh
Enter the target directory for SDK (default: /usr/local/oecore-x86_64):
Extracting SDK...done
Setting it up...done
SDK has been successully set up and ready to be used.
And, I have added the missing modules t configuration file (ni_zynq_defconfig)
CONFIG_XFRM_USER=y
CONFIG_NET_KEY=y
CONFIG_IPV6_MULTIPLE_TABLES=y
export ARCH=arm
export CROSS_COMPILE=/usr/local/oecore-x86_64/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi/
make ni_zynq_defconfig
/home/ugurcil/Desktop/PMU/linux-nizynq-2014/scripts/basic/Makefile:21: warning: ignoring old commands for target `scripts/basic/fixdep'
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
And finally I have tried "make ni-pkg" and received these errors
root@ugurcil-VirtualBox:/home/ugurcil/Desktop/PMU/linux-nizynq-2014# make ni-pkg
make: /usr/local/oecore-x86_64/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi/gcc: Command not found
scripts/Makefile.host:118: warning: overriding commands for target `scripts/basic/fixdep'
/home/ugurcil/Desktop/PMU/linux-nizynq-2014/scripts/basic/Makefile:21: warning: ignoring old commands for target `scripts/basic/fixdep'
scripts/kconfig/conf --silentoldconfig Kconfig
make: /usr/local/oecore-x86_64/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi/gcc: Command not found
make[1]: *** No rule to make target `ni-pkg'. Stop.
make: *** [ni-pkg] Error 2
Do you have any idea about this situation?
Best
Ugur
04-02-2015 10:00 AM
First,
cilugur wrote:
...
And, I have added the missing modules t configuration file (ni_zynq_defconfig)
CONFIG_XFRM_USER=y
CONFIG_NET_KEY=y
CONFIG_IPV6_MULTIPLE_TABLES=y
How did you make these changes? Did you use something like "menuconfig"? Don't just add them to the .config/nati_zynq_defconfig file.
Next,
cilugur wrote:
...
export ARCH=arm
export CROSS_COMPILE=/usr/local/oecore-x86_64/sysroots/armv7a-vfp-neon-nilrt-linux-gnu eabi/
This is not correct. Read up a bit more on how to cross-compile kernels for an idea on how to use the CROSS_COMPILE variable. For our distributed tools, you want to use something like .../sysroots/x86_64-nilrtsdk-linux/usr/bin/armv7a-vfp-neon-nilrt-linux-gnueabi/arm-nilrt-linux-gnueabi-
Keep in mind, you are way, way off of what NI expects that you'll do with our controllers, and as such there's no support. I'm just helping out since it's interesting. I just wanted to make sure to set expectations correctly.
I just checked by running a build locally, and it works fine. I'll post the commands I used (with some parts redacted as they'll be different on your system) but I highly recommend you take the time to learn about the commands you are running, not just blindly running them without understanding them!
~/temp/linux $ wget http://download.ni.com/ni-linux-rt/src/linux-nizynq-2014.tar.gz
~/temp/linux $ tar xzf linux-nizynq-2014.tar.gz
~/temp/linux $ cd linux-nizynq-2014/
~/temp/linux/linux-nizynq-2014 $ wget http://download.ni.com/ni-linux-rt/src/ni_image_creation_patches.tar.gz
~/temp/linux/linux-nizynq-2014 $ tar xzf ni_image_creation_patches.tar.gz
~/temp/linux/linux-nizynq-2014 $ patch -p1 < 0001-builditb-Generate-needed-files-for-NI-Zynq-boards.patch
~/temp/linux/linux-nizynq-2014 $ patch -p1 < 0002-ni-dts-Add-device-codes-remove-proto-dts.patch
~/temp/linux/linux-nizynq-2014 $ patch -p1 < 0003-buildnipkg-Rename-builditb-to-be-more-general.patch
~/temp/linux/linux-nizynq-2014 $ export ARCH=arm
~/temp/linux/linux-nizynq-2014 $ export CROSS_COMPILE=$PATH_TO_SYSROOTS/x86_64-nilrtsdk-linux/usr/bin/armv7a-vfp-neon-nilrt-linux-gnueabi/arm-nilrt-linux-gnueabi-
~/temp/linux/linux-nizynq-2014 $ make ni_zynq_defconfig
// Use make menuconfig to make your changes
~/temp/linux/linux-nizynq-2014 $ make ni-pkg
~/temp/linux/linux-nizynq-2014 $ ls ni-install/arm/
boot headers lib
04-07-2015 07:12 AM
Hi,
Firstly, thanks for your all replies, I really appreciate your helps. And I know you are helping me although you dont have to.. So thank you again and again...
I have compiled the kernel with necessary modifications.
root@ugurcil-VirtualBox:/home/ugurcil/Desktop/PMU/linux-nizynq-2014# export ARCH=arm
root@ugurcil-VirtualBox:/home/ugurcil/Desktop/PMU/linux-nizynq-2014# export CROSS_COMPILE=/usr/local/oecore-x86_64/sysroots/x86_64-nilrtsdk-linux/usr/bin/armv7a-vfp-neon-nilrt-linux-gnueabi/arm-nilrt-linux-gnueabi-
root@ugurcil-VirtualBox:/home/ugurcil/Desktop/PMU/linux-nizynq-2014# cp arch/arm/configs/ni_zynq_defconfig .config
root@ugurcil-VirtualBox:/home/ugurcil/Desktop/PMU/linux-nizynq-2014# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/mconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig
#
# configuration written to .config
#
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
root@ugurcil-VirtualBox:/home/ugurcil/Desktop/PMU/linux-nizynq-2014# make ni-pkg
And copied the kernel image, modules, and header squashfs to my cRIO according to instructions on the readme file (https://github.com/ni/nilrt/blob/master/KERNEL_SOURCE.txt)
Then I rebooted the target (cRIO) and I can ping it and also connect via browser
But I cannot establish an ssh connection. When I tried to connect, I receive this error:
I have tried to figure out and solve the problem but I could not.
Any help would be appreciated..
Thank in advance.
04-07-2015 09:56 AM
Hmm, that's a new one on me. I'd recommend enabling serial console and using that to get a better idea of what's going on in the system.