Commit Graph

685 Commits

Author SHA1 Message Date
Joseph Chen 59d931994c scripts: add README for rockchip scripts and tool
Provide a quick reference to developers.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7cb96ad558637a5d06e2e450070bc3a8bda23043
2019-11-28 14:48:43 +08:00
Joseph Chen 25a2be8e4d scripts: repack-bootimg: fix os patch level "m" equal 0
Traceback (most recent call last):
  File "./scripts/mkbootimg", line 234, in <module>
    main()
  File "./scripts/mkbootimg", line 224, in main
    args = parse_cmdline()
  File "./scripts/mkbootimg", line 210, in parse_cmdline
    return parser.parse_args()
  File "/usr/lib/python2.7/argparse.py", line 1690, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1722, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1928, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/lib/python2.7/argparse.py", line 1868, in consume_optional
    take_action(action, args, option_string)
  File "/usr/lib/python2.7/argparse.py", line 1780, in take_action
    argument_values = self._get_values(action, argument_strings)
  File "/usr/lib/python2.7/argparse.py", line 2220, in _get_values
    value = self._get_value(action, arg_string)
  File "/usr/lib/python2.7/argparse.py", line 2249, in _get_value
    result = type_func(arg_string)
  File "./scripts/mkbootimg", line 172, in parse_os_patch_level
    assert m > 0 and m <= 12
AssertionError

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I625717d27b9e807c4a2afee6b38eca9750ee4e41
2019-11-28 11:38:16 +08:00
Joseph Chen 763ecaa306 scripts: stacktrace.sh: use grep to filter lines
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3817c654f9391dd6b6a216333a3a8c9fc519c0d3
2019-11-22 08:42:16 +08:00
Joseph Chen 92cdb0ce91 scripts: repack-bootimg: independent on kernel build args
Use args just like pack command to replace kernel/second/ramdisk/dtb
as you want:

repack kernel:
    ./scripts/repack-bootimg --boot_img boot.img --kernel zImage -o boot_repack.img

repack second:
    ./scripts/repack-bootimg --boot_img boot.img --second resource.img -o boot_repack.img

Change-Id: I88167049fe645114f1ef2f6a453b12e95456607c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-12 19:32:12 +08:00
Joseph Chen 8a334094ee scripts: add mkbootimg and unpack_bootimg
Pack boot.img:
    ./scripts/mkbootimg --kernel zImage --second resource.img --ramdisk ramdisk.img --out boot.img

Unpack boot.img:
    ./scripts/unpack_bootimg --boot_img boot.img --out out/

sync from kernel 4.19:
(ac97525 drm/rockchip: cdn-dp: Add bus format setting)

Change-Id: I886db6e2ac11d07852c2c9a4cb7c5088dbfa3cd5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-11-12 19:32:12 +08:00
Joseph Chen 3cc97df118 scripts: add unpack_resource.sh
Change-Id: Ie4422bfc36fb7a4c40adfbe1104d04fbd0d7d22a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-10-22 16:42:22 +08:00
Adam Ford 1490eb89f4 UPSTREAM: Convert CONFIG_SPI to Kconfig
This converts the following to Kconfig:
   CONFIG_SPI

This partly involves updating code that assumes that CONFIG_SPI implies
things that are specific to the MPC8xx SPI driver.  For now, just update
the CONFIG tests.  This also involves reworking the default for
CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a
reasonable default, as it does not cause any compile failures.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
(cherry picked from commit f1b1f77060beadbfe9f42a3be00019bd025afbd6)
Change-Id: Ie9f15ada869105eb407f41d4df7eecbaa916b940
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-23 17:15:32 +08:00
Tom Rini 10f7c0a965 UPSTREAM: Revert "spi: atmel: Drop non-dm code"
As we aren't quite able to convert some platforms with a very small size
limit in SPL yet, we need to revert this for now.

This reverts commit 7b0947787358c6b277431d6b76ce043d8bec641d.

