Skip to contentSkip to conversation

board: add support for WarPboard

PATCH New Arthur LAMBERT 2 participants 4 messages Jul 1, 2015 – Jul 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 board: add support for WarPboard

This is a set of patch to add support for warpboard (Freescale board based on imx6sl)

The patch contains :
- defconfig for warpboard
- linux patches from Fabio Estevam to fix device tree due to last change on warpboard schematics (rev 1.12) and to fix kernel imx_v6_v7 defconfig which use incorrect hci protocol
- specific firmware file for warpboard bluetooth
nvram : brcmfmac4330-sdio.txt

Origin of nvram config file for wifi :
https://github.com/Freescale/meta-fsl-arm-extra

---
Changes v3 -> v4:
- Commit log should be wrapped to 80 columns
- Add more details about bluetooth and rootfs in README
- Enable host-dfu-util in defconfig
Changes v2 -> v3:
- Use imx_v6_v7_defconfig instead of custom config.
- Add patch to enable good hci protocol for bluetooth in kernel config
- Use internal sdma firmware instead of external since the 1.12 integrate good firmware.
- Fix some typo
- Add some extra info in README and remove useless section
- Fix patch naming convention
- Use GLOBAL_PATH_DIR for all patches
- Move some section in defconfig to keep .config ordering
- Upgrade uboot to 2015.07-rc2 to fix bug on dfu process
Changes v1 -> v2:
- add specific kernel headers
- use wget download rather than git download for kernel
- fix version symbol for uboot
- add imx_usb_loader host utility
- remove bin firmware file and enable linux-firmware package instead
- fix command to enable bluetooth and fix protocol for hci in custom kernel config

---
 board/freescale/warpboard/README                   |  53 +++++++++++
 .../warpboard/patches/linux/0001-hciuart-h4.patch  |  34 +++++++
 .../linux/0002-replace-uart2-by-uart5.patch        | 103 +++++++++++++++++++++
 .../lib/firmware/brcm/brcmfmac4330-sdio.txt        |  40 ++++++++
 configs/warpboard_defconfig                        |  42 +++++++++
 5 files changed, 272 insertions(+)
 create mode 100644 board/freescale/warpboard/README
 create mode 100644 board/freescale/warpboard/patches/linux/0001-hciuart-h4.patch
 create mode 100644 board/freescale/warpboard/patches/linux/0002-replace-uart2-by-uart5.patch
 create mode 100644 board/freescale/warpboard/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt
 create mode 100644 configs/warpboard_defconfig
