Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-30 Thread znavko
I tried completely to disable all options in linux-libre-4.17.3-gnu kernel  
and compile it. I installed kernel and modules and then booted to iniramfs,  
so my system works not proper way on it.


I need safely delete new broken kernels. How to do this?


# dpkg -l | grep linux-image | awk '{print$2}'
linux-image-4.4.0-119-generic
linux-image-extra-4.4.0-119-generic
linux-image-generic

# ls /boot
abi-4.4.0-119-generic retpoline-4.4.0-119-generic
config-4.17.3-gnu System.map-4.17.3-gnu
config-4.17.3-gnu.old System.map-4.17.3-gnu.old
config-4.4.0-119-generic  System.map-4.4.0-119-generic
config-4.4.15-gnu System.map-4.4.15-gnu
grub  vmlinuz-4.17.3-gnu
initrd.img-4.17.3-gnu vmlinuz-4.17.3-gnu.old
initrd.img-4.4.0-119-generic  vmlinuz-4.4.0-119-generic
initrd.img-4.4.15-gnu vmlinuz-4.4.15-gnu

# ls /lib/modules/
4.17.3-gnu  4.4.0-119-generic  4.4.15-gnu

--
Please, how delete 4.17.3-gnu, vmlinuz-4.17.3-gnu.old ?? will my pc boot  
correctly after


# rm -rf vmlinuz-4.17* System.map-4.17* config-4.17* initrd.img-4.17.3-gnu  
/lib/modules/4.17.3-gnu

# update-grub
# reboot

--
Or it needs something else?



Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-29 Thread jason

"Please, let me know how to optimize kernel in my situation?"

You could try build a kernel with make localyesconfig or make localmodconfig  
which will only include the module currently loaded on your system (so make  
sure all modules you need are presently loaded or they won't be available in  
the new kernel.) But that will probably only help with compile time by not  
building stuff you don't need and with the size of the kernel since those  
won't be there. I don't expect it to make much of a difference in start up  
time.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-29 Thread znavko

jxself, thanks a lot!

I have compiled last Libre-linux  and successfully boot into it. I used only  
menuconfig and disabled bluetooth, ipv6, xen, all wifi modules except my  
atheros.


But the kernel boot time becomes twice bigger then I had on 4.4.0

Now I have:

$ uname -a
Linux asus 4.17.3-gnu #1 SMP Wed Jun 27 21:09:44 +03 2018 x86_64 x86_64  
x86_64 GNU/Linux


$ systemd-analyze
Startup finished in 35.301s (kernel) + 1min 38.982s (userspace) = 2min  
14.284s


$ cat /home/user/kernel/mybuild/.config | nc termbin.com 
http://termbin.com/xer0

$ dmesg
[   23.880080] usb 5-2: new full-speed USB device number 2 using xhci_hcd
[   23.952630] ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
[   23.989023]
   3ACPI BIOS Error (bug): Could not resolve [^^^PB2.VGA.AFN7],  
AE_NOT_FOUND (20180313/psargs-330)
[   23.989054] ACPI Error: Method parse/execution failed  
\_SB.PCI0.VGA.LCDD._BCM, AE_NOT_FOUND (20180313/psparse-516)

[   23.991492] ACPI Error: Evaluating _BCM failed (20180313/video-364)
[   23.993303] input: Video Bus as  
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input9



But I had on 4.4.0 this:

$ systemd-analyze
Startup finished in 11.933s (kernel) + 5.280s (userspace) = 17.214s

$ cat /boot/config-4.4.0-128-generic | nc termbin.com 
http://termbin.com/rf1q

and I had bluetooth errors on boot.


I think boot time depends on components that are enabled in 4.17.3 kernel.
Please, let me know how to optimize kernel in my situation?


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-17 Thread jason

Your config mentions 4.4.128 so I first try with mainline Linux-libre:

wget  
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.128-gnu/linux-libre-4.4.128-gnu.tar.xz

