platform/kernel/u-boot.git
3 years agotizen: rpi: move bootscripts to tizen specific directory 76/250676/1 accepted/tizen/unified/20210105.125826 submit/tizen/20210104.215357
Jaehoon Chung [Thu, 31 Dec 2020 06:18:17 +0000 (15:18 +0900)]
tizen: rpi: move bootscripts to tizen specific directory

Move bootscripts from board/raspberrypi/rpi to tizen/bootscript/.
And combine to one script, because those are duplicated almost codes.

Change-Id: I2ee929bbcd6cb68566d441a272a1ba3d84beb100
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: amlogic: support recovery mode 54/250454/1
Jaehoon Chung [Mon, 28 Dec 2020 02:25:16 +0000 (11:25 +0900)]
tizen: bootscript: amlogic: support recovery mode

Support recovery mode.

Change-Id: Idf6dca45c0e3636c0579b674223e4af7c59d767f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: amlogic: remove tizen specific kernel loading address 53/250453/1
Jaehoon Chung [Mon, 28 Dec 2020 02:00:20 +0000 (11:00 +0900)]
tizen: bootscript: amlogic: remove tizen specific kernel loading address

Remove tizen specific kernel loading address.
When it's entered to recovery mode, "Synchronous Abort" is occurred.

Change-Id: I6ff3afc52299b12714a25bb83fe114467c007573
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: amlogic: remove voutmode in bootargs 52/250452/1
Jaehoon Chung [Mon, 28 Dec 2020 01:28:38 +0000 (10:28 +0900)]
tizen: bootscript: amlogic: remove voutmode in bootargs

Remove voutmode in bootargs.
If it's defined, it will be passed from boot_args.
- It's used in only odroid-n2/c4.

Change-Id: I112c4932c31b8e33cdb8c073712f443c5c88c1ac
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: script: ignore when no file in output directory 85/250185/1
Seung-Woo Kim [Tue, 22 Dec 2020 01:51:15 +0000 (10:51 +0900)]
tizen: script: ignore when no file in output directory

The build output directory can have no file. Ignore when no file
in the output directory.

Change-Id: Ia2ce4c25f7f386915c2606a36d4ea66ca46747e3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agotizen: move Function button check to separate env script 64/250164/1 accepted/tizen/unified/20201222.122550 submit/tizen/20201222.005612
Marek Szyprowski [Mon, 21 Dec 2020 10:25:56 +0000 (11:25 +0100)]
tizen: move Function button check to separate env script

This will make CONFIG_PREBOOT a bit more readable and easier to
understand.

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

3 years agoconfigs: amlogic: check a reboot reason to enter download mode 26/250126/2
Jaehoon Chung [Mon, 21 Dec 2020 05:06:57 +0000 (14:06 +0900)]
configs: amlogic: check a reboot reason to enter download mode

Check a reboot reason to enter download mode.
If reboot reason is download, it will be entered to download mode.

Change-Id: I9a2223962ad49a19a2b084711107dd23e6c17b95
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoARM: meson: add a reboot reason about DOWNLOAD 25/250125/1
Jaehoon Chung [Mon, 21 Dec 2020 05:06:46 +0000 (14:06 +0900)]
ARM: meson: add a reboot reason about DOWNLOAD

Tizen is using "reboot download" as download mode.

Change-Id: Ia53d1605982957bc2388552e81c4d3cd99eac1e8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: make version parsing insensitive to message tranlations 94/250094/3
Łukasz Stelmach [Fri, 18 Dec 2020 19:11:50 +0000 (20:11 +0100)]
tizen: make version parsing insensitive to message tranlations

Localised versions of version messages present version number at different
positions. Matching numbers with grep(1) ensures that version number is
extracted properly regardles of the message format.

Change-Id: I6dd4bc476aaa43c1a736f269dc14910d8653b730
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agoARM: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4 86/250086/2
Marek Szyprowski [Fri, 18 Dec 2020 10:32:32 +0000 (11:32 +0100)]
ARM: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4

For the proper reboot Odroid-C4 board requires to switch TFLASH_VDD_EN
pin to the high impedance mode, otherwise the board is stuck in the
middle of loading early stages of the bootloader from SD card.

This can be achieved by using the OPEN_DRAIN flag instead if the
ACTIVE_HIGH, what will leave the pin in input to achieve high state (pin
has the pull-up) and solve the issue.

Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
Change-Id: Id91d0c5e354ed58fcba3b2e8a5ebe7f2953f2142
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
3 years agoRevert "ARM: meson: Temporary fix for OdroidC4 SD card reboot issue" 85/250085/2
Marek Szyprowski [Fri, 18 Dec 2020 14:32:10 +0000 (15:32 +0100)]
Revert "ARM: meson: Temporary fix for OdroidC4 SD card reboot issue"

This reverts commit 394a3fc1a2f2ab0eb61dc32231cb94e8ed55e845.

It will be replaced by a patch accepted in mainline uboot.

Change-Id: If335526aee08221fcbcd200fb7dbc4b7635d5415
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
3 years agotizen: vim3(l)_deconfig: enable THOR mode if Func button is pressed 84/250084/2
Marek Szyprowski [Mon, 14 Dec 2020 07:33:30 +0000 (08:33 +0100)]
tizen: vim3(l)_deconfig: enable THOR mode if Func button is pressed

Extend the preboot script with a check of the Func button state. If it is
pressed, enter the THOR download mode.

Change-Id: Ic026c345078adbd9030b65e250b18afcc171553b
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
3 years agocmd/button: return button status 83/250083/2
Heinrich Schuchardt [Mon, 14 Sep 2020 10:50:56 +0000 (12:50 +0200)]
cmd/button: return button status

To make the button command useful in a shell script it should return the
status of the button:

* 0 (true) - pressed, on
* 1 (false) - not pressed, off

