Discussion

Easiest way to compile 3.17/3.19 kernel

87 16785
Thanks, I'll view it this evening.

You mentioned I need to cross compile on Ubuntu 14.02.2 LTS.  When I login to the system I am trying to cross compile on it says:
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-34-lowlatency i686)

However, a uname -a says:
Linux mark-ubuntu 3.16.0-34-lowlatency #47~14.04.1-Ubuntu SMP PREEMPT Fri Apr 10 18:18:14 UTC 2015 i686 athlon i686 GNU/Linux

Do you think this is a problem?  This is a ubuntustudio latest distribution.  Do you recommend I use some other distro?  
If I install something else for building(probably dual boot) I may as well use what you have, so what do you suggest I install? (What distro did you install?)

I started the video then ran a build of banana pi at the same time.  Mine had a failure:

tune2fs 1.42.9 (4-Feb-2014)
/home/mark/lib-next/lib/common.sh: line 401: debootstrap: command not found
cp: cannot stat ‘/usr/bin/qemu-arm-static’: No such file or directory
update-binfmts: warning: qemu-arm not in database of installed binary formats.
update-binfmts: exiting due to previous errors

I installed  "sudo apt-get install debootstrap"

Trying again.

Now it failes like this:
dpkg-deb: building package `linux-image-3.19.5-bananapi' in `../linux-image-3.19.5-bananapi_2.7_armhf.deb'.
mount: mount point /home/mark/lib-next/output/output/sdcard/proc does not exist
mount: mount point /home/mark/lib-next/output/output/sdcard/sys does not exist
mount: mount point /home/mark/lib-next/output/output/sdcard/dev does not exist
mount: mount point /home/mark/lib-next/output/output/sdcard/dev does not exist
mount: mount point /home/mark/lib-next/output/output/sdcard/dev/pts does not exist
[ ok ] Install kernel
sed: can't read /home/mark/lib-next/output/output/sdcard/etc/init.d/cpufrequtils: No such file or directory
sed: can't read /home/mark/lib-next/output/output/sdcard/etc/init.d/cpufrequtils: No such file or directory
sed: can't read /home/mark/lib-next/output/output/sdcard/etc/init.d/cpufrequtils: No such file or directory
/home/mark/lib-next/lib/boards.sh: line 306: /home/mark/lib-next/output/output/sdcard/etc/hostname: No such file or directory
/home/mark/lib-next/lib/boards.sh: line 309: /home/mark/lib-next/output/output/sdcard/etc/hosts: No such file or directory
/home/mark/lib-next/lib/boards.sh: line 320: /home/mark/lib-next/output/output/sdcard/etc/modules: No such file or directory
cp: target ‘/home/mark/lib-next/output/output/sdcard/etc/network/’ is not a directory
ln: failed to create symbolic link ‘/home/mark/lib-next/output/output/sdcard/etc/network/interfaces’: No such file or directory
mount: mount point /home/mark/lib-next/output/output/sdcard/tmp does not exist
chroot: failed to run command ‘/bin/bash’: No such file or directory
chroot: failed to run command ‘/bin/bash’: No such file or directory
chroot: failed to run command ‘/bin/bash’: No such file or directory
chroot: failed to run command ‘/bin/bash’: No such file or directory
------ Compile headers scripts
/home/mark/lib-next/lib/boards.sh: line 345: cd: /home/mark/lib-next/output/output/sdcard/usr/src/linux-headers-3.19.5-bananapi: No such file or directory
patching file tools/include/tools/be_byteshift.h
patching file tools/include/tools/le_byteshift.h
chroot: failed to run command ‘/bin/bash’: No such file or directory
cp: cannot create regular file ‘/home/mark/lib-next/output/output/sdcard/boot/boot.cmd’: No such file or directory
mkimage: Can't open /home/mark/lib-next/output/output/sdcard/boot/boot.scr: No such file or directory
checkdir:  cannot create extraction directory: /home/mark/lib-next/output/output/sdcard/lib/firmware
           No such file or directory

The last set of errors were because I stopped the build midstream when I saw the failures.  After rebooting, installing debootstrap and starting from scratch, i got farther and failed again.  Now I installed apt-get install qemu binfmt-support qemu-user-static chroot.

That seems to have worked.  I can't test this till later since I don't have the banana with me, but should know later on today.

igorpec  
OK, we got further and you helped me to stronger the script.

Check main.sh here:
https://github.com/igorpecovnik/lib/blob/next/main.sh#L136

Remove if / fi .. leave only function call and it should work well.

I dont't follow your not about removing if/fi.  Which ones?  It seems to me you need to add the packages to download_host_packages in common.sh.

"apt-get install debootstrap qemu binfmt-support qemu-user-static chroot" to address the problem.  Right?

I tried the resulting image and it does boot.   There is a problem with it though-when booting it says
mount failed for selinuxfs on /sys/fs/selinux: no such file or directory.   It continues, the reboots again but goes to the login pompt after that.  
I included building the desktop and startx works.  but apt-get has some problems.  Looks mostly working though.

Does selinux need to be installed on the build system?

igorpec  
I dont't follow your not about removing if/fi.  Which ones?  It seems to me you need to add the packages to download_host_packages in common.sh.


All packages are already there, they are just not downloading due too that badly written IF sentence. I'll rewrite that ... it's meant that it doesn't try to download packets if they are there. But the if was not properly set. This was one quick dirty workaround. I'll fix it asap.

No, selinux is not needed. Ignore it or help me get it working ;) I was trying to but so far failed.

Ubuntu in general needs some fine tuning.

I'll be glad help when and where I can, I but I don't even know that selinux is.

This is where I am at.  I have successfully built both 3.4.107, and 3.19.5 and they both boot up run.  (Ignoring the selinux mount issue).  They both looke pretty good and it appears I have one more issue to resolve.   I want to get to a stable starting point and attempt a RT kernel.  I will need ubuntustudio-audio installed to test.  So that is what I want to use as the starting point.  But installation fails on both builds with an error in which dpbg error status is 1.  Again i am a newbe at this and am not familiar with how this works.  Any idea why this would be? apt-get does work for some packages, I just don't know why this fails.

I finally got it to install.  By installing a couple of individual packages, I got an error:
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'

I found others fixed this by editing /usr/share/mime/packages/kde.xml and removing the 'fake' types.  I did this and it appears to have installed correctly.(Need to test it now).

My last post was wrong.  I was logged into the wrong system when I did that.  However, I did get ubuntustudio-audio installed by installing the individual apts that make it up, but I am not sure why I could not install the entire package at once.

On to testing it.

You have to log in before you can reply Login | Sign Up

Points Rules