User avatar
KingOfLostFools
Posts: 13
Joined: Thu Oct 05, 2017 9:17 pm
Location: Perth, Scotland
Contact: Website

Re: Moving Linux kernel to 4.14

Wed Jan 10, 2018 6:09 am

One of my Raspberry PI's is in a really poor location for WiFi (not my network, so I can't fix or adjust it).

It operates well and the apt-get update and apt-get upgrade commands don't phase it at all, but the sudo BRANCH=next rpi-update fails multiple times during the download of the second stage with "gzip: stdin: unexpected end of file".

Even though it has downloaded a big chunk of the file, whenever I reissue the command it starts stage two back from the beginning again (and usually fails again when the wifi dips out)

Are there any options to prevent this, ensure the second stage continues from where it left off or whatever?

Image
Time is the fire in which we burn - Delmore Schwartz

User avatar
algorithm
Posts: 168
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: Moving Linux kernel to 4.14

Thu Jan 11, 2018 10:30 am

KingOfLostFools wrote:
Wed Jan 10, 2018 6:09 am
One of my Raspberry PI's is in a really poor location for WiFi (not my network, so I can't fix or adjust it).

It operates well and the apt-get update and apt-get upgrade commands don't phase it at all, but the sudo BRANCH=next rpi-update fails multiple times during the download of the second stage with "gzip: stdin: unexpected end of file".

Even though it has downloaded a big chunk of the file, whenever I reissue the command it starts stage two back from the beginning again (and usually fails again when the wifi dips out)
I'm pretty sure this is not related to the BRANCH=next topic of this thread, but yes, I have had that same problem over the holiday. It might be down to spotty wifi, like you say, but also like you, it only fails on rpi-update never on apt-get upgrade. I wondered if the specific servers were busier than usual.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5162
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux kernel to 4.14

Thu Jan 11, 2018 11:44 am

paul433 wrote:
Tue Jan 09, 2018 5:04 pm
How is the testing going? Has there been a decision made to make the transition official?
Seems to be no major issues. Moving to the master branch of rpi-update should happen pretty soon.


User avatar
KingOfLostFools
Posts: 13
Joined: Thu Oct 05, 2017 9:17 pm
Location: Perth, Scotland
Contact: Website

Re: Moving Linux kernel to 4.14

Thu Jan 25, 2018 4:57 am

I've followed that link and I don't even understand what it is that you are linking to.
Time is the fire in which we burn - Delmore Schwartz

runboy93
Posts: 338
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland
Contact: Website

Re: Moving Linux kernel to 4.14

Thu Jan 25, 2018 9:54 pm

4.9.y VC4 status seem to be frozen, and now work continues on 4.14.y (3 hours ago, changes added to rpi-update firmware kernel 4.14.15)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20752
Joined: Sat Jul 30, 2011 7:41 pm

Re: Moving Linux kernel to 4.14

Fri Jan 26, 2018 9:47 am

runboy93 wrote:
Thu Jan 25, 2018 9:54 pm
4.9.y VC4 status seem to be frozen, and now work continues on 4.14.y (3 hours ago, changes added to rpi-update firmware kernel 4.14.15)
Hence the title of this thread?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

runboy93
Posts: 338
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland
Contact: Website

Re: Moving Linux kernel to 4.14

Fri Jan 26, 2018 11:41 am

jamesh wrote:
Fri Jan 26, 2018 9:47 am
Hence the title of this thread?
Yeah, but let's hope we see it in near future like first post says.

User avatar
DougieLawson
Posts: 34158
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Moving Linux kernel to 4.14

Fri Jan 26, 2018 6:36 pm

jamesh wrote:
Fri Jan 26, 2018 9:47 am
runboy93 wrote:
Thu Jan 25, 2018 9:54 pm
4.9.y VC4 status seem to be frozen, and now work continues on 4.14.y (3 hours ago, changes added to rpi-update firmware kernel 4.14.15)
Hence the title of this thread?
And the reason that 13 out of 14 raspberries are running 4.14.15. Three 3Bs are also running the beta version of the WiFi firmware.

