mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
From 27a2cd6a1980adf3002412678c8fdec6528dc47d Mon Sep 17 00:00:00 2001
|
||||
From: Trent Piepho <tpiepho@impinj.com>
|
||||
Date: Fri, 6 Apr 2018 17:11:27 -0700
|
||||
Subject: [PATCH] imx: Create distinct pre-processed mkimage config files
|
||||
|
||||
Each imx image is created by a separate sub-make and during this process
|
||||
the mkimage config file is run though cpp.
|
||||
|
||||
The cpp output is to the same file no matter what imx image is being
|
||||
created.
|
||||
|
||||
This means if two imx images are generated in parallel they will attempt
|
||||
to independently produce the same pre-processed mkimage config file at
|
||||
the same time.
|
||||
|
||||
Avoid the problem by making the pre-processed config file name unique
|
||||
based on the imx image it will be used in. This way each image will
|
||||
create a unique config file and they won't clobber each other when run
|
||||
in parallel.
|
||||
|
||||
This should fixed the build bug referenced in b5b0e4e3 ("imximage:
|
||||
Remove failure when no IVT offset is found").
|
||||
|
||||
Cc: Breno Lima <breno.lima@nxp.com>
|
||||
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Cc: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
|
||||
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
[fabio: Adapted to imx_v2017.03_4.9.11_1.0.0_ga]
|
||||
Signed-off-by: Fabio Estevam <festevam@gmail.com>
|
||||
---
|
||||
arch/arm/imx-common/Makefile | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
|
||||
index d862258..f1bae8d 100644
|
||||
--- a/arch/arm/imx-common/Makefile
|
||||
+++ b/arch/arm/imx-common/Makefile
|
||||
@@ -69,9 +69,11 @@ endif
|
||||
quiet_cmd_cpp_cfg = CFGS $@
|
||||
cmd_cpp_cfg = $(CPP) $(cpp_flags) -x c -o $@ $<
|
||||
|
||||
-IMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%).cfgtmp
|
||||
+# mkimage source config file
|
||||
+IMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%)
|
||||
|
||||
-$(IMX_CONFIG): %.cfgtmp: % FORCE
|
||||
+# How to create a cpp processed config file, they all use the same source
|
||||
+%.cfgout: $(IMX_CONFIG) FORCE
|
||||
$(Q)mkdir -p $(dir $@)
|
||||
$(call if_changed_dep,cpp_cfg)
|
||||
|
||||
@@ -79,7 +81,7 @@ MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imxim
|
||||
-e $(CONFIG_SYS_TEXT_BASE)
|
||||
u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log
|
||||
|
||||
-u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
|
||||
+u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
|
||||
ifeq ($(CONFIG_OF_SEPARATE),y)
|
||||
@@ -87,16 +89,15 @@ MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T i
|
||||
-e $(CONFIG_SYS_TEXT_BASE)
|
||||
u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log
|
||||
|
||||
-u-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
|
||||
+u-boot-dtb.imx: u-boot-dtb.bin u-boot-dtb.cfgout $(PLUGIN).bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
endif
|
||||
|
||||
MKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \
|
||||
-e $(CONFIG_SPL_TEXT_BASE)
|
||||
-
|
||||
SPL: MKIMAGEOUTPUT = SPL.log
|
||||
|
||||
-SPL: spl/u-boot-spl.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
|
||||
+SPL: spl/u-boot-spl.bin spl/u-boot-spl.cfgout $(PLUGIN).bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
|
||||
MKIMAGEFLAGS_u-boot.uim = -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \
|
||||
@@ -124,4 +125,4 @@ cmd_u-boot-nand-spl_imx = (printf '\000\000\000\000\106\103\102\040\001' && \
|
||||
spl/u-boot-nand-spl.imx: SPL FORCE
|
||||
$(call if_changed,u-boot-nand-spl_imx)
|
||||
|
||||
-targets += $(addprefix ../../../,$(IMX_CONFIG) SPL u-boot.uim spl/u-boot-nand-spl.imx)
|
||||
+targets += $(addprefix ../../../,SPL spl/u-boot-spl.cfgout u-boot-dtb.cfgout u-boot.cfgout u-boot.uim spl/u-boot-nand-spl.imx)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 90ecc0ad14337898b75843efc6530fc4a34f7808 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@freescale.com>
|
||||
Date: Tue, 12 Aug 2014 10:17:31 +0200
|
||||
Subject: [PATCH] mx6qsabre_common: boot Linux to /init in mfgtools mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Buildroot supplies a nice /init wrapper script to use when booting from a
|
||||
ramdisk.
|
||||
|
||||
This patch tells u-boot to tell the kernel to boot into /init (instead of
|
||||
/linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a
|
||||
buildroot system entirely through USB.
|
||||
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
|
||||
---
|
||||
include/configs/mx6sabre_common.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
|
||||
index 93d4c4b..d2e7efd 100644
|
||||
--- a/include/configs/mx6sabre_common.h
|
||||
+++ b/include/configs/mx6sabre_common.h
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#define CONFIG_MFG_ENV_SETTINGS \
|
||||
"mfgtool_args=setenv bootargs console=" CONSOLE_DEV ",115200 " \
|
||||
- "rdinit=/linuxrc " \
|
||||
+ "rdinit=/init " \
|
||||
"g_mass_storage.stall=0 g_mass_storage.removable=1 " \
|
||||
"g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
|
||||
"g_mass_storage.iSerialNumber=\"\" "\
|
||||
--
|
||||
2.1.4
|
||||
|
||||
171
board/freescale/imx6sabre/readme.txt
Normal file
171
board/freescale/imx6sabre/readme.txt
Normal file
@@ -0,0 +1,171 @@
|
||||
********************************************************
|
||||
Freescale i.MX6 Q, DL and SoloX SABRE development boards
|
||||
********************************************************
|
||||
|
||||
This file documents the Buildroot support for the Freescale SABRE Board
|
||||
for Smart Devices Based on the i.MX 6 and i.MX 6SoloX Series (SABRESD),
|
||||
as well as the Freescale SABRE Board for Automotive Infotainment.
|
||||
|
||||
Read the i.MX 6 SABRESD Quick Start Guide for an introduction to the
|
||||
board:
|
||||
http://cache.freescale.com/files/32bit/doc/quick_start_guide/SABRESDB_IMX6_QSG.pdf
|
||||
|
||||
Read the i.MX 6 SoloX SABRESD Quick Start Guide for an introduction to
|
||||
the board:
|
||||
http://cache.freescale.com/files/32bit/doc/user_guide/IMX6SOLOXQSG.pdf
|
||||
|
||||
Read the SABRE for Automotive Infotainment Quick Start Guide for an
|
||||
introduction to the board:
|
||||
http://cache.freescale.com/files/32bit/doc/user_guide/IMX6SABREINFOQSG.pdf
|
||||
|
||||
Building with NXP kernel and NXP U-Boot
|
||||
=======================================
|
||||
|
||||
First, configure Buildroot for your SABRE board.
|
||||
For i.MX6Q SABRE SD board:
|
||||
|
||||
make freescale_imx6qsabresd_defconfig
|
||||
|
||||
For i.MX6DL SABRE SD board:
|
||||
|
||||
make freescale_imx6dlsabresd_defconfig
|
||||
|
||||
For i.MX6 SoloX SABRE SD board:
|
||||
|
||||
make freescale_imx6sxsabresd_defconfig
|
||||
|
||||
For i.MX6Q SABRE Auto board:
|
||||
|
||||
make freescale_imx6qsabreauto_defconfig
|
||||
|
||||
For i.MX6DL SABRE Auto board:
|
||||
|
||||
make freescale_imx6dlsabreauto_defconfig
|
||||
|
||||
Build all components:
|
||||
|
||||
make
|
||||
|
||||
You will find in ./output/images/ the following files:
|
||||
- imx6dl-sabresd.dtb or imx6q-sabresd.dtb or imx6sx-sdb.dtb or
|
||||
imx6q-sabreauto.dtb or imx6dl-sabreauto.dtb
|
||||
- rootfs.ext2
|
||||
- rootfs.tar
|
||||
- u-boot.imx
|
||||
- uImage, or zImage for i.MX6 SoloX
|
||||
|
||||
Building with mainline kernel and mainline U-Boot
|
||||
=================================================
|
||||
|
||||
Mainline U-Boot uses SPL and can support the three
|
||||
variants of mx6sabreauto boards: mx6q, mx6dl and mx6qp.
|
||||
|
||||
First, configure Buildroot for your mx6sabreauto board
|
||||
|
||||
make imx6-sabreauto_defconfig
|
||||
|
||||
Build all components:
|
||||
|
||||
make
|
||||
|
||||
You will find in output/images/ the following files:
|
||||
- imx6dl-sabresd.dtb, imx6q-sabresd.dtb, imx6q-sabresd.dtb
|
||||
- rootfs.ext2
|
||||
- SPL and u-boot.img
|
||||
- u-boot.imx
|
||||
- zImage
|
||||
|
||||
Create a bootable SD card
|
||||
=========================
|
||||
|
||||
To determine the device associated to the SD card have a look in the
|
||||
/proc/partitions file:
|
||||
|
||||
cat /proc/partitions
|
||||
|
||||
Buildroot prepares a bootable "sdcard.img" image in the output/images/
|
||||
directory, ready to be dumped on a microSD card. Launch the following
|
||||
command as root:
|
||||
|
||||
dd if=./output/images/sdcard.img of=/dev/<your-microsd-device>
|
||||
|
||||
*** WARNING! The script will destroy all the card content. Use with care! ***
|
||||
|
||||
For details about the medium image layout, see the definition in
|
||||
board/freescale/common/imx/genimage.cfg.template.
|
||||
|
||||
Boot the SABRE board
|
||||
====================
|
||||
|
||||
i.MX6 SABRE SD
|
||||
--------------
|
||||
|
||||
To boot your newly created system on an i.MX6 SABRE SD Board (refer to
|
||||
the i.MX6 SABRE SD Quick Start Guide for guidance):
|
||||
- insert the SD card in the SD3 slot of the board;
|
||||
- locate the BOOT dip switches (SW6), set dips 2 and 7 to ON, all others to OFF;
|
||||
- connect a Micro USB cable to Debug Port and connect using a terminal emulator
|
||||
at 115200 bps, 8n1;
|
||||
- power on the board.
|
||||
|
||||
i.MX6 SoloX SABRE SD
|
||||
--------------------
|
||||
|
||||
To boot your newly created system on an i.MX6 SoloX SABRE SD Board
|
||||
(refer to the i.MX6 SoloX SABRE SD Quick Start Guide for guidance):
|
||||
- insert the SD card in the J4-SD4 socket at the bottom of the board;
|
||||
- Set the SW10, SW11 and SW12 DIP switches at the top of the board in
|
||||
their default position, to boot from SD card. Reference configuration:
|
||||
|
||||
SW10
|
||||
1 2 3 4 5 6 7 8
|
||||
off off off off off off off off
|
||||
|
||||
SW11
|
||||
1 2 3 4 5 6 7 8
|
||||
off off ON ON ON off off off
|
||||
|
||||
SW12
|
||||
1 2 3 4 5 6 7 8
|
||||
off ON off off off off off off
|
||||
|
||||
- connect a Micro USB cable to the J16 Debug Port at the bottom of the
|
||||
board. This is a dual UART debug port; connect to the first tty using
|
||||
a terminal emulator at 115200 bps, 8n1;
|
||||
- power on the board with the SW1-PWR switch at the top of the board.
|
||||
|
||||
SABRE Auto
|
||||
----------
|
||||
|
||||
To boot your newly created system on a SABRE Auto Board (refer to the SABRE for
|
||||
Automotive Infotainment Quick Start Guide for guidance):
|
||||
- insert the SD card in the CPU card SD card socket J14;
|
||||
- Set the S1, S2 and S3 DIP switches and J3 jumper to boot from SD on CPU card.
|
||||
Reference configuration:
|
||||
|
||||
S1
|
||||
1 2 3 4 5 6 7 8 9 10
|
||||
off ON off off ON off off off off off
|
||||
|
||||
S2
|
||||
1 2 3 4
|
||||
off off ON off
|
||||
|
||||
S3
|
||||
1 2 3 4
|
||||
off off ON ON
|
||||
|
||||
J3: 1-2
|
||||
|
||||
- connect an RS-232 UART cable to CPU card debug port J18 UART DB9 and
|
||||
connect using a terminal emulator at 115200 bps, 8n1;
|
||||
- power on the board.
|
||||
|
||||
Enjoy!
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
https://community.freescale.com/docs/DOC-95015
|
||||
https://community.freescale.com/docs/DOC-95017
|
||||
https://community.freescale.com/docs/DOC-99218
|
||||
Reference in New Issue
Block a user