All of lore.kernel.org
 help / color / mirror / Atom feed
* custom linux kernel recipe
@ 2016-08-29 11:34 Mircea Gliga
  2016-08-29 13:02 ` Bruce Ashfield
  0 siblings, 1 reply; 9+ messages in thread
From: Mircea Gliga @ 2016-08-29 11:34 UTC (permalink / raw)
  To: yocto

Hi

I'm using krogoth and trying to create a qemu arm machine with the 
latest stable kernel 4.7.2.
I created a recipe,recipes-kernel/linux/linux-stable_4.7.bb, in my layer 
with the following contents:

---
inherit kernel
require recipes-kernel/linux/linux-yocto.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

KBRANCH ?= "linux-4.7.y"

SRCREV ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"

KBRANCH_sama5d4-xplained ?= "linux-4.7.y"
SRCREV_machine_sama5d4-xplained ?= 
"84fae3f89282ce86a0c0da30e35fe66dbcadda6f"

KERNEL_DEVICETREE_sama5d4-xplained = "at91-sama5d4_xplained.dtb"

KBRANCH_qemuarm ?= "linux-4.7.y"

SRC_URI = 
"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;bareclone=1;branch=${KBRANCH}"

SRC_URI += "file://defconfig"

LINUX_VERSION = "4.7.2"
PV = "${LINUX_VERSION}+git${SRCPV}"

COMPATIBLE_MACHINE = "sama5d4-xplained|qemuarm"
---

As you can see, I'm planning to use this recipe for multiple machines.

In the recipes-kernel/linux/linux-stable-4.7/qemuarm/ directory I copied 
the defconfig file.
I've created this defconfig file by:
* sourcing my build environment, from my build directory: source 
build-qemu/tmp/environment-setup-armv5e-poky-linux-gnueabi
* running "make vexpress_defconfig" in the kernel build directory. (I've 
used this tutorial 
https://balau82.wordpress.com/2012/03/31/compile-linux-kernel-3-2-for-arm-and-emulate-with-qemu/ 
)
This outputed:

---
$ make vexpress_defconfig
   GEN     ./Makefile
#
# configuration written to .config
#
---

* renamed .config to defconfig and then copy it in 
recipes-kernel/linux/linux-stable-4.7/qemuarm/

In my local.conf I've added, in order to use my custom kernel for the 
qemu machine:

---
MACHINE ??= "qemuarm"
PREFERRED_PROVIDER_virtual/kernel_qemuarm ?= "linux-stable"
---

Everything builds without errors (bitbake linux-stable), but when I 
start qemu (runqemu qemuarm) I only get a black screen in the QEMU window.
This is the output of $ runqemu qemuarm:
---
Continuing with the following parameters:
KERNEL: 
[/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin]
ROOTFS: 
[/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4]
FSTYPE: [ext4]
Setting up tap interface under sudo
[sudo] password for user:
Acquiring lockfile for tap0...
Running qemu-system-arm...
/home/user/yocto-k/build-qemu/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm 
-kernel 
/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin 
-net nic,model=virtio -net 
tap,vlan=0,ifname=tap0,script=no,downscript=no -M versatilepb -drive 
file=/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4,if=virtio,format=raw 
-no-reboot -show-cursor -usb -usbdevice tablet -no-reboot -m 128 -serial 
mon:vc -serial null -append "root=/dev/vda rw console=ttyAMA0,115200 
console=tty ip=192.168.7.2::192.168.7.1:255.255.255.0 mem=128M 
highres=off rootfstype=ext4 "
---

This is my build configuration:
Build Configuration:
BB_VERSION        = "1.30.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "qemuarm"
DISTRO            = "poky"
DISTRO_VERSION    = "2.1.1"
TUNE_FEATURES     = "arm armv5 thumb dsp"
TARGET_FPU        = "soft"
meta
meta-poky
meta-yocto-bsp    = "krogoth:12eb72ee3b02f826a156ff4e396c770f2b93571e"
meta-smartcom     = "master:121dbfb9f416de8442bbad1dc150271fd50b38e6"
meta-atmel        = "krogoth:01ff01073dd8fa1463b7841fb0a8caa44559acdd"
meta-oe
meta-networking
meta-python       = "krogoth:247b1267bbe95719cd4877d2d3cfbaf2a2f4865a"


When I use the default linux-yocto as the preferred kernel (v 4.4) 
everything works as expected.
Do you have any suggestions? Is there a problem with the defconfig file 
provided ?
What is the proper way of creating this defconfig file for qemuarm ?
I also tried using the .config file created when building 
linux-yocto_4.4 but got the same result.
I tried the defconfig used for the

Thanks !



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

* Re: custom linux kernel recipe
  2016-08-29 11:34 custom linux kernel recipe Mircea Gliga
@ 2016-08-29 13:02 ` Bruce Ashfield
  2016-08-30 11:33   ` Mircea Gliga
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2016-08-29 13:02 UTC (permalink / raw)
  To: Mircea Gliga, yocto

On 2016-08-29 07:34 AM, Mircea Gliga wrote:
> Hi
>
> I'm using krogoth and trying to create a qemu arm machine with the
> latest stable kernel 4.7.2.
> I created a recipe,recipes-kernel/linux/linux-stable_4.7.bb, in my layer
> with the following contents:
>
> ---
> inherit kernel
> require recipes-kernel/linux/linux-yocto.inc
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
>
> KBRANCH ?= "linux-4.7.y"
>
> SRCREV ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>
> KBRANCH_sama5d4-xplained ?= "linux-4.7.y"
> SRCREV_machine_sama5d4-xplained ?=
> "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>
> KERNEL_DEVICETREE_sama5d4-xplained = "at91-sama5d4_xplained.dtb"
>
> KBRANCH_qemuarm ?= "linux-4.7.y"
>
> SRC_URI =
> "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;bareclone=1;branch=${KBRANCH}"
>
>
> SRC_URI += "file://defconfig"
>
> LINUX_VERSION = "4.7.2"
> PV = "${LINUX_VERSION}+git${SRCPV}"
>
> COMPATIBLE_MACHINE = "sama5d4-xplained|qemuarm"
> ---
>
> As you can see, I'm planning to use this recipe for multiple machines.
>
> In the recipes-kernel/linux/linux-stable-4.7/qemuarm/ directory I copied
> the defconfig file.
> I've created this defconfig file by:
> * sourcing my build environment, from my build directory: source
> build-qemu/tmp/environment-setup-armv5e-poky-linux-gnueabi
> * running "make vexpress_defconfig" in the kernel build directory. (I've
> used this tutorial
> https://balau82.wordpress.com/2012/03/31/compile-linux-kernel-3-2-for-arm-and-emulate-with-qemu/
> )
> This outputed:
>
> ---
> $ make vexpress_defconfig
>   GEN     ./Makefile
> #
> # configuration written to .config
> #
> ---
>
> * renamed .config to defconfig and then copy it in
> recipes-kernel/linux/linux-stable-4.7/qemuarm/
>
> In my local.conf I've added, in order to use my custom kernel for the
> qemu machine:
>
> ---
> MACHINE ??= "qemuarm"
> PREFERRED_PROVIDER_virtual/kernel_qemuarm ?= "linux-stable"
> ---
>
> Everything builds without errors (bitbake linux-stable), but when I
> start qemu (runqemu qemuarm) I only get a black screen in the QEMU window.
> This is the output of $ runqemu qemuarm:
> ---
> Continuing with the following parameters:
> KERNEL:
> [/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin]
>
> ROOTFS:
> [/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4]
>
> FSTYPE: [ext4]
> Setting up tap interface under sudo
> [sudo] password for user:
> Acquiring lockfile for tap0...
> Running qemu-system-arm...
> /home/user/yocto-k/build-qemu/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm
> -kernel
> /home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin
> -net nic,model=virtio -net
> tap,vlan=0,ifname=tap0,script=no,downscript=no -M versatilepb -drive
> file=/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4,if=virtio,format=raw
> -no-reboot -show-cursor -usb -usbdevice tablet -no-reboot -m 128 -serial
> mon:vc -serial null -append "root=/dev/vda rw console=ttyAMA0,115200
> console=tty ip=192.168.7.2::192.168.7.1:255.255.255.0 mem=128M
> highres=off rootfstype=ext4 "
> ---
>
> This is my build configuration:
> Build Configuration:
> BB_VERSION        = "1.30.0"
> BUILD_SYS         = "x86_64-linux"
> NATIVELSBSTRING   = "universal"
> TARGET_SYS        = "arm-poky-linux-gnueabi"
> MACHINE           = "qemuarm"
> DISTRO            = "poky"
> DISTRO_VERSION    = "2.1.1"
> TUNE_FEATURES     = "arm armv5 thumb dsp"
> TARGET_FPU        = "soft"
> meta
> meta-poky
> meta-yocto-bsp    = "krogoth:12eb72ee3b02f826a156ff4e396c770f2b93571e"
> meta-smartcom     = "master:121dbfb9f416de8442bbad1dc150271fd50b38e6"
> meta-atmel        = "krogoth:01ff01073dd8fa1463b7841fb0a8caa44559acdd"
> meta-oe
> meta-networking
> meta-python       = "krogoth:247b1267bbe95719cd4877d2d3cfbaf2a2f4865a"
>
>
> When I use the default linux-yocto as the preferred kernel (v 4.4)
> everything works as expected.
> Do you have any suggestions? Is there a problem with the defconfig file
> provided ?
> What is the proper way of creating this defconfig file for qemuarm ?
> I also tried using the .config file created when building
> linux-yocto_4.4 but got the same result.
> I tried the defconfig used for the

You need a variant of the patch I'm going to submit later today:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zedd/kernel&id=0fe665e69983fe9ef38319deedcb78ecd7b165cf

I'm about to bump linux-yocto to 4.8, which ran into the device tree
changes for the versatile/vexpress class boards. You are seeing the
same thing.


Bruce


>
> Thanks !
>



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

* Re: custom linux kernel recipe
  2016-08-29 13:02 ` Bruce Ashfield
