Skip to contentSkip to conversation

pandaboard: fix defonf build with recent kernels

PATCH New Thomas Pedersen 4 participants 8 messages Dec 4, 2013 – Dec 6, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

The patch "pandaboard: Fix defconfig build" locked the default pandaboard kernel to 3.8.11. This is inconvenient, however, and we can make the default pandaboard kernel build and boot with a few changes:

1. specify the correct load address
2. append the flattened device tree to the uImage

Note the default device tree is now for the pandaboard-ES, so users of other board revisions will need to set the correct DTS_NAME.

---
 configs/pandaboard_defconfig | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
configs/pandaboard_defconfig +6 -5
index 95cfdd6..341ce22 100644
@@ -11,14 +11,15 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
 BR2_TARGET_ROOTFS_EXT2=y
 # BR2_TARGET_ROOTFS_TAR is not set
 
-# Lock to 3.8 headers to avoid breaking with newer kernels
-BR2_KERNEL_HEADERS_3_8=y
-
 # Kernel
 BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.11"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000"
+BR2_LINUX_KERNEL_APPENDED_UIMAGE=y
+BR2_LINUX_KERNEL_APPENDED_DTB=y
+BR2_LINUX_KERNEL_USE_INTREE_DTS=y
+# might need omap4-panda or omap4-panda-a4 instead
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es"
 
 # GCC
 BR2_GCC_VERSION_4_6_X=y
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

Dear Thomas Pedersen,

Quoted 4 lines · Thomas Pedersen

The patch "pandaboard: Fix defconfig build" locked the default pandaboard kernel to 3.8.11. This is inconvenient, however, and we can make the default pandaboard kernel build and boot with a few changes:

The lock down to a specific version of the kernel and a specific version of the kernel headers is intentional. These are here to guarantee that the defconfig will always produce the same result, regardless of whether Buildroot updates the default kernel / kernel headers version.

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 15

Quoted 2 lines
configs/pandaboard_defconfig +0 -2
-# Lock to 3.8 headers to avoid breaking with newer kernels
-BR2_KERNEL_HEADERS_3_8=y

So this should be kept (possibly updating to a new kernel headers version of course, but we should keep a kernel headers version here).

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 20

Quoted 4 lines

# Kernel
BR2_LINUX_KERNEL=y

configs/pandaboard_defconfig +0 -2
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.11"

Same thing here. No problem with bumping from 3.8.x to 3.12.x or something like that, if you've tested 3.12.x, but an explicit version selection must be kept.

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 25

Quoted 10 lines

BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"

configs/pandaboard_defconfig +6 -0
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000"
+BR2_LINUX_KERNEL_APPENDED_UIMAGE=y
+BR2_LINUX_KERNEL_APPENDED_DTB=y
+BR2_LINUX_KERNEL_USE_INTREE_DTS=y
+# might need omap4-panda or omap4-panda-a4 instead
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es"
 
 # GCC
 BR2_GCC_VERSION_4_6_X=y

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

Quoted 9 lines · Thomas Petazzoni

Dear Thomas Pedersen,

Quoted 4 lines · Thomas Pedersen

The patch "pandaboard: Fix defconfig build" locked the default pandaboard kernel to 3.8.11. This is inconvenient, however, and we can make the default pandaboard kernel build and boot with a few changes:

Quoted 4 lines

The lock down to a specific version of the kernel and a specific version of the kernel headers is intentional. These are here to guarantee that the defconfig will always produce the same result, regardless of whether Buildroot updates the default kernel / kernel headers version.

Ah OK. At least this patch will make future kernels compatible with legacy u-boot loaders. In our case we're using usbboot, and I'm not aware of a method to pass the device tree over USB or PXE.

Quoted 6 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 15

Quoted 2 lines
configs/pandaboard_defconfig +0 -2
-# Lock to 3.8 headers to avoid breaking with newer kernels
-BR2_KERNEL_HEADERS_3_8=y

So this should be kept (possibly updating to a new kernel headers version of course, but we should keep a kernel headers version here).

Quoted 8 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 20

Quoted 4 lines

# Kernel
BR2_LINUX_KERNEL=y

