Commit Graph

719 Commits

Author SHA1 Message Date
Joseph Chen 1ff581bb9e scripts: fit: refactor code
- update coding style;
- simply some code logic.
- remove some unused file.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0246dcf5aae6bb73771406518fdaf622bfd9bb2b
2020-05-18 18:16:20 +08:00
Joseph Chen 6402f0407c scripts: fit: support repack rollback-index version
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3b183e6a7868a5a769d41179f62a5ec0a23b41f5
2020-05-14 11:37:26 +08:00
Joseph Chen b53ffe05bf make.sh: fit: change "--new-spl" to "--spl-new"
use "--spl" as prefix in order to add more spl subcommands
in the future.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6e90e0a4b38030bf64bb25f87b6eb6b03f0000fc
2020-05-13 09:05:24 +08:00
Joseph Chen f3797579f0 scripts: fit: support repack boot itb image
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3e529dd9c274196a633a77829d554b2625a77264
2020-05-12 15:05:42 +08:00
Joseph Chen ae994be4c1 scripts: fit: support "--boot_img" args to sign image
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0ce040df7b66089462d19a63e144f28ce9cc7fc1
2020-05-12 15:02:47 +08:00
Joseph Chen 436376efb7 scripts: fit: support unpack its from itb file
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0bec62cc6ba31b2c7e7293f32f751e4a639c7917
2020-05-12 15:02:47 +08:00
Joseph Chen 5facc6b84e scripts: fit: update variant name
Use upper case.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icd3a42c897c93ceaed593906bbda12bd9d2e663e
2020-05-12 15:02:47 +08:00
Joseph Chen ca6206136c scripts: fit: fixup "arch" property for arm64
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie45b89215bd5ae636e4753fc47bfb60a3829b40f
2020-05-12 15:02:47 +08:00
Joseph Chen fe3372b265 scripts: fit: support pack loader with spl in rkbin
Use args: "--new-spl" to pack loader with current build one.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I194a7df4a258f473bfa94aa949a33ea7d06ffbde
2020-04-28 18:54:34 +08:00
Joseph Chen 83fcbb4dc7 scritps: fit: use default spl binary from rkbin for non-vboot
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9c53e82567cf550ea5a897ad62c4815b69cd16c1
2020-04-27 16:43:59 +08:00
Joseph Chen 13b1806c20 scripts: fit: support ini file assignment
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Idc51bce6e1e292ddb6cf1ec88c74c7a3a8527b00
2020-04-27 15:23:01 +08:00
Joseph Chen a46b05016b scripts: add uimage pack script
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id1570789d84f8aba3a6b857e92cc2941e640aaa4
2020-04-24 10:23:26 +08:00
Joseph Chen 0fb435fa05 scripts: fit-unpack: add hash verify
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I11982ee2e6fb09f5c0007334832d7decb6025756
2020-04-24 10:23:25 +08:00
Joseph Chen 8f53a15c01 make/fit: optimise for fit
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I59067a208f3599f13acf995172ec720c1f141d18
2020-04-14 13:13:17 +08:00
Joseph Chen 30374393f3 scripts: fit: update rollback-index error msg
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I721c9c262fa8683d75f7d2413b6fecfcdf0cb28c
2020-04-13 19:48:54 +08:00
Joseph Chen c3a9bbca4b scrptis: fit: fix cp same file
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4356da41e54211e6e9a2ae85603c2d26214ffe9e
2020-04-13 18:23:08 +08:00
Joseph Chen 0dcd90fbf2 scripts: fit: update rollback index assignment
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I95b66f244647b2b4b244bec9956e308ed93de0e5
2020-04-13 18:11:46 +08:00
Joseph Chen 61fbe583d5 scripts: fit: rename output image .fit to .img
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id23b91c9ea04a91c8872bdb1cc02e307ff73b4f0
2020-04-13 11:29:23 +08:00
Joseph Chen 1ae3dd15e9 scripts: fit: support unpack any fit/itb file
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I14ac1594570cd9c7c8676b685bb605998b7263e8
2020-04-13 11:21:32 +08:00
Joseph Chen 37f507ff86 scritps: fit-base: add file existence check for its
remove loader pack from uboot itb build process.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I857d3560f49e4bbfcedf262ee195fbc4f9065d21
2020-04-12 14:39:06 +08:00
Joseph Chen 75323eb827 scripts: add a set of fit scripts for vboot
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie408ef9ff94e880f96e2201f706ee5d0ac44d54c
2020-04-10 11:06:46 +08:00
Joseph Chen 3301aa1a14 scripts: add a script to resign the image
Usage:
	scripts/fit-resign.sh [signed fit image] [new signature]

It replaces the /configurations/conf@1/signature@1/value.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I73ff5ec9a625a87ef91f29773ad241f833ef1758
2020-03-31 18:20:47 +08:00
Joseph Chen 56ed6b5161 scripts: setlocalversion: add more information
- add build username;
- add latest commit creation time.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If038927af085bd02707c0baa23e8ae321d3cae37
2020-03-30 17:31:40 +08:00
Vignesh Raghavendra f6ce6072be UPSTREAM: usb: Add Cadence USB3 host and gadget driver
Add support for USB3 host and gadget driver. This is a direct sync of
Linux kernel Cadence USB stack that from v5.4-rc1 release.
Driver has been modified so that it compiles without errors against
U-Boot code base.
Features not required for U-Boot such as scatter-gather DMA and OTG
interrupt handling has been dropped.

Change-Id: I168e032f35d259ad1bb7a7f9f3c066bd13f129d4
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
[jjhiblot@ti.com: Add PHY support]
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 7e91f6ccdc84fe5952e5c26769e65d12e5fc4733)
2020-01-07 17:25:03 +08:00
Marcel Ziswiler 2522005341 UPSTREAM: configs: move CONFIG_USB_EHCI_VF to Kconfig
Move CONFIG_USB_EHCI_VF to drivers/usb/host/Kconfig and update the one
and only user thereof being colibri_vf.

Change-Id: I69228893cb776f077e68a80ee236aeed6e7c2d26
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 20df4b570d164675da17bf23998e51271f5a79a3)
2020-01-07 17:24:56 +08:00
Jagan Teki 6baf2cc3b2 UPSTREAM: usb: host: Drop [e-o]hci-sunxi drivers
Now Allwinner platform is all set to use Generic USB
controller drivers, so remove the legacy sunxi drivers.

Conflicts:
	drivers/usb/host/ehci-sunxi.c
	drivers/usb/host/ohci-sunxi.c
	scripts/config_whitelist.txt

Change-Id: I68dec1660d92dce8833d5a05584694d7b7c4ab36
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
(cherry picked from commit 543049ab590620a91b37fa0296edd3bcddd0eba2)
2020-01-07 17:24:56 +08:00
Jean-Jacques Hiblot eccca8a35d UPSTREAM: Kconfig: rename CONFIG_SPL_USB_GADGET as CONFIG_SPL_USB_GADGET
The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)

Conflicts:
	arch/arm/mach-imx/mx6/Kconfig
	arch/arm/mach-imx/spl.c
	configs/am335x_boneblack_vboot_defconfig
	configs/am335x_evm_usbspl_defconfig
	configs/am43xx_evm_defconfig
	configs/am43xx_hs_evm_defconfig
	configs/imx6q_logic_defconfig
	configs/mx6memcal_defconfig
	configs/mx6sabresd_defconfig
	configs/pico-hobbit-imx6ul_defconfig
	configs/pico-hobbit-imx7d_defconfig
	configs/pico-imx6ul_defconfig
	configs/pico-imx7d_defconfig
	configs/pico-pi-imx6ul_defconfig
	configs/pico-pi-imx7d_defconfig
	drivers/Makefile

Change-Id: I51305422f13cb7d743274f82c531000c0f93c144
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit f811e9763f4b6f6f5e3fe9c2fa30d2b6c62d289e)
2020-01-07 17:24:55 +08:00
Michal Simek e4371f1f16 UPSTREAM: usb: xhci: zynqmp: Remove support for !DM_USB
Switch to DM_USB was done and there is no need to keep !DM_USB code in
tree.

Change-Id: Ib39e8431dbad9fa330d70235bb48bfb03d942f1b
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d067624c47bf15b9b5b716ae8be510fa1fb615a2)
2020-01-07 17:24:51 +08:00
Maxime Ripard b466df35fb UPSTREAM: usb: gadget: usb_ether: Move settings to common
The usb_ether gadget duplicates the USB settings for the manufacturer,
product ID and vendor ID.

Make sure we use the common option so that we can expect a single VID/PID
couple for a single device.

Change-Id: I71cabacc3dcf5a7335996b2ddaf812e1c97b097b
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 10ac57fda3ff46a20af7ded6cc03d78e88032495)
2020-01-07 17:24:45 +08:00
Maxime Ripard 68e15c2b92 UPSTREAM: usb: gadget: usb_ether: Move the interfaces to Kconfig
We need to select an interface for the usb_ether gadget, and they haven't
been converted to Kconfig yet. Add a choice to make sure we have an option
selected, and convert all the users.

Change-Id: Idd2f234e7538672e2002d14eb2b11893f2751a66
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d2f0f4af4b655de9c63976be659288c88ae23953)
2020-01-07 17:24:44 +08:00
Maxime Ripard 74fae1c7e9 UPSTREAM: usb: gadget: Convert USB_ETHER to Kconfig
The USB Ethernet gadget option has not yet been moved to Kconfig, let's
deal with that.

Change-Id: Ie970ea4a67b81012f1c6382b38a04fac00c6ee75
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 3f33d3c8f4cc1b19a4a74e185bd3b6910f30e00f)
2020-01-07 17:24:44 +08:00
Maxime Ripard 17c5fbc90d UPSTREAM: usb: gadget: Move USBNET_HOST_ADDR to Kconfig
While the USB Ethernet device address is already defined in Kconfig, the
host address isn't. Convert it.

Change-Id: I527f287a8714bd460a2261a9b4ba6be71e8ee436
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit c163668a4abaeef3eaab22b4a5ac13d2d74f1306)
2020-01-07 17:24:44 +08:00
Joseph Chen fcccd23a11 make.sh: move debug command to scripts/rkpatch.sh
Change-Id: Ie9eba5a585b78c92ee56f2fca9ac412ab5068ffa
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-12-10 16:45:54 +08:00
Joseph Chen 14ce00ea60 scripts: repack-bootimg: repack second if total repack
The second is resource.img.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibc09eb2ebb3dc8ba3fda5710d6ae8dfa807c0099
2019-12-10 11:30:51 +08:00
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