i.MX6 SABRESD improvements (using a Freescale kernel)
v2 cover i.MX6 SABRESD improvements (using a Freescale kernel)
Hi,
here are 3 little improvements to the i.MX6 SABRESD board support in Buildroot, both suggested by Thomas Petazzoni in [1].
This differs from the patchest I sent earlier [2] in the kernel origin:
keep using git.freescale.com instead of switching to a mainline kernel, as per the discussion in [2].
Patches 1 and 2 are unchanged from v1.
They have been built and run on an i.MX6DL SABRESD board by me and on the i.MX6Q variant by Vincent Stehl?, so I added his Tested-by tag.
Patch 3 is new in this series and adds a very handy tool to boot a board from USB.
Luca Ceresoli (3):
freescale/imx6-sabresd: use global patch dir for U-Boot patches freescale/imx6-sabresd: lock down kernel headers to the kernel version
imx-usb-loader: new package
...ommon-boot-Linux-to-init-in-mfgtools-mode.patch | 36 ++++++++++++++++++++++ ...ommon-boot-Linux-to-init-in-mfgtools-mode.patch | 36 ---------------------- configs/freescale_imx6dlsabresd_defconfig | 9 +++++- configs/freescale_imx6qsabresd_defconfig | 9 +++++- package/Config.in.host | 1 + package/imx-usb-loader/Config.in.host | 14 +++++++++ package/imx-usb-loader/imx-usb-loader.mk | 22 +++++++++++++ 7 files changed, 89 insertions(+), 38 deletions(-) create mode 100644 board/freescale/imx6sabresd/patches/uboot/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch delete mode 100644 board/freescale/imx6sabresd/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch create mode 100644 package/imx-usb-loader/Config.in.host create mode 100644 package/imx-usb-loader/imx-usb-loader.mk
[1] http://lists.busybox.net/pipermail/buildroot/2014-September/106704.html
[2] http://lists.busybox.net/pipermail/buildroot/2014-September/106972.html
Signature · 1 line
1.9.1
PATCH v2 1/3 freescale/imx6-sabresd: use global patch dir for U-Boot patches
The best practice is to use the BR2_GLOBAL_PATCH_DIR for patches against U-Boot, not BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR.
---
...ot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch | 0
configs/freescale_imx6dlsabresd_defconfig | 4 +++-
configs/freescale_imx6qsabresd_defconfig | 4 +++-
3 files changed, 6 insertions(+), 2 deletions(-)
rename board/freescale/imx6sabresd/{ => patches/uboot}/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch (100%)board/freescale/imx6sabresd/patches/uboot/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch renamed from board/freescale/imx6sabresd/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch +0 -0
configs/freescale_imx6dlsabresd_defconfig +3 -1
@@ -2,6 +2,9 @@ BR2_arm=y BR2_cortex_a9=y +# patches +BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabresd/patches" + # system BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
@@ -25,4 +28,3 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y BR2_TARGET_UBOOT_CUSTOM_GIT=y BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" -BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/freescale/imx6sabresd"
configs/freescale_imx6qsabresd_defconfig +3 -1
@@ -2,6 +2,9 @@ BR2_arm=y BR2_cortex_a9=y +# patches +BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabresd/patches" + # system BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
@@ -25,4 +28,3 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y BR2_TARGET_UBOOT_CUSTOM_GIT=y BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" -BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/freescale/imx6sabresd"
Signature · 1 line
1.9.1
PATCH v2 2/3 freescale/imx6-sabresd: lock down kernel headers to the kernel version
In reply to Luca CeresoliThe current defconfigs for iMX6 SABRESD kernel 3.10.17 from the Freescale git repository. This kernel is older than the toolchain kernel headers used in Buildroot (currently 3.16.3).
Explicitly lock down the kernel headers to match the version of the kernel that is built.
--- configs/freescale_imx6dlsabresd_defconfig | 5 +++++ configs/freescale_imx6qsabresd_defconfig | 5 +++++ 2 files changed, 10 insertions(+)
configs/freescale_imx6dlsabresd_defconfig +5 -0
@@ -5,6 +5,11 @@ BR2_cortex_a9=y # patches BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabresd/patches" +# toolchain +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.10.17" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y + # system BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
configs/freescale_imx6qsabresd_defconfig +5 -0
@@ -5,6 +5,11 @@ BR2_cortex_a9=y # patches BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabresd/patches" +# toolchain +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.10.17" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y + # system BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
Signature · 1 line
1.9.1
PATCH v2 3/3 imx-usb-loader: new package
In reply to Luca Ceresoli--- package/Config.in.host | 1 + package/imx-usb-loader/Config.in.host | 14 ++++++++++++++ package/imx-usb-loader/imx-usb-loader.mk | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 package/imx-usb-loader/Config.in.host create mode 100644 package/imx-usb-loader/imx-usb-loader.mk
package/Config.in.host +1 -0
@@ -8,6 +8,7 @@ menu "Host utilities" source "package/genext2fs/Config.in.host" source "package/genimage/Config.in.host" source "package/genpart/Config.in.host" + source "package/imx-usb-loader/Config.in.host" source "package/lpc3250loader/Config.in.host" source "package/mtd/Config.in.host" source "package/mtools/Config.in.host"
package/imx-usb-loader/Config.in.host new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_HOST_IMX_USB_LOADER + bool "host imx-usb-loader" + depends on BR2_arm || BR2_armeb + select BR2_PACKAGE_LIBUSB # libusb >= 1.0 is required + help + This utility allows to download and execute code on Freescale + i.MX5/i.MX6 and Vybrid SoCs through the Serial Download Protocol + (SDP). Depending on the board, there is usually some kind of recovery + button to bring the SoC into serial download boot mode, check + documentation of your hardware. + + The utility support USB and UART as serial link. + + https://github.com/boundarydevices/imx_usb_loader
package/imx-usb-loader/imx-usb-loader.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# imx-uxb-loader +# +################################################################################ + +IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299 +IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION)) +IMX_USB_LOADER_LICENSE = LGPLv2.1+, LGPL (getopt.*) +IMX_USB_LOADER_LICENSE_FILES = COPYING +IMX_USB_LOADER_DEPENDENCIES = host-libusb + +define HOST_IMX_USB_LOADER_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_IMX_USB_LOADER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/imx_usb $(HOST_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/imx_uart $(HOST_DIR)/usr/bin +endef + +$(eval $(host-generic-package))
Signature · 1 line
1.9.1
PATCH v2 3/3 imx-usb-loader: new package
Dear Luca Ceresoli,
package/imx-usb-loader/Config.in.host line 4
Quoted 10 lines · Luca Ceresoli
package/imx-usb-loader/Config.in.host new file +4
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_HOST_IMX_USB_LOADER + bool "host imx-usb-loader" + depends on BR2_arm || BR2_armeb + select BR2_PACKAGE_LIBUSB # libusb >= 1.0 is required
Huh, no! BR2_PACKAGE_LIBUSB is the *target* libusb. If you depend on host-libusb, you don't need to add any select here.
Quoted 6 lines
package/imx-usb-loader/imx-usb-loader.mk new file +0
-0
package/imx-usb-loader/imx-usb-loader.mk line 9
Quoted 9 lines
package/imx-usb-loader/imx-usb-loader.mk new file +9
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# imx-uxb-loader +# +################################################################################ + +IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299 +IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION)) +IMX_USB_LOADER_LICENSE = LGPLv2.1+, LGPL (getopt.*)
LGPL with no version specified?
package/imx-usb-loader/imx-usb-loader.mk line 19
Quoted 10 lines
package/imx-usb-loader/imx-usb-loader.mk new file +10
-0+IMX_USB_LOADER_LICENSE_FILES = COPYING +IMX_USB_LOADER_DEPENDENCIES = host-libusb + +define HOST_IMX_USB_LOADER_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_IMX_USB_LOADER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/imx_usb $(HOST_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/imx_uart $(HOST_DIR)/usr/bin
Full path as the last argument.
Also: what about having this package enabled by default in the sabresd defconfigs, if it makes sense to have this host tool enabled for those configurations?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 3/3 imx-usb-loader: new package
Hi Thomas,
Quoted 19 lines · Thomas Petazzoni
Dear Luca Ceresoli,
On Wed, 1 Oct 2014 17:03:46 +0200, Luca Ceresoli wrote:
<snip>
package/imx-usb-loader/imx-usb-loader.mk line 19
Quoted 10 lines
package/imx-usb-loader/imx-usb-loader.mk new file +10
-0+IMX_USB_LOADER_LICENSE_FILES = COPYING +IMX_USB_LOADER_DEPENDENCIES = host-libusb + +define HOST_IMX_USB_LOADER_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_IMX_USB_LOADER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/imx_usb $(HOST_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/imx_uart $(HOST_DIR)/usr/binFull path as the last argument.
Quoted 4 lines
Also: what about having this package enabled by default in the sabresd defconfigs, if it makes sense to have this host tool enabled for those configurations?
Or all i.MX devices. This is known to work with i.MX5x and i.MX6x boards, and I think I saw some comments from Vybrid users.
That said, it's a bit of an arcane tool that's useful when doing U-Boot development or unbricking a board.
Regards,
Eric
PATCH v2 3/3 imx-usb-loader: new package
In reply to Thomas PetazzoniDear Thomas,
Quoted 4 lines · Thomas Petazzoni
Dear Luca Ceresoli,
On Wed, 1 Oct 2014 17:03:46 +0200, Luca Ceresoli wrote:
Quoted 13 lines
package/imx-usb-loader/Config.in.host line 4
Quoted 10 lines
package/imx-usb-loader/Config.in.host new file +4
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_HOST_IMX_USB_LOADER + bool "host imx-usb-loader" + depends on BR2_arm || BR2_armeb + select BR2_PACKAGE_LIBUSB # libusb >= 1.0 is requiredHuh, no!
BR2_PACKAGE_LIBUSBis the *target* libusb. If you depend on host-libusb, you don't need to add any select here.
Ops! Will fix!
Quoted 10 lines
Quoted 10 lines
package/imx-usb-loader/imx-usb-loader.mk new file +3
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# imx-uxb-loader
Quoted 9 lines
package/imx-usb-loader/imx-usb-loader.mk line 9
Quoted 6 lines
package/imx-usb-loader/imx-usb-loader.mk new file +6
-0+# +################################################################################ + +IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299 +IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION)) +IMX_USB_LOADER_LICENSE = LGPLv2.1+, LGPL (getopt.*)LGPL with no version specified?
Yes. The only indication in getopt.[hc] is:
License: LGPL
and nothing else. This means LGPL (ant version), it is the list of licenses documented on the BR manual.
BTW, the LGPL license is declared in BR for pppd and tslib as well.
Quoted 4 lines
Quoted 4 lines
package/imx-usb-loader/imx-usb-loader.mk new file +4
-0+IMX_USB_LOADER_LICENSE_FILES = COPYING +IMX_USB_LOADER_DEPENDENCIES = host-libusb + +define HOST_IMX_USB_LOADER_BUILD_CMDS
Quoted 8 lines
package/imx-usb-loader/imx-usb-loader.mk line 19
Quoted 6 lines
package/imx-usb-loader/imx-usb-loader.mk new file +6
-0+ $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_IMX_USB_LOADER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/imx_usb $(HOST_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/imx_uart $(HOST_DIR)/usr/binFull path as the last argument.
Will fix.
Quoted 4 lines
Also: what about having this package enabled by default in the sabresd defconfigs, if it makes sense to have this host tool enabled for those configurations?
My plan is slightly more ambitious indeed. What I have in mind is to:
1. enable imx-usb-loader for both SABRESD boards;
2. prepare the configuration files that imx_usb_loader needs to boot
the device;
3. document how to boot using imx_usb_loader + the config files.
Step 1 is trivial.
For step 2 I'll have generate two files: imx_usb.conf (the top-level config file for imx_usb) and mx6_usb_work.conf (different for the two SoC variants). The former can be taken as is from the imx_usb_loader sources, the latter must be edited as described in Vincent's tutorial [1], at section "Prepare your payload and configuration".
I think the best way is to use a post-image script to create these files in output/images, except they are not images. Does this sound fine?
If step 2 is well done, the actions to boot the device would be as simple as:
./output/host/usr/bin/imx_usb -c output/images
Then step 3 would be trivial as well.
[1] https://community.freescale.com/docs/DOC-101842
Signature · 1 line
Luca
PATCH v2 3/3 imx-usb-loader: new package
Hi,
Quoted 6 lines · Luca Ceresoli
Dear Thomas,
Quoted 3 lines · Thomas Petazzoni
Dear Luca Ceresoli,
On Wed, 1 Oct 2014 17:03:46 +0200, Luca Ceresoli wrote:
...
Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
package/imx-usb-loader/imx-usb-loader.mk new file +5
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# imx-uxb-loader +# +################################################################################Quoted 8 lines
Quoted 5 lines
package/imx-usb-loader/imx-usb-loader.mk new file +3
-0+ +IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299 +IMX_USB_LOADER_SITE = $(callgithub,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION)) +IMX_USB_LOADER_LICENSE = LGPLv2.1+, LGPL (getopt.*)
LGPL with no version specified?
Quoted 8 lines
Yes. The only indication in getopt.[hc] is:
License: LGPL
and nothing else. This means LGPL (ant version), it is the list of licenses documented on the BR manual.
BTW, the LGPL license is declared in BR for pppd and tslib as well.
Looking at it a bit closer, getopt.* is not used to build on Linux, only for Windows.
So I guess I could drop the LGPL part:
IMX_USB_LOADER_LICENSE = LGPLv2.1+
Signature · 1 line
Luca
PATCH v2 3/3 imx-usb-loader: new package
In reply to Luca CeresoliDear Luca Ceresoli,
Quoted 8 lines · Luca Ceresoli
Yes. The only indication in getopt.[hc] is:
License: LGPL
and nothing else. This means LGPL (ant version), it is the list of licenses documented on the BR manual.
BTW, the LGPL license is declared in BR for pppd and tslib as well.
Ok.
Quoted 9 lines
Quoted 3 lines
Also: what about having this package enabled by default in the sabresd defconfigs, if it makes sense to have this host tool enabled for those configurations?
My plan is slightly more ambitious indeed. What I have in mind is to:
1. enable imx-usb-loader for both SABRESD boards;
2. prepare the configuration files thatimx_usb_loaderneeds to bootthe device;3. document how to boot using
imx_usb_loader+ the config files.
Sounds like a good plan.
Quoted 9 lines
Step 1 is trivial.
For step 2 I'll have generate two files: imx_usb.conf (the top-level config file for
imx_usb) and mx6_usb_work.conf (different for the two SoC variants). The former can be taken as is from theimx_usb_loadersources, the latter must be edited as described in Vincent's tutorial [1], at section "Prepare your payload and configuration".
Quoted 3 lines
I think the best way is to use a post-image script to create these files in output/images, except they are not images. Does this sound fine?
Yes, it sounds fine. From my point of view output/images is not necessarily strictly limited to binary images. It can also contain other files that are useful to run/flash the system on the target.
Though do you really need to generate those files? They look like pretty much static configuration files, that could be put in board/freescale/<foo>/, no?
Quoted 4 lines
If step 2 is well done, the actions to boot the device would be as simple as:
./output/host/usr/bin/imx_usb -c output/images
Cool!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 3/3 imx-usb-loader: new package
Dear Thomas,
Quoted 4 lines · Thomas Petazzoni
Dear Luca Ceresoli,
On Thu, 02 Oct 2014 10:47:44 +0200, Luca Ceresoli wrote:
...
Quoted 25 lines
Quoted 9 lines
Quoted 3 lines
Also: what about having this package enabled by default in the sabresd defconfigs, if it makes sense to have this host tool enabled for those configurations?
My plan is slightly more ambitious indeed. What I have in mind is to:
1. enable imx-usb-loader for both SABRESD boards;
2. prepare the configuration files thatimx_usb_loaderneeds to bootthe device;3. document how to boot using
imx_usb_loader+ the config files.Sounds like a good plan.
Quoted 9 lines
Step 1 is trivial.
For step 2 I'll have generate two files: imx_usb.conf (the top-level config file for
imx_usb) and mx6_usb_work.conf (different for the two SoC variants). The former can be taken as is from theimx_usb_loadersources, the latter must be edited as described in Vincent's tutorial [1], at section "Prepare your payload and configuration".Quoted 3 lines
I think the best way is to use a post-image script to create these files in output/images, except they are not images. Does this sound fine?
Quoted 7 lines
Yes, it sounds fine. From my point of view output/images is not necessarily strictly limited to binary images. It can also contain other files that are useful to run/flash the system on the target.
Though do you really need to generate those files? They look like pretty much static configuration files, that could be put in board/freescale/<foo>/, no?
Probably.
I didn't want to create a lot of almost-equal files: the only difference between the two boards is the .dtb to use. Hence I thought of a script producing the config file from a template file.
But since there would be only 2 files for now it may be fine as well to just have the two files.
I'll choose as soon as I start coding.
Signature · 1 line
Luca
PATCH v2 3/3 imx-usb-loader: new package
In reply to Luca CeresoliOn 10/01/2014 05:03 PM, Luca Ceresoli wrote:
(snip)
Hi Luca,
Thank you for this imx_usb_loader "recipe".
I have just some small remarks for the configuration files (below), but apart from that I could build the loader ok with 'make host-imx-usb-loader', and boot through USB just fine. So thanks!
(..)
Quoted 15 lines
package/imx-usb-loader/imx-usb-loader.mk new file +9
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# imx-uxb-loader +# +################################################################################ + +IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299 +IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION)) +IMX_USB_LOADER_LICENSE = LGPLv2.1+, LGPL (getopt.*)
package/imx-usb-loader/imx-usb-loader.mk line 19
Quoted 10 lines
package/imx-usb-loader/imx-usb-loader.mk new file +10
-0+IMX_USB_LOADER_LICENSE_FILES = COPYING +IMX_USB_LOADER_DEPENDENCIES = host-libusb + +define HOST_IMX_USB_LOADER_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_IMX_USB_LOADER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/imx_usb $(HOST_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/imx_uart $(HOST_DIR)/usr/bin
Wouldn't you want to install the supplied configurations files, too? Like in:
$(INSTALL) -D -m 0644 $(@D)/imx_usb.conf $(HOST_DIR)/etc/imx_usb.conf $(INSTALL) -D -m 0644 $(@D)/mx6_usb_work.conf
$(HOST_DIR)/etc/mx6_usb_work.conf
I feel they could be used as examples or, at least, starting points.
Maybe you want to patch a bit imx_usb, to change the default configuration files path? It defaults to '/etc/imx-loader.d/' but I think we could have something better in the buildroot case, like "$(HOST_DIR)/etc".
package/imx-usb-loader/imx-usb-loader.mk line 22
Quoted 3 lines
package/imx-usb-loader/imx-usb-loader.mk new file +3
-0+endef + +$(eval $(host-generic-package))
Best regards,
V.
PATCH v2 3/3 imx-usb-loader: new package
Dear Vincent,
Quoted 10 lines · Vincent Stehl?
On 10/01/2014 05:03 PM, Luca Ceresoli wrote:
(snip)Hi Luca,
Thank you for this
imx_usb_loader"recipe".I have just some small remarks for the configuration files (below), but apart from that I could build the loader ok with 'make host-imx-usb-loader', and boot through USB just fine. So thanks!
Thanks for keeping my patches tested!
Quoted 33 lines
(..)
Quoted 15 lines
package/imx-usb-loader/imx-usb-loader.mk new file +9
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# imx-uxb-loader +# +################################################################################ + +IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299 +IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION)) +IMX_USB_LOADER_LICENSE = LGPLv2.1+, LGPL (getopt.*)package/imx-usb-loader/imx-usb-loader.mk line 19
Quoted 10 lines
package/imx-usb-loader/imx-usb-loader.mk new file +10
-0+IMX_USB_LOADER_LICENSE_FILES = COPYING +IMX_USB_LOADER_DEPENDENCIES = host-libusb + +define HOST_IMX_USB_LOADER_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_IMX_USB_LOADER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/imx_usb $(HOST_DIR)/usr/bin + $(INSTALL) -D -m 0755 $(@D)/imx_uart $(HOST_DIR)/usr/binWouldn't you want to install the supplied configurations files, too? Like in:
$(INSTALL) -D -m 0644 $(@D)/imx_usb.conf $(HOST_DIR)/etc/imx_usb.conf $(INSTALL) -D -m 0644 $(@D)/mx6_usb_work.conf
Quoted 8 lines
$(HOST_DIR)/etc/mx6_usb_work.conf
I feel they could be used as examples or, at least, starting points.
Maybe you want to patch a bit
imx_usb, to change the default configuration files path? It defaults to '/etc/imx-loader.d/' but I think we could have something better in the buildroot case, like "$(HOST_DIR)/etc".
This means I would need to patch the imx_usb.c source code, and do it in a way that is not relocatable.
Actually I have another plan [1]: creating a ready-to-use config file and document how to use it, without touching how imx_usb works now. Unless I'm missing something from your e-mail, I find my way cleaner and more complete.
Users who want to use this tool in a different way can still find the original files in output/build/imx-usb-loader-*/ of course.
[1] http://lists.busybox.net/pipermail/buildroot/2014-October/107492.html
Signature · 1 line
Luca
v2 cover i.MX6 SABRESD improvements (using a Freescale kernel)
In reply to Luca CeresoliDear Luca Ceresoli,
Quoted 3 lines · Luca Ceresoli
Luca Ceresoli (3):
freescale/imx6-sabresd: use global patch dir for U-Boot patches freescale/imx6-sabresd: lock down kernel headers to the kernel version
Both applied.
Quoted 1 line
imx-usb-loader: new package
There are still comments on this one.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com