Skip to contentSkip to conversation

boards/freescale/common: Introduce template_no_boot_part_spl

PATCH New Joris Offouga 2 participants 4 messages Jun 10, 2019 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 boards/freescale/common: Introduce template_no_boot_part_spl

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

---
changes v1 -> v2
- remove no_boot_part feature
- rename commit
- add tested-by
- fix comment for template header file

 .../genimage.cfg.template_no_boot_part_spl    | 30 +++++++++++++++++++
 board/freescale/common/imx/post-image.sh      |  4 +++
 2 files changed, 34 insertions(+)
 create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl new file +30 -0
new file mode 100644
index 0000000000..9cdecc6ce0
@@ -0,0 +1,30 @@
+# 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,
+# * SPL is at the offset expected by ROM,
+# * U-Boot is at the offset expected by SPL,
+# * The first partition is expected to be an ext2 and have a /boot directory.
+#
+
+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"
+  }
+}
board/freescale/common/imx/post-image.sh +4 -0
index d07ad2ef5d..12756c63d5 100755
@@ -38,6 +38,10 @@ 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"
+		fi
 	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_spl"
 	else
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 2/3 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.

---
changes v1 -> v2
- reshape commit log (suggested by Arnout)
- add tested-by

 .../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
board/technexion/imx7dpico/patches/uboot/0001-picomx7dname.patch deleted +0 -31
deleted file mode 100644
index 59408bcd7a..0000000000
@@ -1,31 +0,0 @@
-From 6d298b0fcacfc555f93864fa45fb612140902388 Mon Sep 17 00:00:00 2001
-From: Fabio Estevam <[email protected]>
-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 <[email protected]>
----
- 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
-
board/technexion/imx7dpico/readme.txt +2 -1
index cda3f285eb..07e089c38e 100644
@@ -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
board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..4824aff079
@@ -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
configs/imx7dpico_defconfig +10 -9
index 93e3fd7414..cd12e282ef 100644
@@ -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
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/3 configs/imx7dpico: Bump Linux and U-Boot

Series applied to master, thanks, with one little change here.

On 10/06/2019 21:41, Joris Offouga wrote:
[snip]

configs/imx7dpico_defconfig BR2_PACKAGE_HOST_GENIMAGE=y · line 34

Quoted 4 lines
 # required tools to create the eMMC image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
configs/imx7dpico_defconfig +0 -0
@@ -34,6 +34,7 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y

Since no FAT filesystem is created any more, dosfstools and mtools are not needed.

Regards,
Arnout

#3 lore raw

PATCH v2 3/3 configs/imx7dpico: Add Wifi support

In reply to Joris Offouga

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

---
changes v1 -> v2
- fix empty line
- add reviewed-by and tested-by

 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
board/technexion/imx7dpico/readme.txt +11 -0
index 07e089c38e..1b9e80a0fd 100644
@@ -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!
board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt new file +99 -0

99 lines not on this page · raw message

configs/imx7dpico_defconfig +12 -0
index cd12e282ef..056f549d0b 100644
@@ -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
Signature · 1 line
2.17.1