board/freescale/warpboard/README new file +53 -0
new file mode 100644
index 0000000..fdf93c3
@@ -0,0 +1,53 @@
+Build
+=====
+
+First, configure Buildroot for your WarpBoard.
+  make warpboard_defconfig
+
+Build all components:
+  make
+
+You will find in ./output/images/ the following files:
+  - imx6sl-warp.dtb
+  - rootfs.ext2
+  - rootfs.tar
+  - u-boot.imx
+  - zImage
+
+Update uboot
+============
+
+- Put warpboard in USB download mode
+  closing the jumper j2  on daugther board
+- Load u-boot.imx in warpboard by using imx usb loader from host utility
+  $ ./imx_usb output/images/u-boot.imx
+- Uboot will appear in minicom
+- Use the default environment variables:
+ => env default -f -a
+ => saveenv
+- run the DFU command in uboot prompt:
+ => dfu 0 mmc 0
+- transfer uboot into flash by running this command in host side:
+ $ sudo dfu-util -D output/images/u-boot.imx -a boot
+- remove power and put warpboard into normal boot mode by opening the jumper.
+
+Update linux & rootfs
+=====================
+
+Use ums command from uboot prompt to mount emmc as mass storage and update
+zImage, device tree (imx6sl-warp.dtb) and rootfs file (rootfs.tar)
+=> ums 0 mmc 0
+
+Put zimage and dtb file in warp-vfat and extract rootfs.tar in warp-rootfs
+partition.
+
+Using bluetooth
+================
+Enable the bluez_utils or bluez5_utils package, and then:
+
+$ hciattach /dev/ttymxc4 any
+$ hciconfig hci0 up
+
+Using Wifi
+==========
+$ ifconfig wlan0 up
board/freescale/warpboard/patches/linux/0001-hciuart-h4.patch new file +34 -0
new file mode 100644
index 0000000..f47541b
@@ -0,0 +1,34 @@
+From f6878a437a5ba157fd087ef5e1874bdce5eca199 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <[email protected]>
+Date: Mon, 22 Jun 2015 16:37:34 -0300
+Subject: [PATCH] ARM: imx_v6_v7_defconfig: Select HCIUART_H4
+
+The old warp board revision had hardware issues that prevented
+the RTS/CTS lines to work with the Bluetooth module.
+
+Tha latest rev1.12 fixes this problem, so now we should better use
+CONFIG_BT_HCIUART_H4 instead, as it provides a better throughput than
+the CONFIG_BT_HCIUART_3WIRE option.
+
+Suggested-by: Arthur Lambert <[email protected]>
+Signed-off-by: Fabio Estevam <[email protected]>
+---
+ arch/arm/configs/imx_v6_v7_defconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
+index f6989fb..c864295 100644
+--- a/arch/arm/configs/imx_v6_v7_defconfig
++++ b/arch/arm/configs/imx_v6_v7_defconfig
+@@ -73,7 +73,7 @@ CONFIG_CAN=y
+ CONFIG_CAN_FLEXCAN=y
+ CONFIG_BT=y
+ CONFIG_BT_HCIUART=y
+-CONFIG_BT_HCIUART_3WIRE=y
++CONFIG_BT_HCIUART_H4=y
+ CONFIG_CFG80211=y
+ CONFIG_CFG80211_WEXT=y
+ CONFIG_MAC80211=y
+-- 
+1.9.1
+
board/freescale/warpboard/patches/linux/0002-replace-uart2-by-uart5.patch new file +103 -0

103 lines not on this page · raw message

board/freescale/warpboard/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt new file +40 -0
new file mode 100644
index 0000000..9546246
@@ -0,0 +1,40 @@
+# bcm94330wlsdgb.txt
+manfid=0x2d0
+prodid=0x0552
+vendid=0x14e4
+devid=0x4360
+boardtype=0x0552
+boardrev=0x11
+# this design has 2.4GHz SP3T switch
+boardflags=0x00080200
+nocrc=1
+xtalfreq=37400
+boardnum=22
+macaddr=00:90:4c:c5:12:38
+ag0=255
+aa2g=1
+ccode=CN
+pa0b0=0x14d0
+pa0b1=0xfd98
+pa0b2=0xff78
+rssismf2g=0xa
+rssismc2g=0x3
+rssisav2g=0x7
+maxp2ga0=0x50
+sromrev=3
+il0macaddr=00:90:4c:c5:12:38
+wl0id=0x431b
+cckPwrOffset=5
+ofdm2gpo=0x66666666
+mcs2gpo0=0x6666
+mcs2gpo1=0x6666
+swctrlmap_2g=0x04040404,0x02020202,0x02020404,0x10202,0x1ff
+swctrlmap_5g=0x00100010,0x00280020,0x00200010,0x14202,0x2f8
+rfreg033=0x19
+rfreg033_cck=0x1f
+dacrate2g=160
+txalpfbyp2g=1
+bphyscale=17
+cckPwrIdxCorr=-15
+pacalidx2g=45
+txgaintbl=1
configs/warpboard_defconfig new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw

PATCH v4 1/1 board: add support for WarPboard

Arthur,

board/freescale/warpboard/README line 23

Quoted 4 lines · Arthur LAMBERT

+- Put warpboard in USB download mode

board/freescale/warpboard/README new file +3 -0
+  closing the jumper j2  on daugther board
+- Load u-boot.imx in warpboard by using imx usb loader from host utility
+  $ ./imx_usb output/images/u-boot.imx

Can you confirm that:

$ output/host/usr/bin/imx_usb output/images/u-boot.imx
Quoted 7 lines
+- Uboot will appear in minicom
+- Use the default environment variables:

+ => env default -f -a
+ => saveenv
+- run the DFU command in uboot prompt:
+ => dfu 0 mmc 0
+- transfer uboot into flash by running this command in host side:

and:

Quoted 1 line

+ $ sudo dfu-util -D output/images/u-boot.imx -a boot

