public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* Building the Raspberry Pi kernel with RT PREEMPT
@ 2018-02-06 23:02 t-v.k
  2018-02-07  7:55 ` Alexander Dahl
  0 siblings, 1 reply; 5+ messages in thread
From: t-v.k @ 2018-02-06 23:02 UTC (permalink / raw)
  To: linux-rt-users

Hello,

this is my first time on a mailing list. I'm not sure how this works.
The FAQ linked on this page:
https://wiki.linuxfoundation.org/realtime/communication/mailinglists
just says "Page not found". I hope I can just ask a question this way.

I'm currently trying to automate the build of a Linux kernel with the RT
PREEMPT patch. The kernel that I'm trying to build is in this git
repository: https://github.com/raspberrypi/linux (branch rpi-4.14.y)

It's the official kernel for the Raspberry Pi.

But at the moment I am stuck. There are two problems. When I apply the
patch "patch-4.14.15-rt13.patch.gz", I get errors like:

Hunk #9 FAILED at 795.
...
1 out of 20 hunks FAILED -- saving rejects to file kernel/softirq.c.rej
...

and as a result of this it exits with code 1.

Here is the full build process output:
https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435

When I just ignore it and continue I get to the point where I can run
"make zImage", which then fails with this:

kernel/softirq.c: In function 'invoke_softirq':
kernel/softirq.c:801:3: error: implicit declaration of function
'do_softirq_own_stack' [-Werror=implicit-function-declaration]
   do_softirq_own_stack();
   ^
kernel/softirq.c:806:2: error: #else without #if
 #else /* PREEMPT_RT_FULL */
  ^
kernel/softirq.c:807:2: warning: ISO C90 forbids mixed declarations and
code [-Wdeclaration-after-statement]
  unsigned long flags;
  ^
kernel/softirq.c:817:2: error: #endif without #if
 #endif
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:320: recipe for target 'kernel/softirq.o' failed
make[1]: *** [kernel/softirq.o] Error 1
Makefile:1028: recipe for target 'kernel' failed
make: *** [kernel] Error 2


The full log is in the build output linked above.
I've been trying to follow this guide: http://www.frank-durr.de/?p=203
This is my "build script" if you will:
https://gitlab.com/T-vK/rpi-rt-kernel/blob/master/.gitlab-ci.yml
The docker image it runs on has been build from this file:
https://gitlab.com/T-vK/rpi-rt-kernel/blob/master/Dockerfile

I should mention, the patch that I apply right before "make zImage"
(patch < rt-config.patch) simply applies this menuconfig setting:

Kernel Features → Preemption Model (Fully Preemptible Kernel (RT)) →
Fully Preemptible Kernel (RT)

(I just created the default config for rpi-4.14.y using "make
bcm2709_defconfig" and then copied it and modified the above mentioned
option using "make menuconfig" and then I just ran a "diff -u ..." on it
to create the patch)

Can anyone help me with these issues?


Best regards
T-vK

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building the Raspberry Pi kernel with RT PREEMPT
  2018-02-06 23:02 Building the Raspberry Pi kernel with RT PREEMPT t-v.k
@ 2018-02-07  7:55 ` Alexander Dahl
  2018-02-08 16:19   ` t-v.k
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Dahl @ 2018-02-07  7:55 UTC (permalink / raw)
  To: linux-rt-users; +Cc: t-v.k@gmx.net

Hello,

Am Mittwoch, 7. Februar 2018, 00:02:52 CET schrieb t-v.k@gmx.net:
> this is my first time on a mailing list. I'm not sure how this works.

You write to the list address, everyone also subscribed gets your mail, 
including you. Some people will set you in Cc additionally.

> I'm currently trying to automate the build of a Linux kernel with the RT
> PREEMPT patch. The kernel that I'm trying to build is in this git
> repository: https://github.com/raspberrypi/linux (branch rpi-4.14.y)
> 
> It's the official kernel for the Raspberry Pi.

Yes, and it has some patches on top of the upstream vanilla kernel, IIRC 
around 200 the last time a looked at it.

> But at the moment I am stuck. There are two problems. When I apply the
> patch "patch-4.14.15-rt13.patch.gz", I get errors like:
> 
> Hunk #9 FAILED at 795.
> ...
> 1 out of 20 hunks FAILED -- saving rejects to file kernel/softirq.c.rej
> ...
> 
> and as a result of this it exits with code 1.
> 
> Here is the full build process output:
> https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435
> 
> When I just ignore it and continue I get to the point where I can run
> "make zImage", which then fails with this:

This makes no sense, the patch must apply. You don't want to build anything 
with a half applied patch.

> Can anyone help me with these issues?

If you're on v4.14 anyway, I would recommend to run a vanilla kernel and put 
the RT patch(es) on top. At least for a system without graphics, this should 
work. (I had a RPi 1B running with vanilla v4.12 built with ptxdist and the 
DistroKit BSP some time ago, v4.14 and v4.15 also run fine headless. Should 
also work for RPi 2.)

HTH & Greets
Alex


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building the Raspberry Pi kernel with RT PREEMPT
  2018-02-07  7:55 ` Alexander Dahl