@ 2016-08-30 11:33   ` Mircea Gliga
  2016-08-30 15:09     ` Bruce Ashfield
  0 siblings, 1 reply; 9+ messages in thread
From: Mircea Gliga @ 2016-08-30 11:33 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 6228 bytes --]

Thanks for your answer Bruce !

I've applied the patch you've mentioned 
(http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zedd/kernel&id=0fe665e69983fe9ef38319deedcb78ecd7b165cf) 
to my recipe, linux-stable_4.7.bb, providing the dtb:

KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
QEMU_DTB_qemuarm = "zImage-versatile-pb"

I've also updated my runqemu-internal script to add the dtb file to the 
qemu options.
For some reason the QEMU_DTB variable is empty so I hard coded the dtb 
filename just to make a test.

So now, when running the qemuarm machine, the dtb file is provided with 
the "dtb" parameter.
The result is the same, a black screen.
As mentioned, my recipe is using the 4.7.2 kernel: the Latest Stable Kernel

Then I applied the patch to the linux-yocto-dev.bb recipe (I'm on 
krogoth) - this is using kernel 4.8
This boots correctly - without the dtb patch the result is the same: 
black screen.

But I'm stuck with the 4.7.2 kernel - the Latest Stable Kernel, any 
suggestions on how to accomplish this ? It looks like the patch is not 
enough for kernel 4.7.2.

