LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2018, 01:31 PM   #16
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by AwesomeMachine View Post
Try building the kernel the Debian way, since Ubuntu is a Debian distro. All you have to do is configure the kernel and run from thye sources directory
Code:
$ make deb-pkg
But you must use the kernel-source package from the Ubuntu repos.
Getting the following compilation error after executed command "make deb-pkg".

HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/bin2c
CC kernel/bounds.s
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
Kbuild:19: recipe for target 'kernel/bounds.s' failed
make[3]: *** [kernel/bounds.s] Error 1
Makefile:1059: recipe for target 'prepare0' failed
make[2]: *** [prepare0] Error 2
scripts/package/Makefile:90: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 2
Makefile:1304: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2
ubuntu@localhost:~/Kernel/src4$
 
Old 04-03-2018, 04:37 PM   #17
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hwang1298 View Post
Getting the following compilation error after executed command "make deb-pkg".

HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/bin2c
CC kernel/bounds.s
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
Kbuild:19: recipe for target 'kernel/bounds.s' failed
make[3]: *** [kernel/bounds.s] Error 1
Makefile:1059: recipe for target 'prepare0' failed
make[2]: *** [prepare0] Error 2
scripts/package/Makefile:90: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 2
Makefile:1304: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2
ubuntu@localhost:~/Kernel/src4$
Below are additional my system info.

ubuntu@localhost:~$ uname -r
3.10.0
ubuntu@localhost:~$ lsmod
Module Size Used by
mali_kbase 204748 0
ubuntu@localhost:~$
 
Old 04-03-2018, 06:24 PM   #18
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I would strongly suggest upgrading your distro to something that uses the 4.4 kernel, install a stock kernel, and then check if cgroups is enabled in the /boot/config-version file. You're probably using a version of gcc that is too old. What does /etc/issue say?
 
Old 04-03-2018, 10:18 PM   #19
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
I would strongly suggest upgrading your distro to something that uses the 4.4 kernel, install a stock kernel, and then check if cgroups is enabled in the /boot/config-version file. You're probably using a version of gcc that is too old. What does /etc/issue say?
Below is the build instructions in the readme.md file which was provided from my hardware vendor along with their kernel source codes.

built rk3288:

1.build kernel:

make persee-rk3288_defconfig

make persee-rk3288.img -j12

2.build linux-boot.imgs

mkbootimg --kernel zImage --ramdsik initrd.img -o linux-boot.img


mkbootimg --kernel zImage --ramdisk OBTools/out/initrd.img -o linux-boot.img
 
Old 04-03-2018, 11:27 PM   #20
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
You are not communicating well. mkbootimg is not for PCs. It's to make Android boot images. Are you cross developing for Android on a PC? Unless you can be straightforward about what exactly you're trying to do, nothing I say will be of help.
 
Old 04-03-2018, 11:43 PM   #21
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
You are not communicating well. mkbootimg is not for PCs. It's to make Android boot images. Are you cross developing for Android on a PC? Unless you can be straightforward about what exactly you're trying to do, nothing I say will be of help.
My hardware is Orbbec's Persee and more info can be found at their web site at below.

https://orbbec3d.com/product-persee/

I don't know if I can share their kernel source codes. However, this product does support both Android and ubuntu platforms. It sounds like that I got run version of kernel source codes from them?

Regards,

Heng
 
Old 04-04-2018, 08:15 AM   #22
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
OK, now we're getting somewhere! This is an arm architecture platform that uses embedded Linux. Your mixing together the Android and Ubuntu instructions, which are different. Orbbec3d provides the whole operating system. So, you must follow their own instructions on how to recompile the kernel. Can you give me a link to those instructions so I can look at them?
 
Old 04-04-2018, 12:30 PM   #23
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
OK, now we're getting somewhere! This is an arm architecture platform that uses embedded Linux. Your mixing together the Android and Ubuntu instructions, which are different. Orbbec3d provides the whole operating system. So, you must follow their own instructions on how to recompile the kernel. Can you give me a link to those instructions so I can look at them?
Below link is the only one that I can find and share.

https://3dclub.orbbec3d.com/t/compil...the-persee/942
 
Old 04-04-2018, 01:09 PM   #24
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hwang1298 View Post
Below link is the only one that I can find and share.

https://3dclub.orbbec3d.com/t/compil...the-persee/942
See below screenshot about my current system.

ubuntu@localhost:~$ /usr/bin/arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/5/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
 
