Which model is the ARM that Red Pitaya uses?

Just about everything about Red Pitaya
Post Reply
Cong
Posts: 3
Joined: Thu Jun 18, 2015 5:05 pm

Which model is the ARM that Red Pitaya uses?

Post by Cong » Mon Jun 22, 2015 3:32 pm

Hi guys, I'm trying to cross compile a linux kernel model for Red Pitaya. But I was confused when I tried to prepare the compilation. It seems that I need to choose the correct config file. But there are so many different folders in linux/arch/arm/, which named machxxxxxx. Which is the right model for Red Pitaya? Thanks!

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Which model is the ARM that Red Pitaya uses?

Post by Nils Roos » Tue Jun 23, 2015 7:46 pm

The CPU cores in the ZYNQ chip on the Red Pitaya are ARM Cortex-A9 with FPU and NEON Engine.

The Red Pitaya sources include a custom kernel configuration template.

Cong
Posts: 3
Joined: Thu Jun 18, 2015 5:05 pm

Re: Which model is the ARM that Red Pitaya uses?

Post by Cong » Wed Jun 24, 2015 3:07 pm

Nils Roos wrote:The CPU cores in the ZYNQ chip on the Red Pitaya are ARM Cortex-A9 with FPU and NEON Engine.

The Red Pitaya sources include a custom kernel configuration template.
Thank you so much nils! I'm a newer to arm+linux. Now I'm trying to compile and run a kernel module in Red Pitaya. Could you give me some tips on how to do it? I found a tutorial, but there were some errors. Could you tell me if the process is correct for Red Pitaya? What I have tried is as followed:

1. Download Xilinx 3.9.0 from http://wiki.redpitaya.com/index.php?tit ... oper_Guide
2. Copy /linux-xlnx/arch/arm/configs/xilinx_zynq_defconfig to /linux-xlnx, and change the name to .config. (I did so because I thought the linux kernel in Red Pitaya is xilinx, is that right? From what you told me, it seems that I should use the rp_defconfig that you showed me, right? But to which folder should I copy it to? To the Xilinx folder that I downloaded or RedPitaya/OS/linux/? But there's no whole kernel in RedPitaya/OS/linux/.)
3. sudo make menuconfig
4. sudo make oldconfig
5. sudo make
6. sudo make bzImage
7. sudo make modules
8. sudo make modules_install
9. Create a hello.c and a Makefile in another folder:

Code: Select all

#include<linux/init.h> 
#include<linux/module.h> 
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
{
  printk(KERN_INFO " Hello World enter\n");
  printk(KERN_EMERG " ggggggggggg\n");
  return 0;
}

static void hello_exit(void)
{
  printk(KERN_INFO " Hello World exit....\n ");
  printk(KERN_EMERG " kkkkk....\n ");
}

module_init(hello_init);
module_exit(hello_exit);

MODULE_AUTHOR("Song Baohua");
MODULE_DESCRIPTION("A simple Hello World Module");
MODULE_ALIAS("a simplest module");

Code: Select all

ifneq ($(KERNELRELEASE),)
obj-m := hello.o 
else
KERNELDIR := /linux-xlnx/
PWD := $(shell pwd)
default:
    $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
clean:
    rm *.o *.ko
10. Copy hello.ko to Red Pitaya.
11. Try to load this kernel module with #insmod ./hello.ko, but it cannot be loaded.

Thank you so much for your help!

Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: Which model is the ARM that Red Pitaya uses?

Post by Arnold » Wed Jun 24, 2015 3:55 pm

i would recommend to use pavels project for redpitaya, it builds the whole ecosystem:
https://github.com/pavel-demin/red-pitaya-notes

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 30 guests