Many thanks for your helpful advice.
I tried running the script with no argument.
Here is the result:
Code: Select all
root@storm /home/mikef # ./setup-build.sh
No release specified. Defaulting to "5.1.3-gentoo".
Created /root/kernel/5.1.3-gentoo/
Created /root/kernel/install/5.1.3-gentoo/boot/
KBUILD_OUTPUT=/root/kernel/5.1.3-gentoo/
INSTALL_PATH=/root/kernel/install/5.1.3-gentoo/boot/
INSTALL_MOD_PATH=/root/kernel/install/5.1.3-gentoo/
root@storm /usr/src/linux-5.1.3-gentoo #
I thought it would use the kernel name it got from
and then moan that
does not exist.
But it didn't do that. It really is sniffing out symlinks and kernel id's etc as you said........
It has moved me into the
directory (has it renamed the
to
?).
The kernel tree is there.
I am going to try compiling the kernel.
Regards
MF
PS
I ran the following command after setting the EXTRAVERSION parameter in Makefile to -debian:
Code: Select all
root@storm /usr/src/linux-5.1.3-gentoo # make -j5 deb-pkg
make[1]: Entering directory '/root/kernel/5.1.3-gentoo'
Error: kernelrelease not valid - run 'make prepare' to update it
UPD include/config/kernel.release
make clean
make[3]: *** No rule to make target 'clean'. Stop.
make[2]: *** [/usr/src/linux-5.1.3-gentoo/scripts/package/Makefile:70: deb-pkg] Error 2
make[1]: *** [/usr/src/linux-5.1.3-gentoo/Makefile:1396: deb-pkg] Error 2
make[1]: Leaving directory '/root/kernel/5.1.3-gentoo'
make: *** [Makefile:169: sub-make] Error 2
root@storm /usr/src/linux-5.1.3-gentoo #
Should I run make prepare as it says?
Comments appreciated.
PS
I booted into the gentoo install again and went into the /usr/src directory.
Sure enough some new directories have been created:
Code: Select all
drwxr-xr-x 4 root root 4096 May 27 11:12 .
drwxr-xr-x 13 root root 4096 Apr 27 13:42 ..
-rw-r--r-- 1 root root 0 Apr 24 22:52 .keep
lrwxrwxrwx 1 root root 18 May 22 16:09 linux -> linux-5.1.3-gentoo
drwxr-xr-x 23 root root 4096 May 20 23:35 linux-4.19.27-gentoo-r1
-rw-r--r-- 1 root root 170330757 May 27 11:12 linux-5.1.3-debian_.orig.tar.gz
drwxr-xr-x 26 root root 4096 May 27 11:12 linux-5.1.3-gentoo
root@storm /usr/src #
I ran the compilation command again:
make -j5 deb-pkg
Unfortunately I don't have the output from the first time I ran it. The compilation itself seemed to run OKish but there were problems with making the debian package.
I ran the command again here:
Code: Select all
root@storm /usr/src/linux-5.1.3-gentoo # !515
make -j5 deb-pkg
make clean
/bin/sh ./scripts/package/mkdebian
Using default distribution of 'unstable' in the changelog
Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
TAR linux-5.1.3-debian.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
mv linux-5.1.3-debian.tar.gz ../linux-5.1.3-debian_${origversion}.orig.tar.gz
/bin/sh: dpkg-parsechangelog: command not found
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -i.git -us -uc
/bin/sh: dpkg-buildpackage: command not found
make[1]: *** [scripts/package/Makefile:74: deb-pkg] Error 127
make: *** [Makefile:1396: deb-pkg] Error 2
root@storm /usr/src/linux-5.1.3-gentoo #
I looked in the newly created
directory.
Code: Select all
root@storm ~/kernel/5.1.3-gentoo/include/config # ls -la
total 12
drwxr-xr-x 2 root root 4096 May 26 19:01 .
drwxr-xr-x 3 root root 4096 May 26 19:01 ..
-rw-r--r-- 1 root root 13 May 26 19:01 kernel.release
The kernel release is given here:
Code: Select all
root@storm ~/kernel/5.1.3-gentoo/include/config # more kernel.release
5.1.3-debian
root@storm ~/kernel/5.1.3-gentoo/include/config #
There is also another directory present that has been created that currently is empty:
Code: Select all
root@storm ~/kernel/5.1.3-gentoo/scripts/package # ls -l
total 0
root@storm ~/kernel/5.1.3-gentoo/scripts/package #
This file sitting in /usr/src seems to have been created by the kernel compilation:
Code: Select all
-rw-r--r-- 1 root root 170330757 May 27 11:12 linux-5.1.3-debian_.orig.tar.gz
Could it be a new kernel?
Comments apprecaited.
Regards
MF
PPS
I also tried running the make bindeb-pkg command:
Code: Select all
root@storm /usr/src/linux-5.1.3-gentoo # make -j5 bindeb-pkg
/bin/sh ./scripts/package/mkdebian
Using default distribution of 'unstable' in the changelog
Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc
/bin/sh: dpkg-buildpackage: command not found
make[1]: *** [scripts/package/Makefile:79: bindeb-pkg] Error 127
make: *** [Makefile:1396: bindeb-pkg] Error 2
root@storm /usr/src/linux-5.1.3-gentoo #
It also fails.
The error here:
Code: Select all
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -i.git -us -uc
/bin/sh: dpkg-buildpackage: command not found
could be caused by a package that needs to be installed in gentoo:
see discussion here:
viewtopic-t-26266-start-0.html
There seem to be a couple of relevant packages:
and
I will check to see if either is installed.
Apparently
is not installed.
I have emerged it.
I reran the two make commands.
Unfortunately they both gave the identical set of error messages.
I also tried emerging
But it didn't solve the problem.
Code: Select all
root@storm /usr/src/linux-5.1.3-gentoo # !487
make -j5 bindeb-pkg
/bin/sh ./scripts/package/mkdebian
Using default distribution of 'unstable' in the changelog
Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: info: source package linux-5.1.3-debian
dpkg-buildpackage: info: source version 5.1.3-debian-3
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by root <root@storm>
dpkg-architecture: warning: specified GNU system type x86_64-linux-gnu does not match CC system type x86_64-pc-linux-gnu, try setting a correct CC environment variable
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build linux-5.1.3-gentoo
dpkg-checkbuilddeps: error: cannot open /var/lib/dpkg/status: No such file or directory
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
make[1]: *** [scripts/package/Makefile:79: bindeb-pkg] Error 3
make: *** [Makefile:1396: bindeb-pkg] Error 2
and
Code: Select all
root@storm /usr/src/linux-5.1.3-gentoo # !499
make -j5 deb-pkg
make clean
/bin/sh ./scripts/package/mkdebian
Using default distribution of 'unstable' in the changelog
Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
TAR linux-5.1.3-debian.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
mv linux-5.1.3-debian.tar.gz ../linux-5.1.3-debian_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -i.git -us -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: info: source package linux-5.1.3-debian
dpkg-buildpackage: info: source version 5.1.3-debian-3
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by root <root@storm>
dpkg-architecture: warning: specified GNU system type x86_64-linux-gnu does not match CC system type x86_64-pc-linux-gnu, try setting a correct CC environment variable
dpkg-buildpackage: info: host architecture amd64
dpkg-source -i.git --before-build linux-5.1.3-gentoo
dpkg-checkbuilddeps: error: cannot open /var/lib/dpkg/status: No such file or directory
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
make[1]: *** [scripts/package/Makefile:74: deb-pkg] Error 3
make: *** [Makefile:1396: deb-pkg] Error 2
Comments appreciated
PPS
I ran make -j5 alone.
The compilation seemed to run OK.
The last bit of the output is here:
Code: Select all
LD [M] net/ipv6/xfrm6_mode_tunnel.ko
LD [M] net/netfilter/ipset/ip_set.ko
LD [M] net/netfilter/ipvs/ip_vs.ko
LD [M] net/netfilter/nf_log_common.ko
LD [M] net/netfilter/nf_nat.ko
LD [M] net/netfilter/nf_nat_ftp.ko
LD [M] net/netfilter/nf_nat_irc.ko
LD [M] net/netfilter/xt_LOG.ko
LD [M] net/netfilter/nf_nat_sip.ko
LD [M] net/netfilter/xt_TCPMSS.ko
LD [M] net/netfilter/xt_comment.ko
LD [M] net/netfilter/xt_addrtype.ko
LD [M] net/netfilter/xt_hl.ko
LD [M] net/netfilter/xt_limit.ko
LD [M] net/netfilter/xt_mark.ko
LD [M] net/netfilter/xt_multiport.ko
LD [M] net/netfilter/xt_nat.ko
LD [M] net/netfilter/xt_recent.ko
LD [M] net/xfrm/xfrm_ipcomp.ko
MKPIGGY arch/x86/boot/compressed/piggy.S
AS arch/x86/boot/compressed/piggy.o
LD arch/x86/boot/compressed/vmlinux
ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
ld: warning: creating a DT_TEXTREL in object
ZOFFSET arch/x86/boot/zoffset.h
OBJCOPY arch/x86/boot/vmlinux.bin
AS arch/x86/boot/header.o
LD arch/x86/boot/setup.elf
OBJCOPY arch/x86/boot/setup.bin
BUILD arch/x86/boot/bzImage
Setup is 16028 bytes (padded to 16384 bytes).
System is 10049 kB
CRC e1f71926
Kernel: arch/x86/boot/bzImage is ready (#4)
root@storm /usr/src/linux-5.1.3-gentoo #
I am going to try running make-deb separately and see what happens.
I am also investigating the electron-builder package.
MF
PPPS
Unfortunately it is still generating the same errors:
Code: Select all
root@storm /usr/src/linux-5.1.3-gentoo # make deb-pkg
make clean
CLEAN .
CLEAN arch/x86/entry/vdso
CLEAN arch/x86/kernel/cpu
CLEAN arch/x86/kernel
CLEAN arch/x86/realmode/rm
CLEAN arch/x86/lib
CLEAN certs
CLEAN drivers/base/firmware_loader/builtin
CLEAN drivers/gpu/drm/radeon
CLEAN drivers/scsi
CLEAN drivers/tty/vt
CLEAN kernel
CLEAN lib
CLEAN net/wireless
CLEAN security/selinux
CLEAN usr
CLEAN arch/x86/boot/compressed
CLEAN arch/x86/boot
CLEAN arch/x86/tools
CLEAN .tmp_versions
/bin/sh ./scripts/package/mkdebian
Using default distribution of 'unstable' in the changelog
Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
TAR linux-5.1.3-debian.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
mv linux-5.1.3-debian.tar.gz ../linux-5.1.3-debian_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -i.git -us -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: info: source package linux-5.1.3-debian
dpkg-buildpackage: info: source version 5.1.3-debian-4
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by root <root@storm>
dpkg-architecture: warning: specified GNU system type x86_64-linux-gnu does not match CC system type x86_64-pc-linux-gnu, try setting a correct CC environment variable
dpkg-buildpackage: info: host architecture amd64
dpkg-source -i.git --before-build linux-5.1.3-gentoo
dpkg-checkbuilddeps: error: cannot open /var/lib/dpkg/status: No such file or directory
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
make[1]: *** [scripts/package/Makefile:74: deb-pkg] Error 3
make: *** [Makefile:1396: deb-pkg] Error 2
root@storm /usr/src/linux-5.1.3-gentoo # ^C
root@storm /usr/src/linux-5.1.3-gentoo #
I am going to try changing directory to arch/x86/boot and run make deb-pkg on the bzimage file
Regards
MF