Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions
@ 2016-05-25 20:16 Fabio Estevam
  2016-05-25 20:16 ` [Buildroot] [PATCH 2/3] configs: mx53loco: Extend to ext4 type Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2016-05-25 20:16 UTC (permalink / raw)
  To: buildroot

Update U-boot to the 2016.05 version and the kernel to 4.6.

U-boot 2016.05 needs a patch for fixing an IPU build error.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 ...1-U-Boot-video-ipu_common-fix-build-error.patch | 41 ++++++++++++++++++++++
 configs/mx53loco_defconfig                         | 20 ++++++-----
 2 files changed, 53 insertions(+), 8 deletions(-)
 create mode 100644 board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch

diff --git a/board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch b/board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch
new file mode 100644
index 0000000..1d39f4e
--- /dev/null
+++ b/board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch
@@ -0,0 +1,41 @@
+commit c510f2e436008e55a50b063f2180cb1e63984224
+Author: Peng Fan <van.freenix@gmail.com>
+Date:   Thu Apr 28 10:07:53 2016 +0800
+
+video: ipu_common: fix build error
+
+Some toolchains fail to build
+"clk->rate = (u64)(clk->parent->rate * 16) / div;"
+And the cast usage is wrong.
+
+Use the following code to fix the issue,
+"
+  do_div(parent_rate, div);
+  clk->rate = parent_rate;
+"
+
+Reported-by: Peter Robinson <pbrobinson@gmail.com>
+Signed-off-by: Peng Fan <van.freenix@gmail.com>
+Cc: Stefano Babic <sbabic@denx.de>
+Cc: Fabio Estevam <fabio.estevam@nxp.com>
+Cc: Tom Rini <trini@konsulko.com>
+Cc: Anatolij Gustschin <agust@denx.de>
+Cc: Peter Robinson <pbrobinson@gmail.com>
+Reviewed-by: Tom Rini <trini@konsulko.com>
+Tested-by: Peter Robinson <pbrobinson@gmail.com>
+
+diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
+index 36d4b23..5676a0f 100644
+--- a/drivers/video/ipu_common.c
++++ b/drivers/video/ipu_common.c
+@@ -352,7 +352,9 @@ static int ipu_pixel_clk_set_rate(struct clk *clk, unsigned long rate)
+ 	 */
+ 	__raw_writel((div / 16) << 16, DI_BS_CLKGEN1(clk->id));
+ 
+-	clk->rate = (u64)(clk->parent->rate * 16) / div;
++	do_div(parent_rate, div);
++
++	clk->rate = parent_rate;
+ 
+ 	return 0;
+ }
diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index 3cb1b74..06150c7 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -2,25 +2,29 @@
 BR2_arm=y
 BR2_cortex_a8=y
 
-# Linux headers same as kernel, a 2.6 series (so, no option selected)
+# Linux headers same as kernel, a 4.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y
 
 # System
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
 
+# patches
+BR2_GLOBAL_PATCH_DIR="board/freescale/imx53loco/patches/"
+
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 
 # Bootloader
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="mx53loco"
-BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Freescale/u-boot-fslc.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="e36968af0a033e9d66535928886103370620cb4d"
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.05"
 BR2_TARGET_UBOOT_FORMAT_IMX=y
 
 # Kernel
 BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="b3912bb8a4caf3ec50909135e88af959982c43ca"
-BR2_LINUX_KERNEL_DEFCONFIG="imx5"
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.6"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx53-qsb imx53-qsrb"
-- 
1.9.1

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

* [Buildroot] [PATCH 2/3] configs: mx53loco: Extend to ext4 type
  2016-05-25 20:16 [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions Fabio Estevam
@ 2016-05-25 20:16 ` Fabio Estevam
  2016-05-25 20:16 ` [Buildroot] [PATCH 3/3] imx53loco: Use common script for generating sdcard image Fabio Estevam
  2016-05-26  3:25 ` [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions Baruch Siach
  2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2016-05-25 20:16 UTC (permalink / raw)
  To: buildroot

Add support for EXT4 filesystem.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 configs/mx53loco_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index 06150c7..e461f7a 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -13,6 +13,7 @@ BR2_GLOBAL_PATCH_DIR="board/freescale/imx53loco/patches/"
 
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
 
 # Bootloader
 BR2_TARGET_UBOOT=y
-- 
1.9.1

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

* [Buildroot] [PATCH 3/3] imx53loco: Use common script for generating sdcard image
  2016-05-25 20:16 [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions Fabio Estevam
  2016-05-25 20:16 ` [Buildroot] [PATCH 2/3] configs: mx53loco: Extend to ext4 type Fabio Estevam
@ 2016-05-25 20:16 ` Fabio Estevam
  2016-05-26  3:25 ` [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions Baruch Siach
  2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2016-05-25 20:16 UTC (permalink / raw)
  To: buildroot

Use the common script used by other i.mx boards to generate the sdcard image.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 board/freescale/imx53loco/create-boot-sd.sh |  1 -
 board/freescale/imx53loco/genimage.cfg      | 42 +++++++++++++++++++++++++++++
 board/freescale/imx53loco/post-image.sh     | 16 +++++++++++
 configs/mx53loco_defconfig                  |  6 +++++
 4 files changed, 64 insertions(+), 1 deletion(-)
 delete mode 120000 board/freescale/imx53loco/create-boot-sd.sh
 create mode 100644 board/freescale/imx53loco/genimage.cfg
 create mode 100644 board/freescale/imx53loco/post-image.sh

diff --git a/board/freescale/imx53loco/create-boot-sd.sh b/board/freescale/imx53loco/create-boot-sd.sh
deleted file mode 120000
index d45d639..0000000
--- a/board/freescale/imx53loco/create-boot-sd.sh
+++ /dev/null
@@ -1 +0,0 @@
-../create-boot-sd.sh
\ No newline at end of file
diff --git a/board/freescale/imx53loco/genimage.cfg b/board/freescale/imx53loco/genimage.cfg
new file mode 100644
index 0000000..b56c168
--- /dev/null
+++ b/board/freescale/imx53loco/genimage.cfg
@@ -0,0 +1,42 @@
+# Minimal microSD card image for the Freescale's i.MX53 QSB board
+#
+# We mimic the .sdcard Freescale's image format for i.MX53:
+# * the microSD card must have 1 kB free space at the beginning,
+# * U-Boot is dumped as is,
+# * a FAT partition at offset 8 MB is containing zImage and dtbs,
+# * a single root filesystem partition is required (Ext4 in this case).
+#
+
+image boot.vfat {
+  vfat {
+    files = {
+      "imx53-qsb.dtb",
+      "imx53-qsrb.dtb",
+      "zImage"
+    }
+  }
+  size = 16M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "u-boot.imx"
+    offset = 1024
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+    offset = 8M
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}
diff --git a/board/freescale/imx53loco/post-image.sh b/board/freescale/imx53loco/post-image.sh
new file mode 100644
index 0000000..8757355
--- /dev/null
+++ b/board/freescale/imx53loco/post-image.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+  --rootpath "${TARGET_DIR}" \
+  --tmppath "${GENIMAGE_TMP}" \
+  --inputpath "${BINARIES_DIR}" \
+  --outputpath "${BINARIES_DIR}" \
+  --config "${GENIMAGE_CFG}"
+
+exit $?
diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index e461f7a..b62172c 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -11,7 +11,13 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
 # patches
 BR2_GLOBAL_PATCH_DIR="board/freescale/imx53loco/patches/"
 
+# required tools to create the SD card image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
 # Filesystem
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/imx53loco/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 
-- 
1.9.1

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

* [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions
  2016-05-25 20:16 [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions Fabio Estevam
  2016-05-25 20:16 ` [Buildroot] [PATCH 2/3] configs: mx53loco: Extend to ext4 type Fabio Estevam
  2016-05-25 20:16 ` [Buildroot] [PATCH 3/3] imx53loco: Use common script for generating sdcard image Fabio Estevam
@ 2016-05-26  3:25 ` Baruch Siach
  2 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2016-05-26  3:25 UTC (permalink / raw)
  To: buildroot

Hi Fabio,

On Wed, May 25, 2016 at 05:16:06PM -0300, Fabio Estevam wrote:
> Update U-boot to the 2016.05 version and the kernel to 4.6.
> 
> U-boot 2016.05 needs a patch for fixing an IPU build error.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  ...1-U-Boot-video-ipu_common-fix-build-error.patch | 41 ++++++++++++++++++++++
>  configs/mx53loco_defconfig                         | 20 ++++++-----
>  2 files changed, 53 insertions(+), 8 deletions(-)
>  create mode 100644 board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch
> 
> diff --git a/board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch b/board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch
> new file mode 100644
> index 0000000..1d39f4e
> --- /dev/null
> +++ b/board/freescale/imx53loco/patches/uboot/0001-U-Boot-video-ipu_common-fix-build-error.patch
> @@ -0,0 +1,41 @@
> +commit c510f2e436008e55a50b063f2180cb1e63984224
> +Author: Peng Fan <van.freenix@gmail.com>
> +Date:   Thu Apr 28 10:07:53 2016 +0800
> +
> +video: ipu_common: fix build error
> +
> +Some toolchains fail to build
> +"clk->rate = (u64)(clk->parent->rate * 16) / div;"
> +And the cast usage is wrong.
> +
> +Use the following code to fix the issue,
> +"
> +  do_div(parent_rate, div);
> +  clk->rate = parent_rate;
> +"
> +
> +Reported-by: Peter Robinson <pbrobinson@gmail.com>
> +Signed-off-by: Peng Fan <van.freenix@gmail.com>
> +Cc: Stefano Babic <sbabic@denx.de>
> +Cc: Fabio Estevam <fabio.estevam@nxp.com>
> +Cc: Tom Rini <trini@konsulko.com>
> +Cc: Anatolij Gustschin <agust@denx.de>
> +Cc: Peter Robinson <pbrobinson@gmail.com>
> +Reviewed-by: Tom Rini <trini@konsulko.com>
> +Tested-by: Peter Robinson <pbrobinson@gmail.com>

Please add your SoB here. And since this patch is upstream, please mention 
that in the patch description.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

end of thread, other threads:[~2016-05-26  3:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 20:16 [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions Fabio Estevam
2016-05-25 20:16 ` [Buildroot] [PATCH 2/3] configs: mx53loco: Extend to ext4 type Fabio Estevam
2016-05-25 20:16 ` [Buildroot] [PATCH 3/3] imx53loco: Use common script for generating sdcard image Fabio Estevam
2016-05-26  3:25 ` [Buildroot] [PATCH 1/3] configs: mx53loco: Update bootloader and kernel versions Baruch Siach

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