Change-Id: I9953c2529a611950db1de168d772607329f827b7
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit e80fa2c2c0870f7c17e233ecc07552e1082c1513)
2019-07-23 17:15:32 +08:00
Jagan Teki c7aa08536c UPSTREAM:spi: atmel: Drop non-dm code
All board configs are now enabled DM_SPI for SPL and
U-Boot proper, so now its time to drop non-dm code.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Wenyou Yang <wenyouya@gmail.com>
(cherry picked from commit 7b0947787358c6b277431d6b76ce043d8bec641d)
Change-Id: Ifa87682ea641368d73be6a059c00d194a668bf4b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-23 17:15:32 +08:00
Tuomas Tynkkynen 845f53cfd3 UPSTREAM: spi: Migrate CONFIG_CF_SPI to Kconfig
Change-Id: Ia9f6139d87f28ef8bbab5effb15b3e00e53e732d
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit fbca0e66cc982325d8031094736d79ed007e42e2)
2019-07-23 17:15:32 +08:00
Tuomas Tynkkynen 5932b8bc8c UPSTREAM: spi: Migrate CONFIG_KIRKWOOD_SPI to Kconfig
Change-Id: I70b43d668f905f236e18493c07ac6c369b7ca2d1
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 4a942f49b891872727aa0bdba58e2ca513fc455c)
2019-07-23 17:15:32 +08:00
Tuomas Tynkkynen a1f9e12a3d UPSTREAM: spi: Migrate CONFIG_LPC32XX_SSP to Kconfig
Change-Id: Ib34e1271ed6dd812bfb21bc2162b30d27b014498
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 2c4b096b4c3e9d115b43edb23b1592a297076ae4)
2019-07-23 17:15:32 +08:00
Tuomas Tynkkynen cb90935401 UPSTREAM: spi: Migrate CONFIG_MPC8XXX_SPI to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
(cherry picked from commit bbdf38698ee5c96138868d563c6825cd48bb26dc
Change-Id: I6c99c0696716c148a9f8a3255111b23749c78a6b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-23 17:15:32 +08:00
Tuomas Tynkkynen d851477aa1 UPSTREAM: spi: Migrate CONFIG_MXS_SPI to Kconfig
Change-Id: Id2769d0405f96348de67cdd24df8a82a35101637
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 7b819b569e92fd9b9b1baf160cd946a523fde1ce)
2019-07-23 17:15:32 +08:00
Tuomas Tynkkynen 3ad77667ab UPSTREAM: spi: Migrate CONFIG_SH_QSPI to Kconfig
Change-Id: I51b0a222d7f5d4bf8925f7544c50d8f35da235e2
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a5dfabea19f961826509118513f833cea25797bb)
2019-07-23 17:15:31 +08:00
Tuomas Tynkkynen 99c184906c UPSTREAM: spi: Migrate CONFIG_SH_SPI to Kconfig
Change-Id: I66c533e5c556c26b771037bc7eee5ceff01f5cb9
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 95d3877a5818cc3f149a9d443637ff145bbaaabb)
2019-07-23 17:15:31 +08:00
Mario Six b91a110b4c UPSTREAM: spi: Remove obsolete spi_base_setup_slave_fdt
0efc024 ("spi_flash: Add spi_flash_probe_fdt() to locate SPI by FDT
node") added a helper function spi_base_setup_slave_fdt to to set up a
SPI slave from a given FDT blob. The only user was the exynos SPI
driver.

But commit 73186c9 ("dm: exynos: Convert SPI to driver model") removed
the use of this function, hence rendering it obsolete.

Remove this function, as well as the CONFIG_OF_SPI option, which guarded
only this function.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Change-Id: I2a5bd866fda6d65b908c1f71160da59ab5332a15
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit c5b88f29ba46997e1cae39153980cae475b87b82)
2019-07-23 17:15:31 +08:00
Adam Ford 2b9d6da418 UPSTREAM: Convert CONFIG_DAVINCI_SPI to Kconfig
This converts the following to Kconfig:
   CONFIG_DAVINCI_SPI

Signed-off-by: Adam Ford <aford173@gmail.com>
(cherry picked from commit 26410c1517bbb6d6f90de55b5fa65dac3c298bc7)
Change-Id: I7b2166d5ea20dcd0a0e79d6faa1c51fca4d6eef9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-23 17:12:17 +08:00
Derald D. Woods c6de2aae29 UPSTREAM: ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig
This commit converts the following items to Kconfig:

CONFIG_ATMEL_NAND_HWECC
CONFIG_ATMEL_NAND_HW_PMECC
CONFIG_PMECC_CAP
CONFIG_PMECC_SECTOR_SIZE
CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER

[PMECC References]
https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap

