element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Forum Board device tree.
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RIoTboard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 42 replies
  • Subscribers 23 subscribers
  • Views 4092 views
  • Users 0 members are here
  • device
  • tree
Related

Board device tree.

Former Member
Former Member over 11 years ago

It would be nice if someone can post or point for riotboard device tree file.

 

Just the .dts file that supersedes/overloads the existing arch/arm/boot/dts/imx6qdl.dtsi in linux kernel.

... a kernel defconfig file would be also appreciated.

 

Pablo.

---

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    0 Former Member over 11 years ago

    It's my understanding that the supported linux kernel is the 3.0.35 version, this is before devicetree came to the arm architecture.

     

    I've not been able to find anything beyond the kernels at https://github.com/embest-tech/linux-imx as mentioned in the users manual.  So it's likely there simply isn't a dts for this board.

     

    Depends on how they've configured the default kernel, but you may be able to get the config used by looking at the contents of /proc/config.gz

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Well this helps a little bit but it is not really the way it should be done.

    iMX6 has multifunctional IOs and each board use them in different ways. At

    the given pointer it is rather difficult to know how io muxing has been

    done.

    If you have a look at similar boards like "wandboard" you will see that

    same IOs are not used for the same functions.

    Official linux kernel release provides already support for Wandboard,

    Olinuxino, Zedboard and other equivalent boards based on A10, A13, A20.

    I do not like the idea of having a cooked kernel for this one, I prefer to

    have the freedom of doing all from scratch.

     

    I asked the question just not to do the work twice. Apparently nobody has

    done the dts file for this board yet. I'll try to get it done based on

    latest kernel release. The compiled kernel should be the same for all iMX6

    platforms, the only thing that should change is the device tree for each

    specific board this is the trend to follow on ARM Linux kernels now and

    forget on specific mach-xxxx directories.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    When you will compile the kernel with suitable configs options you will have the floating point unit operational. The key CONFIG_xxx options are :

     

    CONFIG_VFP=y
    CONFIG_VFPv3=y
    CONFIG_NEON=y

     

    ... and the Makefile will set the flags as convenient... ...you do not need to do anything else. When building packages and root file system libraries (typically with .config.in files or other lib build tools) normally the build scripts will query your kernel and will set the proper flags to compile and use the VFP. As simple as that.

     

    Pablo.

    ---

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Thanks Pablo!

    I haven't build a kernel before so Ill be learning on the go for this one. Any help you can give will be appreciated.

    Thanks

    Marius

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    I started a discussion regarding this on google+ at https://plus.google.com/106211083737445953476/posts/ahYHhxRZt6a

    Do you know what is required to get this into the mainline kernel as suggested by Peter?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    OK then let's do it from scratch then.

     

    First : get the cross compile toolchain.

    You have several choices. Build the toolchain from scratch ... or take one already "baked".

    I advise you to take the later one. I guess that your host system will be a desktop PC (i686 or similar) running Linux, right ?

    Then, go to for example to http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/

    and download - "Download the GNU/Linux Release" for ARM processors.

    You need to register to get a download link (it will be sent by mail). So use your real mail or a secondary mail to get it.


    Install it to your home directory. It should be ".tar.bz2" file. Just

    tar xvjf arm-2013.11-33-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

     

    OK the toolchain for cross compiling should be fine.

     

    Second : The kernel sources.

     

    wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.5.tar.gz

     

    Well, If you want to get this into the kernel main line you need to spend some time reading in kernel.org how to proceed. It is not a simple process. I personally do not have time to do it. But of course, this is open source you can submit by yourself if you are really motivated. In that case I suggest you to use git to clone the kernel repository and generate a patch in order to submit the change. You need to be familiar with git and how it works and follow the rules of kernel repository...

     

    So, either you use "wget" to do something locally on your system or you use "git" to clone the kernel repository.

     

    I need to go now. Make a reply to this when you are ready and I'll continue the instructions.

     

    Pablo.

    ---

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Howdy Pablo,

    I managed to get the new kernel compiled on the RIOT itself with your config and dts last night before I read your response. However what I do not know is what to do next. I ran the make install as instructed on kernel.org, however it hasn't made the RIOT actually boot the new kernel. I have all the images ( vmlinuz-3.13.5, initrd.img-3.13.5, System.map-3.13.5, etc) in the /boot directory and even built a new uImage from the compiled kernel, however Im not sure what to do next. Ive never played with the linux boot process so am learning on the fly.

    Cheers,

    Marius

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    OK Marius,

     

    I see, we may skip some steps here. So you have compiled the kernel. I assume that you paid attention to set ARCH=arm CROSS_COMPILE=<toolchain/bin/prefix-> properly when you compiled the kernel and also that you have compiled the DTS file :

    make ARCH=arm CROSS_COMPILE=...  imx6sdl-riotboard.dtb

    Right ?

     

    The kernel config file that I sent was configured to use an appended device tree. Therefore there is one essential step that I assume you also did.

    (I'm taking the zImage )

    cat   zImage   imx6sdl-riotboard.dtb   > zImage_dtb

     

    This "cat" command is essential to get your kernel boot with RIoT working.

    Assuming then that you have the "zImage_dtb" lets say at /boot/ directory :

     

    Now there are two things to take care about. The bootloader (u-boot) and the file system.

    It is the bootloader that it is going to load the kernel in memory (in the DDR) and then execute.

    Obviously if you do not tell the bootloader where the kernel is it is not going to guess it by its own.

     

    To do so, it depends on where you intend to boot.

    Let's use the SD card interface (not the uSD). In the RIoT official deliveries (Linux OS) I think I saw a "u-boot-xxx.bin" image (sorry I'm not at home and I have limited access to the net, I'm just writing by heart). You need to prepare a SD card and make 2 partitions.

    Using fdisk, make 2 partitions. First partition 10Mbytes should be enough and the rest for second partition (Linux filesystem partition).

    Usually you will see the SD card as /dev/sd<letter> (but it depends on your host).

    fdisk /dev/sd<letter>

    (Be careful do not mistake on the device <letter> otherwise you may lose a hard disk or something else).

     

    Once you made the partitions make a ext4 file system on the second partition :

    mkfs.ext4 -L "ROOTFS" /dev/sd<letter>2

    (Again be careful to choose the right device /dev/...).

     

    Write the bootloader :

    dd if=u-boot-xxx.bin of=/dev/sd<letter>

    (No need a number after <letter>).

     

    Then mount the ROOTFS partition :

    mkdir /mnt/rootfs

    mount  /dev/sd<letter>2  /mnt/rootfs

     

    Then in /mnt/rootfs you just copy (untar) your favorite Linux 3.x ARM compatible file system. Debian, Archlinux (ARM), or build your own (but I do not think it is worth doing so)...

     

    Then replace the kernel where ever it is (normally at /mnt/rootfs/boot/). Copy your "zImage_dtb" there.

     

    ... and to be honest you should also install the modules "*.ko" that were compiled with the kernel and also the headers. (There is an install target for that in the Kernel Makefile, ... you need some reading because I do not remember very well).

     

    Your SD is ready. Well nearly because I'm not sure the u-boot provided has the right bootargs variable set... but we can instruct that by hand. Let's ensure first that our Kernel and filesystem is OK and we will rework the u-boot later.

     

    Unpower the RIoT board and insert your SD card, set the boot switches in the right position to boot from SD card.

     

    U-boot provided is set to wait about 5 seconds before loading the kernel. Within this 5 seconds a key press will stop the process and give you a kind of command line prompt.

    I forgot to mention that the console I'm using is on UART2.

     

    Are you able to connect through UART2 ?

    Do you have the material to do so, FTDI, or whatever ?

     

    Tell me if you need instructions to get the console on UART2.

     

    Pablo.

    --

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Howdy Pablo,

    I probably missed a few steps in my compilation. I grabbed all the source from git and put it onto an sd card on the riot board. Then copied the dts into the directory with all the other dts files, copied your config file over the .config and then made the whole kernel as described at

    FAQ/KernelCompilation - Linux Kernel Newbies

    This may not have built what you have described though. Ill have another play around today, but will be out of action for the next few days so will come back to it next week.

    Cheers,

    Marius

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Howdy,

    I thought that by dropping the DTS file into the dts directory the build process would pick it and compile it. It did not. so I have tried to compile it manually however whenever I get an error on the #include when I run 'dtc imx6sdl-riotboard.dts'

    Do you know what I am doing wrong?

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Pablo Madewish wrote:

    It seemed to work well, "selsinork" should not be worried : there was no smoke coming out from the board ;-p !

    Awww..  you've spoiled all my fun image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    put the dts into arch/arm/boot/dts in your kernel source tree and then add a line to the Makefile in that directory under the "dtb-$(CONFIG_ARCH_MXC) +=" line where you see something like

     

            imx6dl-sabresd.dtb \
            imx6dl-wandboard.dtb \

     

    just change it to

     

            imx6dl-sabresd.dtb \

            imx6sdl-riotboard.dtb \
            imx6dl-wandboard.dtb \

     

    then just make dtbs again to get the compiled file

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    put the dts into arch/arm/boot/dts in your kernel source tree and then add a line to the Makefile in that directory under the "dtb-$(CONFIG_ARCH_MXC) +=" line where you see something like

     

            imx6dl-sabresd.dtb \
            imx6dl-wandboard.dtb \

     

    just change it to

     

            imx6dl-sabresd.dtb \

            imx6sdl-riotboard.dtb \
            imx6dl-wandboard.dtb \

     

    then just make dtbs again to get the compiled file

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube