Kernel compilation toolchain, 'broken packages' and compile errors

Discussion in 'UDOO NEO' started by Maurice, Nov 18, 2016.

  1. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    I want to use all the pins on Neo, for which the documentation says I need to compile the Linux kernel. When I try to setup the toolchain I get an error that I have broken packages, which I don't know how to resolve:
    I tried continuing anyway, but I get the following compilation errors, which may, or may not, be related to having a wrong gcc?
     
  2. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    As you have a broken package, the compiler ( arm-linux-gnueabihf-gcc ) can't be found. You need to resolve installation of the package 'cc-5-arm-linux-gnueabihf' before continuing, it can be caused by of a multitude of reasons so 'googling' may be the first port of call.
     
  3. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    I did some googling before I posted, however I'm noobish when it comes to debs. As long as apt-get says it is ok I can handle it. Resolving errors is another matter...
     
  4. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    You try to clean up the unmet dependency issue by:

    sudo apt-get purge gcc-arm-linux-gnueabihf
    sudo apt-get autoclean
    sudo apt-get update
    sudo apt-get upgrade

    Then try to install the package again, however I can't guarantee it will work as the underlying cause can still be present because of an old or newer package being present.
     
    Gary Huband likes this.
  5. Gary Huband

    Gary Huband New Member

    Joined:
    Aug 1, 2016
    Messages:
    22
    Likes Received:
    7
    I'm cross compiling using an Ubuntu 14.04 image running in a VM. I had tried installing the too chain earlier and gotten the same error as Maurice. I did the above, then

    $ sudo apt-get install gcc-arm-linux-gnueabihf
    $ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib
    $ sudo apt-get install build-essential chrpath socat libsdl1.2-dev xterm picocom ncurses-dev lzop

    So, it appeared that everything installed. I then started the kernel build according to the instructions. When I started the compile I got an error that gcc-arm-linux-gnueabihf was not installed, so I installed it again and restarted the compile:

    $ sudo apt-get install gcc-arm-linux-gnueabihf
    $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage -j5

    And the kernel compile completed. I have not copied the zImage file to an sdcard and tried to boot.
     
    Maurice likes this.
  6. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Whoaah, @Gary Huband, you are right. I had to perform exactly what you said, and it completed... Ehm, can you let me know if you have tried the zImage, and tell me how to do that....
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  8. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Last edited: Nov 19, 2016
  9. Gary Huband

    Gary Huband New Member

    Joined:
    Aug 1, 2016
    Messages:
    22
    Likes Received:
    7
    I don't have my board with me this weekend. I'll try the image on Monday and post the results.
     

Share This Page