Old 04-05-2018, 02:14 AM   #25
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
The first thing I notice is that the instructions specify gcc version < 5. That means you need gcc 4.8 or 4.9. You are using 5.4. All of the development takes place on a Debian PC, but it is done for an embedded system. You're basically opening up a operating system image and then putting it back together, and uploading it to the persee.

The persee uses kernel images made by mkbootimg, which is Android format, even for the Ubuntu operating system. So, it's OK to use that program. The instructions are missing one thing, the kernel configuration. But I think you figured that one out: make menuconfig.

It would have been much better if I would have known exactly what you were trying to do before I tried explaining how to do it. The instructions in that link you posted appear sound. Just follow them, and use the correct version of gcc.
 
Old 04-05-2018, 10:35 AM   #26
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
The first thing I notice is that the instructions specify gcc version < 5. That means you need gcc 4.8 or 4.9. You are using 5.4. All of the development takes place on a Debian PC, but it is done for an embedded system. You're basically opening up a operating system image and then putting it back together, and uploading it to the persee.

The persee uses kernel images made by mkbootimg, which is Android format, even for the Ubuntu operating system. So, it's OK to use that program. The instructions are missing one thing, the kernel configuration. But I think you figured that one out: make menuconfig.

It would have been much better if I would have known exactly what you were trying to do before I tried explaining how to do it. The instructions in that link you posted appear sound. Just follow them, and use the correct version of gcc.
Below shows the problem of installing gcc-4.8.

ubuntu@localhost:~/Downloads$ sudo apt-get install gcc-4.8-arm-linux-gnueabihf
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'gcc-4.8-arm-linux-gnueabihf-base' for regex 'gcc-4.8-arm-linux-gnueabihf'
0 upgraded, 0 newly installed, 0 to remove and 233 not upgraded.
ubuntu@localhost:~/Downloads$ sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-4.8 10
update-alternatives: error: alternative path /usr/bin/arm-linux-gnueabihf-gcc-4.8 doesn't exist
ubuntu@localhost:~/Downloads$
 
Old 04-05-2018, 04:21 PM   #27
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Are you sure that's the entire message? If you don't know the correct package name, try 'apt-cache search keyword'. And, just use 'ls' to find the correct file names.
Code:
$ ls /usr/bin/*gcc*
or so. You should be able to figure it out from there.

You can also set the GCC environment variable on the kernel compile command line, with GCC=/path/to/compiler.
 
Old 04-05-2018, 04:40 PM   #28
hwang1298
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
Are you sure that's the entire message? If you don't know the correct package name, try 'apt-cache search keyword'. And, just use 'ls' to find the correct file names.
Code:
$ ls /usr/bin/*gcc*
or so. You should be able to figure it out from there.

You can also set the GCC environment variable on the kernel compile command line, with GCC=/path/to/compiler.
Below shows my system has.
ubuntu@localhost:~$ ls /usr/bin/*gcc* /usr/bin/arm-linux-gnueabihf-gcc /usr/bin/c99-gcc
/usr/bin/arm-linux-gnueabihf-gcc-5 /usr/bin/gcc
/usr/bin/arm-linux-gnueabihf-gcc-ar /usr/bin/gcc-5
/usr/bin/arm-linux-gnueabihf-gcc-ar-5 /usr/bin/gcc-ar
/usr/bin/arm-linux-gnueabihf-gcc-nm /usr/bin/gcc-ar-5
/usr/bin/arm-linux-gnueabihf-gcc-nm-5 /usr/bin/gcc-nm
/usr/bin/arm-linux-gnueabihf-gcc-ranlib /usr/bin/gcc-nm-5
/usr/bin/arm-linux-gnueabihf-gcc-ranlib-5 /usr/bin/gcc-ranlib
/usr/bin/c89-gcc /usr/bin/gcc-ranlib-5
ubuntu@localhost:~$
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cgroup - cgrulesengd - Slackware 13.37 Kernel linuxxer Slackware 0 09-10-2012 08:20 AM
[SOLVED] Cannot move certain kernel threads from root cgroup avinash82 Linux - Kernel 1 07-24-2012 04:29 PM
Alternative to 200 lines kernel patch, /sys/fs/cgroup/cpu missing Linux.tar.gz Slackware 27 11-29-2010 09:40 AM
How to Make Modify the Entries in Access Control Database for Linux Kernel 2.4.18-14? kks_gs Linux - Security 1 02-07-2009 06:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration