Bug#908161: Please enable building a riscv64 kernel image

2018-10-11 Thread Karsten Merker
Control: tags 908161 + patch

On Tue, Sep 18, 2018 at 08:57:01PM +0200, Karsten Merker wrote:
> On Sat, Sep 08, 2018 at 11:15:36PM +0100, Ben Hutchings wrote:
> 
> [Building a linux-image-*-riscv64 binary package]
> 
> > The addition of riscv will have to wait until it has support
> > for an initramfs.
> > 
> > Is this commit sufficient to make booting with an initramfs work:
> > 
> > commit cdc7274029ca5984350a057a2399aaa340d3be2d
> > Author: Guenter Roeck 
> > Date:   Tue Aug 28 17:33:46 2018 -0700
> > 
> > riscv: Do not overwrite initrd_start and initrd_end
> > 
> > or are more changes needed?
> 
> Hello,
> 
> just a short status update: the aforementioned patch has been
> included in the upstream 4.19-rc4 release and I can confirm
> that the initramfs support for riscv64 works with 4.19-rc4.
> 
> The other major issue in this bug (unversioned symbols breaking
> the package build) is still unresolved; I'll report back as soon
> as I have received feedback from the upstream RISC-V architecture
> maintainer.

Hello,

all previously mentioned issues have been addressed in
the meantime:

- The broken initrd support has been fixed upstream in kernel
  4.19-rc4.

- The symbol version issue has been fixed upstream in kernel
  4.19-rc6.

- The riscv64 kernel config has been modularized as far as
  possible and all redundant entries have been removed.

- Headings have been added to the kernel config.

Attached is a new patch, alternatively it is available as a merge
request on salsa as suggested earlier in the discussion:

  https://salsa.debian.org/kernel-team/linux/merge_requests/66

The resulting kernel has been successfully tested on a qemu
"virt" board:

[0.00] OF: fdt: Ignoring memory range 0x8000 - 0x8020
[0.00] Linux version 4.19.0-rc7-riscv64 
(debian-kernel@lists.debian.org) (gcc version 8.2.0 (Debian 8.2.0-7)) #1 SMP 
Debian 4.19~rc7-1~exp2 (2018-10-08)
[0.00] bootconsole [early0] enabled
[0.00] Initial ramdisk at: 0x(ptrval) (43521258 bytes)
[0.00] Zone ranges:
[0.00]   DMA32[mem 0x8020-0x]
[0.00]   Normal   [mem 0x0001-0x2fff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x8020-0x0002]
[0.00] Initmem setup node 0 [mem 0x8020-0x0002]
[0.00] On node 0 totalpages: 2620928
[0.00]   DMA32 zone: 8184 pages used for memmap
[0.00]   DMA32 zone: 0 pages reserved
[0.00]   DMA32 zone: 523776 pages, LIFO batch:63
[0.00]   Normal zone: 32768 pages used for memmap
[0.00]   Normal zone: 2097152 pages, LIFO batch:63
[0.00] software IO TLB: mapped [mem 0xfbfff000-0xf000] (64MB)
[0.00] elf_hwcap is 0x112d
[0.00] percpu: Embedded 19 pages/cpu @(ptrval) s39384 r8192 
d30248 u77824
[0.00] pcpu-alloc: s39384 r8192 d30248 u77824 alloc=19*4096
[0.00] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 2579976
[0.00] Kernel command line: console=ttyS0 ro root=/dev/vda
[0.00] Dentry cache hash table entries: 2097152 (order: 12, 16777216 
bytes)
[0.00] Inode-cache hash table entries: 1048576 (order: 11, 8388608 
bytes)
[0.00] Sorting __ex_table...
[0.00] Memory: 10178016K/10483712K available (4955K kernel code, 504K 
rwdata, 1633K rodata, 446K init, 934K bss, 305696K reserved, 0K cma-reserved)
[0.00] random: get_random_u64 called from 
__kmem_cache_create+0x46/0x55c with crng_init=0
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[0.00] ftrace: allocating 21055 entries in 83 pages
[0.00] rcu: Hierarchical RCU implementation.
[0.00] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[0.00] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[0.00] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[0.00] plic: mapped 10 interrupts to 4 (out of 8) handlers.
[0.00] clocksource: riscv_clocksource: mask: 0x 
max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[0.004000] Console: colour dummy device 80x25
[0.008000] Calibrating delay loop (skipped), value calculated using timer 
frequency.. 20.00 BogoMIPS (lpj=4)
[0.012000] pid_max: default: 32768 minimum: 301
[0.016000] Security Framework initialized
[0.016000] Yama: disabled by default; enable with sysctl kernel.yama.*
[0.02] AppArmor: AppArmor initialized
[0.024000] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes)
[0.028000] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 
bytes)
[0.072000] rcu: Hierarchical SRCU implementation.
[0.092000] smp: Bringing up secondary CPUs ...
[0.112000] smp: Brought up 1 node, 4 CPUs
[0.16] d

Processed: Re: Bug#908161: Please enable building a riscv64 kernel image

2018-10-11 Thread Debian Bug Tracking System
Processing control commands:

> tags 908161 + patch
Bug #908161 [src:linux] Please enable building a riscv64 kernel image
Added tag(s) patch.

-- 
908161: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908161
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#910765: very slow boot with backport kernel (+workaround)

2018-10-11 Thread Yves-Alexis Perez
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Wed, 2018-10-10 at 22:49 +0200, stefano gozzi wrote:
> Debian stable (updated) with kernel 4.18.0-0.bpo.1-amd64 #1 SMP Debian
> 4.18.6-1~bpo9+1 (2018-09-13) x86_64 GNU/Linux
> 
> updating from standard kernel to backports, the boot is very slow (gdm
> login appears after ~3 minutes)

Hi,

can you confirm that reverting to 4.17 fixes the issue? It looks similar to
#910631 (except with LightDM, and I'm waiting confirmation on the kernel
involvement on that one).

LightDM seems to use /dev/urandom which shouldn't block at all, I wonder if
there's something else involved calling getrandom() without O_NONBLOCK, or if
there's indeed a regression in 4.18 rng.

Regards,
- -- 
Yves-Alexis
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAlu/A+IACgkQ3rYcyPpX
RFviZAgAtbkjzapCuWOTvO6rJ5WseDMr5Z88dblxnGyqY7wdh+H2BrwYRyxiZZXw
vyHhXJDInh+Zfii+cQiZ9derVZwLFkuNULagUNbJDbAWceMYqw1fgctIurRvCWJ0
XBBsj/KMuzSMu6d5bw7X3P4t9nnPAxoBnlipV3eKdoau8rTqDygeViHBrZtAlMa1
DvNv2UZ2wicd3H0jnDbm0gAlrh89ZdD9nQ4nASr5kfg29z8F0t7/wFrWefdnbU8j
DfkcxmB4Ok4C9Sx/etooxVcJAFvPQe6LaN1Ytu+Yr9vd3NcWKBteblXH30Boqmn4
QOa3f20tdOViYCAdu2vJZD7+TYF/bQ==
=nbiP
-END PGP SIGNATURE-