tar xf linux-libre-4.4.128-gnu.tar.xz
cd linux-libre-4.4.128
wget http://termbin.com/ef1w
mv ef1w .config
make oldconfig
make -j4 bindeb-pkg

And it builds.

Then I try Trisquel's modified version of Linux-libre:

apt-get source linux-source-4.4.0
cd linux-4.4.0
wget http://termbin.com/ef1w
mv ef1w .config
make oldconfig
make -j4 bindeb-pkg

And that fails:

ERROR: "hci_register_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_recv_frame" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_unregister_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_alloc_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_free_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[3]: *** [__modpost] Error 1
Makefile:1153: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
scripts/package/Makefile:96: recipe for target 'bindeb-pkg' failed
make[1]: *** [bindeb-pkg] Error 2
Makefile:1284: recipe for target 'bindeb-pkg' failed
make: *** [bindeb-pkg] Error 2

So it's specific to Trisquel. I recommend to file a bug over it. In the  
meantime you can build mainline Linux-libre just fine, so there's your  
workaround. Although you may want to upgrade to the current version in the  
4.4 series which is 4.4.138. But it's up to you of course.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-16 Thread znavko

ok. I see it.

When I do not touch config `make` finishes ok. But now I switched off IrDa,  
Bluetooth, Xen drivers, Hyper-V, Fujitsu, all wifi manufacturers except my  
Atheros. And make failed with this:


 LD  arch/x86/boot/compressed/vmlinux
  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 17372 bytes (padded to 17408 bytes).