$ sudo output/host/usr/bin/dfu-util -D output/images/u-boot.imx -a boot

is OK ?

This makes it clear which dfu_util and imx_usb programs should be executed.

board/freescale/warpboard/README line 42

Quoted 6 lines
board/freescale/warpboard/README new file +6 -0
+Use ums command from uboot prompt to mount emmc as mass storage and update
+zImage, device tree (imx6sl-warp.dtb) and rootfs file (rootfs.tar)
+=> ums 0 mmc 0
+
+Put zimage and dtb file in warp-vfat and extract rootfs.tar in warp-rootfs
+partition.

Maybe indicate it should be extracted as root.

Quoted 38 lines
configs/warpboard_defconfig new file +32 -0
new file mode 100644
index 0000000..13e90cd
@@ -0,0 +1,42 @@
+# architecture
+BR2_arm=y
+BR2_cortex_a9=y
+
+# patches
+BR2_GLOBAL_PATCH_DIR="board/freescale/warpboard/patches/"
+
+# lock to 4.0 headers to avoid breaking with newer kernels
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="4.0"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0=y
+
+# system
+BR2_TARGET_GENERIC_HOSTNAME="warpboard"
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+
+# rootfs overlay
+BR2_ROOTFS_OVERLAY="board/freescale/warpboard/rootfs_overlay"
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://github.com/Freescale/linux-fslc/tarball/38ec11d/linux-fslc-38ec11d.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sl-warp"
+
+# wifi firmware for brcm4330
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y
+

configs/warpboard_defconfig line 42

Quoted 10 lines
configs/warpboard_defconfig new file +10 -0
+# uboot
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="warp"
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2015.07-rc2"
+BR2_TARGET_UBOOT_FORMAT_IMX=y
+
+# host utility
+BR2_PACKAGE_HOST_DFU_UTIL=y
+BR2_PACKAGE_HOST_IMX_USB_LOADER=y

You're not enabling an ext2 filesystem (which is good since you don't use it). But you still mention it in your document:

+You will find in ./output/images/ the following files:

+  - imx6sl-warp.dtb
+  - rootfs.ext2
+  - rootfs.tar
+  - u-boot.imx
+  - zImage

No need to resend just for that, just confirm me that my proposals are OK, and I'll fix when applying.

Thanks,

Thomas

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

PATCH v4 1/1 board: add support for WarPboard

Le Wednesday 01 Jul 2015 ? 15:30:04 (+0200), Thomas Petazzoni a ?crit :

Quoted 4 lines

Arthur,

On Wed, 1 Jul 2015 11:22:42 +0200, Arthur LAMBERT wrote:

Quoted 8 lines

board/freescale/warpboard/README line 23

Quoted 4 lines

+- Put warpboard in USB download mode

board/freescale/warpboard/README new file +3 -0
+  closing the jumper j2  on daugther board
+- Load u-boot.imx in warpboard by using imx usb loader from host utility
+  $ ./imx_usb output/images/u-boot.imx

Can you confirm that:

$ output/host/usr/bin/imx_usb output/images/u-boot.imx

Just need to add -c + configuration directory :

$ output/host/usr/bin/imx_usb -c output/host/etc/imx-loader.d/ output/images/u-boot.imx

During my test I was testing the process from :
output/build/host-imx-usb-loader-f96aee286ea17c832b7ec922dd76842deb5ce299 In this directory you can find binary and configuration file. In you use a relative path, you have to add and extra option to give configuration directory path.

Quoted 11 lines
Quoted 8 lines
+- Uboot will appear in minicom
+- Use the default environment variables:

+ => env default -f -a
+ => saveenv
+- run the DFU command in uboot prompt:
+ => dfu 0 mmc 0
+- transfer uboot into flash by running this command in host side:

and:

Quoted 9 lines
Quoted 1 line

+ $ sudo dfu-util -D output/images/u-boot.imx -a boot

$ sudo output/host/usr/bin/dfu-util -D output/images/u-boot.imx -a boot

is OK ?

This makes it clear which dfu_util and imx_usb programs should be executed.

It's OK !

Quoted 9 lines

board/freescale/warpboard/README line 42

