Building a kernel *on* the C1+ under 16.04

Moderators: mdrjr, odroid

Building a kernel *on* the C1+ under 16.04

Unread postby Maury Markowitz » Mon Dec 19, 2016 2:05 am

I recently downloaded the latest version (20160727 ) of 16.04/Mate for the C1 from one of the mirrors, extracted it and flashed it to a 64GB SSD. I installed that in my C1+ and rebooted, and it is up and running and I am using it over ssh from my desktop machine.

My next goal is to build a custom kernel ON THAT DEVICE. I am attempted to follow the instructions found on this page: http://odroid.com/dokuwiki/doku.php?id= ... ing_kernel

However, these instructions appear to be for cross-compiling from a Ubuntu PC, but I am not sure. Can anyone confirm/deny this? Are these instructions usable ON the C1?

The instructions start with sever apt-gets, most of which worked fine. However, 'lib32stdc++6' 'lib32z1' do not work, the server states 'Unable to locate package' for both of those. Did I have to point my apt-update somewhere else to get this to work? I seem to recall another step in here somewhere? Otherwise, is there some other way to get these?

The instructions say the current toolchain is 4.9.2. However, 16.04/Mate comes with 5.4.0 20160609. Can you build with this version?

Finally, should I do a single 'make odroidc_defconfig' before 'make menuconfig'? Or just go right to 'make menuconfig'?
Maury Markowitz
 
Posts: 39
Joined: Tue Nov 24, 2015 8:03 am
languages_spoken: english

Re: Building a kernel *on* the C1+ under 16.04

Unread postby meveric » Mon Dec 19, 2016 2:51 am

Just ignore everything about toolchains and such..
Start reading from here: http://odroid.com/dokuwiki/doku.php?id= ... rnel#linux
everything else if for cross compiling and you don't need that if you compile directly on the ODROID.

Do a make odroidc_defconfig first, since any changes done with make menuconfig will be reverted if you do a make odroidc_defconfig afterwards.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 7715
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Building a kernel *on* the C1+ under 16.04

Unread postby Maury Markowitz » Mon Dec 19, 2016 3:12 am

Ok, what about the missing libraries and compiler version? Both OK?
Maury Markowitz
 
Posts: 39
Joined: Tue Nov 24, 2015 8:03 am
languages_spoken: english

Re: Building a kernel *on* the C1+ under 16.04

Unread postby meveric » Mon Dec 19, 2016 4:50 am

Maury Markowitz wrote:Ok, what about the missing libraries and compiler version? Both OK?

let's try this again:
meveric wrote:Just ignore everything about toolchains and such..
Start reading from here: http://odroid.com/dokuwiki/doku.php?id= ... rnel#linux
everything else if for cross compiling and you don't need that if you compile directly on the ODROID.


you actually need build-essential and libncurses5-dev but you've already done this.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 7715
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Building a kernel *on* the C1+ under 16.04

Unread postby Maury Markowitz » Mon Dec 19, 2016 6:26 am

Fair enough :-)
Maury Markowitz
 
Posts: 39
Joined: Tue Nov 24, 2015 8:03 am
languages_spoken: english

Re: Building a kernel *on* the C1+ under 16.04

Unread postby crashoverride » Mon Dec 19, 2016 8:01 am

Install dependiencies
Code: Select all
sudo apt-get install git-core libncurses5-dev lzop


Clone the repo
Code: Select all
git clone --depth 1 https://github.com/hardkernel/linux.git -b odroidc-3.10.y


Configure the repo
Code: Select all
cd linux
make odroidc_defconfig


Optional: customize the config
Code: Select all
make menuconfig


Build
Code: Select all
make -j4
make uImage


Optional: Make a copy of your existing kernel to make recovery easier
Code: Select all
sudo cp /media/boot/uImage /media/boot/uImage.bak


Install:
Code: Select all
sudo make modules_install
sudo cp arch/arm/boot/uImage /media/boot/uImage
crashoverride
 
Posts: 3078
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Building a kernel *on* the C1+ under 16.04

Unread postby Maury Markowitz » Mon Dec 19, 2016 8:20 am

I am up!

The entire process is much "cleaner" when you start with a 16.04 system. Many of the warnings and such that I saw on 14.x no longer appear.
Maury Markowitz
 
Posts: 39
Joined: Tue Nov 24, 2015 8:03 am
languages_spoken: english

Re: Building a kernel *on* the C1+ under 16.04

Unread postby clickwir » Wed Oct 11, 2017 5:51 am

I know it's been a while, just curious if you remember how long the build took on the C1+ itself.

It's been a while since I compiled a kernel and am thinking of giving it a try. The 3.10 version that comes with Ubuntu 16.04 image is pretty old and may be the source of some issues I'm having.
clickwir
 
Posts: 5
Joined: Mon Jul 06, 2015 3:36 pm
languages_spoken: english
ODROIDs: C1+

Re: Building a kernel *on* the C1+ under 16.04

Unread postby mad_ady » Wed Oct 11, 2017 6:53 pm

Compiling the kernel on the c1 takes ~40 min. Though if you don't use HK's 3.10 source it's unlikely it will boot on the C1.
User avatar
mad_ady
 
Posts: 2595
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 5 guests