Beware that this is a game for experts only, it's for the folks who can get a dead Raspberry running again in twenty minutes rather than twenty hours.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

cjan
Posts: 614
Joined: Sun May 06, 2012 12:00 am

Re: Moving Linux kernel to 4.14

Sat Jan 27, 2018 3:30 am

cjan wrote:
Wed Nov 15, 2017 12:04 am
enable FKMS boot fail, black screen.
after 2 months test again 4.14.15, black screen still.

HiassofT
Posts: 118
Joined: Fri Jun 30, 2017 10:07 pm

Re: Moving Linux kernel to 4.14

Sat Jan 27, 2018 3:00 pm

FYI: Eric Anholt held a rather interesting talk about VC4 driver development a this week's linux.conf.au. It's up here on youtube: https://www.youtube.com/watch?v=hNeq-iG9pfc

so long,

Hias

paul433
Posts: 11
Joined: Sun Dec 30, 2012 10:46 pm

Re: Moving Linux kernel to 4.14

Sat Jan 27, 2018 11:50 pm

Anyone seeing Kernel panics at boot? It's very random and it seems to come and go. The final message is Kernel panic - not syncing - attempted to kill idle task which I know is pretty generic.

But when it happens, the kernel is crashing before the serial console comes up, so all I can see is the partial error that is still on the monitor.

EDIT: I rebuilt the kernel, enabling some built in fonts so that I could get more on the screen. It is crashing when detecting/setting up the usb controller. See Attached image. While this is a PREEMPT built kernel, we have seen this type of crash on the SMP kernel. This image is also using the current firmware->next branch. Most of the time, the system boots just fine, and will run just fine.

Normally we run initial_turbo=60 in the config.txt, but removing it does appear to help.

Image

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5162
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux kernel to 4.14

Tue Jan 30, 2018 1:32 pm

paul433 wrote:
Sat Jan 27, 2018 11:50 pm
Normally we run initial_turbo=60 in the config.txt, but removing it does appear to help.
Are you overclocking? Does "vcgencmd get_throttled" return a non-zero value (when booting succeeded perhaps after running something that stresses Pi).

paul433
Posts: 11
Joined: Sun Dec 30, 2012 10:46 pm

Re: Moving Linux kernel to 4.14

Tue Jan 30, 2018 6:33 pm

No overclocking. I'll have to add vcgencmd to check on throttling. we don't normally include this in our packages. This is happening on many different systems across our dev team (RPI2B, RPI3B) some with the rpi 7" display others HDMI monitors connected to troubleshoot, and various Audio configurations (onboard audio or various i2s dacs). Once running, we have not seen any issues. And we have not seen this situation under 4.9.y kernels.

I should note that we have the scaling governor defaulted to performance in the kernel as well.

A couple other observations
1) Frequency of error is higher when warm booting, but still can go 15-20 reboots without seeing the error.
2) As Noted, removing initial_turbo=60 did help, but did not eliminate the issue
3) Using a different io scheduler changes the behavior (deadline is default)
4) Boot media has no effect (i.e. rpi3B booting from USB stick )

Roken
Posts: 233
Joined: Sun Dec 31, 2017 4:35 pm

Re: Moving Linux kernel to 4.14

Tue Jan 30, 2018 8:59 pm

I've been using 4.14 for a while on an Arch Desktop without issues. 4.15 dropped in today, which at the moment is working, but not long enough for issues. However, 4.15 introduces support for the Pi touchscreen (not an issue for my headless use, but probably of interest to some). - https://www.phoronix.com/scan.php?page= ... r-Exciting

I'm considering buying another with a powerbank and touchscreen, and see how it compares to my tablet.
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

paul433
Posts: 11
Joined: Sun Dec 30, 2012 10:46 pm

Re: Moving Linux kernel to 4.14

Fri Feb 02, 2018 3:33 pm

Just a as a followup, through various testing, vcgencmd get_throttled always returns 0.