@ 2018-02-08 16:19   ` t-v.k
  2018-02-09 10:35     ` Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: t-v.k @ 2018-02-08 16:19 UTC (permalink / raw)
  To: linux-rt-users; +Cc: Alexander Dahl, Mirza Krak

Thanks for the answers!

I'll need a DE in the end so I'll probably have to stick with the Raspberry Pi kernel. 
Also, I would like to have a very recent kernel. I'm using a Raspberry Pi 3 Model B btw.
I think the issue with my patching was that I applied the patches for '4.14.15-rt13' while the 'rpi-4.14.y' branch from the Raspberry Pi kernel was a bit ahead (~4.14.17).
I went back in the commit history and found a commit that literally said 'Linux 4.14.15', then I changed my script to check that out instead of 'rpi-4.14.y'. 
Now the patches apply successfully: https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51703707
But as you can see there is another issue now. 'make bcm2709_defconfig' doesn't work:
> Can't find default configuration "arch/arm/configs/bcm2709_defconfig"!

T-vK
 
 
On 07 February 2018 at 08:55, "Alexander Dahl" <ada@thorsis.com> wrote:

Am Mittwoch, 7. Februar 2018, 00:02:52 CET schrieb t-v.k@gmx.net:
> this is my first time on a mailing list. I'm not sure how this works.

You write to the list address, everyone also subscribed gets your mail,
including you. Some people will set you in Cc additionally.

> I'm currently trying to automate the build of a Linux kernel with the RT
> PREEMPT patch. The kernel that I'm trying to build is in this git
> repository: https://github.com/raspberrypi/linux (branch rpi-4.14.y)
>
> It's the official kernel for the Raspberry Pi.

Yes, and it has some patches on top of the upstream vanilla kernel, IIRC
around 200 the last time a looked at it.

> But at the moment I am stuck. There are two problems. When I apply the
> patch "patch-4.14.15-rt13.patch.gz", I get errors like:
>
> Hunk #9 FAILED at 795.
> ...
> 1 out of 20 hunks FAILED -- saving rejects to file kernel/softirq.c.rej
> ...
>
> and as a result of this it exits with code 1.
>
> Here is the full build process output:
> https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435[https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435]
>
> When I just ignore it and continue I get to the point where I can run
> "make zImage", which then fails with this:

This makes no sense, the patch must apply. You don't want to build anything
with a half applied patch.

> Can anyone help me with these issues?

If you're on v4.14 anyway, I would recommend to run a vanilla kernel and put
the RT patch(es) on top. At least for a system without graphics, this should
work. (I had a RPi 1B running with vanilla v4.12 built with ptxdist and the
DistroKit BSP some time ago, v4.14 and v4.15 also run fine headless. Should
also work for RPi 2.)