Thanks in advance.
Mircea

On 08/29/2016 04:02 PM, Bruce Ashfield wrote:
> On 2016-08-29 07:34 AM, Mircea Gliga wrote:
>> Hi
>>
>> I'm using krogoth and trying to create a qemu arm machine with the
>> latest stable kernel 4.7.2.
>> I created a recipe,recipes-kernel/linux/linux-stable_4.7.bb, in my layer
>> with the following contents:
>>
>> ---
>> inherit kernel
>> require recipes-kernel/linux/linux-yocto.inc
>>
>> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
>>
>> KBRANCH ?= "linux-4.7.y"
>>
>> SRCREV ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>>
>> KBRANCH_sama5d4-xplained ?= "linux-4.7.y"
>> SRCREV_machine_sama5d4-xplained ?=
>> "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>>
>> KERNEL_DEVICETREE_sama5d4-xplained = "at91-sama5d4_xplained.dtb"
>>
>> KBRANCH_qemuarm ?= "linux-4.7.y"
>>
>> SRC_URI =
>> "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;bareclone=1;branch=${KBRANCH}" 
>>
>>
>>
>> SRC_URI += "file://defconfig"
>>
>> LINUX_VERSION = "4.7.2"
>> PV = "${LINUX_VERSION}+git${SRCPV}"
>>
>> COMPATIBLE_MACHINE = "sama5d4-xplained|qemuarm"
>> ---
>>
>> As you can see, I'm planning to use this recipe for multiple machines.
>>
>> In the recipes-kernel/linux/linux-stable-4.7/qemuarm/ directory I copied
>> the defconfig file.
>> I've created this defconfig file by:
>> * sourcing my build environment, from my build directory: source
>> build-qemu/tmp/environment-setup-armv5e-poky-linux-gnueabi
>> * running "make vexpress_defconfig" in the kernel build directory. (I've
>> used this tutorial
>> https://balau82.wordpress.com/2012/03/31/compile-linux-kernel-3-2-for-arm-and-emulate-with-qemu/ 
>>
>> )
>> This outputed:
>>
>> ---
>> $ make vexpress_defconfig
>>   GEN     ./Makefile
>> #
>> # configuration written to .config
>> #
>> ---
>>
>> * renamed .config to defconfig and then copy it in
>> recipes-kernel/linux/linux-stable-4.7/qemuarm/
>>
>> In my local.conf I've added, in order to use my custom kernel for the
>> qemu machine:
>>
>> ---
>> MACHINE ??= "qemuarm"
>> PREFERRED_PROVIDER_virtual/kernel_qemuarm ?= "linux-stable"
>> ---
>>
>> Everything builds without errors (bitbake linux-stable), but when I
>> start qemu (runqemu qemuarm) I only get a black screen in the QEMU 
>> window.
>> This is the output of $ runqemu qemuarm:
>> ---
>> Continuing with the following parameters:
>> KERNEL:
>> [/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin] 
>>
>>
>> ROOTFS:
>> [/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4] 
>>
>>
>> FSTYPE: [ext4]
>> Setting up tap interface under sudo
>> [sudo] password for user:
>> Acquiring lockfile for tap0...
>> Running qemu-system-arm...
>> /home/user/yocto-k/build-qemu/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm 
>>
>> -kernel
>> /home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin 
>>
>> -net nic,model=virtio -net
>> tap,vlan=0,ifname=tap0,script=no,downscript=no -M versatilepb -drive
>> file=/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4,if=virtio,format=raw 
>>
>> -no-reboot -show-cursor -usb -usbdevice tablet -no-reboot -m 128 -serial
>> mon:vc -serial null -append "root=/dev/vda rw console=ttyAMA0,115200
>> console=tty ip=192.168.7.2::192.168.7.1:255.255.255.0 mem=128M
>> highres=off rootfstype=ext4 "
>> ---
>>
>> This is my build configuration:
>> Build Configuration:
>> BB_VERSION        = "1.30.0"
>> BUILD_SYS         = "x86_64-linux"
>> NATIVELSBSTRING   = "universal"
>> TARGET_SYS        = "arm-poky-linux-gnueabi"
>> MACHINE           = "qemuarm"
>> DISTRO            = "poky"
>> DISTRO_VERSION    = "2.1.1"
>> TUNE_FEATURES     = "arm armv5 thumb dsp"
>> TARGET_FPU        = "soft"
>> meta
>> meta-poky
>> meta-yocto-bsp    = "krogoth:12eb72ee3b02f826a156ff4e396c770f2b93571e"
>> meta-smartcom     = "master:121dbfb9f416de8442bbad1dc150271fd50b38e6"
>> meta-atmel        = "krogoth:01ff01073dd8fa1463b7841fb0a8caa44559acdd"
>> meta-oe
>> meta-networking
>> meta-python       = "krogoth:247b1267bbe95719cd4877d2d3cfbaf2a2f4865a"
>>
>>
>> When I use the default linux-yocto as the preferred kernel (v 4.4)
>> everything works as expected.
>> Do you have any suggestions? Is there a problem with the defconfig file
>> provided ?
>> What is the proper way of creating this defconfig file for qemuarm ?
>> I also tried using the .config file created when building
>> linux-yocto_4.4 but got the same result.
>> I tried the defconfig used for the
>
> You need a variant of the patch I'm going to submit later today:
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zedd/kernel&id=0fe665e69983fe9ef38319deedcb78ecd7b165cf 
>
>
> I'm about to bump linux-yocto to 4.8, which ran into the device tree
> changes for the versatile/vexpress class boards. You are seeing the
> same thing.
>
>
> Bruce
>
>
>>
>> Thanks !
>>
>