I also noted that the Rasbian kernels are compiled with a different Cross Compiler than noted here (https://www.raspberrypi.org/documentati ... uilding.md) So I have switched to that gcc 4.9.3 based compiler.

I have not been able to replicate on raspbian. But our OS(piCore) is purely running in RAM, so root=/dev/ram0 and we are loading the initrd with the config.txt

initramfs intrd.gz followkernel


Is there anything that we can do to get more debug info?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5162
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux kernel to 4.14

Mon Feb 05, 2018 9:23 pm

I believe fkms is fixed in latest update (4.14.17). If you use this then please give it a test and report here.
I expect we'll be pushing 4.14 to default (master) branch of rpi-update this week.

runboy93
Posts: 338
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland
Contact: Website

Re: Moving Linux kernel to 4.14

Mon Feb 05, 2018 11:51 pm

dom wrote:
Mon Feb 05, 2018 9:23 pm
I believe fkms is fixed in latest update (4.14.17). If you use this then please give it a test and report here.
I expect we'll be pushing 4.14 to default (master) branch of rpi-update this week.
Very good news :)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5162
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux kernel to 4.14

Fri Feb 09, 2018 6:59 pm

4.14 is now on the master branch of rpi-update.

Code: Select all

sudo rpi-update
is enough to get the 4.14 kernel.

memos.electron
Posts: 1
Joined: Sun Feb 11, 2018 11:52 am

Re: Moving Linux kernel to 4.14

Sun Feb 11, 2018 12:21 pm

Good news for 4.14.18 for arm64. Running on 64bit kernel with only one problem on WiFi. The brcmfmac and brcmutil not loaded at boot time. Tried to load them manually without errors and didn't find the wlan0 interface with sudo ifconfig. I know networking must be restarted and after sudo sysctl networking restart still the same results.

This is the script I 've made for the build process:

Code: Select all