The button command takes only one argument. Correct maxargs.

Adjust the Python unit test.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
[backport of mainline commit a6bfd71a96201127836d59736abcb54dc2d5e1a5]
Change-Id: Ic799b7e189e3fb6793083a92b2ceadb0f5884889
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
3 years agoRevert "tizen: vim3(l)_deconfig: enable THOR mode if Func button is pressed" 82/250082/2
Marek Szyprowski [Wed, 16 Dec 2020 07:24:37 +0000 (08:24 +0100)]
Revert "tizen: vim3(l)_deconfig: enable THOR mode if Func button is pressed"

This reverts commit 0548fab316eac104e8cdd77cb505407facfbc115.

This commit will be changed to use the solution applied in mainline
uboot.

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

3 years agoRevert "cmd: button: store button state in the 'button' env" 81/250081/2
Marek Szyprowski [Wed, 16 Dec 2020 07:24:21 +0000 (08:24 +0100)]
Revert "cmd: button: store button state in the 'button' env"

This reverts commit 5c353ca0b9e417b5f0d0705cc47abc090254a2e4.

It will be replaced by the other solution backported from mainline uboot.

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

3 years agotizen: script: fix wrong indent for case 69/249969/1
Seung-Woo Kim [Fri, 18 Dec 2020 04:43:35 +0000 (13:43 +0900)]
tizen: script: fix wrong indent for case

There are unmet indent for case statement. Fix the wrong indent.

Change-Id: Iafb7e9586c5b401f481cef5afbc879c8f12f90e2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agolib: tizen: fix build error with tizen_defconfig 58/249658/1 accepted/tizen/unified/20201216.215949 submit/tizen/20201216.044245
Jaehoon Chung [Wed, 16 Dec 2020 04:33:24 +0000 (13:33 +0900)]
lib: tizen: fix build error with tizen_defconfig

Fix build error with tizen_defconfig.
tizen_defconfig doesn't support DM_VIDEO.

Change-Id: Ie86a45e97c8d8c4c70e13dfaba70f23b0bdccd93
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosamsung: tizen_amlogic: update loglevel from 4 to 7 43/249643/1 submit/tizen/20201216.030420
Jaehoon Chung [Tue, 15 Dec 2020 22:27:39 +0000 (07:27 +0900)]
samsung: tizen_amlogic: update loglevel from 4 to 7

Update loglevel from 4 to 7.
It's useful that can see more log message because of kernel isn't stable.
In future, it will be restore to 4.

Change-Id: I162b3a049acd1a6765b4c7f9e5ce610fce238e59
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: vim3(l)_deconfig: enable THOR mode if Func button is pressed 35/249535/1
Marek Szyprowski [Mon, 14 Dec 2020 07:33:30 +0000 (08:33 +0100)]
tizen: vim3(l)_deconfig: enable THOR mode if Func button is pressed

Extend the preboot script with a check of the Func button state. If it is
pressed, enter the THOR download mode.

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

3 years agocmd: button: store button state in the 'button' env 34/249534/1
Marek Szyprowski [Mon, 14 Dec 2020 09:26:39 +0000 (10:26 +0100)]
cmd: button: store button state in the 'button' env

Save examined button state in 'button' environment variable to enable
checking button state in the scripts.

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

3 years agobutton: add a simple ADC-based button driver 33/249533/1
Marek Szyprowski [Mon, 14 Dec 2020 09:29:47 +0000 (10:29 +0100)]
button: add a simple ADC-based button driver

Add a simple ADC-based button driver. This driver binds to the 'adc-keys'
device tree node.

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

3 years agoadc: meson-saradc: skip hardware init only if ADC is enabled 32/249532/1
Marek Szyprowski [Mon, 14 Dec 2020 10:18:42 +0000 (11:18 +0100)]
adc: meson-saradc: skip hardware init only if ADC is enabled

The driver skips hardware initialization if it is already configured by
the earlier bootloader stage (BL30). Skip the initialization only if the
hardware is really initialized and enabled.

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

3 years agoadc: meson-saradc: add G12A variant 31/249531/1
Marek Szyprowski [Mon, 14 Dec 2020 10:06:59 +0000 (11:06 +0100)]
adc: meson-saradc: add G12A variant

Add support for the SARADC variant found on the G12A SoCs family.

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

3 years agoclk: meson: add minimal driver for g12a-ao clocks 30/249530/1
Marek Szyprowski [Mon, 14 Dec 2020 07:33:30 +0000 (08:33 +0100)]
clk: meson: add minimal driver for g12a-ao clocks

Add minimal driver AO clocks on meson G12A family. Only ADC related clocks
are supported.

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

3 years agotizen: bootscript: amlogic: restore ${opts} support 66/249366/2
Marek Szyprowski [Thu, 10 Dec 2020 13:55:46 +0000 (14:55 +0100)]
tizen: bootscript: amlogic: restore ${opts} support

After unification of the Amlogic based boards boot scripts, support for
appending ${opts} to kernel cmdline has been lost. Restore it to make the
kernel debugging easier.

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

3 years agousb: dwc3-meson-g12a: always configure dr-mode 59/249359/2
Marek Szyprowski [Thu, 10 Dec 2020 10:35:31 +0000 (11:35 +0100)]
usb: dwc3-meson-g12a: always configure dr-mode

dwc3_meson_g12a_force_mode() sets the dr-mode of the USB PHY. However
it skips setting the mode if it matches the one done during driver probe
(stored in private structure). This fails if the mode has been changed
to other value and then back to initial one. Fix this by configuring the
dr-mode always, regadless of the one set at the driver probe).

This fixes operation of USB gadget based drivers when they are initialized
for the second time.

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