[-- Attachment #2: Type: text/html, Size: 9913 bytes --]

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

* Re: custom linux kernel recipe
  2016-08-30 11:33   ` Mircea Gliga
@ 2016-08-30 15:09     ` Bruce Ashfield
  2016-09-02  7:51       ` Mircea Gliga
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2016-08-30 15:09 UTC (permalink / raw)
  To: Mircea Gliga, yocto

On 2016-08-30 07:33 AM, Mircea Gliga wrote:
> Thanks for your answer Bruce !
>
> I've applied the patch you've mentioned
> (http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zedd/kernel&id=0fe665e69983fe9ef38319deedcb78ecd7b165cf)
> to my recipe, linux-stable_4.7.bb, providing the dtb:
>
> KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
> QEMU_DTB_qemuarm = "zImage-versatile-pb"
>
> I've also updated my runqemu-internal script to add the dtb file to the
> qemu options.
> For some reason the QEMU_DTB variable is empty so I hard coded the dtb
> filename just to make a test.

I actually had that in the wrong place. I've since removed the variable
from the kernel recipes. Sorry about that :D

>
> So now, when running the qemuarm machine, the dtb file is provided with
> the "dtb" parameter.
> The result is the same, a black screen.
> As mentioned, my recipe is using the 4.7.2 kernel: the Latest Stable Kernel
>
> Then I applied the patch to the linux-yocto-dev.bb recipe (I'm on
> krogoth) - this is using kernel 4.8
> This boots correctly - without the dtb patch the result is the same:
> black screen.
>
> But I'm stuck with the 4.7.2 kernel - the Latest Stable Kernel, any
> suggestions on how to accomplish this ? It looks like the patch is not
> enough for kernel 4.7.2.

I'm finishing up 4.8 today, but without doing a boot test, I can't say
for sure. I'll see if I can cycle in some korg 4.7.x testing tomorrow to
see if I can get a clean boot.

Bruce

>
> Thanks in advance.
> Mircea
>
> On 08/29/2016 04:02 PM, Bruce Ashfield wrote:
>> On 2016-08-29 07:34 AM, Mircea Gliga wrote:
>>> Hi
>>>
>>> I'm using krogoth and trying to create a qemu arm machine with the
>>> latest stable kernel 4.7.2.
>>> I created a recipe,recipes-kernel/linux/linux-stable_4.7.bb, in my layer
>>> with the following contents:
>>>
>>> ---
>>> inherit kernel
>>> require recipes-kernel/linux/linux-yocto.inc
>>>
>>> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
>>>
>>> KBRANCH ?= "linux-4.7.y"
>>>
>>> SRCREV ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>>>
>>> KBRANCH_sama5d4-xplained ?= "linux-4.7.y"
>>> SRCREV_machine_sama5d4-xplained ?=
>>> "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>>>
>>> KERNEL_DEVICETREE_sama5d4-xplained = "at91-sama5d4_xplained.dtb"
>>>
>>> KBRANCH_qemuarm ?= "linux-4.7.y"
>>>
>>> SRC_URI =
>>> "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;bareclone=1;branch=${KBRANCH}"
>>>
>>>
>>>
>>> SRC_URI += "file://defconfig"
>>>
>>> LINUX_VERSION = "4.7.2"
>>> PV = "${LINUX_VERSION}+git${SRCPV}"
>>>
>>> COMPATIBLE_MACHINE = "sama5d4-xplained|qemuarm"
>>> ---
>>>
>>> As you can see, I'm planning to use this recipe for multiple machines.
>>>
>>> In the recipes-kernel/linux/linux-stable-4.7/qemuarm/ directory I copied
>>> the defconfig file.
>>> I've created this defconfig file by:
>>> * sourcing my build environment, from my build directory: source
>>> build-qemu/tmp/environment-setup-armv5e-poky-linux-gnueabi
>>> * running "make vexpress_defconfig" in the kernel build directory. (I've
>>> used this tutorial
>>> https://balau82.wordpress.com/2012/03/31/compile-linux-kernel-3-2-for-arm-and-emulate-with-qemu/
>>>
>>> )
>>> This outputed:
>>>
>>> ---
>>> $ make vexpress_defconfig
>>>   GEN     ./Makefile
>>> #
>>> # configuration written to .config
>>> #
>>> ---
>>>
>>> * renamed .config to defconfig and then copy it in
>>> recipes-kernel/linux/linux-stable-4.7/qemuarm/
>>>
>>> In my local.conf I've added, in order to use my custom kernel for the
>>> qemu machine:
>>>
>>> ---
>>> MACHINE ??= "qemuarm"
>>> PREFERRED_PROVIDER_virtual/kernel_qemuarm ?= "linux-stable"
>>> ---
>>>
>>> Everything builds without errors (bitbake linux-stable), but when I
>>> start qemu (runqemu qemuarm) I only get a black screen in the QEMU
>>> window.
>>> This is the output of $ runqemu qemuarm:
>>> ---
>>> Continuing with the following parameters:
>>> KERNEL:
>>> [/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin]
>>>
>>>
>>> ROOTFS:
>>> [/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4]
>>>
>>>
>>> FSTYPE: [ext4]
>>> Setting up tap interface under sudo
>>> [sudo] password for user:
>>> Acquiring lockfile for tap0...
>>> Running qemu-system-arm...
>>> /home/user/yocto-k/build-qemu/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm
>>>
>>> -kernel
>>> /home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/zImage-qemuarm.bin
>>>
>>> -net nic,model=virtio -net
>>> tap,vlan=0,ifname=tap0,script=no,downscript=no -M versatilepb -drive
>>> file=/home/user/yocto-k/build-qemu/tmp/deploy/images/qemuarm/custom-minimal-image-qemuarm-20160823102657.rootfs.ext4,if=virtio,format=raw
>>>
>>> -no-reboot -show-cursor -usb -usbdevice tablet -no-reboot -m 128 -serial
>>> mon:vc -serial null -append "root=/dev/vda rw console=ttyAMA0,115200
>>> console=tty ip=192.168.7.2::192.168.7.1:255.255.255.0 mem=128M
>>> highres=off rootfstype=ext4 "
>>> ---
>>>
>>> This is my build configuration:
>>> Build Configuration:
>>> BB_VERSION        = "1.30.0"
>>> BUILD_SYS         = "x86_64-linux"
>>> NATIVELSBSTRING   = "universal"
>>> TARGET_SYS        = "arm-poky-linux-gnueabi"
>>> MACHINE           = "qemuarm"
>>> DISTRO            = "poky"
>>> DISTRO_VERSION    = "2.1.1"
>>> TUNE_FEATURES     = "arm armv5 thumb dsp"
>>> TARGET_FPU        = "soft"
>>> meta
>>> meta-poky
>>> meta-yocto-bsp    = "krogoth:12eb72ee3b02f826a156ff4e396c770f2b93571e"
>>> meta-smartcom     = "master:121dbfb9f416de8442bbad1dc150271fd50b38e6"
>>> meta-atmel        = "krogoth:01ff01073dd8fa1463b7841fb0a8caa44559acdd"
>>> meta-oe
>>> meta-networking
>>> meta-python       = "krogoth:247b1267bbe95719cd4877d2d3cfbaf2a2f4865a"
>>>
>>>
>>> When I use the default linux-yocto as the preferred kernel (v 4.4)
>>> everything works as expected.
>>> Do you have any suggestions? Is there a problem with the defconfig file
>>> provided ?
>>> What is the proper way of creating this defconfig file for qemuarm ?
>>> I also tried using the .config file created when building
>>> linux-yocto_4.4 but got the same result.
>>> I tried the defconfig used for the
>>
>> You need a variant of the patch I'm going to submit later today:
>>
>> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zedd/kernel&id=0fe665e69983fe9ef38319deedcb78ecd7b165cf
>>
>>
>> I'm about to bump linux-yocto to 4.8, which ran into the device tree
>> changes for the versatile/vexpress class boards. You are seeing the
>> same thing.
>>
>>
>> Bruce
>>
>>
>>>
>>> Thanks !
>>>
>>
>
>
>



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

* Re: custom linux kernel recipe
  2016-08-30 15:09     ` Bruce Ashfield
@ 2016-09-02  7:51       ` Mircea Gliga
  2016-09-02 13:58         ` Bruce Ashfield
  0 siblings, 1 reply; 9+ messages in thread
From: Mircea Gliga @ 2016-09-02  7:51 UTC (permalink / raw)
  To: yocto

Hi Bruce,

Do you have any new input in regards with qemuarm booting with kernel 
4.7.2 LTS ?
Have you managed to test this ?
I wander if this can be reproduce elsewhere and what's the solution for it.

Thanks
Mircea

On 08/30/2016 06:09 PM, Bruce Ashfield wrote:
>
> I'm finishing up 4.8 today, but without doing a boot test, I can't say
> for sure. I'll see if I can cycle in some korg 4.7.x testing tomorrow to
> see if I can get a clean boot.



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

* Re: custom linux kernel recipe
  2016-09-02  7:51       ` Mircea Gliga
@ 2016-09-02 13:58         ` Bruce Ashfield
  2016-09-02 15:26           ` Bruce Ashfield
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2016-09-02 13:58 UTC (permalink / raw)
  To: Mircea Gliga, yocto

On 2016-09-02 03:51 AM, Mircea Gliga wrote:
> Hi Bruce,
>
> Do you have any new input in regards with qemuarm booting with kernel
> 4.7.2 LTS ?
> Have you managed to test this ?
> I wander if this can be reproduce elsewhere and what's the solution for it.

I was tied up with the introduction of the 4.8 kernel, but I *think*
the coast is clear on that front (for the moment).

I can try and spin up a korg based 4.7.x build and see how it goes.

Bruce

>
> Thanks
> Mircea
>
> On 08/30/2016 06:09 PM, Bruce Ashfield wrote:
>>
>> I'm finishing up 4.8 today, but without doing a boot test, I can't say
>> for sure. I'll see if I can cycle in some korg 4.7.x testing tomorrow to
>> see if I can get a clean boot.
>



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

* Re: custom linux kernel recipe
  2016-09-02 13:58         ` Bruce Ashfield
@ 2016-09-02 15:26           ` Bruce Ashfield
  2016-09-05 10:06             ` Mircea Gliga
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2016-09-02 15:26 UTC (permalink / raw)
  To: Mircea Gliga, yocto

On 2016-09-02 09:58 AM, Bruce Ashfield wrote:
> On 2016-09-02 03:51 AM, Mircea Gliga wrote:
>> Hi Bruce,
>>
>> Do you have any new input in regards with qemuarm booting with kernel
>> 4.7.2 LTS ?
>> Have you managed to test this ?
>> I wander if this can be reproduce elsewhere and what's the solution
>> for it.
>
> I was tied up with the introduction of the 4.8 kernel, but I *think*
> the coast is clear on that front (for the moment).
>
> I can try and spin up a korg based 4.7.x build and see how it goes.

The issue is in your defconfig.

qemuarm login: root
root@qemuarm:~# uname -a
Linux qemuarm 4.7.2-yocto-standard #1 PREEMPT Fri Sep 2 11:15:30 EDT 
2016 armv5tejl GNU/Linux
root@qemuarm:~#

I created a similar recipe:

--------
inherit kernel

require recipes-kernel/linux/linux-yocto.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/linux-stable:"

KBRANCH ?= "linux-4.7.y"

SRCREV ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"

KBRANCH ?= "linux-4.7.y"
SRCREV_machine_qemuarm ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"

KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"

KBRANCH_qemuarm ?= "linux-4.7.y"

SRC_URI = 
"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;bareclone=1;branch=${KBRANCH}"

SRC_URI += "file://defconfig"

LINUX_VERSION = "4.7.2"
PV = "${LINUX_VERSION}+git${SRCPV}"

COMPATIBLE_MACHINE = "qemuarm"

----------

And I took the "defconfig" from the -stable tree (the defconfig_versatile).

When I built and booted that, I had no output.

So I grabbed the .config from my 4.8 build, copied it into my layer
as the 'defconfig', rebuilt .. and was able to log in with the prompt
you see above.

So the 4.7 defconfig is missing something, I didn't iterate to find
it.

Cheers,

Bruce


>
> Bruce
>
>>
>> Thanks
>> Mircea
>>
>> On 08/30/2016 06:09 PM, Bruce Ashfield wrote:
>>>
>>> I'm finishing up 4.8 today, but without doing a boot test, I can't say
>>> for sure. I'll see if I can cycle in some korg 4.7.x testing tomorrow to
>>> see if I can get a clean boot.
>>
>



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

* Re: custom linux kernel recipe
  2016-09-02 15:26           ` Bruce Ashfield
@ 2016-09-05 10:06             ` Mircea Gliga
  2016-09-06  2:07               ` Bruce Ashfield
  0 siblings, 1 reply; 9+ messages in thread
From: Mircea Gliga @ 2016-09-05 10:06 UTC (permalink / raw)
  To: yocto

Thanks Bruce for your help!

It works now, with the defconfig from 4.8.

Have a nice day !
Mircea

On 09/02/2016 06:26 PM, Bruce Ashfield wrote:
> On 2016-09-02 09:58 AM, Bruce Ashfield wrote:
>> On 2016-09-02 03:51 AM, Mircea Gliga wrote:
>>> Hi Bruce,
>>>
>>> Do you have any new input in regards with qemuarm booting with kernel
>>> 4.7.2 LTS ?
>>> Have you managed to test this ?
>>> I wander if this can be reproduce elsewhere and what's the solution
>>> for it.
>>
>> I was tied up with the introduction of the 4.8 kernel, but I *think*
>> the coast is clear on that front (for the moment).
>>
>> I can try and spin up a korg based 4.7.x build and see how it goes.
>
> The issue is in your defconfig.
>
> qemuarm login: root
> root@qemuarm:~# uname -a
> Linux qemuarm 4.7.2-yocto-standard #1 PREEMPT Fri Sep 2 11:15:30 EDT 
> 2016 armv5tejl GNU/Linux
> root@qemuarm:~#
>
> I created a similar recipe:
>
> --------
> inherit kernel
>
> require recipes-kernel/linux/linux-yocto.inc
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-stable:"
>
> KBRANCH ?= "linux-4.7.y"
>
> SRCREV ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>
> KBRANCH ?= "linux-4.7.y"
> SRCREV_machine_qemuarm ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>
> KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
>
> KBRANCH_qemuarm ?= "linux-4.7.y"
>
> SRC_URI = 
> "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;bareclone=1;branch=${KBRANCH}"
>
> SRC_URI += "file://defconfig"
>
> LINUX_VERSION = "4.7.2"
> PV = "${LINUX_VERSION}+git${SRCPV}"
>
> COMPATIBLE_MACHINE = "qemuarm"
>
> ----------
>
> And I took the "defconfig" from the -stable tree (the 
> defconfig_versatile).
>
> When I built and booted that, I had no output.
>
> So I grabbed the .config from my 4.8 build, copied it into my layer
> as the 'defconfig', rebuilt .. and was able to log in with the prompt
> you see above.
>
> So the 4.7 defconfig is missing something, I didn't iterate to find
> it.
>
> Cheers,
>
> Bruce
>
>
>>
>> Bruce
>>
>>>
>>> Thanks
>>> Mircea
>>>
>>> On 08/30/2016 06:09 PM, Bruce Ashfield wrote:
>>>>
>>>> I'm finishing up 4.8 today, but without doing a boot test, I can't say
>>>> for sure. I'll see if I can cycle in some korg 4.7.x testing 
>>>> tomorrow to
>>>> see if I can get a clean boot.
>>>
>>
>



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

* Re: custom linux kernel recipe
  2016-09-05 10:06             ` Mircea Gliga
@ 2016-09-06  2:07               ` Bruce Ashfield
  0 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2016-09-06  2:07 UTC (permalink / raw)
  To: Mircea Gliga, yocto

On 2016-09-05 6:06 AM, Mircea Gliga wrote:
> Thanks Bruce for your help!
>
> It works now, with the defconfig from 4.8.

Great news!

Bruce

>
> Have a nice day !
> Mircea
>
> On 09/02/2016 06:26 PM, Bruce Ashfield wrote:
>> On 2016-09-02 09:58 AM, Bruce Ashfield wrote:
>>> On 2016-09-02 03:51 AM, Mircea Gliga wrote:
>>>> Hi Bruce,
>>>>
>>>> Do you have any new input in regards with qemuarm booting with kernel
>>>> 4.7.2 LTS ?
>>>> Have you managed to test this ?
>>>> I wander if this can be reproduce elsewhere and what's the solution
>>>> for it.
>>>
>>> I was tied up with the introduction of the 4.8 kernel, but I *think*
>>> the coast is clear on that front (for the moment).
>>>
>>> I can try and spin up a korg based 4.7.x build and see how it goes.
>>
>> The issue is in your defconfig.
>>
>> qemuarm login: root
>> root@qemuarm:~# uname -a
>> Linux qemuarm 4.7.2-yocto-standard #1 PREEMPT Fri Sep 2 11:15:30 EDT
>> 2016 armv5tejl GNU/Linux
>> root@qemuarm:~#
>>
>> I created a similar recipe:
>>
>> --------
>> inherit kernel
>>
>> require recipes-kernel/linux/linux-yocto.inc
>>
>> FILESEXTRAPATHS_prepend := "${THISDIR}/linux-stable:"
>>
>> KBRANCH ?= "linux-4.7.y"
>>
>> SRCREV ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>>
>> KBRANCH ?= "linux-4.7.y"
>> SRCREV_machine_qemuarm ?= "84fae3f89282ce86a0c0da30e35fe66dbcadda6f"
>>
>> KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
>>
>> KBRANCH_qemuarm ?= "linux-4.7.y"
>>
>> SRC_URI =
>> "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;bareclone=1;branch=${KBRANCH}"
>>
>>
>> SRC_URI += "file://defconfig"
>>
>> LINUX_VERSION = "4.7.2"
>> PV = "${LINUX_VERSION}+git${SRCPV}"
>>
>> COMPATIBLE_MACHINE = "qemuarm"
>>
>> ----------
>>
>> And I took the "defconfig" from the -stable tree (the
>> defconfig_versatile).
>>
>> When I built and booted that, I had no output.
>>
>> So I grabbed the .config from my 4.8 build, copied it into my layer
>> as the 'defconfig', rebuilt .. and was able to log in with the prompt
>> you see above.
>>
>> So the 4.7 defconfig is missing something, I didn't iterate to find
>> it.
>>
>> Cheers,
>>
>> Bruce
>>
>>
>>>
>>> Bruce
>>>
>>>>
>>>> Thanks
>>>> Mircea
>>>>
>>>> On 08/30/2016 06:09 PM, Bruce Ashfield wrote:
>>>>>
>>>>> I'm finishing up 4.8 today, but without doing a boot test, I can't say
>>>>> for sure. I'll see if I can cycle in some korg 4.7.x testing
>>>>> tomorrow to
>>>>> see if I can get a clean boot.
>>>>
>>>
>>
>



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

end of thread, other threads:[~2016-09-06  2:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 11:34 custom linux kernel recipe Mircea Gliga
2016-08-29 13:02 ` Bruce Ashfield
2016-08-30 11:33   ` Mircea Gliga
2016-08-30 15:09     ` Bruce Ashfield
2016-09-02  7:51       ` Mircea Gliga
2016-09-02 13:58         ` Bruce Ashfield
2016-09-02 15:26           ` Bruce Ashfield
2016-09-05 10:06             ` Mircea Gliga
2016-09-06  2:07               ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.