platform/kernel/u-boot.git
4 years agoconfigs: tizen_amlogic: add tizen specific haeder for amlogic
Jaehoon Chung [Sun, 10 May 2020 22:35:15 +0000 (07:35 +0900)]
configs: tizen_amlogic: add tizen specific haeder for amlogic

Add Tizen specific header for amlogic.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoamlogic: w400: add tizen-boot odroid-n2 script
Jaehoon Chung [Sun, 10 May 2020 22:34:55 +0000 (07:34 +0900)]
amlogic: w400: add tizen-boot odroid-n2 script

Add tizen-boot-odroid-n2 boot script.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agofip: add Amlogic prebuilt firmware files for Odroid-N2
Jaehoon Chung [Sun, 10 May 2020 22:34:24 +0000 (07:34 +0900)]
fip: add Amlogic prebuilt firmware files for Odroid-N2

Add amlogic prebilt firmware files for Odroind-N2.
It needs to make u-boot.bin.

Change-Id: I39b3b1145f4f9006632e97702db4e56cea651952
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agofip: set all file in fip dir as binary
Seung-Woo Kim [Thu, 29 Oct 2020 11:41:20 +0000 (20:41 +0900)]
fip: set all file in fip dir as binary

Change-Id: I44175d8d7f778f59649abb7d2310ace1346bf8b5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agousb: gadget: dwc2_udc_otg: return zero when reset property is not present
Jaehoon Chung [Wed, 21 Oct 2020 12:28:41 +0000 (21:28 +0900)]
usb: gadget: dwc2_udc_otg: return zero when reset property is not present

If reset DT property is not present, -ENOENT is returned.
But it's not really error.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: rpi_4_32b: enable UMS config
Jaehoon Chung [Wed, 21 Oct 2020 10:07:20 +0000 (19:07 +0900)]
configs: rpi_4_32b: enable UMS config

Enable UMS configuration to use mass storage.

Change-Id: Ic7dc117e21e025776f7d4711ca63457b3148d166
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agopackaging: update version info from 2019.10 to 2020.10
Jaehoon Chung [Wed, 21 Oct 2020 02:45:12 +0000 (11:45 +0900)]
packaging: update version info from 2019.10 to 2020.10

Update version info from 2019.10 to 2020.10.

Change-Id: I84d1ed4cd3842e9a5baec04d46e5b07dbda4b584
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agobootm: fix wrong conditions about images overlap
Jaehoon Chung [Wed, 21 Oct 2020 03:11:36 +0000 (12:11 +0900)]
bootm: fix wrong conditions about images overlap

It doesn't need to consider start byte address.
If ramdisk size is 0x800000 and start address is 0x2700000, then it's
used until 0x02efffff, not 0x02f00000. But it's detected to overlapt RD
image, when kernel start address is 0x02f00000.
Because it's doing wrong calculation about rd_len.
This patch fixed wrong calculation address position when check
condition.

In addition, it needs to check one more condition about overlapping
entire area.

Fixes: commit fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image")

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: tizen: enable configs relevant to ENV in defconfig
Jaehoon Chung [Tue, 20 Oct 2020 06:10:36 +0000 (15:10 +0900)]
configs: tizen: enable configs relevant to ENV in defconfig

Enable configs relevant to ENV in defconfig.
And remove them from tizen header.

Change-Id: I9e89d73e5919bb181c4b2125b5417aedc0222c9d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: xu3: enable IP_DEFRAG configuration
Jaehoon Chung [Tue, 20 Oct 2020 05:26:55 +0000 (14:26 +0900)]
configs: xu3: enable IP_DEFRAG configuration

Eanble IP_DEFRAG configuration in defconfig.
And remove its config form odrid_xu3 header.

Change-Id: I73f3b08402f08ccae0717c6b32e1b717f5350cd9
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: rpi4: enable IP_DEFRAG configuration
Jaehoon Chung [Tue, 20 Oct 2020 04:36:16 +0000 (13:36 +0900)]
configs: rpi4: enable IP_DEFRAG configuration

Enable IP_DEFRAG configuration in defconfig file.
And Remove its config from tizen_rpi header.

Change-Id: Ie622b593639f9838773bff85e664aaf4d660d6dd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agogadget: f_thor: fix wrong file size cast
Seung-Woo Kim [Fri, 16 Oct 2020 06:56:20 +0000 (15:56 +0900)]
gadget: f_thor: fix wrong file size cast

Casting 32bit int value directly into 64bit unsigned type causes
wrong value for file size equal or larger than 2GB. Fix the wrong
file size by casting uint32_t first.

Change-Id: I7b344856e2cabfb31ef05521c09914599163d923
Fixes: commit 1fe9ae76b113 ("gadget: f_thor: update to support more than 4GB file as thor 5.0")
Reported-by: Junghoon Kim <jhoon20.kim@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agocmd: Remove unreachable code from netboot_nfs()
Sylwester Nawrocki [Wed, 7 Oct 2020 17:39:20 +0000 (19:39 +0200)]
cmd: Remove unreachable code from netboot_nfs()

rcode is always 0 (CMD_RET_SUCCESS) so last bootstage_error() call is never
executed. Remove it altogether with the rcode local variable.

This supresses following SVACE warning:

* UNREACHABLE_CODE: This statement in the source code might be unreachable during program execution.
     [unreachable] unreachable at cmd/net.c:312
     [rcode != 0 is always false because at this program point the variable rcode is always equal to 0]
      rcode != 0 is always false because at this program point the variable rcode is always equal to 0
      at cmd/net.c:309

Change-Id: Idf4759839897a35fb47870bf953d35bcb5f0cad8
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
4 years agorpi: perform xhci firmware upload only once
Marek Szyprowski [Thu, 10 Sep 2020 08:31:09 +0000 (10:31 +0200)]
rpi: perform xhci firmware upload only once

This fixes usb stack initialization after calling "usb stop".

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Icb3f3478c02b17c4e80cd924685492dc373b5c1f

4 years agousb: xhci: Load Raspberry Pi 4 VL805's firmware
Nicolas Saenz Julienne [Tue, 5 May 2020 16:26:07 +0000 (18:26 +0200)]
usb: xhci: Load Raspberry Pi 4 VL805's firmware

When needed, RPi4's co-processor (called VideoCore) has to be instructed
to load VL805's firmware (the chip providing xHCI support). VideCore's
firmware expects the board's PCIe bus to be already configured in order
for it to load the xHCI chip firmware. So we have to make sure this
happens in between the PCIe configuration and xHCI startup.