configs/pandaboard_defconfig +0 -2
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.11"

Same thing here. No problem with bumping from 3.8.x to 3.12.x or something like that, if you've tested 3.12.x, but an explicit version selection must be kept.

Will do. Thanks!

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131205/cf95afab/attachment-0001.html>

#3 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

In reply to Thomas Pedersen
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Pedersen <[email protected]> writes:

The patch "pandaboard: Fix defconfig build" locked the default pandaboard kernel to 3.8.11. This is inconvenient, however, and we can make the default pandaboard kernel build and boot with a few changes:

Quoted 6 lines

1. specify the correct load address
2. append the flattened device tree to the uImage

Note the default device tree is now for the pandaboard-ES, so users of other board revisions will need to set the correct DTS_NAME.

Thanks. There afaik has been quite some breakage in the kernel related to pandaboard, what version have you tested with?

In general we try to stick to known (fixed) kernel version in the defconfigs, to not get the users into that kind of trouble by default.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

Quoted 11 lines · Peter Korsgaard
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Thomas" == Thomas Pedersen <[email protected]> writes:

The patch "pandaboard: Fix defconfig build" locked the default pandaboard kernel to 3.8.11. This is inconvenient, however, and we can make the default pandaboard kernel build and boot with a few changes:

1. specify the correct load address
2. append the flattened device tree to the uImage

Quoted 6 lines
Quoted 3 lines

Note the default device tree is now for the pandaboard-ES, so users of other board revisions will need to set the correct DTS_NAME.

Thanks. There afaik has been quite some breakage in the kernel related to pandaboard, what version have you tested with?

This was tested with 3.12.2, and AFAICT should continue to work moving forward. The recent pandaboard breakage seems to have been shook out since the 3.8+ transition.

Quoted 2 lines

In general we try to stick to known (fixed) kernel version in the defconfigs, to not get the users into that kind of trouble by default.

Makes sense. I'll submit a v2 which does this in the morning.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131205/204751c8/attachment.html>

#5 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

In reply to Thomas Pedersen

Thomas Pedersen,

Thomas Pedersen <[email protected]> wrote on 12/04/2013 05:57:44 PM:

[...]

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 16

Quoted 5 lines

# Kernel
BR2_LINUX_KERNEL=y

configs/pandaboard_defconfig +0 -2
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.11"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"

Would it be possible to lock the kernel version down by using the custom version? This way that when we provide a defconfig with a known working kernel. If it were to be left to not use this, the kernel version will change with all the bumps.

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 18

Quoted 2 lines
configs/pandaboard_defconfig +2 -0
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000"
+BR2_LINUX_KERNEL_APPENDED_UIMAGE=y

What is the need for uImage? zImage is what is supported by default in U-Boot for pandaboard -
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/configs/omap4_common.h

This configuration is not going to work out of the box for a user since U-Boot searches for a zImage and a omap4-panda-es.dtb. So we would want to generate a stand-alone dtb.

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 22

Quoted 4 lines
configs/pandaboard_defconfig +4 -0
+BR2_LINUX_KERNEL_APPENDED_DTB=y
+BR2_LINUX_KERNEL_USE_INTREE_DTS=y
+# might need omap4-panda or omap4-panda-a4 instead
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es"

Also could we lock down the version of u-boot too?

Currently it looks like this -

# Bootloaders
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_BOARDNAME="omap4_panda"
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="MLO"

Which means we will be pulling the latest version of U-Boot which is also not preferable since U-Boot also has a tendency to break. Would you be willing to specify a custom version of u-boot too in your update to the defconfig?

Thanks,
-Ryan

#6 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

HI Ryan,

Quoted 4 lines · On Thu, Dec 5, 2013 at 12:29 AM, <[email protected]> wrote:

Thomas Pedersen <[email protected]> wrote on 12/04/2013 05:57:44 PM:

[...]

Quoted 10 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 16

Quoted 5 lines

# Kernel
BR2_LINUX_KERNEL=y

configs/pandaboard_defconfig +0 -2
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.11"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"