Quoted 6 lines
board/freescale/warpboard/README new file +6 -0
+Use ums command from uboot prompt to mount emmc as mass storage and update
+zImage, device tree (imx6sl-warp.dtb) and rootfs file (rootfs.tar)
+=> ums 0 mmc 0
+
+Put zimage and dtb file in warp-vfat and extract rootfs.tar in warp-rootfs
+partition.

Maybe indicate it should be extracted as root.

Ok.

Quoted 53 lines
Quoted 38 lines
configs/warpboard_defconfig new file +32 -0
new file mode 100644
index 0000000..13e90cd
@@ -0,0 +1,42 @@
+# architecture
+BR2_arm=y
+BR2_cortex_a9=y
+
+# patches
+BR2_GLOBAL_PATCH_DIR="board/freescale/warpboard/patches/"
+
+# lock to 4.0 headers to avoid breaking with newer kernels
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="4.0"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0=y
+
+# system
+BR2_TARGET_GENERIC_HOSTNAME="warpboard"
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+
+# rootfs overlay
+BR2_ROOTFS_OVERLAY="board/freescale/warpboard/rootfs_overlay"
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://github.com/Freescale/linux-fslc/tarball/38ec11d/linux-fslc-38ec11d.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sl-warp"
+
+# wifi firmware for brcm4330
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y
+

configs/warpboard_defconfig line 42

Quoted 10 lines
configs/warpboard_defconfig new file +10 -0
+# uboot
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="warp"
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2015.07-rc2"
+BR2_TARGET_UBOOT_FORMAT_IMX=y
+
+# host utility
+BR2_PACKAGE_HOST_DFU_UTIL=y
+BR2_PACKAGE_HOST_IMX_USB_LOADER=y

You're not enabling an ext2 filesystem (which is good since you don't use it). But you still mention it in your document:

board/freescale/warpboard/README line 15

Quoted 6 lines
board/freescale/warpboard/README new file +6 -0
+You will find in ./output/images/ the following files:
+  - imx6sl-warp.dtb
+  - rootfs.ext2
+  - rootfs.tar
+  - u-boot.imx
+  - zImage

So yes we can remove rootfs.ext2 from the document. We don't use it during the flash process.

Quoted 3 lines

No need to resend just for that, just confirm me that my proposals are OK, and I'll fix when applying.

Thanks for that. So yes all your proposals are good. Just need to add the configuration directory path for the first proposal.

Quoted 4 lines

Thanks,

Thomas

Thanks,
Arthur.

Quoted 3 lines

Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#3 lore raw

PATCH v4 1/1 board: add support for WarPboard

In reply to Arthur LAMBERT

Dear Arthur LAMBERT,

Quoted 31 lines · Arthur LAMBERT

This is a set of patch to add support for warpboard (Freescale board based on imx6sl)

The patch contains :
- defconfig for warpboard
- linux patches from Fabio Estevam to fix device tree due to last change on warpboard schematics (rev 1.12) and to fix kernel imx_v6_v7 defconfig which use incorrect hci protocol
- specific firmware file for warpboard bluetooth
nvram : brcmfmac4330-sdio.txt

Origin of nvram config file for wifi :
https://github.com/Freescale/meta-fsl-arm-extra

---
Changes v3 -> v4:
- Commit log should be wrapped to 80 columns
- Add more details about bluetooth and rootfs in README
- Enable host-dfu-util in defconfig
Changes v2 -> v3:
- Use imx_v6_v7_defconfig instead of custom config.
- Add patch to enable good hci protocol for bluetooth in kernel config
- Use internal sdma firmware instead of external since the 1.12 integrate good firmware.
- Fix some typo
- Add some extra info in README and remove useless section
- Fix patch naming convention
- Use GLOBAL_PATH_DIR for all patches
- Move some section in defconfig to keep .config ordering
- Upgrade uboot to 2015.07-rc2 to fix bug on dfu process

Quoted 8 lines

Changes v1 -> v2:
- add specific kernel headers
- use wget download rather than git download for kernel
- fix version symbol for uboot
- add imx_usb_loader host utility
- remove bin firmware file and enable linux-firmware package instead
- fix command to enable bluetooth and fix protocol for hci in custom kernel config

Applied after doing a good number of misc improvements to the README file, as discussed earlier in this thread. Thanks a lot!

Thomas

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