Introduce a callback in xhci_pci_probe() to run this platform specific
routine.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
[mszyprow: backport of https://patchwork.ozlabs.org/project/uboot/list/?series=174860&state=%2A&archive=both
 the final mainline patch depends on DTS changes not present in vendor tree]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1391806cae261d1ce22137e1a8baf5e261cb865a

4 years agoconfigs: rpi_3: disable configs relevant to SPL
Jaehoon Chung [Wed, 5 Aug 2020 04:54:47 +0000 (13:54 +0900)]
configs: rpi_3: disable configs relevant to SPL

Disable configs relevant to SPL.
It doesn't need to enable anymore.

Change-Id: Idbe37b441e7dc3e2488a2db154522257f2c08722
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agopackaging: u-boot-rpi3: remove unnecessary files
Jaehoon Chung [Wed, 5 Aug 2020 03:53:39 +0000 (12:53 +0900)]
packaging: u-boot-rpi3: remove unnecessary files

Remove unnecessary files. It was used to boot with optee.
But it doesn't use anymore because trust-firmware doesn't support.

Change-Id: I115ba5e6099b624a2113b8cdf1934699f31b6757
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: rpi: set NR_DRAM_BANKS to four
Matthias Brugger [Fri, 29 May 2020 14:42:22 +0000 (16:42 +0200)]
configs: rpi: set NR_DRAM_BANKS to four

With the new RPi4 which has 8 GB of RAM, we can have up to four DRAM
banks. Bump up the configuration files to detect all the memory in
U-Boot.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
[sw0312.kim: cherry-pick mainline commit a61cf765f7e3 to support rpi4 8GB dram]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I7d47e4ae3b70166cde96bc0c86011a8ff4f54262

4 years agoscripts: tizen: sd_fusing_rpi3: change partition size
Jaehoon Chung [Tue, 23 Jun 2020 10:04:56 +0000 (19:04 +0900)]
scripts: tizen: sd_fusing_rpi3: change partition size

Change partition size to use 64bit image.
- ramdisk-recovery : 12MB -> 32MB
- system-data : 512MB -> 1.3GB
- modules : 20MB -> 32MB
- reserved1 : 64MB
- reserved2 : 128MB

Change-Id: I6bb1cca052af91e0e66f6148b76055c60670aead
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agosamsung: tizen_rpi: remove unnecessary variable and comment
Jaehoon Chung [Mon, 22 Jun 2020 02:24:36 +0000 (11:24 +0900)]
samsung: tizen_rpi: remove unnecessary variable and comment

Remove unnecesarry environment variable.
ramdisksize and tizen_kernel_addr_r are set to correct value in boot
script.
Because comment was not valid, it doesn't need to keep.

Change-Id: Ica280a521ba538340b9dfbe640e6a5fd9839ab85
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi: tizen-boot-rpi2: calculate tizen_kernel_addr_r with ramdisk's size
Jaehoon Chung [Mon, 22 Jun 2020 02:18:46 +0000 (11:18 +0900)]
rpi: tizen-boot-rpi2: calculate tizen_kernel_addr_r with ramdisk's size

Calculate tizen_kernel_addr_r with ramdisk's size.
When ramdisk size is increased, kernel loading offset will be also
increased. It can prevent to overwrite the images.

Change-Id: Id65e084a0e076a95ffe005955ef4c12e7554fa07
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi: tizen-boot-rpi3: calculate tizen_kernel_addr_r with ramdisk's size
Jaehoon Chung [Mon, 22 Jun 2020 02:18:03 +0000 (11:18 +0900)]
rpi: tizen-boot-rpi3: calculate tizen_kernel_addr_r with ramdisk's size

Calculate tizen_kernel_addr_r with ramdisk's size.
When ramdisk size is increased, kernel loading offset will be also
increased. It can prevent to overwrite the images.

Change-Id: Ibbec03b4e3380028841d10eee7157c5e86fa8756
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi: tizen-boot-rpi4: calculate tizen_kernel_addr_r with ramdisk's size
Jaehoon Chung [Fri, 19 Jun 2020 03:56:33 +0000 (12:56 +0900)]
rpi: tizen-boot-rpi4: calculate tizen_kernel_addr_r with ramdisk's size

Calculate tizen_kernel_addr_r with ramdisk's size.
When ramdisk size is increased, kernel loading offset will be also
increased. It can prevent to overwrite the images.

Change-Id: Icc900b726f46683e5104be7f8ab31f36934f12b5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi: tizen-boot-rpi2: fix hard-coding value about ramdisksize
Seung-Woo Kim [Thu, 18 Jun 2020 04:20:35 +0000 (13:20 +0900)]
rpi: tizen-boot-rpi2: fix hard-coding value about ramdisksize

Current ramdisksize is set to hard-condig value as 0xc00000 or 0x800000.
If ramdisk's size is changed to other, it also needs to change.
But we're getting the number of block about ramdisk partition.
Use its value to load a ramdisk image. Then it's more clear than now.

Change-Id: I96e1e383d4603f2375a45193a72a95f261bb996d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi: tizen-boot-rpi3: fix hard-coding value about ramdisksize
Jaehoon Chung [Thu, 18 Jun 2020 04:04:18 +0000 (13:04 +0900)]
rpi: tizen-boot-rpi3: fix hard-coding value about ramdisksize

Current ramdisksize is set to hard-condig value as 0xc00000 or 0x800000.
If ramdisk's size is changed to other, it also needs to change.
But we're getting the number of block about ramdisk partition.
Use its value to load a ramdisk image. Then it's more clear than now.

Change-Id: I59e4ed5d1c49e82c2bd76474b1d4bc086fb600e1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi: tizen-boot-rpi4: fix hard-coding value about ramdisksize
Jaehoon Chung [Wed, 17 Jun 2020 11:44:37 +0000 (20:44 +0900)]
rpi: tizen-boot-rpi4: fix hard-coding value about ramdisksize

Current ramdisksize is set to hard-condig value as 0xc00000 or 0x800000.
If ramdisk's size is changed to other, it also needs to change.
But we're getting the number of block about ramdisk partition.
Use its value to load a ramdisk image. Then it's more clear than now.