Would it be possible to lock the kernel version down by using the custom version? This way that when we provide a defconfig with a known working kernel. If it were to be left to not use this, the kernel version will change with all the bumps.

Yes, I'll lock it to 3.12.2 or so.

Quoted 10 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 18

Quoted 2 lines
configs/pandaboard_defconfig +2 -0
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000"
+BR2_LINUX_KERNEL_APPENDED_UIMAGE=y

What is the need for uImage? zImage is what is supported by default in U-Boot for pandaboard -
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/configs/omap4_common.h

This configuration is not going to work out of the box for a user since U-Boot searches for a zImage and a omap4-panda-es.dtb. So we would want to generate a stand-alone dtb.

zImage and dtb is still intact. The appended uImage is simply generated as an extra step after appending the DTB to the zImage.

Quoted 16 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 22

Quoted 4 lines
configs/pandaboard_defconfig +4 -0
+BR2_LINUX_KERNEL_APPENDED_DTB=y
+BR2_LINUX_KERNEL_USE_INTREE_DTS=y
+# might need omap4-panda or omap4-panda-a4 instead
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es"

Also could we lock down the version of u-boot too?

Currently it looks like this -

# Bootloaders
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_BOARDNAME="omap4_panda"
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="MLO"

Quoted 4 lines

Which means we will be pulling the latest version of U-Boot which is also not preferable since U-Boot also has a tendency to break. Would you be willing to specify a custom version of u-boot too in your update to the defconfig?

I'm actually using the linaro-boot-utils u-boot (SPL 2012.07) to enable booting over USB. I'll see if the vanilla version boots the generated uImage off an SD card.

Thanks,

Signature · 1 line
Thomas
#7 lore raw

PATCH 1/1 pandaboard: fix defonf build with recent kernels

Quoted 27 lines · Thomas Pedersen

HI Ryan,

Quoted 4 lines · On Thu, Dec 5, 2013 at 12:29 AM, <[email protected]> wrote:

Thomas Pedersen <[email protected]> wrote on 12/04/2013 05:57:44 PM:

[...]

Quoted 10 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 16

Quoted 5 lines

# Kernel
BR2_LINUX_KERNEL=y

configs/pandaboard_defconfig +0 -2
-BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.11"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"

Would it be possible to lock the kernel version down by using the custom version? This way that when we provide a defconfig with a known working kernel. If it were to be left to not use this, the kernel version will change with all the bumps.

Yes, I'll lock it to 3.12.2 or so.

Quoted 7 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 18

Quoted 2 lines
configs/pandaboard_defconfig +2 -0
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000"
+BR2_LINUX_KERNEL_APPENDED_UIMAGE=y

What is the need for uImage? zImage is what is supported by default in U-Boot for pandaboard -
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/configs/omap4_common.h

Quoted 6 lines
Quoted 3 lines

This configuration is not going to work out of the box for a user since U-Boot searches for a zImage and a omap4-panda-es.dtb. So we would want to generate a stand-alone dtb.

zImage and dtb is still intact. The appended uImage is simply generated as an extra step after appending the DTB to the zImage.

Sorry Ryan, you were correct. The resulting uImage is then installed instead of the zImage, breaking boot with current u-boot.

Quoted 29 lines
Quoted 16 lines

configs/pandaboard_defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y · line 22

Quoted 4 lines
configs/pandaboard_defconfig +4 -0
+BR2_LINUX_KERNEL_APPENDED_DTB=y
+BR2_LINUX_KERNEL_USE_INTREE_DTS=y
+# might need omap4-panda or omap4-panda-a4 instead
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es"

Also could we lock down the version of u-boot too?

Currently it looks like this -

# Bootloaders
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_BOARDNAME="omap4_panda"
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="MLO"

Quoted 4 lines

Which means we will be pulling the latest version of U-Boot which is also not preferable since U-Boot also has a tendency to break. Would you be willing to specify a custom version of u-boot too in your update to the defconfig?

I'm actually using the linaro-boot-utils u-boot (SPL 2012.07) to enable booting over USB. I'll see if the vanilla version boots the generated uImage off an SD card.

Thanks,

--
Thomas

Signature · 1 line
Thomas