3 years agosamsung: tizen_rpi: add hal.img in dfu information 67/249267/2
Jaehoon Chung [Wed, 9 Dec 2020 10:33:04 +0000 (19:33 +0900)]
samsung: tizen_rpi: add hal.img in dfu information

Add hal.img in dfu information.
It's for just prepering to thor download.
- Avoid to fail thor protocol when hal image is created.

Change-Id: I78df372fc0bfa260d120c16c59a4b7bfd6fdddcf
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agomeson: add TIZEN_AMLOGIC_USE_VENDOR_KERNEL config 58/249258/3
Jaehoon Chung [Wed, 9 Dec 2020 09:21:44 +0000 (18:21 +0900)]
meson: add TIZEN_AMLOGIC_USE_VENDOR_KERNEL config

Add TIZEN_AMLOGIC_USE_VENDOR_KERNEL config.
It's more claar than just using CONFIG_TIZEN.
If someone wants to use mainline kernel, just disable it.

Enable CONFIG_TIZEN_AMLOGIC_USE_VENDOR_KERNEL.
- odroid-{c4,n2}_defconfig
- khadas-{vim3,vim3l}_defconfig
Tizen is using each board's vendor kernel.

Change-Id: I2a11e3e08e58ced7ef286487044a1616ac3ac8f4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agolib: tizen: Add support for thor status notifications on video console 14/249214/3
Sylwester Nawrocki [Tue, 8 Dec 2020 18:28:58 +0000 (19:28 +0100)]
lib: tizen: Add support for thor status notifications on video console

This patch implements thor flashing progress bar and status notifications
on graphics console.

Change-Id: Iba4945ae26358936de1e1847d0095f97e6ab3498
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agothor: Add API for thor status notifications 13/249213/1
Sylwester Nawrocki [Wed, 25 Nov 2020 17:54:28 +0000 (18:54 +0100)]
thor: Add API for thor status notifications

This patch adds an empty by default thor_status_notify() function which
can be reimplemented as required and which allows to add notifications
of thor status and flashing progress, e.g. on external monitor.

Change-Id: Ic1eaad7f3f5adbca404162b745a9287d5a9ae247
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agoamlogic: vim3: add code for reading ethernet MAC address from efuse 37/249137/3 accepted/tizen/unified/20201209.060746 submit/tizen/20201208.071016
Marek Szyprowski [Mon, 7 Dec 2020 13:33:54 +0000 (14:33 +0100)]
amlogic: vim3: add code for reading ethernet MAC address from efuse

Add a simple code for reading built-in ethernet MAC address from efuse.

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

3 years agopackaging: u-boot-amlogic: add a spec file for all amlogic boards 25/249125/3
Jaehoon Chung [Mon, 7 Dec 2020 03:42:46 +0000 (12:42 +0900)]
packaging: u-boot-amlogic: add a spec file for all amlogic boards

Add a spec file for all amlogic boards.
- It will be provided u-boot-{n2,c4,vim3,vim3l} packages
- Remove each spec files

