How to modify CGroup in the kernel configuration and then make a new image?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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$
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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?
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.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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.
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.
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?
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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?
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.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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.
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$
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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.
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:~$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.