#!/bin/bash
KERNEL=kernel8
LINUX_SOURCE_DIRECTORY=linux-rpi-4.14.y
LINUX_BUILD_DIRECTORY_PREFFIX=linux-rpi
RPI_KERNEL_VERSION=4.14.18-v8
OUTPUT_DIR=clone
BUILD_OUTPUT=$LINUX_BUILD_DIRECTORY_PREFFIX-$RPI_KERNEL_VERSION
cd $LINUX_SOURCE_DIRECTORY
make ARCH=arm64 O=../$BUILD_OUTPUT CROSS_COMPILE=aarch64-linux-gnu- bcmrpi3_defconfig
make ARCH=arm64 O=../$BUILD_OUTPUT CROSS_COMPILE=aarch64-linux-gnu- -j4
sudo make ARCH=arm64 O=../$BUILD_OUTPUT CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=../$OUTPUT_DIR/rootfs modules_install
cd ..
sudo rm $OUTPUT_DIR/rootfs/lib/modules/$RPI_KERNEL_VERSION/build
sudo rm $OUTPUT_DIR/rootfs/lib/modules/$RPI_KERNEL_VERSION/source
sudo cp $BUILD_OUTPUT/arch/arm64/boot/Image $OUTPUT_DIR/boot/$KERNEL.img
sudo cp $BUILD_OUTPUT/arch/arm64/boot/dts/broadcom/*.dtb $OUTPUT_DIR/boot
[ ! -e $OUTPUT_DIR/boot/config.txt~ ] && sudo cp --preserve=all $OUTPUT_DIR/boot/config.txt $OUTPUT_DIR/boot/config.txt~
#[ ! -e $OUTPUT_DIR/boot/cmdline.txt~ ] && sudo cp $OUTPUT_DIR/boot/cmdline.txt $OUTPUT_DIR/boot/cmdline.txt~
sudo cp --preserve=all $OUTPUT_DIR/boot/config.txt~ $OUTPUT_DIR/boot/config.txt
sudo bash -c 'echo "
# For 64bit to work
arm_64bit=1
" >> '$OUTPUT_DIR'/boot/config.txt'
#sudo cp $OUTPUT_DIR/boot/cmdline.txt~ $OUTPUT_DIR/boot/cmdline.txt
#sudo bash -c 'echo "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait" > '$OUTPUT_DIR'/boot/cmdline.txt'
sudo rsync -aur --rsync-path "sudo rsync" $OUTPUT_DIR/boot/* [email protected]:/boot
sudo rsync -aur --rsync-path "sudo rsync" $OUTPUT_DIR/rootfs/lib/modules/$RPI_KERNEL_VERSION [email protected]:/lib/modules
Please tell me if there is something wrong.

nixy82
Posts: 40
Joined: Sat Sep 12, 2015 9:19 am

Re: Moving Linux kernel to 4.14

Mon Feb 12, 2018 10:50 am

Hi

We're running a CM3 on a custom carrier board we've had for a few years now.

Has been running quite happily up to 4.9.75, no problems. All Solid.

I've just done a rpi-update running on Jessie to test out the new 4.14 kernel and the system hangs on next boot up :

https://gist.github.com/anonymous/55a8b ... b3f61db1c1

These look more interesting from a "going bang" perspective :

https://gist.github.com/anonymous/16b43 ... 046169804a
https://gist.github.com/anonymous/b36a2 ... ffc0584462

What can I do to assist with debugging this?


Andrew.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5808
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Moving Linux kernel to 4.14

Mon Feb 12, 2018 11:13 am

nixy82 wrote:
Mon Feb 12, 2018 10:50 am
Hi

We're running a CM3 on a custom carrier board we've had for a few years now.

Has been running quite happily up to 4.9.75, no problems. All Solid.

I've just done a rpi-update running on Jessie to test out the new 4.14 kernel and the system hangs on next boot up :

https://gist.github.com/anonymous/55a8b ... b3f61db1c1

These look more interesting from a "going bang" perspective :

https://gist.github.com/anonymous/16b43 ... 046169804a
https://gist.github.com/anonymous/b36a2 ... ffc0584462

What can I do to assist with debugging this?
To avoid duplication of effort, this has been raised on Github too. Probably easiest to keep working there.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

nixy82
Posts: 40
Joined: Sat Sep 12, 2015 9:19 am

Re: Moving Linux kernel to 4.14

Mon Feb 12, 2018 11:16 am

Yes that's what I figured ;-)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5808
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Moving Linux kernel to 4.14

Mon Feb 12, 2018 1:43 pm

Minor realisation - 4.14 switches to the upstream version of the V4L2 driver, and that uses CMA for all the allocations. If asking for large images then you may have an issue as the default CMA heap is only 8MB.
Adding "cma=48M" to the start of /boot/cmdline.txt should suffice for now, but I'll discuss with others what the best solution is there. (CMA is going to become more and more relevant very soon, so we need to answer the question sensibly anyway).

edit: scrub that. We just have a bastard love child.
https://github.com/raspberrypi/linux/bl ... Kconfig#L6

Code: Select all

select VIDEOBUF2_VMALLOC
https://github.com/raspberrypi/linux/bl ... mera.c#L20

Code: Select all

#include <media/videobuf2-vmalloc.h>
#include <media/videobuf2-dma-contig.h>
https://github.com/raspberrypi/linux/bl ... ra.c#L1909

Code: Select all

q->mem_ops = &vb2_vmalloc_memops;
Only one of those includes should be present, but we appear to still be on vmalloc so all is OK at present.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

paul433
Posts: 11
Joined: Sun Dec 30, 2012 10:46 pm

Re: Moving Linux kernel to 4.14

Tue Feb 13, 2018 3:03 am

We have been doing a lot of reboot testing, our regular kernel which is compiled nearly identical to the rpi kernel now seems to be pretty stable, with well over 1000 reboot cycles with no kernel panics. However the PREEMPT and PREEMPT_RT kernels are still showing the crash as posted above. Couple of observations

Running Headless or putting dwc_otg.fiq_enable=0 and dwc_otg.fiq_fsm_enable=0 on the command line also reduce/eliminate the kernel panics.

Return to “Advanced users”