LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-22-2017, 03:35 AM   #1
mr.simo
Member
 
Registered: Feb 2010
Posts: 78

Rep: Reputation: 0
Kernel building: install error


Hello,

I am trying to compile a kernel and install it in a custom subdirectory (to been copied into uSD later).

The build process ends up right, while the install process fails, with the following error:

Code:
  Kernel: arch/arm/boot/zImage is ready
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  Kernel: arch/arm/boot/uImage is ready
/bin/bash ./arch/arm/boot/install.sh "4.9.0-xilinx-00037-g5d029fd" \
arch/arm/boot/Image System.map "/home/simo/dev/linux-kernels/xilinx/linux-xlnx/install"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.9.0-xilinx-00037-g5d029fd /home/simo/dev/linux-kernels/xilinx/linux-xlnx/install/vmlinuz-4.9.0-xilinx-00037-g5d029fd
/etc/kernel/postinst.d/apt-auto-removal: 84: /etc/kernel/postinst.d/apt-auto-removal: cannot create /etc/apt/apt.conf.d//01autoremove-kernels.dpkg-new: Permission denied
run-parts: /etc/kernel/postinst.d/apt-auto-removal exited with return code 2
arch/arm/boot/Makefile:96: recipe for target 'install' failed
make[2]: *** [install] Error 1
arch/arm/Makefile:333: recipe for target 'install' failed
make[1]: *** [install] Error 2
Makefile:525: recipe for target '__build_one_by_one' failed
make: *** [__build_one_by_one] Error 2
As it seems, the install process tries to access to my system directories calling /etc/kernel/postinst.d/apt-auto-removal, which of course is not what I want.

The problem does not come up when I try to compile an older kernel version.
Do you have an idea or any suggestion to what is causing this problem and how to solve ?

Thank you in advance.
Regards,
Simon
 
Old 06-22-2017, 04:16 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010
Are you making a kernel for an ARM system?
 
Old 06-22-2017, 04:53 AM   #3
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 553

Rep: Reputation: 277Reputation: 277Reputation: 277
How are you compiling this kernel? By hand or some script automates it for you? Which system are you currently building on and what kind of system are you building for? Is is cross-compilation?
 
Old 06-22-2017, 05:06 AM   #4
mr.simo
Member
 
Registered: Feb 2010
Posts: 78

Original Poster
Rep: Reputation: 0
Hello AwesomeMachine & aragorn2101,

Yes, I am cross compiling a kernel for ARM architecture from a x86_64 Debian 8.8.
The command line I use to build it is:

Code:
make -j 8 all uImage INSTALL_PATH=${INSTALLDIR} INSTALL_MOD_PATH=${INSTALLDIR} ARCH=arm CROSS_COMPILE=${CROSS} UIMAGE_LOADADDR=${LOADADDR} install moduless_install
INSTALLDIR is a local directory named "install".
CROSS is the path to the armhf-linux-gnueabi- toolchain binaries.

Regards,
Simon
 
Old 06-23-2017, 05:36 AM   #5
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 553

Rep: Reputation: 277Reputation: 277Reputation: 277
It seems that the system recognizes this process as a kernel upgrade and looks forward to remove "4.9.0-xilinx-00037-g5d029fd" before proceeding. Since the xilinx kernel is not there it returns error.

I suggest you go through the building process in separate steps instead of "make ... install" in one go.

Check these out:

- Installing a custom kernel step by step:
http://www.linuxfromscratch.org/lfs/...08/kernel.html

- Cross-compiling ARM kernal
https://raspberrypi.stackexchange.co...-a-ubuntu-host
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
A rather odd kernel build error while building a powerpc version of kernel 3.0.3 bloggins666 Linux - Kernel 2 01-29-2015 10:08 AM
Error building crosstools-ng on LFS for raspberry pi - custom kernel error Keith Hedger Linux From Scratch 0 01-15-2013 05:44 PM
[SOLVED] error building kernel 2.6.36 vonbiber Linux - General 8 02-05-2011 07:07 AM
Error building Mandriva Kernel GlennsPref Linux - Kernel 5 04-26-2010 06:03 AM
Error while building kernel linuxboy69 Linux - Software 10 08-26-2004 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:59 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