Change-Id: I450ace4f0e795f0a05f5ff36fcd837349bc5a4aa
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: rpi_4_defconfig: enable ums configuration
Jaehoon Chung [Tue, 9 Jun 2020 23:32:56 +0000 (08:32 +0900)]
configs: rpi_4_defconfig: enable ums configuration

Enable ums configuration.
And CONFIG_ARCH_FIXUP_FDT_MEMORY was enabled by default.

Change-Id: I4eaebba7b3fd05bc01d125b159289056162d203a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agotizen: sd_fusing_xu4.sh: Support for non-sdX partition names
Marek Szyprowski [Tue, 9 Jun 2020 03:42:07 +0000 (12:42 +0900)]
tizen: sd_fusing_xu4.sh: Support for non-sdX partition names

Properly find partiton device names for the given block device. In
case of MMC (or loop) partition names are created in a different way
(/dev/mmcblk0p1) than for typical USB pen-drives (/dev/sdb1).

Change-Id: Ic486e97a4e04c25dc438315bcefa668945765e65
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agotizen: sd_fusing_rpi3.sh: Support for non-sdX partition names
Marek Szyprowski [Mon, 8 Jun 2020 08:01:16 +0000 (10:01 +0200)]
tizen: sd_fusing_rpi3.sh: Support for non-sdX partition names

Properly find partiton device names for the given block device. In
case of MMC (or loop) partition names are created in a different way
(/dev/mmcblk0p1) than for typical USB pen-drives (/dev/sdb1).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4e3e272acd85bcd5a54ff8102a3978d18ea5687e

4 years agoconfigs: rpi_4: Enable CONFIG_ARCH_FIXUP_FDT_MEMORY for Tizen
Marek Szyprowski [Fri, 5 Jun 2020 12:52:02 +0000 (14:52 +0200)]
configs: rpi_4: Enable CONFIG_ARCH_FIXUP_FDT_MEMORY for Tizen

On Tizen, a custom dtb loaded directly from boot partition is used instead of the one provided by the VC4 firmware, thus u-boot needs to update the
memory information in the loaded dtb. Without this option, the memory information is missing
and the loaded Linux kernel crashes early.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic78d134aaef2ab272f839d305b5db3e79b0ef90b

4 years agopackaging: rpi4: add rpi4 64-bit spec file
Seung-Woo Kim [Fri, 5 Jun 2020 07:46:03 +0000 (16:46 +0900)]
packaging: rpi4: add rpi4 64-bit spec file

Add rpi4 64-bit spec file.

Change-Id: I569df01d93a1d08de28f56f1ccbaf4a1600d79c0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi: tizen-boot: rpi: tizen-boot: add tizen boot script for rpi4 64bit
Seung-Woo Kim [Fri, 5 Jun 2020 07:42:28 +0000 (16:42 +0900)]
rpi: tizen-boot: rpi: tizen-boot: add tizen boot script for rpi4 64bit

Add tizen boot script for rpi4 64bit.

Change-Id: I5ea641bccfa38dbabf666a783c2c3446daad4992
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi: tizen-boot: rpi3: fix wrong setenv usage
Seung-Woo Kim [Fri, 5 Jun 2020 07:40:52 +0000 (16:40 +0900)]
rpi: tizen-boot: rpi3: fix wrong setenv usage

The setenv does not require '='. Fix wrong setenv usage.

Change-Id: Idf1bf41655fa80837784fabc441dd2e47ac487a9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agommc: s5p_sdhci: add Tizen specific bind codes
Marek Szyprowski [Tue, 19 May 2020 12:46:43 +0000 (14:46 +0200)]
mmc: s5p_sdhci: add Tizen specific bind codes

Add Tizen specific bind codes for OdroidU3. When device is booted from SD,
SDHCI MMC controller is registered as MMC0, like it is done for DWMMC for OdroidXU3.
Based on commit 76f4fcf ("mmc: exynos_dw_mmc: add tizen specific bind codes").

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I624be4f0c6f7b1ce5a392249d73e36785649fd35

4 years agoRevert "bootstage: enable bootstage timing report to fdt"
Seung-Woo Kim [Tue, 19 May 2020 10:32:17 +0000 (19:32 +0900)]
Revert "bootstage: enable bootstage timing report to fdt"

This reverts commit cc19bd066c446a91d0e1292e2e21fc9395afb92a
pratially for odroid_defconfig. From other defconfigs including
tizen_defconfig and odroid-xu3_defconfig, the options has been
already removed.

Note: the bootstage options breaks booting from odroid-u3.

Change-Id: If85a8956ed805f6221619f9462f8d672f48458bf
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agocmd: remote obsoleted nfsdown and usbdown commands
Marek Szyprowski [Fri, 15 May 2020 07:45:41 +0000 (09:45 +0200)]
cmd: remote obsoleted nfsdown and usbdown commands

Gneric Tizen Downloader based on the DFU framework, provides better
replacement for those commands.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia0a0ccd5fb7e1b65c12f6c5653015ef7ae05e6be

4 years agotizen: replace NFSdown with generic Tizen Download utility (NFS and USB)
Marek Szyprowski [Mon, 20 Apr 2020 13:08:30 +0000 (15:08 +0200)]
tizen: replace NFSdown with generic Tizen Download utility (NFS and USB)

Tizen Download utility provides replacement for nfsdown and usbdown
commands, implemented on top of the generic u-boot's DFU framework.
It allows to flash any entity defined in dfu_alt_info, not only the ones
hardcoded in the mentioned commands.

This is useful for flashing only the selected images/entities.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic4275302442b84dc96a2d7d31188eb3d7143e7ec

4 years agoarm: exynos: enable DFU's alt_info support for Tizen downloader
Marek Szyprowski [Fri, 15 May 2020 09:20:53 +0000 (11:20 +0200)]
arm: exynos: enable DFU's alt_info support for Tizen downloader

dfu_alt_info env is required for Tizen downloader, so set it correctly on
all Odroid variants.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3530d3be22b1ed76f4687198064bde3faebd6b37

4 years agocmd: add generic Tizen Download (NFS & USB) command
Marek Szyprowski [Mon, 27 Apr 2020 06:45:02 +0000 (08:45 +0200)]
cmd: add generic Tizen Download (NFS & USB) command

This is a quick replacement of the NFSdown and USBdown commands, rewritten
on top of the generic DFU framework. This removes a few limitation of both
obsoleted commands.