[Mailing List Thread]
https://lists.denx.de/pipermail/u-boot/2018-December/350666.html

Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignment")
[trini: Make the migration be size neutral and possibly not fix the
above in all cases]
Reported-by: Daniel Evans <photonthunder@gmail.com>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Change-Id: I00f123659dcb281b50cd4720901343e039e802c1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a 49ad40298cc5639436c6d490b699ecb60895ba2d)
2019-07-05 19:33:49 +08:00
Adam Ford 577968e566 UPSTREAM: Convert CONFIG_MTD_PARTITIONS et al to Kconfig
This converts the following to Kconfig:
   CONFIG_MTD_PARTITIONS
   CONFIG_MTD_DEVICE

Signed-off-by: Adam Ford <aford173@gmail.com>
Change-Id: I90c45c7716965009c00d18a19f5491f19b1ab8b3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9c5b00973bceb7c0192bd6b03672d69b092700b4)
2019-07-05 19:33:40 +08:00
Adam Ford 02850cebc5 UPSTREAM: Convert CONFIG_NAND_DAVINCI to Kconfig
This converts the following to Kconfig:
   CONFIG_NAND_DAVINCI

Signed-off-by: Adam Ford <aford173@gmail.com>

Change-Id: I3d95031ee5ebaa5e8ac6c03236622089ccf3caee
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit eba7f1ff6c9836931f0ce2812182190862e38b5f)
2019-07-05 19:33:40 +08:00
Adam Ford 2cce6f5430 UPSTREAM: Convert CONFIG_NAND_ATMEL to Kconfig
This converts the following to Kconfig:
   CONFIG_NAND_ATMEL

Signed-off-by: Adam Ford <aford173@gmail.com>

Change-Id: Ic71bd0ef5704faf04852bf51d265d94e1a8dc259
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit e7db856bf96213ba3f6b716be9fa264e184f74e2)
2019-07-05 19:33:40 +08:00
Adam Ford e81e7a8556 UPSTREAM: Convert CONFIG_NAND_LPC32XX_SLC to Kconfig
This converts the following to Kconfig:
   CONFIG_NAND_LPC32XX_SLC

Change-Id: Ib4d42bc173665d6483af8c1007006dd0422d5a86
Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit d294335e5d51aa83b6dd57db85c3251e9a92349e)
2019-07-05 19:33:40 +08:00
Jörg Krause a564ed3a53 UPSTREAM: spl, nand: add option CONFIG_SPL_NAND_IDENT to lookup for supported NAND chips
Add the config option `CONFIG_SPL_NAND_IDENT` for using the NAND chip ID list
to identify the NAND flash in SPL.

Change-Id: I4d83cb678cb52e83ddf755c0188a4f2f42fe5671
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 15e207faa0c32b587c173844936cadd7bf8dee01)
2019-07-05 19:33:39 +08:00
Petr Vorel 0d5390ceb2 UPSTREAM: Convert CONFIG_UBI_SILENCE_MSG to Kconfig
Change-Id: I0ba60a6d86cd7f4777f91027fc9da3f4db855114
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit c0ce4ceaba03fa6ddf738628344025c44fc78dd4)
2019-07-05 19:33:35 +08:00
Stefan Roese 32fcc59596 UPSTREAM: nand: Remove unused ppc4xx NAND driver and references
ppc4xx support was removed some time ago. Lets remove the now unused
NAND driver and all its references for this platform as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Scott Wood <oss@buserror.net>
Change-Id: I18d36aa6b1529d608acb7d39f886c3b45a791c22
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ec9c80d643a3e5ff35c5d24d675cb1feaa440c9d)
2019-07-05 19:33:35 +08:00
Adam Ford 6a35a5ca77 UPSTREAM: Convert CONFIG_APBH_DMA et al to Kconfig
This converts the following to Kconfig:
   CONFIG_APBH_DMA
   CONFIG_APBH_DMA_BURST
   CONFIG_APBH_DMA_BURST8

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
[trini: Add in MMC as well]
Change-Id: I45b919ab747aa414ba23f1e165c11dd8aff44c44
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 99bec1aead5927c54f4364bfe10823a86fe0dad2)
2019-07-05 19:33:35 +08:00
Adam Ford 157f8461d4 UPSTREAM: Convert CONFIG_NAND_OMAP_GPMC et al and CONFIG_NAND_MXC to Kconfig
This converts the following to Kconfig:
   CONFIG_NAND_MXC
   CONFIG_NAND_OMAP_GPMC
   CONFIG_NAND_OMAP_GPMC_PREFETCH
   CONFIG_NAND_OMAP_ELM
   CONFIG_SPL_NAND_AM33XX_BCH
   CONFIG_SPL_NAND_SIMPLE
   CONFIG_SYS_NAND_BUSWIDTH_16BIT