Change-Id: Ic4f8ab6f5608fbe8606fdc3cca591e53c7bdfe18
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoconfigs: put a space to sys prompt in odroid-{c4,n2}_defconfig and khadas-vim3(l... 02/249102/2
Seung-Woo Kim [Mon, 7 Dec 2020 06:13:15 +0000 (15:13 +0900)]
configs: put a space to sys prompt in odroid-{c4,n2}_defconfig and khadas-vim3(l)_defconfig

Like all other targets, put a space to sys prompt.

Change-Id: Ie106f61406b686dfc7ec98079cb6adf96a7d6fff
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agocommon: splash_source: fix -Wint-to-pointer-cast warning 75/249075/1
Jaehoon Chung [Sun, 6 Dec 2020 23:39:05 +0000 (08:39 +0900)]
common: splash_source: fix -Wint-to-pointer-cast warning

Fix -Wint-to-pointer-cast warning

common/splash_source.c: In function 'splash_load_raw':
common/splash_source.c:100:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  100 |  bmp_hdr = (struct bmp_header *)bmp_load_addr;
      |            ^
common/splash_source.c: In function 'splash_sf_read_raw':
common/splash_source.c:39:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   39 |  return spi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
      |                                               ^

Change-Id: I3ab5875a7c33c0b22b2824dc8534dafcf70abd26
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoconfigs: Enable options for splash image in odroid-{c4,n2}_defconfig 20/249020/4
Marek Szyprowski [Tue, 1 Dec 2020 17:38:51 +0000 (18:38 +0100)]
configs: Enable options for splash image in odroid-{c4,n2}_defconfig

These options are needed for the splash image loading.

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

3 years agotizen: amlogic: Add hdmimode env variable 47/248847/4
Sylwester Nawrocki [Wed, 2 Dec 2020 15:32:54 +0000 (16:32 +0100)]
tizen: amlogic: Add hdmimode env variable

The hdmimode variable set to "1080p60hz" value allows the HDMI driver
to switch to default full HD timings for QHD/UHD monitors and such
monitors can still be used in lower resolution mode.
This a workaround until proper support for QHD/UHD is implemented
in the VPU driver.
The new variable is also used in kernel bootargs.

Change-Id: Ib1b58ee9173fa380c1c79bf819b0ffaca1a6aab9
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agovideo: meson: Add fallback to default timings for QHD/UHD monitors 46/248846/3
Sylwester Nawrocki [Wed, 25 Nov 2020 19:13:55 +0000 (20:13 +0100)]
video: meson: Add fallback to default timings for QHD/UHD monitors

The HDMI driver currently supports only up to 1920x1200 resolutions
and QHD/UHD monitors might not specify detailed timings in EDID other
than those for their maximum resolution, even though they work with
lower resolutions like full HD. In such cases display_read_timings()
will fail breaking the video output driver initialization.

As a workaround fallback to full HD timings is added for QHD or UHD
monitors. The default timing will only be used when "hdmimode"
environment variable is set to "1080p60hz", otherwise the driver
switches to CVBS mode as before, when display timings are
unsupported/could not be read.

The proper solution would be to implement support for 2K/4K HDMI
modes, which are also not supported yet by driver in the kernel.

Change-Id: I407228392a6b1b6e8b0c55a6962235111df0c69c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agotizen: Add splash image file to the bootloader tar image 06/248806/4
Sylwester Nawrocki [Wed, 2 Dec 2020 09:37:27 +0000 (10:37 +0100)]
tizen: Add splash image file to the bootloader tar image

Change-Id: Ie3e1f76a663eddb65887ec42c651dedbd6b07f81
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agoconfigs: Enable options for splash image in khadas-vim3(l)_defconfig 03/248803/3
Sylwester Nawrocki [Tue, 1 Dec 2020 17:38:51 +0000 (18:38 +0100)]
configs: Enable options for splash image in khadas-vim3(l)_defconfig

These options are needed for the splash image loading.

Change-Id: Ieeddd2e2d9ff6872297b9eb3f3d899702ee717a7
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agotizen: amlogic: add CONFIG entries for splash image loading 02/248802/3
Sylwester Nawrocki [Thu, 26 Nov 2020 16:42:18 +0000 (17:42 +0100)]
tizen: amlogic: add CONFIG entries for splash image loading

These options are needed for decompressing the logo image file
(gzipped BMP).

Change-Id: Ieb3c35adf5007e2f795f2cecc3cf365e7a40b629
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agoconfigs: tizen_amlogic: Add environment variables for splash image 01/248801/3
Sylwester Nawrocki [Thu, 26 Nov 2020 18:45:01 +0000 (19:45 +0100)]
configs: tizen_amlogic: Add environment variables for splash image

Set the splash file location, bmp image load address and logo position
on the display.

The compressed bitmap file should be installed on first mmc partition.

Change-Id: Ic1ce517460beaf318821f53ed3adbe6c41e091e8
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agopackaging: u-boot-vim3(l): Add tizen logo bitmap file 00/248800/3
Sylwester Nawrocki [Tue, 1 Dec 2020 17:37:40 +0000 (18:37 +0100)]
packaging: u-boot-vim3(l): Add tizen logo bitmap file

This image will be used as u-boot splash image.

Change-Id: I262cc2219435afc7c8f208ff39b2bf7cce6a636c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agogitattributes: Set binary attribute for *.gz and *.png files 99/248799/2
Sylwester Nawrocki [Wed, 2 Dec 2020 08:36:29 +0000 (09:36 +0100)]
gitattributes: Set binary attribute for *.gz and *.png files

After commit ("1f35137 Add .gitattributes for line endings") all files
have text attribute set and we need such change to ensure content of
the *.gz and *.png files remains unmodified.

$ git check-attr -a -- *.gz *.png
*.gz: binary: set
*.gz: diff: unset
*.gz: merge: unset
*.gz: text: unset
*.gz: eol: lf
*.png: binary: set
*.png: diff: unset
*.png: merge: unset
*.png: text: unset
*.png: eol: lf

Change-Id: Ie7b1d48761c01c045bdcdae3b0ac66e64af79326
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agotizen: enable support for formatting MBR partition layout during flashing 44/248844/2
Marek Szyprowski [Thu, 26 Nov 2020 14:32:03 +0000 (15:32 +0100)]
tizen: enable support for formatting MBR partition layout during flashing

This is ensured by the following steps:
1. enable 'mbr' command and provide default partiton layout,
2. add support for formating block device from THOR downloaded script,
3. check MBR partition layout on boot and enter THOR mode if invalid
4. provide a script for formating MBR for THOR download

MBR partition layout is checked on boot if it mathes the one defined
during u-boot compilation. If not, set dfu_alt_info to the minimal safe
list and enter THOR download mode to flash the new, proper partition
layout and the complete Tizen image.

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

3 years agothor: add support for dfu_alt_info reintialization from the downloaded script 43/248843/2
Marek Szyprowski [Fri, 27 Nov 2020 15:10:34 +0000 (16:10 +0100)]
thor: add support for dfu_alt_info reintialization from the downloaded script

Reinitialize dfu_env_entities after flashing the 'SCRIPT' entity to
ensure that the potential changes to the 'dfu_alt_info' environment
variable are applied.

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

3 years agodfu: add support for dfu_alt_info reintialization from the flashed script 42/248842/2
Marek Szyprowski [Wed, 2 Dec 2020 12:56:19 +0000 (13:56 +0100)]
dfu: add support for dfu_alt_info reintialization from the flashed script

Reinitialize DFU USB gadget after flashing the 'SCRIPT' entity to ensure
that the potential changes to the 'dfu_alt_info' environment variable are
applied.

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

3 years agodfu: add 'SCRIPT' entity support 41/248841/2
Marek Szyprowski [Fri, 27 Nov 2020 15:08:28 +0000 (16:08 +0100)]
dfu: add 'SCRIPT' entity support

Define a new 'SCRIPT' type for DFU entities. The downloaded data are
treated as simple u-boot's scripts and executed with run_command_list()
function.

Flashing the 'SCRIPT' entity might result in changing the 'dfu_alt_info'
from that script. Add a global variable for tracking the potential need
to reinitialize the dfu_alt_info structures.

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

3 years agocmd: Add MBR partition layout control utility 40/248840/2
Marek Szyprowski [Thu, 26 Nov 2020 14:27:00 +0000 (15:27 +0100)]
cmd: Add MBR partition layout control utility

Add a 'mbr' command to let user create or verify MBR partition layout
based on the provided text description. The partition layout is
altearnatively read from 'mbr_parts' environment variable. This can be
used in scripts to help system image flashing tools to ensure proper
partition layout.

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

3 years agopart: dos: add code for creating MBR partition layout 39/248839/2
Marek Szyprowski [Thu, 26 Nov 2020 14:25:01 +0000 (15:25 +0100)]
part: dos: add code for creating MBR partition layout

Add code for creating and writing MBR partition layout. The code generates
similar layout of EBRs (Exteneded Block Records) and logical volumes as
Linux's fdisk utility.

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

3 years agodisk: dos: make some functions static 38/248838/2
Marek Szyprowski [Thu, 26 Nov 2020 14:23:41 +0000 (15:23 +0100)]
disk: dos: make some functions static

Make function not used outside this file static.

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

3 years agodisk: dos: use generic macro for unaligned le32 access 37/248837/2
Marek Szyprowski [Thu, 26 Nov 2020 14:22:32 +0000 (15:22 +0100)]
disk: dos: use generic macro for unaligned le32 access

Use a generic helper for reading LE32 integers.

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

3 years agodisk: dos: add some defines for the hardcoded numbers 36/248836/2
Marek Szyprowski [Thu, 26 Nov 2020 14:19:54 +0000 (15:19 +0100)]
disk: dos: add some defines for the hardcoded numbers

Add handy defines for some hardcoded magic numbers related to extended
partition handling.

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

3 years agodisk: dos: rename write_mbr_partition to write_mbr_sector 35/248835/2
Marek Szyprowski [Thu, 26 Nov 2020 06:08:02 +0000 (07:08 +0100)]
disk: dos: rename write_mbr_partition to write_mbr_sector

write_mbr_partition() function name is a bit misleading, so rename it to
write_mbr_sector(). This is a preparation for adding code for writing a
complete MBR partition layout.

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

3 years agotizen: build-amlogic: add support for building images for all boards 65/248965/1
Marek Szyprowski [Thu, 3 Dec 2020 16:49:23 +0000 (17:49 +0100)]
tizen: build-amlogic: add support for building images for all boards

Add 'all' target for build-amlogic.sh to build images for all supported
boards and pack them to the common amlogic_bootloader.tar.

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

3 years agotizen: bootscript: amlogic: use proper string comparison operator 64/248964/1
Marek Szyprowski [Thu, 3 Dec 2020 16:24:30 +0000 (17:24 +0100)]
tizen: bootscript: amlogic: use proper string comparison operator

The proper string comparison operator for u-boot's test is '='.

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

3 years agotizen: limit boot to MMC0 and MMC1 devices 46/248946/1
Marek Szyprowski [Thu, 3 Dec 2020 10:57:48 +0000 (11:57 +0100)]
tizen: limit boot to MMC0 and MMC1 devices

Other types of boot are not supported on Tizen, so disable generating
scripts and envs for them.

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

3 years agotizen: avoid doubled entries in params.bin 45/248945/1
Marek Szyprowski [Thu, 3 Dec 2020 10:55:29 +0000 (11:55 +0100)]
tizen: avoid doubled entries in params.bin

Disable generating entries (re)defined in tizen_amlogic.h to avoid
confusing user, which one is valid.

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

3 years agotools: image-host.c: use correct output format 26/248726/1
Heinrich Schuchardt [Thu, 8 Oct 2020 18:51:24 +0000 (20:51 +0200)]
tools: image-host.c: use correct output format

When building on a 32bit host the following warning occurs:

tools/image-host.c: In function ‘fit_image_read_data’:
tools/image-host.c:296:56: warning: format ‘%ld’ expects argument of
type ‘long int’, but argument 3 has type ‘__off64_t’
{aka ‘long long int’} [-Wformat=]
   printf("File %s don't have the expected size (size=%ld, expected=%d)\n",
                                                      ~~^
                                                      %lld
          filename, sbuf.st_size, expected_size);
                    ~~~~~~~~~~~~
tools/image-host.c:311:62: warning: format ‘%ld’ expects argument of
type ‘long int’, but argument 4 has type ‘__off64_t’
{aka ‘long long int’} [-Wformat=]
   printf("Can't read all file %s (read %zd bytes, expexted %ld)\n",
                                                            ~~^
                                                            %lld
          filename, n, sbuf.st_size);
                       ~~~~~~~~~~~~

Fix the format strings.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[jh80.chung: cherry picked from mainline commit 3311eda658e0]
Change-Id: I5ed82a5c3d876a56d6b9ac75598eeed2d2b85d2a

3 years agotizen: remove generic params.bin and u-boot.bin 74/248674/1
Marek Szyprowski [Tue, 1 Dec 2020 09:36:03 +0000 (10:36 +0100)]
tizen: remove generic params.bin and u-boot.bin

The generic entity params.bin is no longer functional, so remove it. Also
remove generic entity for the u-boot.bin to force user to use proper
board specific image.

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

3 years agotizen: sanitize file names for VIM3(l) boards 67/248667/1
Marek Szyprowski [Mon, 30 Nov 2020 14:13:51 +0000 (15:13 +0100)]
tizen: sanitize file names for VIM3(l) boards

Use only the board name (vim3/vim3l) in file names (i.e. u-boot-vim3.bin)
like it is done for odroid boards (i.e. u-boot-c4.bin).

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

3 years agovideo: Fix line padding calculation for 16 and 24 bpp bitmaps 39/248539/4
Sylwester Nawrocki [Wed, 25 Nov 2020 11:13:12 +0000 (12:13 +0100)]
video: Fix line padding calculation for 16 and 24 bpp bitmaps

The line size in the bitmap file is multiple of 4 bytes. In current code
the complement of row size to a multiple of 4 bytes is further unnecessarily
multiplied by the pixel size. This result in incorrect displaying of bitmaps
with image width which is not multiple of 4 pixels. Fix this by removing
the unnecessary multiplication.

Tested with 24BPP bitmap and XRGB32 display.

Change-Id: I9bd307780e388a70f47823444fe3ecdf910d08fb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agotizen: unify build script for all boards 97/248597/2
Marek Szyprowski [Mon, 30 Nov 2020 13:14:04 +0000 (14:14 +0100)]
tizen: unify build script for all boards

Use the same build script for all Amlogic boards.

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

3 years agotizen: amlogic: change a params name to postfix of each board's name 65/248565/2
Jaehoon Chung [Mon, 30 Nov 2020 03:33:22 +0000 (12:33 +0900)]
tizen: amlogic: change a params name to postfix of each board's name

Chagne a params.bin name to postfix of each board's name and location
to root directory.
Also changed the kernel directory from each boardname to kvim/odroid.

Change-Id: I0468f0894d7220cc55b64885c8c411f2c5340606
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agopackaging: amlogic: use one boot.scr.uimg script 21/248521/1
Jaehoon Chung [Fri, 27 Nov 2020 08:24:22 +0000 (17:24 +0900)]
packaging: amlogic: use one boot.scr.uimg script

Use one boot.scr.uimg instead of each scsripts.
To prevent conflict, move to boot.scr.uimg after installed each script.
Also change the place of boot.scr.uimg in build script.

Change-Id: Ia7d0746062f6d548ae1fb36a7111d55d353a1545
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: amlogic: calculate tizen_kernel_add_r with ramdisk's size 68/248468/1
Jaehoon Chung [Fri, 27 Nov 2020 02:11:09 +0000 (11:11 +0900)]
tizen: bootscript: amlogic: calculate tizen_kernel_add_r with ramdisk's size

Calculate tizen_kernel_addr_r with ramdisk's size.
It cat be prevented to overwrite the images.

Change-Id: If766b514e40865c3a531c3ebbe75f6b7a6898b2a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoconfigs: enable CONFIG_SETEXPR config 67/248467/1
Jaehoon Chung [Fri, 27 Nov 2020 02:11:03 +0000 (11:11 +0900)]
configs: enable CONFIG_SETEXPR config

Eanble CONFIG_SETEXPR configuration.

Change-Id: If1255fabae584b17e176fb7d8cbc0324ac2b3902
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agopackaging: u-boot-kvim3l: add kvim3l spec file 65/248365/1
Jaehoon Chung [Thu, 26 Nov 2020 01:06:11 +0000 (10:06 +0900)]
packaging: u-boot-kvim3l: add kvim3l spec file

Add kvim3l spec file for khadas-vim3l.

Change-Id: Ie7ddaaab70a3218a81927ccef9953bdb41e4eb52
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: create one bootscript for amlogic boards 64/248364/1
Jaehoon Chung [Wed, 25 Nov 2020 23:12:45 +0000 (08:12 +0900)]
tizen: bootscript: create one bootscript for amlogic boards

Create one bootscript for amlogic boards.
There is a common variable to use about each boards. So it can be
reused.
Remove each bootscript files. Instead, use one script file with
board_name.

Change-Id: If50529fc1f34f3ac274ce8a0955499f3e3e12d22
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: remove vim3l boot script 33/248333/2
Jaehoon Chung [Wed, 25 Nov 2020 10:30:44 +0000 (19:30 +0900)]
tizen: bootscript: remove vim3l boot script

Remove vim3l boot sript.
Instead, use tizen-boot-khadas-vim3-64b.scr.
In future, it can be used one image after combined other amlogic script.

Change-Id: Ifa16622ca0507db6b61720d7cddd3bd66bfbb07f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: remove fdtfile in boot script 32/248332/1
Jaehoon Chung [Wed, 25 Nov 2020 10:19:55 +0000 (19:19 +0900)]
tizen: bootscript: remove fdtfile in boot script

Remove fdtfile in boot script file.
Move fdtfile variable from bootscript to tizen_amlogic header.

Change-Id: I7c87253eab09332e6ab73e5174bf93a95fde60f7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: bootscript: move boot scripts under bootscript directory 31/248331/1
Jaehoon Chung [Wed, 25 Nov 2020 09:31:13 +0000 (18:31 +0900)]
tizen: bootscript: move boot scripts under bootscript directory

Move each bootscript files to tizen/bootscript directory.
It's more easier to maintain which boot script is used for tizen than now

Change-Id: I435fdf8352195091763226fdbb05b844219f5842
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agobuild: kvim3: add vim3l in build-kvim3 script 30/248330/1
Jaehoon Chung [Wed, 25 Nov 2020 09:20:58 +0000 (18:20 +0900)]
build: kvim3: add vim3l in build-kvim3 script

There is no reason not to reuse build-kvim3 script.
If one wants to build vim3 or vim3l, pass the argument as target name.
- ./build-kvim3.sh vim3 or vim3l

Change-Id: I645e52f8dc97269e2048c0a2357755029dcfe7d9
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoamlogic: w400: add tizen boot script for vim3l 29/248329/1
Jaehoon Chung [Wed, 25 Nov 2020 09:08:51 +0000 (18:08 +0900)]
amlogic: w400: add tizen boot script for vim3l

Add tizen boot script for vim3l.

Change-Id: I77503992af9bc3955ddd4fefd71ded12351f20d6
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosamsung: tizen_amlogic: add khadas vim3l environment value 89/248289/2
Jaehoon Chung [Wed, 25 Nov 2020 03:01:20 +0000 (12:01 +0900)]
samsung: tizen_amlogic: add khadas vim3l environment value

Add khadas vim3l environment value to use thor download.

Change-Id: Ie97abfee1c48ad43c29c7539a1835593e24ecc5b
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoARM: meson: Add TIZEN_KHADAS_VIM3L config 88/248288/2
Jaehoon Chung [Wed, 25 Nov 2020 02:54:23 +0000 (11:54 +0900)]
ARM: meson: Add TIZEN_KHADAS_VIM3L config

Add TIZEN_KHADAS_VIM3L config and enable it.

Change-Id: I20c431b4cc5f54f1ea8f24dbc8e94290e6047f96
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoconfigs: khadas: enable configurations relevant to Tizen 87/248287/1
Jaehoon Chung [Wed, 25 Nov 2020 02:32:58 +0000 (11:32 +0900)]
configs: khadas: enable configurations relevant to Tizen

Enable configurations relevant to Tizen.

Change-Id: I66dc227aa94ec7626558df611790a829b4bef165
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agofip: kvim3l: add the prebuilt images to make u-boot image 86/248286/1
Jaehoon Chung [Tue, 24 Nov 2020 04:44:07 +0000 (13:44 +0900)]
fip: kvim3l: add the prebuilt images to make u-boot image

Add the prebuilt images to make u-boot image.
It's from khadas opensource github.
https://github.com/khadas/u-boot.gi -b khadas-vims-v2015.01

Refer to doc/board/amlogic/khadas-vim3l.rst

Change-Id: I579d9375a682c5e737080950ae25009032c7584e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: sd_fusing_amlogic: sync with recent script for old tools 71/248271/1
Seung-Woo Kim [Wed, 25 Nov 2020 02:49:27 +0000 (11:49 +0900)]
tizen: sd_fusing_amlogic: sync with recent script for old tools

The script was not fully sync with recent sd_fusing script change
and it cayses old sfdisk size issue because not enough EXTEND_SZ
to align block offset in extended partition. Update the parts with
recent rpi fusing script and also remove duplicated data size
variable.

Change-Id: I5bd939f9a29093d9acaf76e2b4cae7b1c8ae2de0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoARM: meson: Temporary fix for OdroidC4 SD card reboot issue 05/248105/2
Marek Szyprowski [Fri, 20 Nov 2020 12:17:46 +0000 (13:17 +0100)]
ARM: meson: Temporary fix for OdroidC4 SD card reboot issue

For the proper reboot OdroidC4 requires to switch TFLASH_VDD_EN pin to
the input (high impedance?) mode. This should be handled by the proper
reset driver, but until then implement this logic in the common code.

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

3 years agotizen: amlogic: remove unused environment values 93/247993/1
Jaehoon Chung [Thu, 19 Nov 2020 03:28:29 +0000 (12:28 +0900)]
tizen: amlogic: remove unused environment values

Remove unused environment values.
It doesn't need to enter the flash mode with inform file.
If it needs to consider the flash mode, then we can use Amlogic's
scheme with secure monitor command.

Change-Id: Ia5374f7b2f411c3a48c0d469c837541875f0f84a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosamsung: tizen_amlogic: fix wrong defined name 92/247992/1
Jaehoon Chung [Thu, 19 Nov 2020 04:28:48 +0000 (13:28 +0900)]
samsung: tizen_amlogic: fix wrong defined name

Fix wrong defined name from KVIM3 to VIM3.
It's occurred a build error on gbs system.

Change-Id: Icff90e97d3e5b3c655ac0685780281b9ad414859
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosamsung: tizen_amlogic: increase u-boot size for raw write 53/247853/1
Jaehoon Chung [Tue, 17 Nov 2020 11:35:14 +0000 (20:35 +0900)]
samsung: tizen_amlogic: increase u-boot size for raw write

Increase u-boot size from 0x850 to 0x1000.
- From 1M to 2M.
If u-boot image is over 1064K (0x850), then it will be broken.

Change-Id: I95b8a0b074d5c4b2877b98c2e5cd4057941fda64
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotizen: amlogic: make 'dfu_alt_info' static 49/247849/2
Marek Szyprowski [Tue, 17 Nov 2020 10:16:28 +0000 (11:16 +0100)]
tizen: amlogic: make 'dfu_alt_info' static

The data layout on the storage device is the same for both eMMC and SD
card, so after switching to the default boot MMC device, the 'dfu_alt_info'
string is static, fully known during the compile time. Use this simple
approach, which is a bit more error proof for future changes. It also
obsoletes the custom code added to Amlogic boards.

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

3 years agotizen: amlogic: move trailing '\0' to the common place 48/247848/2
Marek Szyprowski [Tue, 17 Nov 2020 10:06:45 +0000 (11:06 +0100)]
tizen: amlogic: move trailing '\0' to the common place

To make the env setup a bit more error proof, move the required trailing
'\0' character for the 'boot_prefixes' entry to the common place.

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

3 years agotizen: amlogic: fix separators in env entries setup 47/247847/2
Marek Szyprowski [Tue, 17 Nov 2020 10:09:00 +0000 (11:09 +0100)]
tizen: amlogic: fix separators in env entries setup

The proper separator for environment entries is '\0' not '\n'.

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

3 years agotizen: amlogic: automatically set "dfu_device" env 46/247846/2
Marek Szyprowski [Tue, 17 Nov 2020 09:59:13 +0000 (10:59 +0100)]
tizen: amlogic: automatically set "dfu_device" env

Automatically set "dfu_device" to the current boot MMC device number. This
allows to call dfu/thor/ums commands without any parameters for the default
storage device.

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

3 years agodfu: mmc: use the default MMC device if entity specifies it as -1 45/247845/2
Marek Szyprowski [Tue, 17 Nov 2020 09:45:46 +0000 (10:45 +0100)]
dfu: mmc: use the default MMC device if entity specifies it as -1

Use the default MMC device set in the command line if entity specifies it
as -1. This allows to use the same dfu_alt_info string for different MMC
devices (like embedded eMMC and external SD card if data layout is the
same).

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

3 years agocmd: ums: add getting the default parameters from env 44/247844/1
Marek Szyprowski [Tue, 17 Nov 2020 09:56:34 +0000 (10:56 +0100)]
cmd: ums: add getting the default parameters from env

Add reading command parameters from the environment. The same environment
variables are used as for the "dfu" and "thor" commands. This allows to
specify USB controller ("dfu_usb_con"), device interface ("dfu_interface")
and device number ("dfu_device"). Such change allows to call "ums" without
any parameters for the default storage device.

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

3 years agocmd: ums: show device interface name in the information string 43/247843/1
Marek Szyprowski [Tue, 17 Nov 2020 09:51:20 +0000 (10:51 +0100)]
cmd: ums: show device interface name in the information string

Add interface name (i.e. 'mmc') in the information string to ease user
checking which device is exported via USB Mass Storage protocol.

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

3 years agocmd: dfu: fix using the default parameters from envirnoment 42/247842/1
Marek Szyprowski [Tue, 17 Nov 2020 09:49:20 +0000 (10:49 +0100)]
cmd: dfu: fix using the default parameters from envirnoment

This fixes commit 3768df292a8 ("samsung: misc_init_r: insert call to
platform_setup()") after rebase, because due to other changes, that code
was never reached.

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

3 years agotizen: sd_fusing_amlogic: wait a bit before creating filesystems 88/247688/4
Marek Szyprowski [Fri, 13 Nov 2020 10:17:44 +0000 (11:17 +0100)]
tizen: sd_fusing_amlogic: wait a bit before creating filesystems

With Ubuntu 18.04 and slow SD card I've observed that partition scan
takes too much time, so the calls to create filesystems on the created
partitions fail. Partition rescan is done asynchronously so there is no
easy way to check it. Force a 2 seconds delay before creating filesystems
to avoid this issue.

This fixes the following issue:
--->8---
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.vfat: unable to open /dev/sdb1: No such file or directory
mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

End /dev/sdb format
--->8---

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

3 years agotizen: build scripts: use cross compiler from env if provided 05/247605/5
Marek Szyprowski [Thu, 12 Nov 2020 14:17:53 +0000 (15:17 +0100)]
tizen: build scripts: use cross compiler from env if provided

If user set CROSS_COMPILE env in his shell, use it instead of the
hard-coded path ("/usr/bin/aarch64-linux-gnu-") from the scripts.

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

3 years agotizen: use compressed kernel image 04/247604/5
Marek Szyprowski [Thu, 12 Nov 2020 14:14:52 +0000 (15:14 +0100)]
tizen: use compressed kernel image

To speed-up kernel load and reduce total image size, use compressed kernel
image.

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

3 years agoboard: amlogic: add proper boot device detection for params.bin load 01/247601/5
Marek Szyprowski [Thu, 12 Nov 2020 11:49:53 +0000 (12:49 +0100)]
board: amlogic: add proper boot device detection for params.bin load

Detect eMMC/SD card boot and report proper MMC device to the environment
loading code. This requires to use an empty device part in
CONFIG_ENV_FAT_DEVICE_AND_PART to let the code update the device to the
value returned by mmc_get_env_dev() function.

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

3 years agoboard: amlogic: remove prefixes in boot scripts 37/247537/1
Jaehoon Chung [Thu, 12 Nov 2020 01:07:31 +0000 (10:07 +0900)]
board: amlogic: remove prefixes in boot scripts

Remove prefixes in boot scripts. Instead, use boot_prefixes about each
boards.
Add a debug message for checking a directory.
If there is no kernel image under odroid-c4 directory, then it will
search for kernel image under /.

Change-Id: I4ca259c31bf8b8a360d9095d5039adcdf77d5590
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosamsung: tizen_amlogic: fix directory path about thor fail 36/247436/2
Jaehoon Chung [Wed, 11 Nov 2020 02:01:29 +0000 (11:01 +0900)]
samsung: tizen_amlogic: fix directory path about thor fail

Fix directory path about thor fail.
When flash to directory, it didn't match "/" with filename.

Change-Id: I5cc65c1b8aa5741dfab5b532c070d82146444f68
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoscript: tizen: add amlogic fusning script 29/247429/2
Jaehoon Chung [Wed, 11 Nov 2020 00:53:59 +0000 (09:53 +0900)]
script: tizen: add amlogic fusning script

Add amlogic fusning script.
- VIM3, VIM3L, Odroid-N2, Odroid-C4

Change-Id: I0331840839de5f8bbbea5c4bfd188089d8f9c853
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosamsung: tizen_amlogic: add ramdisk-recovery in dfu_alt_system 28/247428/1
Jaehoon Chung [Wed, 11 Nov 2020 00:33:03 +0000 (09:33 +0900)]
samsung: tizen_amlogic: add ramdisk-recovery in dfu_alt_system

Add ramdisk-recovery image in dfu_alt_system.
Tizen is supporting ramdisk-recovery.

Change-Id: I68eb9205d9c5d2f6980d781c16b8415eb38d9a4e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoboard: amlogic: remove DFU_ALT_BOOT_SD about alt_boot 27/247427/1
Jaehoon Chung [Wed, 11 Nov 2020 00:25:48 +0000 (09:25 +0900)]
board: amlogic: remove DFU_ALT_BOOT_SD about alt_boot

It doesn't need to set to DFU_ALT_BOOT_SD.
It's only using raw write on Amlogic board. Not need to consider what
device is selected.

Change-Id: Ie444ded409f16e60e8622611bf2135b034940ecd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agommc: meson_gx_mmc: enable DDR_52MHz mode 78/247378/2
Jaehoon Chung [Tue, 10 Nov 2020 08:02:55 +0000 (17:02 +0900)]
mmc: meson_gx_mmc: enable DDR_52MHz mode

Enable DDR_52MHz mode.

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