Change-Id: Id8a311eabd2bab7d90aeee6adabbd6461897b4e3
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
[sw0312.kim: remove newline from command name]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoscripts: tizen: update script version to distinguish
Jaehoon Chung [Fri, 22 May 2020 07:52:18 +0000 (16:52 +0900)]
scripts: tizen: update script version to distinguish

Update script minor version to distinguish.
(from 1.3 to 1.3.1)
- 1.3.1 : Enhance write performcne

Change-Id: If9bbc1cbca22d87bc837d03e60d09a3a0e6c6883
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agonet: fix build without NFS or NFS download enabled
Marek Szyprowski [Fri, 15 May 2020 10:08:54 +0000 (12:08 +0200)]
net: fix build without NFS or NFS download enabled

Partial NFS download requires setting net_boot_file_{offset,size_limit}
global variables, which are available only when CONFIG_CMD_NFS is set.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I74e2dbb56c2b41078d2e5506bdcba6458299d792

4 years agoFixup "tools:mkimage_multidtb: Align less than PAD size"
Marek Szyprowski [Fri, 15 May 2020 05:56:24 +0000 (07:56 +0200)]
Fixup "tools:mkimage_multidtb: Align less than PAD size"

Partially revert commit fe215b2f7ddf30f36b326f7a3fe3734a872a37fe
("tools:mkimage_multidtb: Align less than PAD size"), as it looks that the MFC hack
 accidendly sneaked into that commit.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I81c0f4713a83a8e5d888b03fb851e9c673cd1c77

4 years agoconfigs: odroid-xu3: enable NET_RANDOM_ETHADDR for proper USB ethernet support
Marek Szyprowski [Mon, 18 May 2020 11:56:34 +0000 (13:56 +0200)]
configs: odroid-xu3: enable NET_RANDOM_ETHADDR for proper USB ethernet support

Odroid XU3 and XU3lite has built-in USB SMSC9512/9514 Ethernet controller, which has no
EEPROM for the board MAC address. Force using random one instead of failing.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia1024f925d7b692b40cb76ef261e9c1cc8890e7b

4 years agotizen: odroid-xu3: add missing Odroid HC1 support to CONFIG_DFU_ALT_SYSTEM_2
Marek Szyprowski [Fri, 15 May 2020 06:29:46 +0000 (08:29 +0200)]
tizen: odroid-xu3: add missing Odroid HC1 support to CONFIG_DFU_ALT_SYSTEM_2

Add missing exynos5422-odroidhc1.dtb to DFU_ALT_SYSTEM_2, selected when ramdisk
partition is available.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ie72136e5b63739abe40add42590d30463c09f3c1

4 years agoscripts: sd_fusing: Increase the block size upon the image flashing
Junghoon Kim [Thu, 21 May 2020 03:56:23 +0000 (12:56 +0900)]
scripts: sd_fusing: Increase the block size upon the image flashing

Fine-grained IO degrades the image flashing performance due to the IO
stack overhead. Increase the block size upon the dd operation to improve
the flashing performance.

Change-Id: I937ca401d07045f055d3f55ca9f52a3261ee4fb4
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoscripts: sd_fusing_xu4.sh: Improve the image flashing performance
Junghoon Kim [Mon, 18 May 2020 06:22:47 +0000 (15:22 +0900)]
scripts: sd_fusing_xu4.sh: Improve the image flashing performance

The current dd of the pv combination degrades the flashing performance
due to the pipe overhead and is also bad to see due to the duplicate
output. This can be improved by the use of direct mode with progress
status.

Change-Id: Id682683e892181cc2608d1ba811d4ddb847048da
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoscripts: tizen: sd_fusing_rpi3: Check dd version for backward compatibility
Seung-Woo Kim [Thu, 14 May 2020 08:19:36 +0000 (17:19 +0900)]
scripts: tizen: sd_fusing_rpi3: Check dd version for backward compatibility

Before dd version 8.24, "status=progress" option is not supported.
For backward compatibility, check dd version and use the option
only when it is possible.

Change-Id: Ia90668e9cd22bf2906b4b0ecd574bb45ad14fd95
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: tizen: Improve the image flashing performance for RPI family
Junghoon Kim [Thu, 14 May 2020 05:51:00 +0000 (14:51 +0900)]
scripts: tizen: Improve the image flashing performance for RPI family

The current dd of the pv combination degrades the performance due to the
pipe overhead and is also bad to see due to the duplicate output.

It can be resolved by the use of direct mode with progress status. This
reduces the flashing time of platform images by 17.5% in my environment.

Change-Id: I986ce72e0294b6f143ca95419364a0f89f289d74
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agocmd: thordown: Fix to show stopped message when interrupted
Seung-Woo Kim [Sat, 25 Apr 2020 06:05:34 +0000 (15:05 +0900)]
cmd: thordown: Fix to show stopped message when interrupted

The thordown command can be interrupted by Ctrl-C, and it can be
identified with error value. Fix to show stopped message when
interrupted.

Change-Id: Idfe1a9dc1e168ea20c94d49ada497dc1b66bde52
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agogadget: f_thor: Return proper error value for thor_init()
Seung-Woo Kim [Fri, 24 Apr 2020 07:40:40 +0000 (16:40 +0900)]
gadget: f_thor: Return proper error value for thor_init()

After the commit 17679aed622b ("usb: thor: add screen support"),
caller of thor_init() expects general error value to check
interrupt by Ctrl-C but thor_init() returns wrong error value -1
for Ctrl-C termination during rx or wrong protocol response.
Return proper error for the cases.

Change-Id: I8a637918930673bad953a88e26c79b8e64580bc8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoFix the use of resize2fs
Junghoon Kim [Tue, 21 Apr 2020 07:59:05 +0000 (16:59 +0900)]
Fix the use of resize2fs

The resize2fs can be used to enlarge or shrink the ext family filesystem
only. Thus, An error occurs when trying to use it with other filesystems
such as vfat. Fix the use of resize2fs for use only with the ext family
filesystem.

Change-Id: I2c9b7c686086d924b003d07a2762bb668dd39ac8
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agotizen: rpi2/3/4: fix typo in Tizen boot scripts
Marek Szyprowski [Fri, 17 Apr 2020 10:43:45 +0000 (12:43 +0200)]
tizen: rpi2/3/4: fix typo in Tizen boot scripts

/s/comdline/cmdline

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I2464583207200762d981f0d133dacb14ec66a445

4 years agoscripts: tizen: sd_fusing: Check requested device
Seung-Woo Kim [Fri, 3 Apr 2020 07:58:36 +0000 (16:58 +0900)]
scripts: tizen: sd_fusing: Check requested device

It is possible to request flashing a device which is non-existent
or unaccessible. Especially, request can flash non-removable
storage disk that user do not really intend. To skip all the case,
Check requested device.
For non removable disk, it will ask user really intended to flash
the device.

Change-Id: I7ee3363fe4075abd7b860acf26b6cbe65e6fa68c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agonet: bcmgenet: move PHY initialization from probe() to start()
Marek Szyprowski [Wed, 25 Mar 2020 09:01:48 +0000 (10:01 +0100)]
net: bcmgenet: move PHY initialization from probe() to start()

Fix random network failures on subsequent network access by forcing PHY initialization on
every network access. This also fixes sudden link drop from 100baseT to 10baseT observed
from time to time.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I5bb55ce6546dec5449afea1bef036458563f287c

4 years agonet: nfs: show file offset and improve progress display
Marek Szyprowski [Wed, 25 Mar 2020 09:03:40 +0000 (10:03 +0100)]
net: nfs: show file offset and improve progress display

Always align progress display to the start of the column and show downloaded
file offset.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia5e3185110e0dbfc89046854f8d612f6428af794

4 years agonet: ping: reset stored IP once the command finishes to avoid interrupting other...
Marek Szyprowski [Wed, 25 Mar 2020 09:08:16 +0000 (10:08 +0100)]
net: ping: reset stored IP once the command finishes to avoid interrupting other protocols

Reset stored ping IP address before leaving the netloop to ensure that the subsequent calls
to the netloop, especially for the other protocols, won't be interrupted by the received
ICMP_ECHO_REPLY packet.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0d90b3a6e9481c8e8237874eff8a9a12df4190e0

4 years agocmd/nfsdown: fix summary message
Marek Szyprowski [Wed, 25 Mar 2020 09:02:03 +0000 (10:02 +0100)]
cmd/nfsdown: fix summary message

Adjust summary message format to align properly with
'ramdisk-recovery.img' file.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1747695718585f1a91e17a41ca12948b6db99a75

4 years agocmd/nfsdown: fix download image names for all RPi variants
Marek Szyprowski [Wed, 25 Mar 2020 08:10:11 +0000 (09:10 +0100)]
cmd/nfsdown: fix download image names for all RPi variants

There is no single CONFIG option for all RPi variants, so preprocessor has to check all of them.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I730a7f29dbf529c3da1c06f075e4c7a52089bf6c

4 years agocmd/nfsdown: fix wrong null check for argument in do_mmc_init()
Seung-Woo Kim [Mon, 23 Mar 2020 09:07:32 +0000 (18:07 +0900)]
cmd/nfsdown: fix wrong null check for argument in do_mmc_init()

In do_mmc_init(), there is wrong null check for argument
instead of find_mmc_device() result. Fix wrong null check.

Change-Id: Ibbd2781bed7ae1a812563a5d77b2a4c46cf66523
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agocmd/nfsdown: fix recently introduced type mismatch issues
Marek Szyprowski [Mon, 23 Mar 2020 08:05:39 +0000 (09:05 +0100)]
cmd/nfsdown: fix recently introduced type mismatch issues

When u-boot is configured from odroid-xu3_defconfig, the compiler reports following warnings:
In file included from include/config.h:5:0,
                 from include/common.h:23,
                 from cmd/nfsdown.c:11:
cmd/nfsdown.c: In function ‘do_nfs_down’:
include/configs/odroid_xu3.h:16:32: warning: passing argument 1 of ‘do_nfs_to_fat’ makes pointer from integer without a cast [-Wint-conversion]
 #define CONFIG_SYS_SDRAM_BASE  0x40000000
                                ^
cmd/nfsdown.c:24:27: note: in expansion of macro ‘CONFIG_SYS_SDRAM_BASE’
 #define NFS_DOWNLOAD_ADDR CONFIG_SYS_SDRAM_BASE
                           ^~~~~~~~~~~~~~~~~~~~~