HTH & Greets
Alex
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building the Raspberry Pi kernel with RT PREEMPT
  2018-02-08 16:19   ` t-v.k
@ 2018-02-09 10:35     ` Roland Hieber
  2018-02-09 11:16       ` t-v.k
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2018-02-09 10:35 UTC (permalink / raw)
  To: t-v.k; +Cc: linux-rt-users, Alexander Dahl, Mirza Krak

Hi,

the bcm2709_defconfig is an addition of the Raspberry Pi version of the 
kernel, and is therefore not available in the upstream 4.4.15 commit you 
checked out.

  - Roland

On 08.02.2018 17:19, t-v.k@gmx.net wrote:
> Thanks for the answers!
> 
> I'll need a DE in the end so I'll probably have to stick with the Raspberry Pi kernel.
> Also, I would like to have a very recent kernel. I'm using a Raspberry Pi 3 Model B btw.
> I think the issue with my patching was that I applied the patches for '4.14.15-rt13' while the 'rpi-4.14.y' branch from the Raspberry Pi kernel was a bit ahead (~4.14.17).
> I went back in the commit history and found a commit that literally said 'Linux 4.14.15', then I changed my script to check that out instead of 'rpi-4.14.y'.
> Now the patches apply successfully: https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51703707
> But as you can see there is another issue now. 'make bcm2709_defconfig' doesn't work:
>> Can't find default configuration "arch/arm/configs/bcm2709_defconfig"!
> 
> T-vK
>   
>   
> On 07 February 2018 at 08:55, "Alexander Dahl" <ada@thorsis.com> wrote:
> 
> Am Mittwoch, 7. Februar 2018, 00:02:52 CET schrieb t-v.k@gmx.net:
>> this is my first time on a mailing list. I'm not sure how this works.
> 
> You write to the list address, everyone also subscribed gets your mail,
> including you. Some people will set you in Cc additionally.
> 
>> I'm currently trying to automate the build of a Linux kernel with the RT
>> PREEMPT patch. The kernel that I'm trying to build is in this git
>> repository: https://github.com/raspberrypi/linux (branch rpi-4.14.y)
>>
>> It's the official kernel for the Raspberry Pi.
> 
> Yes, and it has some patches on top of the upstream vanilla kernel, IIRC
> around 200 the last time a looked at it.
> 
>> But at the moment I am stuck. There are two problems. When I apply the
>> patch "patch-4.14.15-rt13.patch.gz", I get errors like:
>>
>> Hunk #9 FAILED at 795.
>> ...
>> 1 out of 20 hunks FAILED -- saving rejects to file kernel/softirq.c.rej
>> ...
>>
>> and as a result of this it exits with code 1.
>>
>> Here is the full build process output:
>> https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435[https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435]
>>
>> When I just ignore it and continue I get to the point where I can run
>> "make zImage", which then fails with this:
> 
> This makes no sense, the patch must apply. You don't want to build anything
> with a half applied patch.
> 
>> Can anyone help me with these issues?
> 
> If you're on v4.14 anyway, I would recommend to run a vanilla kernel and put
> the RT patch(es) on top. At least for a system without graphics, this should
> work. (I had a RPi 1B running with vanilla v4.12 built with ptxdist and the
> DistroKit BSP some time ago, v4.14 and v4.15 also run fine headless. Should
> also work for RPi 2.)
> 
> HTH & Greets
> Alex
>   
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Pengutronix e.K.                  | Roland Hieber               |
Industrial Linux Solutions        | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Building the Raspberry Pi kernel with RT PREEMPT
  2018-02-09 10:35     ` Roland Hieber
