31 Replies Latest reply on Sep 17, 2014 3:05 PM by radiatortwo

    Linux on RIoT

      Yep folks, it's possible to have a current linux kernel on the RIoTboard

       

      IMG_2413.JPG

      IMG_2414.JPG

      IMG_2415.JPG

       

      Oh, and I really, really hate shiny screens

        • Re: Linux on RIoT
          dxtn

          How did you get it?

            • Re: Linux on RIoT
              radiatortwo

              Selsinork did some great work on implementing the board in the Kernel sources.

               

              You can browse through his git repository and get the sources to compile them yourself.

              https://github.com/selsinork

               

              Also in this thread theres some info what has been done by him in the sources.

              Board device tree.

                • Re: Linux on RIoT

                  Most of the stuff is already there as there are many other boards based on the i.MX6 series.. I've just added the final layer of glue to bring together a lot of other peoples excellent work.

                  Sadly, not all of the pieces are in released versions of the kernel or u-boot just yet, so you do have to be prepared for a bit of work compiling stuff yourself.

                   

                  I hope to have enough bits available on github later this week and when that's done I'll write some blog posts covering building and installing u-boot, the kernel, and hopefully one of Robert Nelsons minimal Debian filesystems. If we can get to that point it should be possible to install the rest.

                   

                  Unfortunately there doesn't seem to be a way to upload a large image file here, so it's unlikely I'll be able to provide something that can simply be written to an SD card for people who're not comfortable building everything themselves.

                    • Re: Linux on RIoT

                      Oh, and if there's anyone able to build the pieces themselves, testing is always appreciated.  I'm sure there'll be something I'll miss...

                        • Re: Linux on RIoT
                          radiatortwo

                          If you want I could provide some space for the image on my server.

                          No website just direct linking to files.

                           

                          I am also trying to compile the stuff myself. Maybe create an image later if it works.
                          But I think I´ll wait till you describe it later. Don´t have that much time recently.

                            • Re: Linux on RIoT
                              creatron

                              I was surprised that I could manage to use processes to get Debian running.  All is well except that I do get the demx image of u-boot on the LCD8000-97C screen but not the Debian console. I could however access the RIot via the TTL console and SSH.

                              U-boot detects the display..

                              => printenv

                                 baudrate=115200

                                 bootargs=console=ttymxc1,115200 init=/init nosmp video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off fbmem=10M vmalloc=400M

                                 bootcmd=for dtype in ${dtypes} ; do for disk in ${bootord} ; do if test ${fail} -eq 0; then ${dtype} dev ${disk} ;if run lbs; then if run evi; 

                                 bootdelay=2

                                 bootord=0 1 2

                                 bootpart=1

                                 console=ttymxc1

                                 dtypes=mmc

                                 ethact=FEC

                                 ethprime=FEC

                                 evi=env import -t ${scriptaddr} ${filesize} ;

                                 fail=0

                                 fdt_addr_r=0x11000000 

                                 fdt_file=imx6dl-riotboard.dtb

                                 kernel_addr_r=0x12000000

                                 lbs=load ${dtype} ${disk}:${bootpart} ${scriptaddr} /bootscript ;

                                 loadaddr=0x12000000

                                 scriptaddr=0x10008000

                              I also save the following in U-boot

                              U-Boot >>

                                 setenv bootargs console=ttymxc1,115200 init=/init nosmp video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off vmalloc=400M androidboot.console=ttymxc1    androidboot.hardware=freescale

                              U-Boot >> saveenv

                               

                              What else need to done ? (I used step 6 to get the image, and create the uSD card on Linux)

                              Thanks

                                • Re: Linux on RIoT

                                  If you're using a 3.15+ kernel with my devicetree then you can't (easily) use any LVDS connected display. There are a couple of reasons for this.

                                   

                                  1. there's an issue with the imx-drm display driver (or more correctly with the selection of which clock to use for the IPU) that prevents the ability to have both HDMI & LVDS enabled at the same time. You have to chose either HDMI or LVDS and build a separate, different, devicetree for each configuration.

                                  2. There's a problem related to ethernet interrupts in low power modes that's best resolved by using GPIO6 to to mirror interrupts in that mode. However GPIO6 is used by the touchscreen I2C interface connected to the LVDS interface.

                                   

                                  As there's no driver for the particular touchscreen controller used on LCD8000-97C in the upstream kernels, and due to the relative cost of the display, I deemed it to be an acceptable compromise to use GPIO6 in order to provide reliable ethernet.

                                   

                                  On the side of not being able to have both LVDS & HDMI in the devicetree at the same time, it's mostly a case of waiting until the driver issue is resolved before we can enable it.

                                   

                                  Also, somewhat unfortunately, saving the environment is probably not the best of ideas. There's arguably a flaw in the way u-boot handles the environment - it saves it to eMMC. This means that even if you use a different SD card with a different OS you'll get the bootargs that were previously saved to eMMC. This can be problematic for many reasons, but take the example where you want one SD card that uses HDMI and a different one that uses LVDS it becomes difficult to do without manually changing the environment saved into eMMC every time you switch.

                                   

                                  Let me know if you do want a LVDS only setup and I'll build a devicetree for you with that functionality as well as some instruction on how to clear the saved environment and the changes you'll need for /bootscript to accomplish it.

                                    • Re: Linux on RIoT
                                      creatron

                                      Many thanks for the quick and prompt reply.. I am only interested in a LVDS only setup, and appreciate your willingness to help.

                                       

                                      Thanks you

                                        • Re: Linux on RIoT

                                          Go here https://drive.google.com/folderview?id=0B-WIc2IIJv2FQURpR2V0MkhhUjg#list and download the lvds version of the kernel.

                                          Copy it onto the RIoTboard and then extract it with

                                           

                                          tar xf linux-kernel-imx-lvds-3.15.0-armv7l-101.txz -C /

                                          then reboot.

                                          When u-boot prompts, press a key to break into the u-boot shell and type the following.

                                           

                                          mmc dev 2

                                          mmc erase 300 1

                                          now type 'reset' or push the reset button.

                                           

                                          You should see something like the following

                                           

                                          U-Boot 2014.07-rc3-00065-ge606136-dirty (Jun 14 2014 - 13:33:50)

                                           

                                          CPU:   Freescale i.MX6SOLO rev1.1 at 792 MHz

                                          Reset cause: WDOG

                                          Board: RIoTboard

                                          I2C:   ready

                                          DRAM:  1 GiB

                                          MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2

                                          *** Warning - bad CRC, using default environment

                                           

                                          auto-detected panel LCD8000-97C

                                          Display: LCD8000-97C (1024x768)

                                          In:    serial

                                          Out:   serial

                                          Err:   serial

                                          Net:   FEC [PRIME]

                                           

                                          what we're looking for is the highlighted line that tells us that we're using the compiled in environment rather than one saved to eMMC.

                                           

                                          When the board has booted, edit /bootscript and find this line

                                          bargs=setenv bootargs console=${console},115200n8 rootwait root=PARTUUID=${btpart}

                                          change it to look like this

                                          bargs=setenv bootargs console=${console},115200n8 rootwait root=PARTUUID=${btpart} enable_wait_mode=off

                                          disabling wait mode solves the ethernel interrupt problem at the expense of some extra power consumption.

                                           

                                          The general idea here is not to edit any environment settings within u-boot, and never to use saveenv. Instead change the settings in /bootscript which means they only affect the device you're currently booted from, instead of every possible place you could boot from.

                                           

                                          For anyone who may be interested, the change to the devicetree that allows the LCD8000-97C to work is here https://github.com/selsinork/linux/commit/e9bce885d404ce86525dbab36faf84015bc53aac

                                           

                                          The change also re-enables the I2C controller connected to the LVDS connector. However this won't get the touch-screen working as there's no driver for tha chip in the upstream kernel at this point in time. The intent is only to give the option of a userspace driver or to allow for someone to forward port the 3.0.35 driver as I don't have time to even attempt it right now.

                                           

                                          Good luck, and do let us know how you get on with it!

                                            • Re: Linux on RIoT
                                              creatron

                                              You are a star!!, cant wait to try it.

                                              • Re: Linux on RIoT
                                                creatron

                                                Yip, it works.. I now try to port the touch screen driver.

                                                Zillions of thanks

                                                  • Re: Linux on RIoT

                                                    Have a look here https://github.com/embest-tech/linux-imx/commit/9bc0f9cee6fc6a1939de55324a67807ab962f2b3 that commit includes a port of the touchscreen driver to the 3.10.17 Freescale BSP by the Embest folks who designed both the RIoTboard and the LCD8000-97C.

                                                    How close it is to being useable on 3.16+ I don't know, but it's certainly much closer and so should be easier to forward port than the version from 3.0.35.

                                                      • Re: Linux on RIoT

                                                        Hmm.. having looked a bit more at the touchscreen driver, it includes four binary-only objects (in addition to what appears to be firmware), so it's unclear if it'll be possible to do much with the driver.

                                                        It's certainly not suitable for submission to mainline in this state, it'd never be accepted.  It also leaves us in the position where a trivial change elsewhere may break the driver, as we don't know what these four binary objects depend on we can't predict what may break them.  Various of the files also proclaim to be GPL2, but with the binary bits the total can't be GPL which puts us in an akward position - we may not be able to legally distribute a compiled kernel with this included.

                                                         

                                                        All told, the sum of the problems this introduces means I'm not willing to waste any time on it myself. Pity, as the LCD8000-97C otherwise seems to be a fairly decent screen.

                                                          • Re: Linux on RIoT
                                                            creatron

                                                            I tried to get hold of the Selsinork linux kernel source, but the article has been removed from the Element14 web, I made a backup and followed the steps in

                                                             

                                                            Part 3 Building mainline Linux kernel for RIoTboard.doc

                                                             

                                                            1. git clone -b riotboard-3.15 git://github.com/selsinork/linux.git -- does not exist anymore

                                                            fatal: Remote branch riotboard-3.15 not found in upstream origin

                                                            Then I tried

                                                            2.

                                                            git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

                                                            cd linux

                                                            git remote add sgo git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git

                                                            git fetch sgo

                                                            git checkout -b imx v3.15

                                                            git merge sgo/for-next

                                                            git remote add riot git://github.com/selsinork/linux.git

                                                            git fetch riot

                                                            git merge riot/riotboard-3.15

                                                            gerrie@opensusehp1310:~/riot/debian/kernel> git clone -b riotboard-3.15 git://github.com/selsinork/linux.git

                                                            Cloning into 'linux'...

                                                            fatal: Remote branch riotboard-3.15 not found in upstream origin

                                                            gerrie@opensusehp1310:~/riot/debian/kernel> git clone -b riotboard-3.15 git://github.com/selsinork/linux.git

                                                            Cloning into 'linux'...

                                                            fatal: Remote branch riotboard-3.15 not found in upstream origin

                                                            gerrie@opensusehp1310:~/riot/debian/kernel> git clone -b riotboard-3.15

                                                            You must specify a repository to clone.

                                                             

                                                            usage: git clone [options] [--] <repo> [<dir>]

                                                             

                                                                -v, --verbose         be more verbose

                                                                -q, --quiet           be more quiet

                                                                --progress            force progress reporting

                                                                -n, --no-checkout     don't create a checkout

                                                                --bare                create a bare repository

                                                                --mirror              create a mirror repository (implies bare)

                                                                -l, --local           to clone from a local repository

                                                                --no-hardlinks        don't use local hardlinks, always copy

                                                                -s, --shared          setup as shared repository

                                                                --recursive           initialize submodules in the clone

                                                                --recurse-submodules  initialize submodules in the clone

                                                                --template <template-directory>

                                                                                      directory from which templates will be used

                                                                --reference <repo>    reference repository

                                                                -o, --origin <name>   use <name> instead of 'origin' to track upstream

                                                                -b, --branch <branch>

                                                                                      checkout <branch> instead of the remote's HEAD

                                                                -u, --upload-pack <path>

                                                                                      path to git-upload-pack on the remote

                                                                --depth <depth>       create a shallow clone of that depth

                                                                --single-branch       clone only one branch, HEAD or --branch

                                                                --separate-git-dir <gitdir>

                                                                                      separate git dir from working tree

                                                                -c, --config <key=value>

                                                                                      set config inside the new repository

                                                             

                                                            gerrie@opensusehp1310:~/riot/debian/kernel> git clone -b riotboard-3.15 git://github.com/selsinork/linux.git

                                                            Cloning into 'linux'...

                                                            fatal: Remote branch riotboard-3.15 not found in upstream origin

                                                            gerrie@opensusehp1310:~/riot/debian/kernel> git clone ://github.com/selsinork/linux.git

                                                            Cloning into 'linux'...

                                                            fatal: I don't handle protocol ''

                                                            gerrie@opensusehp1310:~/riot/debian/kernel> git clone riotboard-3.15 git://github.com/selsinork/linux.git

                                                            fatal: repository 'riotboard-3.15' does not exist

                                                            gerrie@opensusehp1310:~/riot/debian/kernel> git clone git://github.com/selsinork/linux.git

                                                            Cloning into 'linux'...

                                                            remote: Counting objects: 3651418, done.

                                                            remote: Compressing objects: 100% (602059/602059), done.

                                                            remote: Total 3651418 (delta 3019689), reused 3651418 (delta 3019689)

                                                            Receiving objects: 100% (3651418/3651418), 1.01 GiB | 449.00 KiB/s, done.

                                                            Resolving deltas: 100% (3019689/3019689), done.

                                                            Checking connectivity... done

                                                            Checking out files: 100% (47410/47410), done.

                                                            3. I then tried

                                                            For the really impatient who have skipped ahead, you can download a tarball

                                                            here https://github.com/selsinork/linux/archive/riotboard-3.15.tar.gz, but this also does not exist any more.

                                                            Thanks

                                                              • Re: Linux on RIoT
                                                                radiatortwo

                                                                You  shouldn´t be looking into selsinorks stuff anymore.
                                                                He deleted everything Riotboard related.

                                                                 

                                                                If you really want to compile the mainline kernel yourself then you only have to use the mainline kernel from linus torvalds.

                                                                All changes to get it running on the riotboard are integrated.

                                                                If really needed I could write a blog entry on how to do this.


                                                                But theres actually a more recent kernel officially from embest available, that is worked on.

                                                                 

                                                                You can get it and much more here: RIoTboard

                                                                  • Re: Linux on RIoT
                                                                    creatron


                                                                    Embest only has an very very old linux, so old that you cannot install Ubuntu software after you installed the image, (apt refer to a repository that was removed by ubuntu, some two months ago I still could install software with apt-get, but Ubuntu for some reason destroy itself and the latest install from Embest has this problem).

                                                                     

                                                                    The guys from EMBEST don't even response to your emails,  indeed I send mail to

                                                                     

                                                                    yangkun <yangkun@embedinfo.com>, and
                                                                    zhangyl <zhangyl@embedinfo.com>


                                                                    With no response..


                                                                    zhangyl <zhangyl@embedinfo.com> from Embest  is very help full, but she only forward it to some else that is not interested

                                                                     

                                                                    I used Selsinork stuff and it works supper, he really knows what he is doing, and he was indeed very help full.

                                                                     

                                                                    Is the patches Selsinork suggested now in the 3.16 Kernel?, as I need to patch the serial port to be used for RS485 with direction control, and I use his 3.15 kernel currently, running Debian. It would be sad to abandon Riot, looking at UDOO ( as I have already bought 20 units for a project, with a possible  450 production run);

                                                                     

                                                                    For some reason Selsinorks stuff was removed .. wonder why?

                                                                     

                                                                    Kind Regards

                                                                      • Re: Linux on RIoT
                                                                        radiatortwo

                                                                        As far as I know the changes you have in his 3.15 kernel are in the code of the mainline kernel. And with that in the 3.16 kernel. (Send me a message if you need a config to compile it)

                                                                         

                                                                        Selsinork himself wanted all his stuff to be deleted.

                                                                        I didn't understand exactly why he wanted that. It was something about E14 censoring stuff from him that he had written here.

                                                                        But with that his account, his blog entries and all the other stuff got deleted.

                                                                        And because he switched to another board from an other manufacturer he also deleted his git repo and Dropbox stuff for the riotboard.

                                                                         

                                                                        Sad but nothing we can change about.

                                                                         

                                                                        Also have you considered using another rootfs system like debian for example?

                                                                        You could build yourself an image with the latest version and install everything you need.

                                                                        Or is there a need to use Ubuntu?

                                                                          • Re: Linux on RIoT
                                                                            creatron

                                                                            I don't want Ubuntu, Debian is fine, that is what I am using at the moment, I only tried Ubuntu because Embest had it, and gave up.. useless

                                                                             

                                                                            Embest must consider software as an important factor for success, most probably the main reason why  Raspberry Pi is so successful , everything just works.. , the only reason why I don't use it was the limited I/O an only one serial port, Riot has many Uarts and ports, and it was available, not like the BBB for instance,

                                                                             

                                                                            Any help would be appreciated to build kernel (3.16) (Debian)  for the Embest LVDS touch screen,  I also need to toggle the direction for the RS485 buffer for the U(s)ARTS.

                                                                             

                                                                            Thanks in advance

                                            • Re: Linux on RIoT
                                              kylemills

                                              If really needed I could write a blog entry on how to do this.

                                               

                                              hi Otto Römmich  sir ,

                                              where can i find that blog??

                                               

                                              i got this board and looking for a debian support like in BBB .

                                               

                                              @gerrie

                                              same here,  the ubuntu is pretty old, debian & arch linux are good.

                                               

                                               

                                                • Re: Linux on RIoT
                                                  radiatortwo

                                                  You can´t find it because I didn´t write it.
                                                  I think I can write it tomorrow though.

                                                   

                                                  By the way if you only need debian, I had something to create a somwhat minimal debian system.

                                                  I described there how to create an image file with that you can replace the original oneiric.tgz when flashing with MFGTool.

                                                  Re: Hard Float on RIoTboard

                                                  Then you have the embest kernel, but a Debian rootfs system.

                                                  This is abolutely minimal. Nothing installed but the essential stuff.
                                                  But apt is working.

                                                    • Re: Linux on RIoT
                                                      creatron

                                                      Ok, I manage to build the 3.17 kernel doing the following ( I also attach the extra file required to process this procedure).

                                                       

                                                      I cross complied with the linaro toolchain ( google to install it). I installed it in my home directory home/gerrie/riot/fsl-linaro-toolchain/bin.


                                                      The attach script will create a linux folder in the directory where you run the script, it could be anywhere on the linux PC., remember to make it executable (chmod +x crossit.sh)

                                                       

                                                      Note: first just run the get_image, then copy the file, and then run the rest of the script.

                                                       

                                                      #!/bin/sh

                                                      #--------------------------------------

                                                      get_image () {

                                                        git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

                                                        cd linux

                                                        git remote add sgo git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git

                                                        git fetch sgo

                                                        git checkout -b imx v3.16

                                                        git merge sgo/for-next

                                                      }

                                                      #----------------------

                                                      export PATH=/home/gerrie/riot/fsl-linaro-toolchain/bin/:$PATH

                                                      export ARCH=arm

                                                      export CROSS_COMPILE=arm-none-linux-gnueabi-

                                                       

                                                      CC=arm-none-linux-gnueabi-

                                                       

                                                      # uncomment to get the latest image for the kernel

                                                      get_image

                                                       

                                                      The above will clone the latest kernel and merge with Shawn latest commits.

                                                       

                                                      Please note the CROSS_COMPILE '-'  in arm-none-linux-gnueabi-, this is correct, the make file will attach the rest of the command, like gcc etc, this took me a while, as everybody thinks everybody knows this, but it just confused me.

                                                       

                                                      One should now have the latest source code, copy the attache riot_defconfig  into /linux/arch/arm/configs before proceeding. You might want to change this config during menu-config, but this might be a good starting point.

                                                       

                                                      Run the rest of the script file now, ( I usually just copy comment the get_image to prevent it to run again.. Note the cloning, make kernel and module shall take a while, so be prepared

                                                       

                                                      I first did this on the RiOT itself, but this takes a loooooong time, if you want to use the RiOT, just remove the ARCH..= and CROSS...= from the script

                                                       

                                                      echo ">===== Clean it up ============================="

                                                      make ARCH=arm CROSS_COMPILE=${CC} distclean

                                                      make ARCH=arm CROSS_COMPILE=${CC} riot_defconfig

                                                      make ARCH=arm CROSS_COMPILE=${CC} menuconfig

                                                       

                                                      echo ">===== Compile it .. time for pizza & coffee ==="

                                                      make ARCH=arm CROSS_COMPILE=${CC} -j4 bzImage

                                                       

                                                      echo ">===== Create Outputs & Modules ==============="

                                                      mkdir -p output/boot

                                                      cp arch/arm/boot/zImage output/boot/

                                                      cp System.map output/boot

                                                       

                                                      make ARCH=arm CROSS_COMPILE=${CC} modules

                                                      make ARCH=arm CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH=output

                                                       

                                                      echo ">===== Create Kernel Headers ==================="

                                                      make ARCH=arm CROSS_COMPILE=${CC} headers_install INSTALL_HDR_PATH=output/usr

                                                       

                                                      echo ">===== Create Device Tree======================="

                                                      make ARCH=arm CROSS_COMPILE=${CC} dtbs

                                                      cp arch/arm/boot/dts/imx6dl-riotboard.dtb output/boot

                                                      cd output

                                                       

                                                      tar jcf ../linux-kernel-3.17-riot.txz *

                                                       

                                                      You now should have a image ready in the output directory. It boot up with

                                                       

                                                      Debian Linux 7 riotboard ttymxc1

                                                       

                                                      riotboard login: root

                                                      Password:

                                                      Last login: Sat Sep  6 21:26:11 UTC 2014 on ttymxc1

                                                      Linux riotboard 3.17.0-rc3+ #1 SMP Sat Sep 6 15:57:42 SAST 2014 armv7l

                                                      root@riotboard:~#

                                                       

                                                      Please note, I am not a Linux guru, any comments is welcome, I could not yet get my LVDS working yet, but maybe someone can help.

                                                        • Re: Linux on RIoT
                                                          kylemills

                                                          how did you add the debian fiel system  to it ??

                                                           

                                                          Regards

                                                          Kyle

                                                            • Re: Linux on RIoT
                                                              creatron

                                                              I was fortunate enough to download and create the Selsinork one, but all was deleted from the element14 web site. I am not sure If I can re-distribute it.

                                                                • Re: Linux on RIoT
                                                                  kylemills

                                                                  i can build the kernel but unable to put it into sdcard, bootloader doesn't find it .

                                                                  i tried some arm file systems available in armhf.com.

                                                                   

                                                                  the link http://s3.armhf.com/dist/basefs/ubuntu-trusty-14.04-armhf.com-20140603.tar.xz.

                                                                   

                                                                  copied into card but not response .

                                                                   

                                                                  i am stuck up with this board .

                                                                    • Re: Linux on RIoT
                                                                      radiatortwo
                                                                      i can build the kernel but unable to put it into sdcard, bootloader doesn't find it

                                                                      This depends on your u-boot configuration.

                                                                       

                                                                      The u-boot you get from e14 doesn´t search for a file, but for a specific starting sector on the sdcard.

                                                                      But this does not use the device tree blob file.

                                                                       

                                                                      The u-boot you can compile from the mainline source, uses a bootscript.

                                                                       

                                                                      This bootscript is located in the u-boot environment variables. (Most likely /boot on the root partition)

                                                                      You have to put the bootscript and the kernel with the dtb file into this folder.

                                                                       

                                                                      Have you read my blog here?

                                                                      Mainline Kernel and U-Boot with MFGTool

                                                                       

                                                                      I describe there pretty precisely what the steps are to get your own compiled kernel with your own compiled u-boot and your own rootfs to run on the board.

                                                                       

                                                                      I describe it using MFGTool.

                                                                      But if you understand the xml commands you will also know how to do this in Linux directly on an sdcard. (If you want that of course)

                                                                        • Re: Linux on RIoT
                                                                          creatron

                                                                          I used the following using OpenSuse on Linux:

                                                                          You need :

                                                                          1. u-boot.imx

                                                                          2. linux-kernel-xxx.txz

                                                                          3. rootfs_xxx.txz

                                                                          4. a blank uSD/SD card

                                                                          A. Run

                                                                              fdisk -l

                                                                               >> should list all available device, usually the last one

                                                                          to get the SD card device x = b,c...g etc  Identify the device /dev/sdx

                                                                            

                                                                               dd if=/dev/zero of=/dev/sdx bs=1M count=100

                                                                           

                                                                          100+0 records in

                                                                          100+0 records out

                                                                          104857600 bytes (105 MB) copied, 17,2134 s, 6,1 MB/s

                                                                           

                                                                          B. Write the u-boot.imx

                                                                              dd if=u-boot.imx of=/dev/mmcblk0 bs=1k seek=1

                                                                          323+0 records in

                                                                          323+0 records out

                                                                          330752 bytes (331 kB) copied, 0,116274 s, 2,8 MB/s

                                                                           

                                                                          C. Create a filesystem on our newly created partition.

                                                                          run

                                                                              mkfs.ext4 /dev/sdx

                                                                           

                                                                          Mount the partition:

                                                                              mount /dev/sdx /mnt

                                                                           

                                                                          D. Untar the filesystem into our newly mounted partition

                                                                             tar xf xxx-rootfs.txz -C /mnt

                                                                              ls /mnt

                                                                              >> should produce  

                                                                          bin/   dev/  home/  lost+found/  mnt/  proc/  run/   selinux/  sys/  usr/

                                                                          boot/  etc/  lib/   media/       opt/  root/  sbin/  srv/      tmp/  var/ etc

                                                                           

                                                                          E.   tar xf linux-kernel-imx-xxx.txz -C /mnt

                                                                            ls /mnt/boot

                                                                             >> should produce

                                                                          System.map  imx6dl-riotboard.dtb  zImage*

                                                                           

                                                                          F. Unmount the uSD card (SD card)

                                                                            umount /dev/sdx

                                                                           

                                                                          Done!

                                                                           

                                                                          Make sure boot switches to boot from uSD/SD

                                                                           

                                                                          Reboot

                                                                             and check UBoot messages on the 'TTL' serial port

                                                                            

                                                                             U-Boot 2014.04-00075-g4057f9f-dirty (May 31 2014 - 14:21:56)

                                                                           

                                                                          Starting kernel ...

                                                                            • Re: Linux on RIoT
                                                                              creatron

                                                                              Forgot, Step C need a

                                                                                     fdisk /dev/sdx

                                                                              before the mkfs

                                                                                     new partition, primary  1, etc bla bla bla

                                                                              The start is very important, it must be 2048, the rest could be default

                                                                               

                                                                              Device         Boot    Start       End  Blocks  Id System

                                                                              /dev/sdx                  2048   xxxx       yyy   83 Linux

                                                                                • Re: Linux on RIoT
                                                                                  radiatortwo

                                                                                  Hi Gerrie,

                                                                                   

                                                                                  I´m trying right now to get u-boot to boot my kernel.

                                                                                  I´ve got this to work a hundred times before. But now it won´t work anymore.

                                                                                  As always I compiled u-boot myself, but they changed something.

                                                                                  Looking at the u-boot args I think it´s expecting an extra partition in fat32 where the bootscript and kernel is located.

                                                                                  (Similar to the raspberry pi I think.)

                                                                                  I don´t like that. Not at all...

                                                                                   

                                                                                  Could you upload your u-boot.imx so I can compare yours with mine?

                                                                                   

                                                                                  And also have you created it yourself from the source at http://git.denx.de/u-boot.git?

                                                                                  Or is it some other file?

                                                                                    • Re: Linux on RIoT
                                                                                      creatron

                                                                                      Attached the image  am using . Unfortunately I have not yet compile my own UBoot yet, but this might be helpfull

                                                                                      v2014.04 has no support of the RIoT. However Eric Bénard posted patches Gmane --  PATCH v2 4 8  RiOTboard and MarSBoard: add new boards support .

                                                                                      Gmane -- PATCH v2 4 8 RiOTboard and MarSBoard: add new boards support

                                                                                      dd if=/dev/zero of=/dev/sdx bs=1M count=100
                                                                                      Write our newly created u-boot.imx file onto the card.

                                                                                      dd if=u-boot.imx of=/dev/mmcblk0 bs=1k seek=1

                                                                                      Hope this help

                                                                                        • Re: Linux on RIoT
                                                                                          creatron

                                                                                          The image I have

                                                                                            • Re: Linux on RIoT
                                                                                              radiatortwo

                                                                                              Thanks for the file.

                                                                                              But I already sorted that out though.

                                                                                               

                                                                                              The patches you mentioned are already in mainline code by the way.

                                                                                              So that´s not a problem.

                                                                                               

                                                                                              The reason I asked is I´m writing some blogs where you compile everything yourself.

                                                                                              Starting with u-boot over to the kernel, a debian rootfs and and then flashing everything together.

                                                                                               

                                                                                              And I have been using the mainline code since the patches are in there.

                                                                                              But they changed the boot process in u-boot completely.

                                                                                               

                                                                                              That´s something I hate with u-boot by the way. Wasn´t the first time they changed it so previous methods wouldn´t work anymore...

                                                                                              (They even removed a command i used in my bootscript)

                                                                                               

                                                                                              I first didn´t want´to describe on how to change the boot process.

                                                                                              But I decided that I take this as a chance and teach in these blogs additionally how u-boot works and will write what has to be changed.

                                                                                               

                                                                                              Thanks again for the reply