View previous topic :: View next topic |
Author |
Message |
dpshak Apprentice


Joined: 05 May 2005 Posts: 170 Location: Wisconsin
|
Posted: Mon May 28, 2018 1:23 pm Post subject: [SOLVED] Help! Kernel update problem... |
|
|
Some background first. Bought a new laptop for my wife, installed Gentoo - using the stable branch. She's not happy! The native resolution of 1920x1080 renders printing so small she can't read it. Thanks (apparently) to Optimus, I can't seem to adjust the screen resolution down. So I handed her an older laptop, I had laying around, to use for the time being, while I tinkered with the new one.
The first thing I did was change from the stable branch to the testing branch and updated the system. There were a number of problems along the way; circular dependencies and so on, but I got everything fixed. Everything is up to date and portage isn't complaining. Then I updated, or rather tried to update, the kernel from 4.14.26 to 4.16.11. Then the problems started. Failure, after failure, after failure. My practice is (from /usr/src):
1. cp linux/.config /usr/src/new-sources-gentoo/
2. rm -rf linux
3. ln -snf /usr/src/new-sources-gentoo linux
4. cd linux
5. make oldconfig (generally answering all the questions no)
6. make -j9 && make modules_install
7. cp arch/x86_64/boot/bzImage /boot/new-kernel
8. cp .config /boot/config-new-kernel
9. grub-mkconfig -o /boot/grub/grub.cfg
10. emerge @module-rebuild
That failed the first time. The output from make modules_install didn't look right, so I removed the new sources, new config and re-emerged gentoo-sources. Still wasn't right. So I started over again, this time using 'make menuconfig' to configure a 'clean' kernel. It failed again; something having to do with 'crypto.' WTF?!? So I decided to take the (working) 4.6.11 config from my desktop and use that as the basis for the config on the laptop - adjusting (via make menuconfig) settings for networking, video, and so on. Both the laptop and my desktop are running Intel Core-I7 processors and using the same profile (default/linux/amd64/17.0/desktop/plasma (stable). This time, I split the 'make' and 'make_install' up, so I could see if any errors popped up. And they did! 'Make' seemed to work properly, no errors showed up. 'Make_install' on the other hand, popped up whole slew of these errors: Code: | cp: cannot stat 'drivers/platform/x86/asus-laptop.ko': No such file or directory
INSTALL drivers/platform/x86/asus-wireless.ko
cp: cannot stat 'drivers/platform/x86/asus-wireless.ko': No such file or directory
INSTALL drivers/thermal/intel_pch_thermal.ko
INSTALL drivers/thermal/x86_pkg_temp_thermal.ko
** INSTALL drivers/video/backlight/backlight.ko
**cp: cannot stat 'drivers/video/backlight/backlight.ko': No such file or directory
INSTALL drivers/video/backlight/generic_bl.ko
cp: cannot stat 'drivers/video/backlight/generic_bl.ko': No such file or directory
INSTALL drivers/video/backlight/lcd.ko
cp: cannot stat 'drivers/video/backlight/lcd.ko': No such file or directory
INSTALL fs/fuse/fuse.ko |
Note the starred lines. When I scroll back to the 'make' output I get this:
Code: | CC [M] drivers/gpu/drm/i915/intel_dpio_phy.o
CC drivers/video/hdmi.o
CC [M] drivers/video/backlight/lcd.o
**CC [M] drivers/video/backlight/backlight.o
CC [M] drivers/video/backlight/generic_bl.o |
As you can see, from the first code snipped, SOME modules are being built and installed.
Using my thermal example:
Code: | /usr/src/linux/drivers/thermal # ls
armada_thermal.c intel_bxt_pmic_thermal.c max77620_thermal.c st thermal_sysfs.c
broadcom intel_pch_thermal.c modules.builtin step_wise.c thermal_sysfs.o
built-in.o intel_pch_thermal.ko modules.order step_wise.o thermal_sys.o
clock_cooling.c intel_pch_thermal.mod.c mtk_thermal.c tango_thermal.c ti-soc-thermal
cpu_cooling.c intel_pch_thermal.mod.o of-thermal.c tegra uniphier_thermal.c
da9062-thermal.c intel_pch_thermal.o power_allocator.c thermal_core.c user_space.c
db8500_thermal.c intel_powerclamp.c qcom thermal_core.h user_space.o
devfreq_cooling.c intel_quark_dts_thermal.c qcom-spmi-temp-alarm.c thermal_core.o x86_pkg_temp_thermal.c
dove_thermal.c intel_soc_dts_iosf.c qoriq_thermal.c thermal-generic-adc.c x86_pkg_temp_thermal.ko
fair_share.c intel_soc_dts_iosf.h rcar_gen3_thermal.c thermal_helpers.c x86_pkg_temp_thermal.mod.c
gov_bang_bang.c intel_soc_dts_thermal.c rcar_thermal.c thermal_helpers.o x86_pkg_temp_thermal.mod.o
hisi_thermal.c Kconfig rockchip_thermal.c thermal_hwmon.c x86_pkg_temp_thermal.o
imx_thermal.c kirkwood_thermal.c samsung thermal_hwmon.h zx2967_thermal.c
int340x_thermal Makefile spear_thermal.c thermal_hwmon.o | Both a 'x86_pkg_temp_thermal.ko' and a 'x86_pkg_temp_thermal.o' were built.
However, using my backlight example:
Code: | /usr/src/linux/drivers/video/backlight # ls
88pm860x_bl.c backlight.o gpio_backlight.c Kconfig lms501kf03.c modules.order sky81452-backlight.c
aat2870_bl.c bd6107.c hp680_bl.c l4f00242t03.c locomolcd.c omap1_bl.c tdo24m.c
adp5520_bl.c built-in.o hx8357.c lcd.c lp855x_bl.c ot200_bl.c tosa_bl.c
adp8860_bl.c corgi_lcd.c ili922x.c lcd.o lp8788_bl.c pandora_bl.c tosa_lcd.c
adp8870_bl.c cr_bllcd.c ili9320.c ld9040.c ltv350qv.c pcf50633-backlight.c tps65217_bl.c
ams369fg06.c da903x_bl.c ili9320.h ld9040_gamma.h ltv350qv.h platform_lcd.c vgg2432a4.c
apple_bl.c da9052_bl.c ipaq_micro_bl.c lm3533_bl.c lv5207lp.c pm8941-wled.c wm831x_bl.c
arcxcnn_bl.c ep93xx_bl.c jornada720_bl.c lm3630a_bl.c Makefile pwm_bl.c
as3711_bl.c generic_bl.c jornada720_lcd.c lm3639_bl.c max8925_bl.c s6e63m0.c
backlight.c generic_bl.o kb3886_bl.c lms283gf05.c modules.builtin s6e63m0_gamma.h | only 'backlight.o' was built. No 'backlight.ko' is available.
I thought, at first, maybe this was a 'built-in' vs 'module' problem. But that doesn't seem to be the case: Code: | /usr/src/linux # grep BACKLIGHT .config
# CONFIG_FB_BACKLIGHT is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=m
CONFIG_BACKLIGHT_GENERIC=m
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_PM8941_WLED is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set |
Code: | grep THERMAL .config
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_ACPI_THERMAL=y
CONFIG_THERMAL=y
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
CONFIG_THERMAL_GOV_STEP_WISE=y
# CONFIG_THERMAL_GOV_BANG_BANG is not set
CONFIG_THERMAL_GOV_USER_SPACE=y
# CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set
# CONFIG_THERMAL_EMULATION is not set
CONFIG_X86_PKG_TEMP_THERMAL=m
# CONFIG_INTEL_SOC_DTS_THERMAL is not set
# CONFIG_INT340X_THERMAL is not set
CONFIG_INTEL_PCH_THERMAL=m | In the first code example: 'CONFIG_BACKLIGHT_LCD_SUPPORT=y' is built-in, yet (WAY) above '.../backlight/lci.ko' isn't found.
In the second code example: 'CONFIG_X86_PKG_TEMP_THERMAL=m' is a module and was built and installed... (again, see WAY above)
I think I'm going around in circles now. I'm so confused...
What changed? Is this a configuration error on my part? How do I fix this?
Thanks for looking!
Last edited by dpshak on Mon May 28, 2018 4:20 pm; edited 2 times in total |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 7328 Location: Saint Amant, Acadiana
|
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 44193 Location: 56N 3W
|
Posted: Mon May 28, 2018 2:29 pm Post subject: |
|
|
dpshak,
Wild guess, you ran out of inodes or space on the filesystem.
What does and have to say?
hides a multitude of errors.
Without doing anything else. Leave your part made kernel part made run make or make -j1 if you like.
The build will stop at the first error. Thats the one we need. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
dpshak Apprentice


Joined: 05 May 2005 Posts: 170 Location: Wisconsin
|
Posted: Mon May 28, 2018 3:17 pm Post subject: |
|
|
Jaglover wrote: | Sounds like your kernel build does not finish properly, any errors at the end of make run? |
Oh for FSCK sakes! I mashed make, and it err'd out with: Code: | MK_FW firmware/i915/sk1_dmc_ver1_26.bin.gen.S
make[1]: *** No rule to make target '/lib/firmware/i915/sk1_dmc_ver1_26.bin', needed by 'firmware/i915/sk1_dmc_ver1_26.bin.gen.o'. Stop.
make: *** [Makefile:1060: firmware] Error 2 | That firmware is needed so the Intel part of Optimus is available. And yes, that firmware is available in that directory.
So I removed all of the kernel-4.16.11 stuff, copied the (working) config from my desktop machine to /usr/src/linux, made config changes to match the laptop hardware, and tried again.
Made it part way through the make and it popped up the above error! THAT didn't happen before...
So, once again, removed all kernel-4.16.11 stuff from the laptop, imported my working config from my desktop, did NOT make any configuration changes to the config, and mashed make. I figure that if I can get a 4.16.11 kernel to build and modules installed, I can then make the config changes needed.
And what do you know, it's complete! However, it looks different than before... At the end of the 'make' this is what I have: Code: | CC arch/x86/boot/main.o
CC arch/x86/boot/memory.o
CC arch/x86/boot/pm.o
AS arch/x86/boot/pmjump.o
CC arch/x86/boot/printf.o
CC arch/x86/boot/regs.o
CC arch/x86/boot/string.o
CC arch/x86/boot/tty.o
CC arch/x86/boot/video.o
CC arch/x86/boot/video-mode.o
CC arch/x86/boot/version.o
CC arch/x86/boot/video-vga.o
CC arch/x86/boot/video-vesa.o
CC arch/x86/boot/video-bios.o
LD arch/x86/boot/setup.elf
OBJCOPY arch/x86/boot/setup.bin
OBJCOPY arch/x86/boot/vmlinux.bin
HOSTCC arch/x86/boot/tools/build
BUILD arch/x86/boot/bzImage
Setup is 15548 bytes (padded to 15872 bytes).
System is 4425 kB
CRC 2a269511
Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 24 modules
CC crypto/drbg.mod.o
LD [M] crypto/drbg.ko
CC crypto/echainiv.mod.o
LD [M] crypto/echainiv.ko
CC crypto/hmac.mod.o
LD [M] crypto/hmac.ko
CC crypto/jitterentropy_rng.mod.o
LD [M] crypto/jitterentropy_rng.ko
CC crypto/sha256_generic.mod.o
LD [M] crypto/sha256_generic.ko
CC drivers/hwmon/coretemp.mod.o
LD [M] drivers/hwmon/coretemp.ko
CC drivers/hwmon/hwmon-vid.mod.o
LD [M] drivers/hwmon/hwmon-vid.ko
CC drivers/hwmon/nct6775.mod.o
LD [M] drivers/hwmon/nct6775.ko
CC drivers/mfd/lpc_ich.mod.o
LD [M] drivers/mfd/lpc_ich.ko
CC drivers/mfd/lpc_sch.mod.o
LD [M] drivers/mfd/lpc_sch.ko | (Truncated for space)
It finished without any error, and the 'bzImage' is available. THAT stuff wasn't there before!
And now: Code: | /usr/src/linux # make modules_install
INSTALL crypto/drbg.ko
INSTALL crypto/echainiv.ko
INSTALL crypto/hmac.ko
INSTALL crypto/jitterentropy_rng.ko
INSTALL crypto/sha256_generic.ko
INSTALL drivers/hwmon/coretemp.ko
INSTALL drivers/hwmon/hwmon-vid.ko
INSTALL drivers/hwmon/nct6775.ko
INSTALL drivers/mfd/lpc_ich.ko
INSTALL drivers/mfd/lpc_sch.ko
INSTALL drivers/mfd/mfd-core.ko
INSTALL drivers/mfd/vx855.ko
INSTALL drivers/thermal/intel_pch_thermal.ko
INSTALL drivers/thermal/x86_pkg_temp_thermal.ko
INSTALL fs/fuse/fuse.ko
INSTALL lib/crc8.ko
INSTALL sound/core/seq/snd-seq-midi-event.ko
INSTALL sound/core/seq/snd-seq-midi.ko
INSTALL sound/core/snd-pcm.ko
INSTALL sound/core/snd-rawmidi.ko
INSTALL sound/drivers/mpu401/snd-mpu401-uart.ko
INSTALL sound/pci/oxygen/snd-oxygen-lib.ko
INSTALL sound/pci/oxygen/snd-oxygen.ko
INSTALL sound/pci/oxygen/snd-virtuoso.ko
DEPMOD 4.16.11-gentoo | SUCCESS!!! Sort of...I must have had SOMETHING messed up in the config!
Well, now I'll start changing the config to match the laptop hardware and see what happens.
I may be back!  |
|
Back to top |
|
 |
dpshak Apprentice


Joined: 05 May 2005 Posts: 170 Location: Wisconsin
|
Posted: Mon May 28, 2018 3:23 pm Post subject: |
|
|
NeddySeagoon wrote: | dpshak,
Wild guess, you ran out of inodes or space on the filesystem.
What does and have to say?
hides a multitude of errors.
Without doing anything else. Leave your part made kernel part made run make or make -j1 if you like.
The build will stop at the first error. Thats the one we need. |
NeddySeagoon:
Code: | /usr/src/linux # df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda4 5.8M 501K 5.4M 9% /
devtmpfs 985K 413 984K 1% /dev
tmpfs 993K 517 993K 1% /run
cgroup_root 993K 3 993K 1% /sys/fs/cgroup
shm 993K 1 993K 1% /dev/shm
/dev/sda2 32K 329 32K 2% /boot
/dev/sda5 9.1M 425 9.1M 1% /home | Code: | df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda4 91G 11G 76G 13% /
devtmpfs 10M 0 10M 0% /dev
tmpfs 795M 740K 794M 1% /run
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
shm 3.9G 0 3.9G 0% /dev/shm
/dev/sda2 120M 15M 97M 13% /boot
/dev/sda5 143G 106M 135G 1% /home |
I had also thought of that 'make -jX' could be hiding problems, so I had been using JUST 'make' and watching the output... |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 7328 Location: Saint Amant, Acadiana
|
Posted: Mon May 28, 2018 3:32 pm Post subject: |
|
|
Checklist:
1. Is the firmware really where it is supposed to be, no typos, etc?
2. Is the firmware directory set up properly in kernel config? _________________ Please learn how to denote units correctly! |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 44193 Location: 56N 3W
|
Posted: Mon May 28, 2018 3:37 pm Post subject: |
|
|
dpshak,
Spot the typo ...
Code: | make[1]: *** No rule to make target '/lib/firmware/i915/sk1_dmc_ver1_26.bin' |
You have ...sk1... Thats digit one in place of lower case letter 'l' _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
dpshak Apprentice


Joined: 05 May 2005 Posts: 170 Location: Wisconsin
|
Posted: Mon May 28, 2018 4:18 pm Post subject: |
|
|
SON-OF-A-BITCH!!!
Code: | /usr/src/linux # make
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
DESCEND objtool
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/compile.h
GZIP kernel/config_data.gz
CHK kernel/config_data.h
UPD kernel/config_data.h
CC kernel/configs.o
AR kernel/built-in.o
MK_FW firmware/i915/skl_dmc_ver1_26.bin.gen.S
AS firmware/i915/skl_dmc_ver1_26.bin.gen.o
AR firmware/built-in.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
AR init/built-in.o
AR built-in.o
LD vmlinux.o
MODPOST vmlinux.o
KSYM .tmp_kallsyms1.o
KSYM .tmp_kallsyms2.o
LD vmlinux
SORTEX vmlinux
SYSMAP System.map
VOFFSET arch/x86/boot/compressed/../voffset.h
CC arch/x86/boot/compressed/misc.o
OBJCOPY arch/x86/boot/compressed/vmlinux.bin
GZIP arch/x86/boot/compressed/vmlinux.bin.gz
MKPIGGY arch/x86/boot/compressed/piggy.S
AS arch/x86/boot/compressed/piggy.o
DATAREL arch/x86/boot/compressed/vmlinux
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
AS arch/x86/boot/header.o
CC arch/x86/boot/version.o
LD arch/x86/boot/setup.elf
OBJCOPY arch/x86/boot/setup.bin
OBJCOPY arch/x86/boot/vmlinux.bin
BUILD arch/x86/boot/bzImage
Setup is 15548 bytes (padded to 15872 bytes).
System is 5433 kB
CRC 73dbe120
Kernel: arch/x86/boot/bzImage is ready (#3)
Building modules, stage 2.
MODPOST 51 modules | That, as you can see, is the 3rd kernel build. In the second build; I changed all of the sound and network drivers to match the hardware in the laptop but, to avoid the most recent problem, didn't add the firmware settings. On the third kernel build, I added in the firmware. Yes Neddy, you were right! I typed it wrong! And, now I have a laptop with a working 4.16.11 kernel!
I've been fighting with this for 2 days now and I can't figure out why it didn't work the first time around!?! As I said in my first post, I always do a kernel upgrade using the previous working kernel config file. In THAT kernel, the firmware file was typed correctly...
Oh well, it's working now!
Thanks folks for your help!  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|