Change-Id: Ic2238bb7ba18d9ae37dfef7ac7593fd42e34ef7d
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Finish migration of CONFIG_SPL_NAND_SIMPLE, fix some build issues,
        add CONFIG_NAND_MXC so we can do CONFIG_SYS_NAND_BUSWIDTH_16BIT]
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 0a9ef45158d586017839d4b6fccd7f8f16672156)
2019-07-05 19:20:53 +08:00
Joseph Chen 73251fc230 scripts: stacktrace: support parse spl/tpl stacktrace info
Usage:
	./scripts/stacktrace.sh ./dump.txt
	./scripts/stacktrace.sh ./dump.txt tpl
	./scripts/stacktrace.sh ./dump.txt spl

Change-Id: I6a496109206d26917d5677c076aa770388c36ae6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-06-21 18:15:56 +08:00
Joseph Chen 1b4592b538 scripts: Makefile.spl: generate symbol file for spl and tpl
u-boot-tpl.sym and u-boot-spl.sym are required by stacktrace scripts

Change-Id: Ie408332eaff71c3ed244016adb9f75401ca35845
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-06-21 18:15:56 +08:00
Joseph Chen 8dd9db5d1c Makefile: tpl: u-boot-tpl.dtb support include node with prop "u-boot,dm-tpl"
Without this patch, u-boot-tpl.dtb is always copy from u-boot-spl.dtb which
doesn't apply fdtgrep with "-b u-boot,dm-tpl".

Sometimes, the platform with critical sram size requires u-boot-tpl.dtb as
smaller as possible, so we use "u-boot,dm-tpl" prop to idendify what the
tpl really needs.

Rules:
"u-boot,dm-tpl": include node with prop for u-boot-tpl.dtb;
"u-boot,dm-spl": include node with prop for u-boot-spl.dtb;
"u-boot,pre-reloc": include node with prop for u-boot-tpl.dtb and u-boot-spl.dtb;

Change-Id: I29c2464d285174f4d0a4a1f8b91a84238ed82384
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-06-21 18:13:10 +08:00
Joseph Chen 04e429a4cd scripts: add mkkrnlimg tool to pack rockchip format image
sync from kernel develop-4.4:
(3091608 arm64: dts: rockchip: fixup vccio3-supply for ai-va-v10)

Change-Id: I4c67dfc617c99791d2706e2b260a79fd3419b29d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-04-04 10:15:19 +08:00
Joseph Chen 5330794924 scripts: stacktrace.sh: dump PC and LR addr2line information
Change-Id: If5c017eb3440b587153fa6b8624bf4acffe5a4e5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-03-31 09:36:09 +08:00
Joseph Chen 8b09909151 pack_resource.sh: move to ./scripts/ folder
Adding copyright and license

Change-Id: Ia3e83797fa968e1cb8916f26ecae3c6f50835a49
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 17:31:13 +08:00
Joseph Chen b97fba2cf2 scripts: add stacktrace.sh to parse stacktrace info
Usage:
	./scripts/stacktrace.sh	<file>

	@<file>: stacktrace info file

Change-Id: I1a7b4798d9826d87ce03186958c51b30784d03e1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-13 09:03:59 +08:00
YouMin Chen ba5fd738de rockchip: tpl: rename CONFIG_TINY_TPL to CONFIG_TPL_TINY_FRAMEWORK
Change-Id: Ia05a73467578f5620a9ba168e67bcfb02c40e1d0
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-07-18 17:09:38 +08:00
David Wu 30129f2f83 config: Add CONFIG_TINY_TPL to disable SPL framework at TPL
Some devices cann't use SPL framework at TPL stage, but the
CONFIG_SPL_FRAMEWORK is still defined at TPL stage, so need
to separate them with CONFIG_TINY_TPL.

If the SPL framewrok was used both at TPL and SPL stage,
CONFIG_TINY_TPL is not defined.
If the SPL framewrok was used at SPL stage, but not use at
TPL, need to define CONFIG_TINY_TPL.