@ 2018-02-09 11:16       ` t-v.k
  0 siblings, 0 replies; 5+ messages in thread
From: t-v.k @ 2018-02-09 11:16 UTC (permalink / raw)
  To: linux-rt-users; +Cc: Alexander Dahl, Mirza Krak, Roland Hieber

Hey,

the commit that I checked out was from the raspberrypi kernel
repository, but it does indeed not have the 'bcm2709_defconfig':
https://github.com/raspberrypi/linux/tree/a16134b082346b7e7c34f594a0763eafacdcea92/arch/arm/configs
The problem is that when that file was added, the branch was at 4.14.17
already. But as I said, I need 4.14.15. :/
Maybe I could just use the old 4.14.15 commit and add that one file from
the 4.14.17 state?

 - T-vK

On 02/09/2018 11:35 AM, Roland Hieber wrote:
> Hi,
> 
> the bcm2709_defconfig is an addition of the Raspberry Pi version of the
> kernel, and is therefore not available in the upstream 4.4.15 commit you
> checked out.
> 
>  - Roland
> 
> On 08.02.2018 17:19, t-v.k@gmx.net wrote:
>> Thanks for the answers!
>>
>> I'll need a DE in the end so I'll probably have to stick with the
>> Raspberry Pi kernel.
>> Also, I would like to have a very recent kernel. I'm using a Raspberry
>> Pi 3 Model B btw.
>> I think the issue with my patching was that I applied the patches for
>> '4.14.15-rt13' while the 'rpi-4.14.y' branch from the Raspberry Pi
>> kernel was a bit ahead (~4.14.17).
>> I went back in the commit history and found a commit that literally
>> said 'Linux 4.14.15', then I changed my script to check that out
>> instead of 'rpi-4.14.y'.
>> Now the patches apply successfully:
>> https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51703707
>> But as you can see there is another issue now. 'make
>> bcm2709_defconfig' doesn't work:
>>> Can't find default configuration "arch/arm/configs/bcm2709_defconfig"!
>>
>> T-vK
>>     On 07 February 2018 at 08:55, "Alexander Dahl" <ada@thorsis.com>
>> wrote:
>>
>> Am Mittwoch, 7. Februar 2018, 00:02:52 CET schrieb t-v.k@gmx.net:
>>> this is my first time on a mailing list. I'm not sure how this works.
>>
>> You write to the list address, everyone also subscribed gets your mail,
>> including you. Some people will set you in Cc additionally.
>>
>>> I'm currently trying to automate the build of a Linux kernel with the RT
>>> PREEMPT patch. The kernel that I'm trying to build is in this git
>>> repository: https://github.com/raspberrypi/linux (branch rpi-4.14.y)
>>>
>>> It's the official kernel for the Raspberry Pi.
>>
>> Yes, and it has some patches on top of the upstream vanilla kernel, IIRC
>> around 200 the last time a looked at it.
>>
>>> But at the moment I am stuck. There are two problems. When I apply the
>>> patch "patch-4.14.15-rt13.patch.gz", I get errors like:
>>>
>>> Hunk #9 FAILED at 795.
>>> ...
>>> 1 out of 20 hunks FAILED -- saving rejects to file kernel/softirq.c.rej
>>> ...
>>>
>>> and as a result of this it exits with code 1.
>>>
>>> Here is the full build process output:
>>> https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435[https://gitlab.com/T-vK/rpi-rt-kernel/-/jobs/51343435]
>>>
>>>
>>> When I just ignore it and continue I get to the point where I can run
>>> "make zImage", which then fails with this:
>>
>> This makes no sense, the patch must apply. You don't want to build
>> anything
>> with a half applied patch.
>>
>>> Can anyone help me with these issues?
>>
>> If you're on v4.14 anyway, I would recommend to run a vanilla kernel
>> and put
>> the RT patch(es) on top. At least for a system without graphics, this
>> should
>> work. (I had a RPi 1B running with vanilla v4.12 built with ptxdist
>> and the
>> DistroKit BSP some time ago, v4.14 and v4.15 also run fine headless.
>> Should
>> also work for RPi 2.)
>>
>> HTH & Greets
>> Alex
>>   --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-rt-users" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-09 11:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-06 23:02 Building the Raspberry Pi kernel with RT PREEMPT t-v.k
2018-02-07  7:55 ` Alexander Dahl
2018-02-08 16:19   ` t-v.k
2018-02-09 10:35     ` Roland Hieber
2018-02-09 11:16       ` t-v.k

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox