Commit Graph

732 Commits

Author SHA1 Message Date
Joseph Chen b42d2103f1 make.sh: clean up and simplify
There are so many commands in make.sh, we have to clean
and seperate command into individual script file. And
some command is to be the official option for outside.

By the way, adding nm command to analyze image size.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I37ba38b621216f6db79325fada5980a54ca987cb
2020-08-11 20:28:08 +08:00
Joseph Chen 3ed9fa58e7 scripts: fit: move its file to fit/
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If8b887ebaf63573b3c7c414873e038c1f67e4111
2020-07-13 20:41:52 +08:00
Joseph Chen 7d33ddceab scripts: sync-fragment: use "mv" instread of "cp"
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I91365eb455ff4b79253a8666571c42847d96090e
2020-07-10 15:14:41 +08:00
Joseph Chen d07fced289 scripts: sync-fragment.sh: support nested
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I37605b2c65c0908aeda20e8a5551c2e630a49732
2020-07-10 10:39:39 +08:00
Joseph Chen bc0a7e781e scripts: add script to support repack fit
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5e132193c62b1ff85ec5248668a74636c0b13165
2020-07-09 11:47:03 +08:00
Joseph Chen 1de0df4512 scripts: fit: support set image version of uboot.img and boot.img
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1fafa347e3b3f53d4987b145642bb96726870ee3
2020-07-09 09:24:07 +08:00
Joseph Chen 8d2c0f5ee8 scripts: add a script to sync/add conifg fragment
Example:
	./scripts/sync-fragment.sh configs/rv1109.config

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I04bc6c0f3615edafcbdb57b91de73162a912838f
2020-07-08 17:57:49 +08:00
Joseph Chen b8561139ba scripts: add diffconfig from kernel project
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iade4d1d7180863f9e110e9ecd60cef63c40e1426
2020-07-08 17:57:49 +08:00
Joseph Chen 0d7448d032 make.sh: fit: apply make_fit_boot.sh to make boot.img
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I406d519725c750386784576416b662b448859f67
2020-07-03 08:58:06 +08:00
Joseph Chen f9976ae435 make.sh/fit: support pack without U-Boot
command: ./make.sh --no-uboot.

Providing empty file for mcu or U-Boot image if it's
not required.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I48650f6cc0bbcc9ed111fee0354ccafe4f6c1773
2020-06-15 14:25:53 +08:00
Joseph Chen 5e23d42422 scripts: fit: add a macro for "data2sign.bin"
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie36551e14f74c6c1a09012f02de5a48bd4dae888
2020-06-15 11:29:46 +08:00
Joseph Chen cc0b1aa3fe make.sh: fit: append "-itb" postfix for args
"--uboot" => "--uboot-itb";
"--boot" => "--boot-itb".

In order to distinguish with "--no-uboot".

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4d1e1a3f88619fb728165764af52ca58665a5e89
2020-06-15 11:29:46 +08:00
Joseph Chen 32ccc236e9 scripts: fit: update uboot.img packing message
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I60f573df2fe73bba7ca9941f3431a6bda020b490
2020-06-15 10:57:34 +08:00
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