Change-Id: Iabb7e0377ee00311ca468cb8ff7544c96bd999d6
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-29 16:27:44 +08:00
Goldschmidt Simon 6222c40124 spl: make CONFIG_OF_EMBED pass dts through fdtgrep
Building spl with CONFIG_OF_EMBED enabled results in an error message
on my board: "SPL image too big". This is because the fdtgrep build
step is only executed for CONFIG_OF_SEPARATE.

Fix this by moving the fdtgrep build step ('cmd_fdtgreo') from
scripts/Makefile.spl to dts/Makefile so that the reduced dtb is
available for all kinds of spl builds.

The resulting variable name for the embedded device tree blob changes,
too, which is why common.h and fdtdec.c have tiny changes.

Change-Id: I2bf2d9780a544ac602752527d17f14aa6b12c5a2
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-26 16:40:36 +08:00
Simon Glass 785b4fbf6c Drop the log buffer
This does not appear to be used by any boards. Before introducing a new
log system, remove this old one.

Change-Id: I798cd4aff50b7136ae9f84362185f9f73b04f710
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c5404b64fb5a35d41f7eff6d12b8ffdb0c851040)
2018-01-17 15:27:28 +08:00
Peng Fan b3e0873731 UPSTREAM: scripts: spl: fix typo
Typo fix: CONIFG->CONFIG

Change-Id: Ib4a1e77aacf0bc3cae32158623c3805cd279fd9f
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 448df354b0725093f857e15a4ab5e849c4ecf3e0)
2018-01-17 15:27:28 +08:00
Michal Simek 008a6da324 UPSTREAM: tools: mkimage: Extend mkimage to also include pmufw
The patch is adding external pmufw "Platform Management Unit firmware"
to boot.bin image. Boot.bin is a Xilinx format which bootrom is capable
to read and boot the system. pmufw is copied to the header data section
follows by u-boot-spl.bin. pmufw is consumed by PMU unit (Microblaze)
and SPL runs on a53-0.

This is generated command line when PMUFW_INIT_FILE is setup.

./tools/mkimage -T zynqmpimage -R ./"" -n
./"board/xilinx/zynqmp/pmufw.bin" -d spl/u-boot-spl.bin spl/boot.bin

Change-Id: I74fc17513dd99b876ab9c08ded6ad41a7b0cd3de
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c85a6b79d10ed8a098997370cbc4fb233ddcb13b)
2018-01-17 15:27:28 +08:00
Masahiro Yamada ec821af4a7 UPSTREAM: pylibfdt: compile pylibfdt only when dtoc/binman is necessary
Currently, pylibfdt is always compiled if swig is installed on your
machine.  It is really annoying because most of targets (excepts
x86, sunxi, rockchip) do not use dtoc or binman.

"checkbinman" and "checkdtoc" are wrong.  It is odd that the final
build stage checks if we have built necessary tools.  If your platform
depends on dtoc/binman, you must be able to build pylibfdt.  If swig
is not installed, it should fail immediately.

I added PYLIBFDT, DTOC, BINMAN entries to Kconfig.  They should be
property select:ed by platforms that need them.  Kbuild will descend
into scripts/dtc/pylibfdt/ only when CONFIG_PYLIBFDT is enabled.

Change-Id: I56c5daf252e28d23fcaea0bc2d327a34de60cdcf
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d6a0c78a4efb1353f4ec6f6c59c0771298510f58)
2018-01-17 15:27:28 +08:00
Masahiro Yamada 815366520a UPSTREAM: pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefile
The pylibfdt is used by dtoc (and, indirectly by binman), but there
is no reason why it must be generated in the tools/ directory.

Recently, U-Boot switched over to the bundled DTC, and the directory
structure under scripts/dtc/ now mirrors the upstream DTC project.
So, scripts/dtc/pylibfdt is the best location.

I also rewrote the Makefile in a cleaner Kbuild style.

The scripts from the upstream have been moved as follows:

  lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py
  lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped

The .i_shipped is coped to .i during building because the .i must be
located in the objtree when we build it out of tree.

Change-Id: I48233cbae93794809397b7160234469f66fa11dc
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 15b97f5c5e6d88e0560c6928f3acd01c999a494d)
2018-01-17 15:27:28 +08:00
Masahiro Yamada 14df9b242f UPSTREAM: scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110
This adds the following commits from upstream:

b1a6003 tests: Add a test for overlays syntactic sugar
737b2df overlay: Add syntactic sugar version of overlays
497432f checks: Use proper format modifier for size_t
22a65c5 dtc: Bump version to v1.4.5
c575d80 Add fdtoverlay to .gitignore
b6a6f94 fdtoverlay: Sanity check blob size
8c1eb15 pylibfdt: Use Python2 explicitly
ee3d26f checks: add interrupts property check
c1e7738 checks: add gpio binding properties check
b3bbac0 checks: add phandle with arg property checks

[ sync with Linux commit: 4201d057ea91c3d6efd2db65219bc91fae413bc2 ]

Change-Id: I58c014073977530e43a5a67acf0c2e681ae27b0c
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 999a78d5cf00dfb8cd8342454933ea492e955377)
2018-01-17 15:27:28 +08:00
Rob Herring b7638540ee UPSTREAM: scripts/dtc: add fdt_overlay.c and fdt_addresses.c to sync script
libfdt has gained some new files. We need to include them in the
kernel's copy.

Change-Id: Ie2524f28391c57f5b3ac86d72e93b94e89ea7347
Reported-by: Kyle Yan <kyan@codeaurora.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ Linux commit: 4322323058f010274564006d61945187a15b6361 ]
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0d8216182388a5e485aa84b3175ea87d8f9b57c5)
2018-01-17 15:27:28 +08:00
Heinrich Schuchardt ae530ff2ca UPSTREAM: scripts/get_maintainer.pl: enable find_maintainer_files
Many MAINTAINERS files are in subdirectories.
We should enable searching these.

Change-Id: Ia0cd7a8c9255486e30b9d59027ae822bbdf00030
Reported-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b79372ae94fbc9e30d014ad8ce830d2062539eb9)
2018-01-17 15:27:28 +08:00
Heinrich Schuchardt 722c07dd6e UPSTREAM: checkpatch: Support wide strings
Allow prefixing typical strings with L for wide strings

Patch originally by Joe Perches
https://lkml.org/lkml/2017/10/17/1117

Change-Id: Ie92cf1fec9c7d5eaf78de0a02315eb2067b8fad2
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 9ef2684c033d325b08133e96e8744b4da9b69a58)
2018-01-17 15:27:28 +08:00
Heinrich Schuchardt 4fd65389ae UPSTREAM: scripts/get_maintainer.pl: update to current version
Update the script to version 0.26 (as of Linux v4.14-rc1)
Keep our "penguin_chief".
Keep our top_of_kernel_tree.

The negative forms of the command line parameters are described
when using --help.

New options are

 --git-blame-signatures => when used with --git-blame,
                           also include all commit signers
 --r => include reviewer(s) if any
 --letters => print all matching 'letter' types
              from all matching sections

File .get_maintainer.ignore can be used to specify
email addressees that shall be ignored.

Change-Id: I6db9f769496c1fe4421aa93362032c702a3808c0
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 59ab72d7bc5672eaf74820cde156be313217c087)
2018-01-17 15:27:28 +08:00
Masahiro Yamada 96f111c8b8 UPSTREAM: kbuild: fix dependency of DT build
I saw a DT build issue report some time before [1].  I was able to
reproduce the bug, and figure out the root cause.

Since commit 6d427c6b1f ("binman: Automatically include a U-Boot
.dtsi file"), invalid .*.cmd files are generated.

Since that commit, DTS files are put into sed and piped to CPP.
Because CPP reads the stream from stdin, -Wp,-MD,$(depfile).pre.tmp
option generates a depfile with the target name "-".  This is not
the format expected by fixdep.

Use one more temporary file instead of using pipe.  With this, deps_
in the .*.cmd will be fixed.  Having a temp file name in source_ is
odd, but it is unsed in the build system.  Not a big deal.

[1] https://lists.denx.de/pipermail/u-boot/2017-June/294451.html

Fiexes: 6d427c6b1f ("binman: Automatically include a U-Boot .dtsi file")
Change-Id: I85b50c565c3d1d6b4c01136d020bc45b87d8087f
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ecc9709fc12cc8e1a07b062d07cb8a5b296888d7)
2018-01-17 15:27:28 +08:00
Tuomas Tynkkynen b0ec94428e UPSTREAM: Drop CONFIG_HAS_DATAFLASH
Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Change-Id: Id05869deccb88c1102700dd5af58a8c249e3e9e2
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c68c03f52badc90951dbf8a054c0e500e04bf365)
2018-01-17 15:27:28 +08:00