System is 5424 kB
CRC 4a768971
Kernel: arch/x86/boot/bzImage is ready  (#1)
ERROR: "hci_register_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_recv_frame" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_unregister_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_alloc_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
ERROR: "hci_free_dev" [ubuntu/rsi/ven_rsi_91x.ko] undefined!
/home/user/kernel/linux-4.4.0/scripts/Makefile.modpost:91: Error execution  
operation for «__modpost»

make[2]: *** [__modpost] Error 1
/home/user/kernel/linux-4.4.0/Makefile:1153: Error execution operation for  
«modules»

make[1]: *** [modules] Error 2
make[1]: exiting directory «/home/user/kernel/mybuild»
Makefile:152: Error execution operation for «sub-make»
make: *** [sub-make] Error 2

# cat /home/user/kernel/mybuild/.config | nc termbin.com 
http://termbin.com/ef1w

Please, teach me how disable unnecessary stuff knowing definitely make will  
not stop.




Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-16 Thread jason
Well, you can see the difference right? As you compare line by line they're  
not identical: One has Flidas Main and Security. The other has Flidas Main,  
Security,  and Updates.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-16 Thread znavko

-2nd laptop--

# cat /etc/apt/sources.list
# deb cdrom:[Trisquel 8.0 _flidas_ - Release amd64 (20180417)]/ flidas main

# Trisquel repositories for supported software and updates
deb https://archive.trisquel.info/trisquel/ flidas main
deb-src https://archive.trisquel.info/trisquel/ flidas main
deb https://archive.trisquel.info/trisquel/ flidas-security main
deb-src https://archive.trisquel.info/trisquel/ flidas-security main
deb https://archive.trisquel.info/trisquel/ flidas-updates main
deb-src https://archive.trisquel.info/trisquel/ flidas-updates main
# deb http://mirrors.serverhost.ro/trisquel/packages flidas-backports main
# deb-src http://mirrors.serverhost.ro/trisquel/packages flidas-backports  
main


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-16 Thread znavko
Hello! I tried to compile linux-source-4.4.0 without any changes, resting  
config as it was there.


# make menuconfig
...without any changes I saved .config
# make

it worked ok. So now I try again to make with no bluetooth and no irda.

Every time I have difficult to understand why Xen, Android, Fujitsu,  
Miscrosoft Hyper-V and many other stuff are there. When I switching off all I  
see as unnecessary the make breaks. `make` takes 10 hours for my asus x552e.   



Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-16 Thread jason

Check your sources.list. They don't seem to be identical.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-15 Thread jason
"I thought kernel has no any configuration set and I tried to use my current  
config."


The kernel does need to be configured: This is the time where you get to  
decide exactly what parts of the kernel should be built and how they should  
work. Like what scheduler do you want to use?  
https://en.wikipedia.org/wiki/Scheduling_(computing)#Since_Linux_2.6.23 And  
there's lots more.


Further, that config varies from one major release to another (so a config  
for 4.4 will be different from 4.13 because each new release introduces new  
and changed features, so the config must be updated to cover the differences.  
This is what "make oldconfig" is for: Taking a config from an old version and  
updating it based on whatever version you're building.) The kernel config  
will also vary from one CPU architecture to another (so a config for 32-bit  
x86 will be different from 64-bit and will be different from ARM and MIPS and  
RISC-V...) Not only because they are different CPUs but also because some  
kernel features are only relevant on certain kinds of machines. You can  
explore all of the options when doing "make nconfig" but there's also lots of  
information online too. Configuring the kernel is a topic of much discussion.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-15 Thread znavko

make stops with fatal error, I  achieve nothing.

Please, where can I find kernel build log? I 've leaved pc on 'make'  
execution, after that it was switched off due to os error. I want to  
understand if make was finished or not


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-15 Thread znavko

Sorry. Why 1 laptop trisquel 8 has only one linux-source, but other - 4 ones.

---1st:--
# apt-get update
Сущ:1 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial  
InRelease

Сущ:2 https://archive.trisquel.info/trisquel flidas InRelease
Пол:3 https://archive.trisquel.info/trisquel flidas-security InRelease  
[4 898 B]
Пол:4 https://archive.trisquel.info/trisquel flidas-security/main Sources  
[178 kB]
Пол:5 https://archive.trisquel.info/trisquel flidas-security/main amd64  
Packages [684 kB]
Пол:6 https://archive.trisquel.info/trisquel flidas-security/main i386  
Packages [681 kB]

Получено 1 547 kБ за 3с (449 kБ/c)
Чтение списков пакетов… Готово

# apt-cache search linux-source
linux-source-4.4.0 - Linux-libre kernel source for version 4.4.0

# lsb_release -a
No LSB modules are available.
Distributor ID: Trisquel
Description:Trisquel GNU/Linux 8.0, Flidas
Release:8.0
Codename:   flidas


2nd



Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-14 Thread znavko

Thank you for reply.

# gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

manually? I am using linux-libre core, cause it is free. I cannot remove  
everything non-free. So what exactly I need?


How to compile 4.13? Can I not to use current config? So will I need setup  
kernel options or there are default options that will work?


... I downloaded linux-source-4.4.0 and started `make menuconfig && make` . I  
did not use my current config. Just rested things as it was and also disabled  
bluetooth and irda. Now it is making 15 minutes. (Making of 4.13 stopped  
after 4 minutes).


I think config for 4.4 cannot  work for 4.13.

Why there is no anywhere info about how to get config for upstream version ?  
I thought kernel has no any configurations set and I tried to use my current  
config.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-14 Thread megver83
It seems that the  
/home/y/kernel/linux-hwe-4.13.0/scripts/ubuntu-retpoline-extract-one script  
does something wrong. Why don't you better fo everything manually?


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-14 Thread megver83

which GCC version are you using?


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-13 Thread znavko

jxself, thank you.

make menuconfig
make oldconfig
make

cause the same error: segmentation faul. Ur config for 4.13 forced me to  
answer several questions. I only pressed enter. So the error rests -  
Segmentation fault. 


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-13 Thread jason
"Segmentation fault" is an important message there. I don't know what the  
rests says because they're in Russian and I only speak English.


I notice you're building 4.13 but using a .config from 4.4. There will be  
configuration file differences that need to be accounted for. Run make  
oldconfig first to answer the questions. You can also use mine for 4.13 if  
you'd rather: https://jxself.org/git/?p=kernel-configs.git


Also, instead of 'make' try 'make bindeb-pkg' - Then you'll get .deb files  
that can be used with the package manager.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-13 Thread intheforest
Я бы обязательно помог, но пока мне самому  
престоит многое узнать. Компилировать  
кёрнел - дело интересное и приятное.


Re: [Trisquel-users] Let me several questions about kernel compilation?

2018-06-13 Thread znavko

Is it a kernel bug or my own mistake?


[Trisquel-users] Let me several questions about kernel compilation?

2018-06-13 Thread znavko
Hello! I use trisquel 8.0. I have no sense how to compile kernel, I tried  
once it worked on 1 laptop, the other laptop stops and does not compile every  
time. Please, what is wrong in these actions:


# apt-get update
# apt-get upgrade

# apt-get install dpkg-dev libncurses5-dev  kernel-package fakeroot bzip2  
build-essential


# uname -a
Linux asus 4.4.0-119-generic #143+8.0trisquel2 SMP Thu Apr 5 16:24:48 UTC  
2018 x86_64 x86_64 x86_64 GNU/Linux


# ls /boot
abi-4.4.0-119-generic grub   
retpoline-4.4.0-119-generic   vmlinuz-4.4.0-119-generic
config-4.4.0-119-generic  initrd.img-4.4.0-119-generic   
System.map-4.4.0-119-generic



# apt-cache search linux-source
linux-source-4.4.0 - Linux-libre kernel source for version 4.4.0
linux-source - Linux kernel source with Ubuntu patches
linux-source-4.13.0 - Linux-libre kernel source for version 4.13.0
linux-source-4.8.0 - Linux-libre kernel source for version 4.8.0

# apt-get source linux-source-4.13.0

# ls
linux-hwe-4.13.0  linux-hwe_4.13.0-45.50~16.04.1+8.0trisquel1.dsc   
linux-hwe_4.13.0-45.50~16.04.1+8.0trisquel1.tar.gz  mybuild


# cd linux-hwe-4.13.0

# make O=/home/user/kernel/mybuild menuconfig

Then I loaded config from /boot/config-4.4.0-119-generic, switched off that I  
do not need: IRDA и Bluetooth then saved config into  
/home/user/kernel/mybuild/.config



# make O=/home/user/kernel/mybuild

/bin/bash  
/home/y/kernel/linux-hwe-4.13.0/scripts/ubuntu-retpoline-extract-one  
arch/x86/crypto/sha1-mb/sha1_mb_mgr_submit_avx2.o  
/home/y/kernel/linux-hwe-4.13.0/arch/x86/crypto/sha1-mb/sha1_mb_mgr_submit_avx2.S  
"";

  AS [M]  arch/x86/crypto/sha1-mb/sha1_x8_avx2.o
/bin/bash  
/home/y/kernel/linux-hwe-4.13.0/scripts/ubuntu-retpoline-extract-one  
arch/x86/crypto/sha1-mb/sha1_x8_avx2.o  
/home/y/kernel/linux-hwe-4.13.0/arch/x86/crypto/sha1-mb/sha1_x8_avx2.S "";

  LD [M]  arch/x86/crypto/sha1-mb/sha1-mb.o
  AS  arch/x86/entry/entry_64.o
Segmentation fault
/home/y/kernel/linux-hwe-4.13.0/scripts/Makefile.build:419: ошибка  
выполнения рецепта для цели  
«arch/x86/entry/entry_64.o»

make[3]: *** [arch/x86/entry/entry_64.o] Ошибка 139
/home/y/kernel/linux-hwe-4.13.0/scripts/Makefile.build:589: ошибка  
выполнения рецепта для цели «arch/x86/entry»

make[2]: *** [arch/x86/entry] Ошибка 2
/home/y/kernel/linux-hwe-4.13.0/Makefile:1055: ошибка  
выполнения рецепта для цели «arch/x86»

make[1]: *** [arch/x86] Ошибка 2
make[1]: выход из каталога «/home/y/kernel/mybuild»
Makefile:145: ошибка выполнения рецепта для  
цели «sub-make»

make: *** [sub-make] Ошибка 2

Sorry? Why does it stop?