cmd/nfsdown.c:429:25: note: in expansion of macro ‘NFS_DOWNLOAD_ADDR’
    size = do_nfs_to_fat(NFS_DOWNLOAD_ADDR, src_path,
                         ^~~~~~~~~~~~~~~~~
cmd/nfsdown.c:328:12: note: expected ‘void *’ but argument is of type ‘int’
 static int do_nfs_to_fat(void *addr, char *file_path, char *file_name,
            ^~~~~~~~~~~~~
In file included from include/config.h:5:0,
                 from include/common.h:23,
                 from cmd/nfsdown.c:11:
include/configs/odroid_xu3.h:16:32: warning: passing argument 2 of ‘do_nfs_to_mmc’ makes pointer from integer without a cast [-Wint-conversion]
 #define CONFIG_SYS_SDRAM_BASE  0x40000000
                                ^
cmd/nfsdown.c:24:27: note: in expansion of macro ‘CONFIG_SYS_SDRAM_BASE’
 #define NFS_DOWNLOAD_ADDR CONFIG_SYS_SDRAM_BASE
                           ^~~~~~~~~~~~~~~~~~~~~
cmd/nfsdown.c:433:30: note: in expansion of macro ‘NFS_DOWNLOAD_ADDR’
    size = do_nfs_to_mmc(mmc, NFS_DOWNLOAD_ADDR, src_path,
                              ^~~~~~~~~~~~~~~~~
cmd/nfsdown.c:282:12: note: expected ‘void *’ but argument is of type ‘int’
 static int do_nfs_to_mmc(struct mmc *mmc, void *addr, char *file_path,
            ^~~~~~~~~~~~~

Fix this by changing addr to unsigned long and adding needed casts.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia78da10d04a0daf3301ddc6fa4c7b73000d33c22

4 years agocmd/nfsdown: add support for partial image download
Marek Szyprowski [Wed, 18 Mar 2020 07:41:36 +0000 (08:41 +0100)]
cmd/nfsdown: add support for partial image download

Add support for downloading image file in parts, so images larger than the available memory
can be flashed correctly. This allows to flash large (>1GiB) rootfs images on RPi3 or RPi4
boards.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I40437191876eb48b9ca14756106f8316a92cc546

4 years agonet: nfs: add support for partial downloads from given offset
Marek Szyprowski [Tue, 17 Mar 2020 13:03:10 +0000 (14:03 +0100)]
net: nfs: add support for partial downloads from given offset

Add support for downloading file from the given offset (in bytes) and limit the size up to given
bytes.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I9f442d375d6b37986cb7c10f93c11d265886cceb

4 years agonet: nfs: reduce the number of printed hashes during data transfer
Marek Szyprowski [Tue, 17 Mar 2020 13:50:08 +0000 (14:50 +0100)]
net: nfs: reduce the number of printed hashes during data transfer

Downloading large images (about 1GiB) prints a lots of hash characters, so it is hard to follow
what is happenings. Reduce the amount of printed progress marks by a magnitude.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I142d1c646b2232eb505301a88b1ff051ac2bc19c

4 years agorpi3/4: enable NFS download feature
Marek Szyprowski [Thu, 12 Mar 2020 13:04:56 +0000 (14:04 +0100)]
rpi3/4: enable NFS download feature

Sync RPi3/4 defconfigs and enable NFS download feature for all configs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I35ade633d89bbd18374270362ba831d35c9a0d49

4 years agommc: exynos_dw_mmc: remove unused code
Jaehoon Chung [Mon, 24 Feb 2020 06:47:42 +0000 (15:47 +0900)]
mmc: exynos_dw_mmc: remove unused code

Remove unused code and fix wrong memory allocation.
- When rebased on v2019.10, it was applied wrong.

Change-Id: I6cc953c511d01ce42c33bf8d461e7bf5629c6428
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfig: rpi: Increase malloc buffer size
Marek Szyprowski [Thu, 13 Feb 2020 08:50:54 +0000 (09:50 +0100)]
config: rpi: Increase malloc buffer size

GENET ethernet driver and THORdown consume more memory than the default
4M, so increase the malloc buffer size to 16M to let them work together.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1c4d386761699fcb72b1a76d90d50518554a2980

4 years agommc: bcm2835_sdhci: remove QUIRK_BROKEN_SDMA flag
Jaehoon Chung [Wed, 22 Jan 2020 23:45:52 +0000 (08:45 +0900)]
mmc: bcm2835_sdhci: remove QUIRK_BROKEN_SDMA flag

Remove QUIRK_BROKEN_SDMA flag.

Change-Id: I6206ccb6ade14f51786d5603ae5207840ac51f63
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agosamsung: tizen_rpi: add dfu setup informations
Jaehoon Chung [Mon, 20 Jan 2020 21:55:14 +0000 (06:55 +0900)]
samsung: tizen_rpi: add dfu setup informations

Add dfu setup informations.
- usb controller index : 0
- dfu interface : mmc(eMMC/SD)
- default dfu device : 0

After applied this patch, it will be worked with "thor" instead of "thor 0 mmc 0".

Change-Id: I32294af8531532ea86333853fb208c2c23deb33d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: bcm2835_sdhci: set SDHCI_QUIRK_BROKEN_SDMA flag
Jaehoon Chung [Mon, 20 Jan 2020 09:50:45 +0000 (18:50 +0900)]
mmc: bcm2835_sdhci: set SDHCI_QUIRK_BROKEN_SDMA flag

RPI4 is used device-tree that taken from firmware.
mmcnr@73e00000 is enabled on device-tree, so it's probed on u-boot side.
Because it's for SDIO interface, it doesn't need to probe.
When SDMA is enabled, mmcnr's probe is always failed.

Below log is unnecessary :
  sdhci_setup_cfg: Your controller doesn't support SDMA!!
  mmcnr@7e30000 - probe failed: -22

Change-Id: Icb1cbebf9172d8bf6d14bd167e28eb3d570a21cd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: add quriks relevant to broken SDMA
Jaehoon Chung [Mon, 20 Jan 2020 09:47:35 +0000 (18:47 +0900)]
mmc: sdhci: add quriks relevant to broken SDMA

ADd quirks relevant to broken SDMA.
If set to SDHCI_QUIRK_BROKEN_SDMA, it should be run the pio mode.

Change-Id: Iddae84fea4d1de0301b9afd45f9f55d7d3f8de74
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agospl: atf: cast NULL to uintptr_t explictly
Seung-Woo Kim [Mon, 6 Jan 2020 09:46:08 +0000 (18:46 +0900)]
spl: atf: cast NULL to uintptr_t explictly

The bl31_entry() requires uintptr_t for its 3rd argument but NULL
is used calling the function. Cast it explictly to avoid
int-conversion build warning.

Change-Id: I0033c1bdcb9e115745ecec67950487cb85aeaba2
Fixes: d332415fe82f ("spl: atf: call bl31_entry function before jump to u-boot")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoconfigs: rpi_4_32b_defconfig: enable btrfs config
Jaehoon Chung [Thu, 19 Dec 2019 04:25:19 +0000 (13:25 +0900)]
configs: rpi_4_32b_defconfig: enable btrfs config

Enable btrfs configuration to support BTRFS on u-boot.

Change-Id: I883ab759f48724bb6bac6804d95f58a2b07b1ab5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: rpi_4_32b_defconfig: enable UMS configuration
Jaehoon Chung [Thu, 19 Dec 2019 00:53:45 +0000 (09:53 +0900)]
configs: rpi_4_32b_defconfig: enable UMS configuration

Enable UMS configuration.
It can be used to usb-mass storage.
Usage: U-Boot> ums 0 mmc 0
- Then you can see block device node on your local host.

It's useful to flash or format for using Tizen.

Change-Id: Ic3a27a69a03d05691f60e764990d33d8bfef2275
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agosamsung: tizen_rpi: fix typo about boot.scr.uimg
Jaehoon Chung [Thu, 19 Dec 2019 00:44:18 +0000 (09:44 +0900)]
samsung: tizen_rpi: fix typo about boot.scr.uimg

Fix typo about boot.scr.uimg.
- s/boot.src.uimg/boot.scr.uimg

Change-Id: I656f8f856cc918ca0239e12a709662269f6c10c9
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: tizen_rpi: add bcm2711-rpi-4-b.dtb in dfu information
Jaehoon Chung [Mon, 16 Dec 2019 10:30:31 +0000 (19:30 +0900)]
configs: tizen_rpi: add bcm2711-rpi-4-b.dtb in dfu information

Add bcm2711-rpi-4-b.dtb in dfu information.
It's used when thor command is run.

Change-Id: I55c0397647457af94301007763b5732a28d20d42
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM: defconfig: Fix 32bit config for RPi4
Matthias Brugger [Thu, 5 Dec 2019 17:53:15 +0000 (18:53 +0100)]
ARM: defconfig: Fix 32bit config for RPi4

The rpi_4_32b_defconfig states that only one DRAM bank is present. This
leads to a wrong configuration of the available DRAM. Fix this by
setting the DRAM bank config accordingly.

Fixes: 193279d784 ("RPI: Add defconfigs for rpi4 (32/64)")

Change-Id: I067ba66d80f636d6a56dfb7a14e3ee8da78829d4
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agorpi: Enable DRAM bank initialization on arm64
Matthias Brugger [Thu, 5 Dec 2019 17:53:14 +0000 (18:53 +0100)]
rpi: Enable DRAM bank initialization on arm64

Up to now we only update the DRAM banks when we are define
CONFIG_BCM2711. But our one binary approach uses a config that supports
BCM2837 and BCM2711. As a result we only see one gibibyte of RAM on
Raspberry Pi 4, even if it has more RAM.
Fix this by calling dram_init_banksize.

Fixes: 5694090670 ("ARM: defconfig: add unified config for RPi3 and RPi4")

Change-Id: Id7f3fec63777360d4536b836d98ad77f4b3a5a4e
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agoboard: rpi: remove unnecessary #ifdef CONFIG_NO_TIZEN
Jaehoon Chung [Mon, 16 Dec 2019 04:24:00 +0000 (13:24 +0900)]
board: rpi: remove unnecessary #ifdef CONFIG_NO_TIZEN

Remove #ifdef CONFIG_NO_TIZEN comment.

Change-Id: I0d125b66bc40f22f4a88ab7a41bfedeb5570ce4a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM: bcm283x: Set rpi_bcm283x_base at run-time
Matthias Brugger [Tue, 19 Nov 2019 15:01:04 +0000 (16:01 +0100)]
ARM: bcm283x: Set rpi_bcm283x_base at run-time

As part of the effort to create one binary for several bcm83x SoCs
we read the IO base address from device-tree.

Change-Id: I9816b3576a4fd6637bbf11bb6aeb6fa3bb8de456
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agoARM: bcm283x: Move BCM283x_BASE to a global variable
Matthias Brugger [Tue, 19 Nov 2019 15:01:03 +0000 (16:01 +0100)]
ARM: bcm283x: Move BCM283x_BASE to a global variable

We move the per SOC define BCM283x_BASE to a global variable.
This is a first step to provide a single binary for several bcm283x
SoCs.

Change-Id: If32915d693b26e9d3ddbbddbcac004140623afd0
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agoinclude: samsung: tizen_rpi: separate vc_mem base/size value
Jaehoon Chung [Thu, 5 Dec 2019 00:28:35 +0000 (09:28 +0900)]
include: samsung: tizen_rpi: separate vc_mem base/size value

Separate vc_mem base/size value according to target.
RPI4 and RPI3 have different value about vc_mem base and size.

This value has been taken from raspbian kernel image.

Change-Id: I95274e2acab9e3ef6af90759d2141428b82f86a8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoscripts: tizen: sd_fusing: increase minor version information
Jaehoon Chung [Thu, 28 Nov 2019 04:02:17 +0000 (13:02 +0900)]
scripts: tizen: sd_fusing: increase minor version information

Increase minor version information from 1.0. to 1.1.

Change-Id: I15612f6ecb73d77c58e5690e542d8e51af41257a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: exynos_dw_mmc: add tizen specific bind codes
Jaehoon Chung [Mon, 18 Nov 2019 11:32:11 +0000 (20:32 +0900)]
mmc: exynos_dw_mmc: add tizen specific bind codes

Add tizen specific bind codes.
Device number is defined according to boot from SD or eMMC.

Change-Id: I05876b0600d2e19e2642fd46742183d0d8cbe5c4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agosamsung: odroid: add CONFIG_TIZEN_XU3 config
Jaehoon Chung [Mon, 18 Nov 2019 11:22:55 +0000 (20:22 +0900)]
samsung: odroid: add CONFIG_TIZEN_XU3 config

Add CONFIG_TIZEN_XU3 configuration.
And enable it to boot tizen specific boot.

Change-Id: I98c533a0d044ebc017fb59a00d98c32ef6af2047
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoscripts: tizen: sd_fusing_xu4: Fix start position of extended partitions
Seung-Woo Kim [Mon, 18 Nov 2019 05:45:46 +0000 (14:45 +0900)]
scripts: tizen: sd_fusing_xu4: Fix start position of extended partitions

Older version sfdisk than 2.26 does not align the start and end
of partitions to block, and it breaks the size of paritions less
than requested. Fix start position of extended partitions by
calculation to guarantee the requested size.

Change-Id: I2e5a6c72550f71f213c2d7352b537c1b12d13670
Ref: http://man7.org/linux/man-pages/man8/sfdisk.8.html
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: tizen: sd_fusing_rpi3: Fix start position of extended partitions
Seung-Woo Kim [Fri, 15 Nov 2019 10:46:40 +0000 (19:46 +0900)]
scripts: tizen: sd_fusing_rpi3: Fix start position of extended partitions

Older version sfdisk than 2.26 does not align the start and end
of partitions to block, and it breaks the size of paritions less
than requested. Fix start position of extended partitions by
calculation to guarantee the requested size.

Change-Id: I6d5bae06e4cd871075259d406d349c4ac63fab40
Ref: http://man7.org/linux/man-pages/man8/sfdisk.8.html
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agosamsung: tizen_rpi: change rebootparam address
Jaehoon Chung [Sun, 17 Nov 2019 23:52:42 +0000 (08:52 +0900)]
samsung: tizen_rpi: change rebootparam address

Change rebootparam address from 0x02700000 to 0x02100000.
0x02700000 is used as ramdisk_addr_r.

Change-Id: Iee69f582b44cbcf7cbcd9c29c5b2bd0efbaf349c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi: tizen-boot: rpi4-32b; sync boot script with rpi3-32b
Jaehoon Chung [Tue, 12 Nov 2019 05:35:18 +0000 (14:35 +0900)]
rpi: tizen-boot: rpi4-32b; sync boot script with rpi3-32b

Sync boot script with rpi3-32b.
It's fixed wrong statement and condition check.

Change-Id: I3179f1fa9909443bbe8b1711232396f042228877
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agorpi: tizen-boot: rpi3-32b: Enable custom network configuration
Dongwoo Lee [Fri, 3 May 2019 06:08:01 +0000 (15:08 +0900)]
rpi: tizen-boot: rpi3-32b: Enable custom network configuration

To apply custom network configuration, this patch adds ip_opt to
bootcmd.

Fixes: 653d68709c27 ("rpi: tizen-boot: rpi3-32b: pass network arguments on flash mode")
Change-Id: I42d113f2c1591d62602128bc2e75a464d7cefebc
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
4 years agorpi: tizen-boot: rpi3-32b: support to enter the flash mode with command
Seung-Woo Kim [Mon, 29 Apr 2019 06:25:36 +0000 (15:25 +0900)]
rpi: tizen-boot: rpi3-32b: support to enter the flash mode with command

Support to enter the flash mode with command.

- Refer to below command:
U-boot> run tfm

Note: this applies, to rpi3-32b from rpi3, the commit cf212f48a110
("config: tizen_rpi: support to enter the flash mode with command").

Change-Id: I3a801aed172557385abd8651c811708f1f27feec
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi: tizen-boot: rpi3-32b: pass network arguments on flash mode
Seung-Woo Kim [Mon, 29 Apr 2019 06:23:27 +0000 (15:23 +0900)]
rpi: tizen-boot: rpi3-32b: pass network arguments on flash mode

To setup network environment for flash manager, this patch makes
passing parameters such as 'ipaddr', 'netmask', and 'gateway' through
kernel bootcmd. Those parameters can be assigned by user-self before
using flash mode.

Note: this is applying below patches from rpi3 to rpi3-32b:
f6f75b5bb37d ("rpi: tizen-boot: rpi3: pass network arguments on flash mode")
e2e0f18b9f3e ("rpi: tizen-boot: rpi3: remove dhcp as default network configuration")

Change-Id: I8de2c8f26f0a5c276ac32e46a83d8fc71eb1e7fd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agorpi: tizen-boot: rpi3-32b: fix to use setenv for bootmode
Seung-Woo Kim [Mon, 29 Apr 2019 06:16:53 +0000 (15:16 +0900)]
rpi: tizen-boot: rpi3-32b: fix to use setenv for bootmode

Fix to use setenv for bootmode instead of assignment for remaining
part from the commit 5c008029d782 ("config: tizen_rpi: move env
values from boot script to tizen_rpi.h").

Change-Id: I2ae5d58706bc1e5a8c39ee2952bf3ca2355054ec
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoconfigs: rpi: remove lcd from console output
Seung-Woo Kim [Mon, 11 Nov 2019 02:36:50 +0000 (11:36 +0900)]
configs: rpi: remove lcd from console output

From RPI3, log printing to lcd video console causes slow down of
uart rx getc called and fifo overrun occured from uart rx because
rpi3 mini uart has small h/w fifo. Remove lcd from console output.

It's changed from lcd to videoconsole.

Change-Id: I1d96ceab2ee796b4757032400c659fe40ab2f08d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agopackaging: u-boot: remove u-boot-tools package
Seung-Woo Kim [Fri, 8 Nov 2019 01:48:55 +0000 (10:48 +0900)]
packaging: u-boot: remove u-boot-tools package

Remove u-boot-tools package in u-boot.spec. For armv7l, The
u-boot-tools rpm is also building from u-boot-rpi3-32b.spec, so
no need duplicated packaging.

Change-Id: I7280e3add4079c66e1c8340f739b067427e49a58
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agopackaging: u-boot-xu3: remove u-boot-tools package
Jaehoon Chung [Thu, 7 Nov 2019 21:28:25 +0000 (06:28 +0900)]
packaging: u-boot-xu3: remove u-boot-tools package

Remove u-boot-tools package in u-boot-xu3.spec.
u-boot-tools is also building from u-boot-rpi3-32b.spec.
So it's created duplicated rpm on download.tizen.org.
- u-boot-tools-2019.10-38.1.armv7l.rpm
- u-boot-tools-2019.10-39.1.armv7l.rpm

Change-Id: I5c1e83935d4c37f8bff3f2bcf53283b3a7cc116c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoboard: rpi: not read ram_size from device-tree
Jaehoon Chung [Thu, 7 Nov 2019 09:02:20 +0000 (18:02 +0900)]
board: rpi: not read ram_size from device-tree

This patch is workaround to boot u-boot for tizen.
In future, it will be fixed.

Change-Id: Ic0d40dff1e61df2721f99f13bef5823fa08f5401
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agopackaging: rpi4-32: add rpi4 32bit spec file
Jaehoon Chung [Thu, 7 Nov 2019 06:32:05 +0000 (15:32 +0900)]
packaging: rpi4-32: add rpi4 32bit spec file

Add rpi4 32bit spec file.

Change-Id: I5e2b18275d0e92ec2294f19cd0f56dffe412691d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: tizen: change from boardname to board_name
Jaehoon Chung [Wed, 6 Nov 2019 07:25:20 +0000 (16:25 +0900)]
configs: tizen: change from boardname to board_name

In board/samsung/common/misc.c, it's set to board's name as board_name.
If it's used to boardname, it can't set to correct board's name.
This is caused the broken kernel booting on U3 board.

Change-Id: I3172254bd700309c3b8cd4420739ee214b411570
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoconfigs: tizen: enable CONFIG_DISTRO_DEFAULT
Jaehoon Chung [Wed, 6 Nov 2019 07:02:08 +0000 (16:02 +0900)]
configs: tizen: enable CONFIG_DISTRO_DEFAULT

Enable CONFIG_DISTRO_DEFAULT configuration.
When it's enabled, some configurations are enabled by default.

Change-Id: I16675f84c5285a1df6e88a9ba294e6cef3230fbd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agofdtdec: support multi device-tree when OF_SEPARATE is enabled
Jaehoon Chung [Wed, 6 Nov 2019 01:49:14 +0000 (10:49 +0900)]
fdtdec: support multi device-tree when OF_SEPARATE is enabled

When CONFIG_OF_SEPARATE is enabled, it needs to call get_board_fdt() for
supporting multi device-tree.

Change-Id: I8345789b55eb7f55d0805e8f164552f72dc6d6ef
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>