All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot
@ 2019-06-09 14:57 Joris Offouga
  2019-06-09 14:57 ` [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part Joris Offouga
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Joris Offouga @ 2019-06-09 14:57 UTC (permalink / raw)
  To: buildroot

This commit bumps Linux & Linux-headers to 5.1 and U-Boot to version 2019.01.
With U-Boot version 2019.01, imx7dpico boot with distrobootcmd also introduce
extlinux file also remove patch and change TARGET_UBOOT_BOARNAME for select
correct defconfig in U-Boot.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
---
 .../patches/uboot/0001-picomx7dname.patch     | 31 -------------------
 board/technexion/imx7dpico/readme.txt         |  3 +-
 .../boot/extlinux/extlinux.conf               |  4 +++
 configs/imx7dpico_defconfig                   | 19 ++++++------
 4 files changed, 16 insertions(+), 41 deletions(-)
 delete mode 100644 board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch
 create mode 100644 board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf

diff --git a/board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch b/board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch
deleted file mode 100644
index 59408bcd7a..0000000000
--- a/board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6d298b0fcacfc555f93864fa45fb612140902388 Mon Sep 17 00:00:00 2001
-From: Fabio Estevam <festevam@gmail.com>
-Date: Tue, 5 Jun 2018 22:12:48 -0300
-Subject: [PATCH] pico-imx7d: Adjust the dtb name
-
-Since kernel commit 41bbeadceb03 ("ARM: dts: imx7d-pico-pi: Separate
-into cpu and baseboard dts") the dtb name has changed.
-
-Fix it accordingly.
-
-Signed-off-by: Fabio Estevam <festevam@gmail.com>
----
- include/configs/pico-imx7d.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
-index b208d7f..d2ffa70 100644
---- a/include/configs/pico-imx7d.h
-+++ b/include/configs/pico-imx7d.h
-@@ -41,7 +41,7 @@
- 	"console=ttymxc4\0" \
- 	"fdt_high=0xffffffff\0" \
- 	"initrd_high=0xffffffff\0" \
--	"fdt_file=imx7d-pico.dtb\0" \
-+	"fdt_file=imx7d-pico-pi.dtb\0" \
- 	"fdt_addr=0x83000000\0" \
- 	"ip_dyn=yes\0" \
- 	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
--- 
-2.7.4
-
diff --git a/board/technexion/imx7dpico/readme.txt b/board/technexion/imx7dpico/readme.txt
index cda3f285eb..07e089c38e 100644
--- a/board/technexion/imx7dpico/readme.txt
+++ b/board/technexion/imx7dpico/readme.txt
@@ -20,7 +20,8 @@ You will find in output/images/ the following files:
   - rootfs.ext4
   - rootfs.tar
   - sdcard.img
-  - u-boot.imx
+  - u-boot.img
+  - SPL
   - zImage
 
 Flash the eMMC
diff --git a/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf b/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf
new file mode 100644
index 0000000000..4824aff079
--- /dev/null
+++ b/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf
@@ -0,0 +1,4 @@
+Label imx7d-pico-buildroot
+  kernel /boot/zImage
+  devicetree /boot/imx7d-pico-pi.dtb
+  append root=PARTUUID=${uuid} rootwait rw console=${console},${baudrate}
\ No newline at end of file
diff --git a/configs/imx7dpico_defconfig b/configs/imx7dpico_defconfig
index 93e3fd7414..cd12e282ef 100644
--- a/configs/imx7dpico_defconfig
+++ b/configs/imx7dpico_defconfig
@@ -3,11 +3,8 @@ BR2_arm=y
 BR2_cortex_a7=y
 BR2_ARM_FPU_NEON_VFPV4=y
 
-# patches
-BR2_GLOBAL_PATCH_DIR="board/technexion/imx7dpico/patches"
-
-# Linux headers same as kernel, a 4.17 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_17=y
+# Linux headers same as kernel, a 5.1 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
 
 # system
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc4"
@@ -15,18 +12,21 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc4"
 # kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.1.6"
 BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-pico-pi"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
 
 # bootloader
 BR2_TARGET_UBOOT=y
-BR2_TARGET_UBOOT_BOARDNAME="pico-imx7d"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_TARGET_UBOOT_BOARDNAME="pico-pi-imx7d"
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05"
-BR2_TARGET_UBOOT_FORMAT_IMX=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
 
 # required tools to create the eMMC image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -34,6 +34,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # filesystem / image
+BR2_ROOTFS_OVERLAY="board/technexion/imx7dpico/rootfs_overlay"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
-- 
2.17.1

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

* [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part
  2019-06-09 14:57 [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Joris Offouga
@ 2019-06-09 14:57 ` Joris Offouga
  2019-06-09 22:17   ` Arnout Vandecappelle
  2019-06-09 14:57 ` [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support Joris Offouga
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Joris Offouga @ 2019-06-09 14:57 UTC (permalink / raw)
  To: buildroot

This includes the no_boot_part templates which use a /boot
included in rootfs.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
 .../imx/genimage.cfg.template_no_boot_part    | 23 +++++++++++++++
 .../genimage.cfg.template_no_boot_part_spl    | 29 +++++++++++++++++++
 board/freescale/common/imx/post-image.sh      |  6 ++++
 3 files changed, 58 insertions(+)
 create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part
 create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl

diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
new file mode 100644
index 0000000000..9e19b4ee3e
--- /dev/null
+++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
@@ -0,0 +1,23 @@
+# Minimal SD card image for the Freescale boards Template
+#
+# We mimic the .sdcard Freescale's image format:
+# * the SD card must have 1 kB free space at the beginning,
+# * U-Boot is dumped as is,
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "%UBOOTBIN%"
+    offset = 1024
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
new file mode 100644
index 0000000000..6d3ae183e3
--- /dev/null
+++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
@@ -0,0 +1,29 @@
+# Minimal SD card image for the Freescale boards Template for SPL Boot
+#
+# We mimic the .sdcard Freescale's image format:
+# * the SD card must have 1 kB free space at the beginning,
+# * U-Boot is dumped as is,
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition spl {
+    in-partition-table = "no"
+    image = "SPL"
+    offset = 1024
+  }
+
+  partition u-boot-img {
+    in-partition-table = "no"
+    image = "u-boot.img"
+    offset = 69K
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
index 12a5bea73b..851ce97c57 100755
--- a/board/freescale/common/imx/post-image.sh
+++ b/board/freescale/common/imx/post-image.sh
@@ -36,6 +36,12 @@ genimage_type()
 		echo "genimage.cfg.template_imx8"
 	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_imx8"
+	elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then
+		if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
+		    echo "genimage.cfg.template_no_boot_part_spl"
+		else
+		    echo "genimage.cfg.template_no_boot_part"
+		fi
 	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_spl"
 	else
-- 
2.17.1

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

* [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support
  2019-06-09 14:57 [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Joris Offouga
  2019-06-09 14:57 ` [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part Joris Offouga
@ 2019-06-09 14:57 ` Joris Offouga
  2019-06-09 22:27   ` Arnout Vandecappelle
  2019-06-09 16:44 ` [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Pierre-Jean Texier
  2019-06-09 22:08 ` Arnout Vandecappelle
  3 siblings, 1 reply; 12+ messages in thread
From: Joris Offouga @ 2019-06-09 14:57 UTC (permalink / raw)
  To: buildroot

imx7dpico has a BCM4339 Wifi chip. Add Wifi support by default
to allow a better customer experience.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
---
 board/technexion/imx7dpico/readme.txt         | 11 +++
 .../lib/firmware/brcm/brcmfmac4339-sdio.txt   | 99 +++++++++++++++++++
 configs/imx7dpico_defconfig                   | 12 +++
 3 files changed, 122 insertions(+)
 create mode 100644 board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt

diff --git a/board/technexion/imx7dpico/readme.txt b/board/technexion/imx7dpico/readme.txt
index 07e089c38e..1b9e80a0fd 100644
--- a/board/technexion/imx7dpico/readme.txt
+++ b/board/technexion/imx7dpico/readme.txt
@@ -57,4 +57,15 @@ To boot your newly created system:
   emulator at 115200 bps, 8n1;
 - power on the board.
 
+Using Wifi
+==========
+
+# modprobe brcmfmac
+# iwconfig wlan0 essid ACCESSPOINTNAME
+# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf
+(enter the wifi password and press enter)
+# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf &
+# udhcpc -i wlan0
+# ping buildroot.org
+
 Enjoy!
diff --git a/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt b/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt
new file mode 100644
index 0000000000..41ccaa3cad
--- /dev/null
+++ b/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt
@@ -0,0 +1,99 @@
+#AP6335_NVRAM_V1.5_03112014
+NVRAMRev=$Rev: 410316 $
+sromrev=11
+boardrev=0x1203
+boardtype=0x06c5
+boardflags=0x00000c01
+boardflags2=0x00002000
+boardflags3=0x101188
+macaddr=00:90:4c:c5:12:38
+ccode=0
+regrev=0
+antswitch=0
+pdgain2g=7
+pdgain5g=7
+tworangetssi2g=0
+tworangetssi5g=0
+femctrl=7
+pcieingress_war=15
+vendid=0x14e4
+devid=0x43ae
+manfid=0x2d0
+nocrc=1
+otpimagesize=502
+xtalfreq=37400
+extpagain2g=2
+pdetrange2g=2
+extpagain5g=2
+pdetrange5g=2
+rxgains2gelnagaina0=0
+rxgains2gtrisoa0=7
+rxgains2gtrelnabypa0=0
+rxgains5gelnagaina0=0
+rxgains5gtrisoa0=11
+rxgains5gtrelnabypa0=0
+rxchain=1
+txchain=1
+aa2g=1
+aa5g=1
+tssipos5g=0
+tssipos2g=0
+pa2ga0=-161,6269,-723
+pa2gccka0=-116,7568,-852
+pa5ga0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
+pa5gbw40a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
+pa5gbw80a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
+pdoffset40ma0=0
+pdoffset80ma0=0
+pdoffsetcckma0=0
+maxp2ga0=75
+maxp5ga0=64,64,72,72
+cckbw202gpo=0x0000
+cckbw20ul2gpo=0x0
+mcsbw202gpo=0x99445533
+mcsbw402gpo=0x99775533
+dot11agofdmhrbw202gpo=0x2233
+ofdmlrbw202gpo=0x0000
+tssifloor2g=500
+mcsbw205glpo=0x66333330
+mcsbw405glpo=0x66665530
+mcsbw805glpo=0xAA555530
+mcsbw1605glpo=0x99555530
+mcsbw205gmpo=0x99BB5530
+mcsbw405gmpo=0x99BB5530
+mcsbw805gmpo=0xEE555530
+mcsbw1605gmpo=0x99555530
+mcsbw205ghpo=0x99995530
+mcsbw405ghpo=0x99BB5530
+mcsbw805ghpo=0xEE555530
+mcsbw1605ghpo=0x99555530
+mcslr5glpo=0x0000
+mcslr5gmpo=0x0000
+mcslr5ghpo=0x0000
+sb20in40hrrpo=0x0
+sb20in80and160hr5glpo=0x0
+sb40and80hr5glpo=0x0
+sb20in80and160hr5gmpo=0x0
+sb40and80hr5gmpo=0x0
+sb20in80and160hr5ghpo=0x0
+sb40and80hr5ghpo=0x0
+sb20in40lrpo=0x0
+sb20in80and160lr5glpo=0x0
+sb40and80lr5glpo=0x0
+sb20in80and160lr5gmpo=0x0
+sb40and80lr5gmpo=0x0
+sb20in80and160lr5ghpo=0x0
+sb40and80lr5ghpo=0x0
+dot11agduphrpo=0x0
+dot11agduplrpo=0x0
+phycal_tempdelta=25
+cckdigfilttype=2
+pacalidx2g=65
+dacrate2g=160
+swctrlmap_5g=0x00000008,0x00000010,0x00000008,0x000000,0x038
+swctrlmap_2g=0x00000001,0x00000002,0x00000001,0x040002,0x0ff
+swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
+swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000
+rssicorrnorm_c0=3,3
+rssicorrnorm5g_c0=2,3,4,2,3,3,0,1,2,0,1,2
+muxenab=0x10
\ No newline at end of file
diff --git a/configs/imx7dpico_defconfig b/configs/imx7dpico_defconfig
index cd12e282ef..6b1184f672 100644
--- a/configs/imx7dpico_defconfig
+++ b/configs/imx7dpico_defconfig
@@ -28,6 +28,18 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 
+
+# wifi firmware for brcm43439
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y
+
+# For automatic firmware loading
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+
+# wireless packages
+BR2_PACKAGE_WIRELESS_TOOLS=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
 # required tools to create the eMMC image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
-- 
2.17.1

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

* [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot
  2019-06-09 14:57 [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Joris Offouga
  2019-06-09 14:57 ` [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part Joris Offouga
  2019-06-09 14:57 ` [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support Joris Offouga
@ 2019-06-09 16:44 ` Pierre-Jean Texier
  2019-06-09 22:08 ` Arnout Vandecappelle
  3 siblings, 0 replies; 12+ messages in thread
From: Pierre-Jean Texier @ 2019-06-09 16:44 UTC (permalink / raw)
  To: buildroot

Hi Joris,

Le 09/06/2019 ? 16:57, Joris Offouga a ?crit?:
> This commit bumps Linux & Linux-headers to 5.1 and U-Boot to version 2019.01.
> With U-Boot version 2019.01, imx7dpico boot with distrobootcmd also introduce
> extlinux file also remove patch and change TARGET_UBOOT_BOARNAME for select
> correct defconfig in U-Boot.
> 
> Signed-off-by: Joris Offouga <offougajoris@gmail.com>
> ---
>   .../patches/uboot/0001-picomx7dname.patch     | 31 -------------------
>   board/technexion/imx7dpico/readme.txt         |  3 +-
>   .../boot/extlinux/extlinux.conf               |  4 +++
>   configs/imx7dpico_defconfig                   | 19 ++++++------
>   4 files changed, 16 insertions(+), 41 deletions(-)
>   delete mode 100644 board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch
>   create mode 100644 board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf
> 
> diff --git a/board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch b/board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch
> deleted file mode 100644
> index 59408bcd7a..0000000000
> --- a/board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -From 6d298b0fcacfc555f93864fa45fb612140902388 Mon Sep 17 00:00:00 2001
> -From: Fabio Estevam <festevam@gmail.com>
> -Date: Tue, 5 Jun 2018 22:12:48 -0300
> -Subject: [PATCH] pico-imx7d: Adjust the dtb name
> -
> -Since kernel commit 41bbeadceb03 ("ARM: dts: imx7d-pico-pi: Separate
> -into cpu and baseboard dts") the dtb name has changed.
> -
> -Fix it accordingly.
> -
> -Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ----
> - include/configs/pico-imx7d.h | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
> -index b208d7f..d2ffa70 100644
> ---- a/include/configs/pico-imx7d.h
> -+++ b/include/configs/pico-imx7d.h
> -@@ -41,7 +41,7 @@
> - 	"console=ttymxc4\0" \
> - 	"fdt_high=0xffffffff\0" \
> - 	"initrd_high=0xffffffff\0" \
> --	"fdt_file=imx7d-pico.dtb\0" \
> -+	"fdt_file=imx7d-pico-pi.dtb\0" \
> - 	"fdt_addr=0x83000000\0" \
> - 	"ip_dyn=yes\0" \
> - 	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
> ---
> -2.7.4
> -
> diff --git a/board/technexion/imx7dpico/readme.txt b/board/technexion/imx7dpico/readme.txt
> index cda3f285eb..07e089c38e 100644
> --- a/board/technexion/imx7dpico/readme.txt
> +++ b/board/technexion/imx7dpico/readme.txt
> @@ -20,7 +20,8 @@ You will find in output/images/ the following files:
>     - rootfs.ext4
>     - rootfs.tar
>     - sdcard.img
> -  - u-boot.imx
> +  - u-boot.img
> +  - SPL
>     - zImage
>   
>   Flash the eMMC
> diff --git a/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf b/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf
> new file mode 100644
> index 0000000000..4824aff079
> --- /dev/null
> +++ b/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf
> @@ -0,0 +1,4 @@
> +Label imx7d-pico-buildroot
> +  kernel /boot/zImage
> +  devicetree /boot/imx7d-pico-pi.dtb
> +  append root=PARTUUID=${uuid} rootwait rw console=${console},${baudrate}
> \ No newline at end of file
> diff --git a/configs/imx7dpico_defconfig b/configs/imx7dpico_defconfig
> index 93e3fd7414..cd12e282ef 100644
> --- a/configs/imx7dpico_defconfig
> +++ b/configs/imx7dpico_defconfig
> @@ -3,11 +3,8 @@ BR2_arm=y
>   BR2_cortex_a7=y
>   BR2_ARM_FPU_NEON_VFPV4=y
>   
> -# patches
> -BR2_GLOBAL_PATCH_DIR="board/technexion/imx7dpico/patches"
> -
> -# Linux headers same as kernel, a 4.17 series
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_17=y
> +# Linux headers same as kernel, a 5.1 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
>   
>   # system
>   BR2_TARGET_GENERIC_GETTY_PORT="ttymxc4"
> @@ -15,18 +12,21 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc4"
>   # kernel
>   BR2_LINUX_KERNEL=y
>   BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.1.6"
>   BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
>   BR2_LINUX_KERNEL_DTS_SUPPORT=y
>   BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-pico-pi"
>   BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
>   
>   # bootloader
>   BR2_TARGET_UBOOT=y
> -BR2_TARGET_UBOOT_BOARDNAME="pico-imx7d"
> +BR2_TARGET_UBOOT_SPL=y
> +BR2_TARGET_UBOOT_SPL_NAME="SPL"
> +BR2_TARGET_UBOOT_BOARDNAME="pico-pi-imx7d"
>   BR2_TARGET_UBOOT_CUSTOM_VERSION=y
> -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05"
> -BR2_TARGET_UBOOT_FORMAT_IMX=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01"
> +BR2_TARGET_UBOOT_FORMAT_IMG=y
>   
>   # required tools to create the eMMC image
>   BR2_PACKAGE_HOST_DOSFSTOOLS=y
> @@ -34,6 +34,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
>   BR2_PACKAGE_HOST_MTOOLS=y
>   
>   # filesystem / image
> +BR2_ROOTFS_OVERLAY="board/technexion/imx7dpico/rootfs_overlay"
>   BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
>   BR2_TARGET_ROOTFS_EXT2=y
>   BR2_TARGET_ROOTFS_EXT2_4=y
> 

Works fine on my side:

Net:   FEC0
Hit any key to stop autoboot:  0
Saving Environment to MMC... Writing to MMC(0)... OK
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
159 bytes read in 87 ms (1000 Bytes/s)
1:	imx7d-pico-buildroot
Retrieving file: /boot/zImage
8197792 bytes read in 266 ms (29.4 MiB/s)
append: root=PARTUUID=00000000-01 rootwait rw console=ttymxc4,115200
Retrieving file: /boot/imx7d-pico-pi.dtb
33018 bytes read in 70 ms (460 KiB/s)
## Flattened Device Tree blob at 83000000
    Booting using the fdt blob at 0x83000000
    Using Device Tree in place at 83000000, end 8300b0f9

Starting kernel ...

So,

Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>

-- 
Best regards,
Pierre-Jean Texier

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

* [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot
  2019-06-09 14:57 [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Joris Offouga
                   ` (2 preceding siblings ...)
  2019-06-09 16:44 ` [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Pierre-Jean Texier
@ 2019-06-09 22:08 ` Arnout Vandecappelle
  3 siblings, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2019-06-09 22:08 UTC (permalink / raw)
  To: buildroot



On 09/06/2019 16:57, Joris Offouga wrote:
> This commit bumps Linux & Linux-headers to 5.1 and U-Boot to version 2019.01.
> With U-Boot version 2019.01, imx7dpico boot with distrobootcmd also introduce
> extlinux file also remove patch and change TARGET_UBOOT_BOARNAME for select
> correct defconfig in U-Boot.

 Wow, this commit log is pretty dense... I rewrote it to the following:

configs/imx7dpico: Bump Linux and U-Boot

Bump Linux to 5.1 and U-Boot to version 2019.01.

U-Boot patch is no longer needed, applied upstream.

U-Boot defconfig name for this board has changed to pico-pi-imx7d.

U-Boot now supports distrobootcmd for this board, so add the appropriate
extlinux.conf and use SPL+u-boot.img instead of u-boot.imx. Note that
the common freescale post-image script handles things appropriately
based on the selected options in .config.


 However, I haven't applied yet because there's something I don't understand...

> 
> Signed-off-by: Joris Offouga <offougajoris@gmail.com>
[snip]
> diff --git a/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf b/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf
> new file mode 100644
> index 0000000000..4824aff079
> --- /dev/null
> +++ b/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf

 So this will be placed in the rootfs, in the second partition. How does U-boot
know how to pick it up from there?

 I believe it doesn't, I don't think this file is used at all. It still works,
because the U-Boot config looks for zImage and imx7d-pico-pi.dtb on the first
partition by default.

> @@ -0,0 +1,4 @@
> +Label imx7d-pico-buildroot
> +  kernel /boot/zImage
> +  devicetree /boot/imx7d-pico-pi.dtb
> +  append root=PARTUUID=${uuid} rootwait rw console=${console},${baudrate}
> \ No newline at end of file

 Please add a newline at the end of the file.

 How would uuid get expanded? How does U-Boot know the rootfs's UUID?

 However, I believe this file and the OVERLAY config option can just be removed.

 Regards,
 Arnout

> diff --git a/configs/imx7dpico_defconfig b/configs/imx7dpico_defconfig
> index 93e3fd7414..cd12e282ef 100644
> --- a/configs/imx7dpico_defconfig
> +++ b/configs/imx7dpico_defconfig
> @@ -3,11 +3,8 @@ BR2_arm=y
>  BR2_cortex_a7=y
>  BR2_ARM_FPU_NEON_VFPV4=y
>  
> -# patches
> -BR2_GLOBAL_PATCH_DIR="board/technexion/imx7dpico/patches"
> -
> -# Linux headers same as kernel, a 4.17 series
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_17=y
> +# Linux headers same as kernel, a 5.1 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
>  
>  # system
>  BR2_TARGET_GENERIC_GETTY_PORT="ttymxc4"
> @@ -15,18 +12,21 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc4"
>  # kernel
>  BR2_LINUX_KERNEL=y
>  BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.1.6"
>  BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
>  BR2_LINUX_KERNEL_DTS_SUPPORT=y
>  BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-pico-pi"
>  BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
>  
>  # bootloader
>  BR2_TARGET_UBOOT=y
> -BR2_TARGET_UBOOT_BOARDNAME="pico-imx7d"
> +BR2_TARGET_UBOOT_SPL=y
> +BR2_TARGET_UBOOT_SPL_NAME="SPL"
> +BR2_TARGET_UBOOT_BOARDNAME="pico-pi-imx7d"
>  BR2_TARGET_UBOOT_CUSTOM_VERSION=y
> -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05"
> -BR2_TARGET_UBOOT_FORMAT_IMX=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01"
> +BR2_TARGET_UBOOT_FORMAT_IMG=y
>  
>  # required tools to create the eMMC image
>  BR2_PACKAGE_HOST_DOSFSTOOLS=y
> @@ -34,6 +34,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
>  BR2_PACKAGE_HOST_MTOOLS=y
>  
>  # filesystem / image
> +BR2_ROOTFS_OVERLAY="board/technexion/imx7dpico/rootfs_overlay"
>  BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
>  BR2_TARGET_ROOTFS_EXT2=y
>  BR2_TARGET_ROOTFS_EXT2_4=y
> 

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

* [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part
  2019-06-09 14:57 ` [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part Joris Offouga
@ 2019-06-09 22:17   ` Arnout Vandecappelle
  2019-06-10 18:43     ` Joris Offouga
  0 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2019-06-09 22:17 UTC (permalink / raw)
  To: buildroot

 Okay, this explains a lot... I should have read this patch before looking at
the previous one.

 So basically, patch 1 and 2 should be swapped.

 Note that I like this very much, I think it's silly that most of our defconfigs
still use a FAT partition.

On 09/06/2019 16:57, Joris Offouga wrote:
> This includes the no_boot_part templates which use a /boot
> included in rootfs.
> 
> Signed-off-by: Joris Offouga <offougajoris@gmail.com>
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> ---
>  .../imx/genimage.cfg.template_no_boot_part    | 23 +++++++++++++++
>  .../genimage.cfg.template_no_boot_part_spl    | 29 +++++++++++++++++++
>  board/freescale/common/imx/post-image.sh      |  6 ++++
>  3 files changed, 58 insertions(+)
>  create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part
>  create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
> 
> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
> new file mode 100644
> index 0000000000..9e19b4ee3e
> --- /dev/null
> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
> @@ -0,0 +1,23 @@
> +# Minimal SD card image for the Freescale boards Template
> +#
> +# We mimic the .sdcard Freescale's image format:
> +# * the SD card must have 1 kB free space at the beginning,

 Is this one going to be used by anything in practice? I expect that anything
that uses this kind of layout is *not* going to use the .imx format, since
that's considered kind of deprecated...

 So my suggestion would be to remove it (also from the post-image script).

> +# * U-Boot is dumped as is,
> +# * a single root filesystem partition is required (ext2, ext3 or ext4)
> +#
> +
> +image sdcard.img {
> +  hdimage {
> +  }
> +
> +  partition u-boot {
> +    in-partition-table = "no"
> +    image = "%UBOOTBIN%"
> +    offset = 1024
> +  }
> +
> +  partition rootfs {
> +    partition-type = 0x83
> +    image = "rootfs.ext2"
> +  }
> +}
> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
> new file mode 100644
> index 0000000000..6d3ae183e3
> --- /dev/null
> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
> @@ -0,0 +1,29 @@
> +# Minimal SD card image for the Freescale boards Template for SPL Boot
> +#
> +# We mimic the .sdcard Freescale's image format:
> +# * the SD card must have 1 kB free space at the beginning,
> +# * U-Boot is dumped as is,

 Mention SPL here. And mention that SPL is at the offset expected by ROM, while
U-Boot is at the offset expected by SPL.

> +# * a single root filesystem partition is required (ext2, ext3 or ext4)

 Well, to be precise: the first partition is expected to be an ext2 and have a
/boot directory.

 Regards,
 Arnout

> +#
> +
> +image sdcard.img {
> +  hdimage {
> +  }
> +
> +  partition spl {
> +    in-partition-table = "no"
> +    image = "SPL"
> +    offset = 1024
> +  }
> +
> +  partition u-boot-img {
> +    in-partition-table = "no"
> +    image = "u-boot.img"
> +    offset = 69K
> +  }
> +
> +  partition rootfs {
> +    partition-type = 0x83
> +    image = "rootfs.ext2"
> +  }
> +}
> diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
> index 12a5bea73b..851ce97c57 100755
> --- a/board/freescale/common/imx/post-image.sh
> +++ b/board/freescale/common/imx/post-image.sh
> @@ -36,6 +36,12 @@ genimage_type()
>  		echo "genimage.cfg.template_imx8"
>  	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
>  		echo "genimage.cfg.template_imx8"
> +	elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then
> +		if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
> +		    echo "genimage.cfg.template_no_boot_part_spl"
> +		else
> +		    echo "genimage.cfg.template_no_boot_part"
> +		fi
>  	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
>  		echo "genimage.cfg.template_spl"
>  	else
> 

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

* [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support
  2019-06-09 14:57 ` [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support Joris Offouga
@ 2019-06-09 22:27   ` Arnout Vandecappelle
  0 siblings, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2019-06-09 22:27 UTC (permalink / raw)
  To: buildroot



On 09/06/2019 16:57, Joris Offouga wrote:
> imx7dpico has a BCM4339 Wifi chip. Add Wifi support by default
> to allow a better customer experience.

 I wasn't sure if this one depended on the kernel bump to 5.1, so I haven't
applied yet. Also, minor nits below.

[snip]
> diff --git a/configs/imx7dpico_defconfig b/configs/imx7dpico_defconfig
> index cd12e282ef..6b1184f672 100644
> --- a/configs/imx7dpico_defconfig
> +++ b/configs/imx7dpico_defconfig
> @@ -28,6 +28,18 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
>  BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01"
>  BR2_TARGET_UBOOT_FORMAT_IMG=y
>  
> +

 Spurious empty line here.

> +# wifi firmware for brcm43439
> +BR2_PACKAGE_LINUX_FIRMWARE=y
> +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y
> +
> +# For automatic firmware loading
> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
> +
> +# wireless packages
> +BR2_PACKAGE_WIRELESS_TOOLS=y
> +BR2_PACKAGE_WPA_SUPPLICANT=y
> +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y

 ... and a missing empty line here.

 With those two things fixed, you can add my

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Also, don't forget to keep Pierre-Jean's Tested-by tag.

 Regards,
 Arnout

>  # required tools to create the eMMC image
>  BR2_PACKAGE_HOST_DOSFSTOOLS=y
>  BR2_PACKAGE_HOST_GENIMAGE=y
> 

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

* [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part
  2019-06-09 22:17   ` Arnout Vandecappelle
@ 2019-06-10 18:43     ` Joris Offouga
  2019-06-10 18:43       ` Joris Offouga
  2019-06-10 19:00       ` Arnout Vandecappelle
  0 siblings, 2 replies; 12+ messages in thread
From: Joris Offouga @ 2019-06-10 18:43 UTC (permalink / raw)
  To: buildroot

Hi Arnoud,

Le 10/06/2019 ? 00:17, Arnout Vandecappelle a ?crit?:
>   Okay, this explains a lot... I should have read this patch before looking at
> the previous one.
>
>   So basically, patch 1 and 2 should be swapped.
Yes, i fix to v2
>
>   Note that I like this very much, I think it's silly that most of our defconfigs
> still use a FAT partition.
>
> On 09/06/2019 16:57, Joris Offouga wrote:
>> This includes the no_boot_part templates which use a /boot
>> included in rootfs.
>>
>> Signed-off-by: Joris Offouga <offougajoris@gmail.com>
>> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
>> ---
>>   .../imx/genimage.cfg.template_no_boot_part    | 23 +++++++++++++++
>>   .../genimage.cfg.template_no_boot_part_spl    | 29 +++++++++++++++++++
>>   board/freescale/common/imx/post-image.sh      |  6 ++++
>>   3 files changed, 58 insertions(+)
>>   create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>   create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
>>
>> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>> new file mode 100644
>> index 0000000000..9e19b4ee3e
>> --- /dev/null
>> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>> @@ -0,0 +1,23 @@
>> +# Minimal SD card image for the Freescale boards Template
>> +#
>> +# We mimic the .sdcard Freescale's image format:
>> +# * the SD card must have 1 kB free space at the beginning,
>   Is this one going to be used by anything in practice? I expect that anything
> that uses this kind of layout is *not* going to use the .imx format, since
> that's considered kind of deprecated...

It depends on the targets, imx7dpico has migrated to the SPL and so its 
u-boot has gone from .imx to .img,

Example of the warp7 on 2019.01 it's still .imx.

so I think that should not be removed.

>
>   So my suggestion would be to remove it (also from the post-image script).
>
>> +# * U-Boot is dumped as is,
>> +# * a single root filesystem partition is required (ext2, ext3 or ext4)
>> +#
>> +
>> +image sdcard.img {
>> +  hdimage {
>> +  }
>> +
>> +  partition u-boot {
>> +    in-partition-table = "no"
>> +    image = "%UBOOTBIN%"
>> +    offset = 1024
>> +  }
>> +
>> +  partition rootfs {
>> +    partition-type = 0x83
>> +    image = "rootfs.ext2"
>> +  }
>> +}
>> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
>> new file mode 100644
>> index 0000000000..6d3ae183e3
>> --- /dev/null
>> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
>> @@ -0,0 +1,29 @@
>> +# Minimal SD card image for the Freescale boards Template for SPL Boot
>> +#
>> +# We mimic the .sdcard Freescale's image format:
>> +# * the SD card must have 1 kB free space at the beginning,
>> +# * U-Boot is dumped as is,
>   Mention SPL here. And mention that SPL is at the offset expected by ROM, while
> U-Boot is at the offset expected by SPL.
Yes, i add to v2
>
>> +# * a single root filesystem partition is required (ext2, ext3 or ext4)
>   Well, to be precise: the first partition is expected to be an ext2 and have a
> /boot directory.

and this


Best regards,

Joris

>
>   Regards,
>   Arnout
>
>> +#
>> +
>> +image sdcard.img {
>> +  hdimage {
>> +  }
>> +
>> +  partition spl {
>> +    in-partition-table = "no"
>> +    image = "SPL"
>> +    offset = 1024
>> +  }
>> +
>> +  partition u-boot-img {
>> +    in-partition-table = "no"
>> +    image = "u-boot.img"
>> +    offset = 69K
>> +  }
>> +
>> +  partition rootfs {
>> +    partition-type = 0x83
>> +    image = "rootfs.ext2"
>> +  }
>> +}
>> diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
>> index 12a5bea73b..851ce97c57 100755
>> --- a/board/freescale/common/imx/post-image.sh
>> +++ b/board/freescale/common/imx/post-image.sh
>> @@ -36,6 +36,12 @@ genimage_type()
>>   		echo "genimage.cfg.template_imx8"
>>   	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
>>   		echo "genimage.cfg.template_imx8"
>> +	elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then
>> +		if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
>> +		    echo "genimage.cfg.template_no_boot_part_spl"
>> +		else
>> +		    echo "genimage.cfg.template_no_boot_part"
>> +		fi
>>   	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
>>   		echo "genimage.cfg.template_spl"
>>   	else
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190610/75f76e40/attachment.html>

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

* [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part
  2019-06-10 18:43     ` Joris Offouga
@ 2019-06-10 18:43       ` Joris Offouga
  2019-06-10 19:00       ` Arnout Vandecappelle
  1 sibling, 0 replies; 12+ messages in thread
From: Joris Offouga @ 2019-06-10 18:43 UTC (permalink / raw)
  To: buildroot

Arnout*, sorry

Le 10/06/2019 ? 20:43, Joris Offouga a ?crit?:
>
> Hi Arnoud,
>
> Le 10/06/2019 ? 00:17, Arnout Vandecappelle a ?crit?:
>>   Okay, this explains a lot... I should have read this patch before looking at
>> the previous one.
>>
>>   So basically, patch 1 and 2 should be swapped.
> Yes, i fix to v2
>>   Note that I like this very much, I think it's silly that most of our defconfigs
>> still use a FAT partition.
>>
>> On 09/06/2019 16:57, Joris Offouga wrote:
>>> This includes the no_boot_part templates which use a /boot
>>> included in rootfs.
>>>
>>> Signed-off-by: Joris Offouga<offougajoris@gmail.com>
>>> Signed-off-by: Pierre-Jean Texier<pjtexier@koncepto.io>
>>> ---
>>>   .../imx/genimage.cfg.template_no_boot_part    | 23 +++++++++++++++
>>>   .../genimage.cfg.template_no_boot_part_spl    | 29 +++++++++++++++++++
>>>   board/freescale/common/imx/post-image.sh      |  6 ++++
>>>   3 files changed, 58 insertions(+)
>>>   create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>>   create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
>>>
>>> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>> new file mode 100644
>>> index 0000000000..9e19b4ee3e
>>> --- /dev/null
>>> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>> @@ -0,0 +1,23 @@
>>> +# Minimal SD card image for the Freescale boards Template
>>> +#
>>> +# We mimic the .sdcard Freescale's image format:
>>> +# * the SD card must have 1 kB free space at the beginning,
>>   Is this one going to be used by anything in practice? I expect that anything
>> that uses this kind of layout is *not* going to use the .imx format, since
>> that's considered kind of deprecated...
>
> It depends on the targets, imx7dpico has migrated to the SPL and so 
> its u-boot has gone from .imx to .img,
>
> Example of the warp7 on 2019.01 it's still .imx.
>
> so I think that should not be removed.
>
>>   So my suggestion would be to remove it (also from the post-image script).
>>
>>> +# * U-Boot is dumped as is,
>>> +# * a single root filesystem partition is required (ext2, ext3 or ext4)
>>> +#
>>> +
>>> +image sdcard.img {
>>> +  hdimage {
>>> +  }
>>> +
>>> +  partition u-boot {
>>> +    in-partition-table = "no"
>>> +    image = "%UBOOTBIN%"
>>> +    offset = 1024
>>> +  }
>>> +
>>> +  partition rootfs {
>>> +    partition-type = 0x83
>>> +    image = "rootfs.ext2"
>>> +  }
>>> +}
>>> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
>>> new file mode 100644
>>> index 0000000000..6d3ae183e3
>>> --- /dev/null
>>> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
>>> @@ -0,0 +1,29 @@
>>> +# Minimal SD card image for the Freescale boards Template for SPL Boot
>>> +#
>>> +# We mimic the .sdcard Freescale's image format:
>>> +# * the SD card must have 1 kB free space at the beginning,
>>> +# * U-Boot is dumped as is,
>>   Mention SPL here. And mention that SPL is at the offset expected by ROM, while
>> U-Boot is at the offset expected by SPL.
> Yes, i add to v2
>>> +# * a single root filesystem partition is required (ext2, ext3 or ext4)
>>   Well, to be precise: the first partition is expected to be an ext2 and have a
>> /boot directory.
>
> and this
>
>
> Best regards,
>
> Joris
>
>>   Regards,
>>   Arnout
>>
>>> +#
>>> +
>>> +image sdcard.img {
>>> +  hdimage {
>>> +  }
>>> +
>>> +  partition spl {
>>> +    in-partition-table = "no"
>>> +    image = "SPL"
>>> +    offset = 1024
>>> +  }
>>> +
>>> +  partition u-boot-img {
>>> +    in-partition-table = "no"
>>> +    image = "u-boot.img"
>>> +    offset = 69K
>>> +  }
>>> +
>>> +  partition rootfs {
>>> +    partition-type = 0x83
>>> +    image = "rootfs.ext2"
>>> +  }
>>> +}
>>> diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
>>> index 12a5bea73b..851ce97c57 100755
>>> --- a/board/freescale/common/imx/post-image.sh
>>> +++ b/board/freescale/common/imx/post-image.sh
>>> @@ -36,6 +36,12 @@ genimage_type()
>>>   		echo "genimage.cfg.template_imx8"
>>>   	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
>>>   		echo "genimage.cfg.template_imx8"
>>> +	elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then
>>> +		if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
>>> +		    echo "genimage.cfg.template_no_boot_part_spl"
>>> +		else
>>> +		    echo "genimage.cfg.template_no_boot_part"
>>> +		fi
>>>   	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
>>>   		echo "genimage.cfg.template_spl"
>>>   	else
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190610/93e36f66/attachment.html>

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

* [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part
  2019-06-10 18:43     ` Joris Offouga
  2019-06-10 18:43       ` Joris Offouga
@ 2019-06-10 19:00       ` Arnout Vandecappelle
  2019-06-10 19:12         ` Joris Offouga
  1 sibling, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2019-06-10 19:00 UTC (permalink / raw)
  To: buildroot



On 10/06/2019 20:43, Joris Offouga wrote:
> Hi Arnoud,
> 
> Le 10/06/2019 ? 00:17, Arnout Vandecappelle a ?crit?:
>> On 09/06/2019 16:57, Joris Offouga wrote:
[snip]
>>> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>> new file mode 100644
>>> index 0000000000..9e19b4ee3e
>>> --- /dev/null
>>> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>> @@ -0,0 +1,23 @@
>>> +# Minimal SD card image for the Freescale boards Template
>>> +#
>>> +# We mimic the .sdcard Freescale's image format:
>>> +# * the SD card must have 1 kB free space at the beginning,
>>  Is this one going to be used by anything in practice? I expect that anything
>> that uses this kind of layout is *not* going to use the .imx format, since
>> that's considered kind of deprecated...
> 
> It depends on the targets, imx7dpico has migrated to the SPL and so its u-boot
> has gone from .imx to .img,
> 
> Example of the warp7 on 2019.01 it's still .imx.

 OK, let me rephrase it then: does U-Boot 2019.01 have any configuration without
boot FAT partition, but which uses the .imx format instead of SPL?

 In any case, I think this enimage.cfg.template_no_boot_part should only be
introduced when there is something that actually uses it. Now it is just dead code.

 Regards,
 Arnout

[snip]

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

* [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part
  2019-06-10 19:00       ` Arnout Vandecappelle
@ 2019-06-10 19:12         ` Joris Offouga
  0 siblings, 0 replies; 12+ messages in thread
From: Joris Offouga @ 2019-06-10 19:12 UTC (permalink / raw)
  To: buildroot


Le 10/06/2019 ? 21:00, Arnout Vandecappelle a ?crit?:
>
> On 10/06/2019 20:43, Joris Offouga wrote:
>> Hi Arnoud,
>>
>> Le 10/06/2019 ? 00:17, Arnout Vandecappelle a ?crit?:
>>> On 09/06/2019 16:57, Joris Offouga wrote:
> [snip]
>>>> diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>>> new file mode 100644
>>>> index 0000000000..9e19b4ee3e
>>>> --- /dev/null
>>>> +++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part
>>>> @@ -0,0 +1,23 @@
>>>> +# Minimal SD card image for the Freescale boards Template
>>>> +#
>>>> +# We mimic the .sdcard Freescale's image format:
>>>> +# * the SD card must have 1 kB free space at the beginning,
>>>   Is this one going to be used by anything in practice? I expect that anything
>>> that uses this kind of layout is *not* going to use the .imx format, since
>>> that's considered kind of deprecated...
>> It depends on the targets, imx7dpico has migrated to the SPL and so its u-boot
>> has gone from .imx to .img,
>>
>> Example of the warp7 on 2019.01 it's still .imx.
>   OK, let me rephrase it then: does U-Boot 2019.01 have any configuration without
> boot FAT partition, but which uses the .imx format instead of SPL?
>
>   In any case, I think this enimage.cfg.template_no_boot_part should only be
> introduced when there is something that actually uses it. Now it is just dead code.

I see you are right if a target will need it it will introduce the 
variable I drop this file,

thanks for review

Best regards,

Joris

>
>   Regards,
>   Arnout
>
> [snip]
>

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

* [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support
  2019-06-10 19:35 [Buildroot] [PATCH 1/3] boards/freescale/common: Introduce template_no_boot_part_spl Joris Offouga
@ 2019-06-10 19:35 ` Joris Offouga
  0 siblings, 0 replies; 12+ messages in thread
From: Joris Offouga @ 2019-06-10 19:35 UTC (permalink / raw)
  To: buildroot

imx7dpico has a BCM4339 Wifi chip. Add Wifi support by default
to allow a better customer experience.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
 board/technexion/imx7dpico/readme.txt         | 11 +++
 .../lib/firmware/brcm/brcmfmac4339-sdio.txt   | 99 +++++++++++++++++++
 configs/imx7dpico_defconfig                   | 12 +++
 3 files changed, 122 insertions(+)
 create mode 100644 board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt

diff --git a/board/technexion/imx7dpico/readme.txt b/board/technexion/imx7dpico/readme.txt
index 07e089c38e..1b9e80a0fd 100644
--- a/board/technexion/imx7dpico/readme.txt
+++ b/board/technexion/imx7dpico/readme.txt
@@ -57,4 +57,15 @@ To boot your newly created system:
   emulator at 115200 bps, 8n1;
 - power on the board.
 
+Using Wifi
+==========
+
+# modprobe brcmfmac
+# iwconfig wlan0 essid ACCESSPOINTNAME
+# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf
+(enter the wifi password and press enter)
+# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf &
+# udhcpc -i wlan0
+# ping buildroot.org
+
 Enjoy!
diff --git a/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt b/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt
new file mode 100644
index 0000000000..1ddd929504
--- /dev/null
+++ b/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt
@@ -0,0 +1,99 @@
+#AP6335_NVRAM_V1.5_03112014
+NVRAMRev=$Rev: 410316 $
+sromrev=11
+boardrev=0x1203
+boardtype=0x06c5
+boardflags=0x00000c01
+boardflags2=0x00002000
+boardflags3=0x101188
+macaddr=00:90:4c:c5:12:38
+ccode=0
+regrev=0
+antswitch=0
+pdgain2g=7
+pdgain5g=7
+tworangetssi2g=0
+tworangetssi5g=0
+femctrl=7
+pcieingress_war=15
+vendid=0x14e4
+devid=0x43ae
+manfid=0x2d0
+nocrc=1
+otpimagesize=502
+xtalfreq=37400
+extpagain2g=2
+pdetrange2g=2
+extpagain5g=2
+pdetrange5g=2
+rxgains2gelnagaina0=0
+rxgains2gtrisoa0=7
+rxgains2gtrelnabypa0=0
+rxgains5gelnagaina0=0
+rxgains5gtrisoa0=11
+rxgains5gtrelnabypa0=0
+rxchain=1
+txchain=1
+aa2g=1
+aa5g=1
+tssipos5g=0
+tssipos2g=0
+pa2ga0=-161,6269,-723
+pa2gccka0=-116,7568,-852
+pa5ga0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
+pa5gbw40a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
+pa5gbw80a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
+pdoffset40ma0=0
+pdoffset80ma0=0
+pdoffsetcckma0=0
+maxp2ga0=75
+maxp5ga0=64,64,72,72
+cckbw202gpo=0x0000
+cckbw20ul2gpo=0x0
+mcsbw202gpo=0x99445533
+mcsbw402gpo=0x99775533
+dot11agofdmhrbw202gpo=0x2233
+ofdmlrbw202gpo=0x0000
+tssifloor2g=500
+mcsbw205glpo=0x66333330
+mcsbw405glpo=0x66665530
+mcsbw805glpo=0xAA555530
+mcsbw1605glpo=0x99555530
+mcsbw205gmpo=0x99BB5530
+mcsbw405gmpo=0x99BB5530
+mcsbw805gmpo=0xEE555530
+mcsbw1605gmpo=0x99555530
+mcsbw205ghpo=0x99995530
+mcsbw405ghpo=0x99BB5530
+mcsbw805ghpo=0xEE555530
+mcsbw1605ghpo=0x99555530
+mcslr5glpo=0x0000
+mcslr5gmpo=0x0000
+mcslr5ghpo=0x0000
+sb20in40hrrpo=0x0
+sb20in80and160hr5glpo=0x0
+sb40and80hr5glpo=0x0
+sb20in80and160hr5gmpo=0x0
+sb40and80hr5gmpo=0x0
+sb20in80and160hr5ghpo=0x0
+sb40and80hr5ghpo=0x0
+sb20in40lrpo=0x0
+sb20in80and160lr5glpo=0x0
+sb40and80lr5glpo=0x0
+sb20in80and160lr5gmpo=0x0
+sb40and80lr5gmpo=0x0
+sb20in80and160lr5ghpo=0x0
+sb40and80lr5ghpo=0x0
+dot11agduphrpo=0x0
+dot11agduplrpo=0x0
+phycal_tempdelta=25
+cckdigfilttype=2
+pacalidx2g=65
+dacrate2g=160
+swctrlmap_5g=0x00000008,0x00000010,0x00000008,0x000000,0x038
+swctrlmap_2g=0x00000001,0x00000002,0x00000001,0x040002,0x0ff
+swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
+swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000
+rssicorrnorm_c0=3,3
+rssicorrnorm5g_c0=2,3,4,2,3,3,0,1,2,0,1,2
+muxenab=0x10
diff --git a/configs/imx7dpico_defconfig b/configs/imx7dpico_defconfig
index cd12e282ef..056f549d0b 100644
--- a/configs/imx7dpico_defconfig
+++ b/configs/imx7dpico_defconfig
@@ -28,6 +28,18 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 
+# wifi firmware for brcm43439
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y
+
+# For automatic firmware loading
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+
+# wireless packages
+BR2_PACKAGE_WIRELESS_TOOLS=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
+
 # required tools to create the eMMC image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
-- 
2.17.1

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

end of thread, other threads:[~2019-06-10 19:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-09 14:57 [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Joris Offouga
2019-06-09 14:57 ` [Buildroot] [PATCH 2/3] boards/freescale/common: Introduce template_no_boot_part Joris Offouga
2019-06-09 22:17   ` Arnout Vandecappelle
2019-06-10 18:43     ` Joris Offouga
2019-06-10 18:43       ` Joris Offouga
2019-06-10 19:00       ` Arnout Vandecappelle
2019-06-10 19:12         ` Joris Offouga
2019-06-09 14:57 ` [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support Joris Offouga
2019-06-09 22:27   ` Arnout Vandecappelle
2019-06-09 16:44 ` [Buildroot] [PATCH 1/3] configs/imx7dpico: Bump Linux and U-Boot Pierre-Jean Texier
2019-06-09 22:08 ` Arnout Vandecappelle
2019-06-10 19:35 [Buildroot] [PATCH 1/3] boards/freescale/common: Introduce template_no_boot_part_spl Joris Offouga
2019-06-10 19:35 ` [Buildroot] [PATCH 3/3] configs/imx7dpico: Add Wifi support Joris Offouga

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.