platform/kernel/u-boot.git
5 years agorpi: tizen-boot: rpi3: pass network arguments on flash mode 60/195660/5 accepted/tizen/unified/20190104.061233 submit/tizen/20190102.053705 submit/tizen/20190102.221308 submit/tizen/20190103.040758
Dongwoo Lee [Wed, 12 Dec 2018 08:19:40 +0000 (17:19 +0900)]
rpi: tizen-boot: rpi3: 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.

Change-Id: Ifda261598978b4cc985fe43e2e612fd58c49fdd1
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agosamsung: platform_boot: increase space for kernel from 8MiB to 16MiB 35/195735/1 accepted/tizen/unified/20181220.061534 submit/tizen/20181219.021138 submit/tizen/20181219.092800
Jaehoon Chung [Mon, 17 Dec 2018 22:57:02 +0000 (07:57 +0900)]
samsung: platform_boot: increase space for kernel from 8MiB to 16MiB

This patch is based on "samsung: common: increase space for kernel from
8MiB to 16MiB".
Tizen is using platform_boot header file, not autocmd.cmd.

Change-Id: I5d245a51bf975d4a1ca51f6dbf6dba1ab8ef72fd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agosamsung: common: increase space for kernel from 8MiB to 16MiB 48/195448/1 accepted/tizen/unified/20181218.063001 submit/tizen/20181217.063902
Marek Szyprowski [Thu, 13 Dec 2018 12:53:08 +0000 (13:53 +0100)]
samsung: common: increase space for kernel from 8MiB to 16MiB

v4.14 kernel for Odroid easily exceeds 8MiB, thus loading kernel with the
default configuration corrupts previously loaded dtb. Increase ${fdtaddr}
to 0x41000000 to avoid this issue, what gives about 16MiB space for kernel.

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

5 years agopackaging: added a comment how to build with gbs for rpi3 44/192844/2 accepted/tizen/unified/20181115.063726 submit/tizen/20181114.044952
Jaehoon Chung [Mon, 12 Nov 2018 02:27:09 +0000 (11:27 +0900)]
packaging: added a comment how to build with gbs for rpi3

Added a comment how to build with gbs for rpi3.
If there is no comment for this, it's difficult to know how to make
u-boot image with gbs system.
(There is dependent on arm-trusted-firmware-rpi3 repository.)

Change-Id: Iee14253dd011c171104273d7285fff969e68e077
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agousb: Handle audio extension endpoint descriptor in usb_parse_config() 66/191966/1 submit/tizen/20181031.053034 submit/tizen/20181101.042526
Bin Meng [Mon, 18 Sep 2017 13:40:40 +0000 (06:40 -0700)]
usb: Handle audio extension endpoint descriptor in usb_parse_config()

Normal endpoint descriptor size is 7, but for audio extension it is
9. Handle that correctly when parsing endpoint descriptor.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
[jcsing.lee: cherry-pick from mainline to fix booting hanging]
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Change-Id: Icf90864b9649686dd17132af3493a5bab6c7f4e3

5 years agoscripts: sd_fusing_xu4: remove not necessary tmp variable and comment 82/190782/1
Seung-Woo Kim [Fri, 5 Oct 2018 08:14:51 +0000 (17:14 +0900)]
scripts: sd_fusing_xu4: remove not necessary tmp variable and comment

Remove not necessary tmp variable and comment.

Note: it is partial revert of the commit e560d71f0d64 ("scripts:
odroid-xu4: add ramdisk.img flashing support") to flash ramdisk.img
at the last time. Almost all of revert is done with the commit
de355221bf93 ("scripts: sd_fusing_xu4: add the ramdisk partition")
but there was remaining variable and comment.

Change-Id: I1b28fa8ab5852fefa1d83b68b498e89ddafe5660
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoscripts: sd_fusing_xu4: add the ramdisk partition 24/190324/4
Jaehoon Chung [Mon, 1 Oct 2018 04:05:49 +0000 (13:05 +0900)]
scripts: sd_fusing_xu4: add the ramdisk partition

Add the ramdisk partition as number 7.

Change-Id: Ie3a833bbe85fe27e0f751a426e09f8e4616fd09b
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoboard: samsung: exynos5-dt: modify the get_dfu_alt_system information 23/190323/4
Jaehoon Chung [Mon, 1 Oct 2018 04:00:43 +0000 (13:00 +0900)]
board: samsung: exynos5-dt: modify the get_dfu_alt_system information

If there is a partition7, set to dfu_alt_system_2.
Otherwise, just use the dfu_alt_system.
(It's relevant to thor download.)

Change-Id: I1ff7b5a6c97ad7eed2b6cd489260cfdc902c2a73
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoconfig: odroid-xu3: add dfu_alt_system information version 2 22/190322/3
Jaehoon Chung [Mon, 1 Oct 2018 03:55:57 +0000 (12:55 +0900)]
config: odroid-xu3: add dfu_alt_system information version 2

Add the dfu_alt_system information version 2.
It's used to flash a ramdisk.img at partition 7.
If there is no partition 7, it will load from mmcbootpart as mmcblk0p1.

Change-Id: I2830a950ab87e80c66e4d5dc134c12523011252e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoscripts: tizen: change modules parition size as 32MB 69/189869/1
Seung-Woo Kim [Fri, 21 Sep 2018 07:59:42 +0000 (16:59 +0900)]
scripts: tizen: change modules parition size as 32MB

Currently, odroid boot image has 20MB modules.img and exact 20MB
modules partition size causes thor flash failure because it is in
extended parition. Change modules partition size as 32MB.

Change-Id: I1c383f359acf3d415c823ff991901a55e647dfd6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agorpi: tizen-boot: rpi3/rpi3-32b: add dwc_otg option like raspbian cmdline 45/189745/1
Seung-Woo Kim [Thu, 20 Sep 2018 06:50:03 +0000 (15:50 +0900)]
rpi: tizen-boot: rpi3/rpi3-32b: add dwc_otg option like raspbian cmdline

From raspbian cmdline.txt, from kernel related otpion, there is
dwc_otg.lpm_enable=0 which is not in Tizen u-boot booting script.
Add dwc_otg option line raspbian.

Change-Id: I37a723f63bae288f9d9d3e0b88adca01398f3c22
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoconfig: rpi3: update dtb file names in dfu_alt_info 49/188949/2
Seung-Woo Kim [Wed, 12 Sep 2018 04:28:26 +0000 (13:28 +0900)]
config: rpi3: update dtb file names in dfu_alt_info

There are wrong dtb file names. Update the wrong dtb file names
and add rpi 3 b plus model dtb.

Change-Id: I61f8833c08443ad8514b6f3bd785653baf609960
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agorpi: tizen-boot: rpi3/rpi3-32b: set dt filename by its model 08/188208/1 accepted/tizen/5.0/unified/20181102.022508 accepted/tizen/unified/20180905.140109 submit/tizen/20180904.010142 submit/tizen_5.0/20181101.000005
Seung-Woo Kim [Mon, 3 Sep 2018 02:48:13 +0000 (11:48 +0900)]
rpi: tizen-boot: rpi3/rpi3-32b: set dt filename by its model

To identify rpi3 b model and rpi3 b+ model, set dt filename by
its model.

Note: Tizen uses raspbian vendor kernel, so raspbian dt name is
used instead of mainline file name set by booting.

Change-Id: I84dc4a38e5f21527912749eee28d784245123340
Reference: 7fe77226aa29 ("rpi: Add identifier for the new RPi3 B+")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agorpi3_32b: Enable lan78xx driver 07/188207/1
Peter Robinson [Fri, 16 Mar 2018 06:26:29 +0000 (06:26 +0000)]
rpi3_32b: Enable lan78xx driver

The new Raspberry Pi B 3+ has a lan78xx device attached to it. Let's add
driver support in U-Boot for it.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
[sw0312.kim: cherry-pick from mainline to support rpi3 b+]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Idd48c133374f7da8036baeeca704c39ece0b146f

5 years agorpi: Add identifier for the new RPi3 B+ 06/188206/1
Alexander Graf [Thu, 15 Mar 2018 14:05:37 +0000 (15:05 +0100)]
rpi: Add identifier for the new RPi3 B+

The Raspberr Pi Foundation released a new RPi3 version which we want
to detect as well, so we can enable ethernet on it and know the correct
device tree file name.

Add an identifier for it.

Signed-off-by: Alexander Graf <agraf@suse.de>
[sw0312.kim: cherry-pick from mainline to identify rpi3 b+]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I1c57f8bd9865366bfee5b66b5a17dcc82b022448

5 years agorpi3: Enable lan78xx driver 05/188205/1
Alexander Graf [Thu, 15 Mar 2018 14:05:36 +0000 (15:05 +0100)]
rpi3: Enable lan78xx driver

The new Raspberry Pi B 3+ has a lan78xx device attached to it. Let's add
driver support in U-Boot for it.

Signed-off-by: Alexander Graf <agraf@suse.de>
[sw0312.kim: cherry-pick from mainline to support rpi3 b+]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I4256aca6f3ad142ff43539fda9bb9ae2a83a25ee

6 years agorpi: tizen-boot: rpi2: Add boot param for support flash mode 22/178422/2
Seung-Woo Kim [Thu, 10 May 2018 04:13:00 +0000 (13:13 +0900)]
rpi: tizen-boot: rpi2: Add boot param for support flash mode

This patch adds support for flash bootmode. If boot-param.bin is
set to 'dwnl', bootmode will be set to flash to invoke flash-init.

Change-Id: I17bda3435176c992d9b457bec14f5aded804f0dc
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: rpi3-32b: Add boot param for support flash mode 21/178421/2
Seung-Woo Kim [Thu, 10 May 2018 04:13:00 +0000 (13:13 +0900)]
rpi: tizen-boot: rpi3-32b: Add boot param for support flash mode

This patch adds support for flash bootmode. If boot-param.bin is
set to 'dwnl', bootmode will be set to flash to invoke flash-init.

Change-Id: I41955d2b2dd08edd23897df4e458ca8f59eaf9a5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: Add boot parameter for support flash mode 13/175013/4
Dongwoo Lee [Thu, 5 Apr 2018 05:40:01 +0000 (14:40 +0900)]
rpi: tizen-boot: Add boot parameter for support flash mode

This patch adds support for flash bootmode. If boot-param.bin is set
to 'dwnl', bootmode will be set to flash to invoke flash-init.

Change-Id: I5fe1554c4ad431f6275c0118d25a36e1f3a8ffc4
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
6 years agogadget: f_thor: update to support more than 4GB file as thor 5.0 89/177589/5
Seung-Woo Kim [Wed, 2 May 2018 04:26:05 +0000 (13:26 +0900)]
gadget: f_thor: update to support more than 4GB file as thor 5.0

During file download, it only uses 32bit variable for file size and
it limits maximum file size less than 4GB. Update to support more
than 4GB file with using two 32bit variables for file size as thor
protocol 5.0.

Change-Id: Ifc572b6939db1693455e168e2e8fb871edac62a2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agogadget: f_thor: fix filename overflow 98/178298/4
Seung-Woo Kim [Wed, 9 May 2018 07:14:00 +0000 (16:14 +0900)]
gadget: f_thor: fix filename overflow

The thor sender can send filename without null character and it is
used without consideration of overflow. Actually, character array
for filename is assigned with DEFINE_CACHE_ALIGN_BUFFER() and it
is bigger than size of memcpy, so there was no real overflow.
Fix filename overflow for code level integrity.

Change-Id: I774e4812b743d6fd99e52feadf84488708bc652c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: rpi2: set console in cmdline as u-boot environment 83/178083/1 accepted/tizen/unified/20180510.070928 submit/tizen/20180510.044512
Seung-Woo Kim [Tue, 8 May 2018 05:41:32 +0000 (14:41 +0900)]
rpi: tizen-boot: rpi2: set console in cmdline as u-boot environment

The console in cmdline will be used by kernel as printk console
and tizen-boot script always sets console with UART device. Set
console in cmdline as u-boot environment value console and set
default uart if nothing is set.

Change-Id: I36f58c0532e0a10efb7844c14caeb21258c9b792
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: rpi3: set console in cmdline as u-boot environment 82/178082/1
Seung-Woo Kim [Tue, 8 May 2018 05:39:09 +0000 (14:39 +0900)]
rpi: tizen-boot: rpi3: set console in cmdline as u-boot environment

The console in cmdline will be used by kernel as printk console
and tizen-boot script always sets console with UART device. Set
console in cmdline as u-boot environment value console and set
default uart if nothing is set.

Change-Id: I0d2743d445de8c8cf4bd43600fbc8c28a07cd0ea
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoscript: Make the get_default_envs.sh script working with cross compile 41/176741/1
Seung-Woo Kim [Mon, 23 Apr 2018 05:09:02 +0000 (14:09 +0900)]
script: Make the get_default_envs.sh script working with cross compile

To support cross compile, partilly pick from mainline commit.

Base commit: 0778e7c50ba1 ("script: Make the get_default_envs.sh script working with newest u-boot")

Change-Id: I35d89cd30eafe83de648aec48e2698396bfaf3dc
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agosamsung: misc: fix wrong #ifdef and #endif bracket for CONFIG_LCD 40/176740/1
Seung-Woo Kim [Mon, 23 Apr 2018 05:46:07 +0000 (14:46 +0900)]
samsung: misc: fix wrong #ifdef and #endif bracket for CONFIG_LCD

There is wrong #ifdef and #endif bracket and it causes unused
variables and unused function build warning. Fix the wrong bracket
for CONFIG_LCD.

Note: When rebasing, this patch should be squashed fixed commit.

Change-Id: I4d9b695fd77ead6ab541ba37db7516eb16ea371c
Fixes: 4a6f3341d549 ("samsung: misc: new feature: common interactive charger")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agotrats2: fix unused variable warnings made from interactive charger 18/176718/1
Jaehoon Chung [Mon, 23 Apr 2018 04:25:26 +0000 (13:25 +0900)]
trats2: fix unused variable warnings made from interactive charger

There are unused variable build warnings made from interactive
charger after rebasing.

Note: When doing rebase, this patch should be squashed into fixed commit.

Change-Id: I3f21899e8c8f349c2ea3d6d341af88b05814198e
Fixes: 5bf0f4c22486 ("trats2: add support to interactive charger")
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[sw0312.kim: add missed pbat]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoconfigs: rpi_3: enable the CMD_TIME configuration 50/169950/4 accepted/tizen/unified/20180220.064200 submit/tizen/20180220.000957
Jaehoon Chung [Mon, 12 Feb 2018 06:08:18 +0000 (15:08 +0900)]
configs: rpi_3: enable the CMD_TIME configuration

To check the time, enable the CMD_TIME configuration.

Change-Id: I4be99bf8b311bf55e6ecf1d74e8d67f47bea8847
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoconfig: rpi3: enable the configurations relevant to NFSDOWN 48/169948/3
Jaehoon Chung [Mon, 12 Feb 2018 05:47:19 +0000 (14:47 +0900)]
config: rpi3: enable the configurations relevant to NFSDOWN

Enable the configurations relevant to nfsdown command for rpi3.

Change-Id: Ic050057e75f4e92b1507ca84c642ba3c798ba6fc
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agocmd: nfsdown: add the update_image_names for rpi3 49/169949/4
Jaehoon Chung [Mon, 12 Feb 2018 05:48:28 +0000 (14:48 +0900)]
cmd: nfsdown: add the update_image_names for rpi3

RPi3 has the names of different file with other exynos boards.
Add the update_image_names for rpi3.

Change-Id: I133f8eb65279629b912aab3715101b46cbf16b4d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agorpi: tizen-boot: add rpi2 script 96/167896/1
Seung-Woo Kim [Tue, 23 Jan 2018 01:34:57 +0000 (10:34 +0900)]
rpi: tizen-boot: add rpi2 script

Add rpi2 tizen-boot script.

For rpi2, serial console is different from rpi3.

Change-Id: I4548468a3c052361b389be0fb6bdee72187b5e33
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: add rpi3 32bit script 95/167895/1
Seung-Woo Kim [Tue, 23 Jan 2018 01:31:45 +0000 (10:31 +0900)]
rpi: tizen-boot: add rpi3 32bit script

Add rpi3 32bit tizen-boot script.

For 32bit, kernel dt image should be loaded to $fdt_addr instead of
$fdt_addr_r and kernel image name is zImage instead of Image. Also,
boot command should be bootz instead of booti.

Change-Id: Ia7a942837dd7a9ed398567f82aa89a81784a7591
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: Rename tizen-boot script for rpi3 94/167894/1
Seung-Woo Kim [Tue, 23 Jan 2018 01:24:23 +0000 (10:24 +0900)]
rpi: tizen-boot: Rename tizen-boot script for rpi3

The tizen-boot script is for rpi3 64bit mode. Rename the script for
rpi3 to support other rpi board family.

Change-Id: Ic05c2bf94deb9381460c0de4e4a31a31c8f615b6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: add note about kernel size limitation. 65/167065/1
Seung-Woo Kim [Mon, 15 Jan 2018 07:48:21 +0000 (16:48 +0900)]
rpi: tizen-boot: add note about kernel size limitation.

There is kernel size limitation to support ramdisk. Add note
about the size limitation.

Change-Id: I77366008ee2a3649b9d9c366c756206784c240cb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: change the kernel loading address 99/166599/2 accepted/tizen/unified/20180112.073237 submit/tizen/20180112.052251
Jaehoon Chung [Thu, 11 Jan 2018 04:54:20 +0000 (13:54 +0900)]
rpi: tizen-boot: change the kernel loading address

Tizen kernel image can be over than 16MB.
It should be overlapped with other image address.
To avoid this behavior, change to 0x02d00000 from 0x01000000.

Change-Id: I8cf142c55d6afedd1186f58181251df39d1e9cc5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoscripts: tizen: call sync before umount 92/166592/1
Seung-Woo Kim [Thu, 11 Jan 2018 03:51:51 +0000 (12:51 +0900)]
scripts: tizen: call sync before umount

After writing files on mounted directory, umount can fail with busy
state. Call sync before umount to clear the busy state instead of
sleep.

Change-Id: I7985ab3688a64b072c9a992957acdf124f925a34
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi: tizen-boot: Add earlycon option to bootargs 66/166266/2
Seung-Woo Kim [Tue, 9 Jan 2018 05:39:57 +0000 (14:39 +0900)]
rpi: tizen-boot: Add earlycon option to bootargs

Add earlycon option to show early uart message. Also, remove
unnecessary earlyprintk option in bootargs.

Change-Id: Ie0d88914b7ee5bbd2bf7a67db37b772b1a937454
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoarm: bcm283x: bcm283x-board-spl: display the SPL version 18/159018/1 accepted/tizen/unified/20171208.062143 submit/tizen/20171207.072626 submit/tizen/20171207.090727
Jaehoon Chung [Mon, 6 Nov 2017 10:41:58 +0000 (19:41 +0900)]
arm: bcm283x: bcm283x-board-spl: display the SPL version

Remove the unuseful log message.
Instead, display the SPL version for providing the build information.

Change-Id: Ibe877ec03fb73a5c0027c3db579344d839d19acc
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agospl: serial_bcm283x: remove unnecessary gpio setting 46/158846/1 accepted/tizen/4.0/unified/20171106.162923 accepted/tizen/unified/20171106.162858 submit/tizen/20171106.082505 submit/tizen_4.0/20171106.082447 tizen_4.0.IoT.p2_release
Seung-Woo Kim [Fri, 3 Nov 2017 09:33:39 +0000 (18:33 +0900)]
spl: serial_bcm283x: remove unnecessary gpio setting

The config.txt has enable_uart=1 option, so bootcode.bin will set
register to enable uart, so spl of rpi3 does not need to set uart
register. Remove the unnecessary setting to remove garbage in uart
rx.

This fixes unexpected hang-up on u-boot prompt without connection
uart to serial console.

Change-Id: I813b4304e434c0f3d51d06078b38d09adb7b993d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoRevert "spl: serial_bcm283x: set GPIO before enabling uart to remove rx" 15/158615/1 accepted/tizen/4.0/unified/20171102.140322 accepted/tizen/unified/20171103.162237 submit/tizen/20171102.071401 submit/tizen_4.0/20171102.071416
Seung-Woo Kim [Thu, 2 Nov 2017 07:08:18 +0000 (16:08 +0900)]
Revert "spl: serial_bcm283x: set GPIO before enabling uart to remove rx"

This reverts commit d1dac2248ae24ba833069679734f966f0e481b5a.

The commit fixes hang on u-boot console with serial connection, but
it blocks all serial rx communication, so it is not possible to send
any command via uart. So reverting it and the original issue will be
handled later.

Change-Id: I216375c8bbfcbd47b960182bfcd79d452d32e1f8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agospl: serial_bcm283x: set GPIO before enabling uart to remove rx 51/158251/3 accepted/tizen/4.0/unified/20171101.064818 accepted/tizen/unified/20171031.055649 submit/tizen/20171031.014243 submit/tizen_4.0/20171101.031710
r.tyminski [Mon, 30 Oct 2017 11:56:18 +0000 (12:56 +0100)]
spl: serial_bcm283x: set GPIO before enabling uart to remove rx

There was some garbage on uart input during boot, so if uart wasn't
connected, we end up in u-boot command line.
Set GPIO before enabling uart to remove uart Rx setup and this makes
SPL use only Tx.

Note: Chip documentation warns that order of commands is important.

Change-Id: I896d8b719c7b9170ad481767f8b27835d81f4af1
Signed-off-by: Rafal Tyminski <r.tyminski@partner.samsung.com>
[sw0312.kim: adjust commit-msg]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoconfigs: odroid_xu3: add missing CONFIG_MMC_DEFAULT_DEV 67/156167/1 accepted/tizen/4.0/unified/20171018.231720 accepted/tizen/unified/20171018.165213 submit/tizen/20171018.024341 submit/tizen_4.0/20171018.024233 submit/tizen_4.0/20171018.060355 tizen_4.0.m2_release
Seung-Woo Kim [Tue, 17 Oct 2017 10:12:15 +0000 (19:12 +0900)]
configs: odroid_xu3: add missing CONFIG_MMC_DEFAULT_DEV

For dfu/thordown command, default mmc device number should be set
as CONFIG_MMC_DEFAULT_DEV. Add the missing CONFIG_MMC_DEFAULT_DEV.

Note: before this patch, CONFIG_MMC_DEFAULT_DEV string itself is
used for parsing mmc device number and anyway it was parsed as 0.

Change-Id: I233c59f810acf37ace57abed99f30c1897595d2b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoconfigs: odroid-xu3: remove bootstage support 99/153899/2
Marek Szyprowski [Fri, 29 Sep 2017 11:49:31 +0000 (13:49 +0200)]
configs: odroid-xu3: remove bootstage support

Bootstage slows down boot and sometimes shows message "bootstage: Failed
to add to device tree", which confuses users.

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

6 years agoARM: Samsung: Add Exynos5422 Odroid HC1 support 98/153898/2
Marek Szyprowski [Fri, 29 Sep 2017 09:41:51 +0000 (11:41 +0200)]
ARM: Samsung: Add Exynos5422 Odroid HC1 support

Odroid HC1 board is based on Odroid XU4 board, but it has no HDMI,
no eMMC, no build-in USB3.0 hub, no extension port pins, and no GPIO
button. USB3.0 ports are used for build-in JMicron USB to SATA bridge
and Gigabit R8152 ethernet chips. HC1 uses only passive cooling.

This patch also updates Odroid's ADCmax array and reduces ADC tolerance
to 1% to ensure that XU4 and HC1 revisions are properly detected.

I've tested this with XU3, XU3-lite, XU4 and HC1 boards. In case of my test
boards I got following values from ADC register: 372, 370, 1281 and 1313.

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

6 years agorpi: support flashing an image of the INFORM partition 33/155833/1 accepted/tizen/4.0/unified/20171017.212505 accepted/tizen/unified/20171017.071154 submit/tizen/20171017.031118 submit/tizen_4.0/20171017.030930
Łukasz Stelmach [Mon, 16 Oct 2017 08:43:12 +0000 (10:43 +0200)]
rpi: support flashing an image of the INFORM partition

Change-Id: I3a48b84454eccc1b5382f47930d40fd55f67ac6d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 years agorpi: Read the value of RSTS register 54/154554/5
Łukasz Stelmach [Tue, 10 Oct 2017 11:11:54 +0000 (13:11 +0200)]
rpi: Read the value of RSTS register

RSTS register allows passing information from OS too bootloader upon
reboot.

Change-Id: I2fa04fa0e63e5c81f78901c06ca8884f7e89f8e8
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 years agorpi: tizen-boot: enable runtime customisation of bootargs with ${opts} 16/151616/4 accepted/tizen/4.0/unified/20170927.181939 accepted/tizen/unified/20170927.181409 submit/tizen/20170927.093519 submit/tizen_4.0/20170927.093628 tizen_4.0.IoT.p1_release
Łukasz Stelmach [Thu, 21 Sep 2017 08:20:38 +0000 (10:20 +0200)]
rpi: tizen-boot: enable runtime customisation of bootargs with ${opts}

Facilitate development of kernel and low level system components, by
making it easier for developers to add kernel command line arguments
via the ${opts} u-boot environment variable.

Change-Id: I4883cc5d29e4edaaa9ed17a3801808672ad66661
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 years agorpi: tizen-boot: remove the ramdiskdev variable 96/151996/1
Jaehoon Chung [Fri, 22 Sep 2017 15:48:47 +0000 (00:48 +0900)]
rpi: tizen-boot: remove the ramdiskdev variable

'ramdiskdev' can be replaced to 'mmcrootdev'.
It should be used the same device.

Change-Id: I9951f955e591a9761fba537b282fa4748d5dc2f5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agorpi: tizen-boot: modify the parameter check logic 35/150635/3 accepted/tizen/4.0/unified/20170925.071737 accepted/tizen/unified/20170925.071203 submit/tizen/20170922.071838 submit/tizen_4.0/20170922.072114
Junghoon Kim [Thu, 14 Sep 2017 11:57:24 +0000 (20:57 +0900)]
rpi: tizen-boot: modify the parameter check logic

Modify the parameter check logic to support all cases of reboot commands
including "reboot", "reboot fota", "reboot recovery", and undefined reboot
parameter.

Change-Id: I00c7cec03bdd8d9364bda3e8c7142a76ed9b4bd9
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agospl: spl_mmc: add __maybe_unused to mmc_load_image_raw_sector() 91/150891/1
Seung-Woo Kim [Tue, 19 Sep 2017 04:13:54 +0000 (13:13 +0900)]
spl: spl_mmc: add __maybe_unused to mmc_load_image_raw_sector()

If there are no CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION,
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR and CONFIG_SPL_OS_BOOT,
there is unused-function build warning. Add __maybe_unused macro
to remove the warning.

Change-Id: I4c8c8c22c949754a15cd951b5de61896ab341e32
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agopackaging: add spl-atf and u-boot raw files 87/149487/5
egukim [Tue, 12 Sep 2017 08:33:00 +0000 (17:33 +0900)]
packaging: add spl-atf and u-boot raw files

Add spl-atf file, u-boot-spl.bin and u-boot raw files including
fit_spl_atf.its, u-boot-nodtb.bin, and bcm2873-rpi-3-b.dtb.

To make fit style image from fit_spl_atf.its, it should run mkimage
with proper optee.bin.
In Tizen RPI 3 image case, this will be done from mic kickstarter.

Change-Id: Ie0ec56b211c198af57da10b971a90ffb2acb9c52
Signed-off-by: egukim <egukim@dignsys.com>
6 years agorpi3: enable spl-atf build config 72/147372/10
egukim [Mon, 4 Sep 2017 05:41:02 +0000 (14:41 +0900)]
rpi3: enable spl-atf build config

Enable build of spl loading atf and u-boot for raspberry pi 3.

The spl will load u-boot and atf optee image from u-boot.img as
defined CONFIG_SPL_FS_LOAD_PAYLOAD_NAME in header.

Change-Id: I482737666a0d7f446699feefda37f9b467955f4d
Signed-off-by: egukim <egukim@dignsys.com>
6 years agoARM: bcm283x: apply SUPPORT_SPL 78/147378/10
egukim [Mon, 4 Sep 2017 06:37:09 +0000 (15:37 +0900)]
ARM: bcm283x: apply SUPPORT_SPL

apply SUPPORT_SPL to support spl loading atf on raspberry pi 3
with bcm2835.

Change-Id: I200a2a7673db5eceaf94abb4c68377a1912e00cb
Signed-off-by: egukim <egukim@dignsys.com>
6 years agospl: implement spl-atf on raspberry 3 b 71/147371/10
egukim [Mon, 4 Sep 2017 05:25:30 +0000 (14:25 +0900)]
spl: implement spl-atf on raspberry 3 b

add implementation of spl-atf on raspberry 3 b board to support
atf optee secure world.

To execute u-boot-spl.bin, it should append built binary from
head.S to u-boot-spl.bin as binary header.

Change-Id: I74883a9e7d7476f9f814660b74a5e68d953aff1b
Signed-off-by: egukim <egukim@dignsys.com>
6 years agousb: dwc2: Align size of invalidating dcache before starting DMA 74/150274/1 accepted/tizen/4.0/unified/20170915.201918 accepted/tizen/unified/20170915.195826 submit/tizen/20170915.052049 submit/tizen_4.0/20170915.051857
Seung-Woo Kim [Mon, 31 Jul 2017 09:08:10 +0000 (18:08 +0900)]
usb: dwc2: Align size of invalidating dcache before starting DMA

During using dwc2 usb gadget, if usb message size is too small,
following cache misaligned warning is shown:

   CACHE: Misaligned operation at range [bfdbcb00bfdbcb04]

Align size of invalidating dcache before starting DMA to remove the
warning.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[sw0312.kim: cherry-pick form mainline u-boot to fix runtime cache misaligned warning of thor usb gadget on odroid-u3]

Change-Id: I540394b380200a58fd84a426a2d31b64ef1ba542

6 years agoSPL: FIT: allow loading multiple images 70/147370/7
Andre Przywara [Wed, 26 Apr 2017 00:32:37 +0000 (01:32 +0100)]
SPL: FIT: allow loading multiple images

So far we were not using the FIT image format to its full potential:
The SPL FIT loader was just loading the first image from the /images
node plus one of the listed DTBs.
Now with the refactored loader code it's easy to load an arbitrary
number of images in addition to the two mentioned above.
As described in the FIT image source file format description, iterate
over all images listed at the "loadables" property in the configuration
node and load every image at its desired location.
This allows to load any kind of images:
- firmware images to execute before U-Boot proper (for instance
  ARM Trusted Firmware (ATF))
- firmware images for management processors (SCP, arisc, ...)
- firmware images for devices like WiFi controllers
- bit files for FPGAs
- additional configuration data
- kernels and/or ramdisks
The actual usage of this feature would be platform and/or board specific.

Also update the FIT documentation to mention the new SPL feature and
provide an example .its file to demonstrate its features.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lokesh Vutla <lokeshvuta@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
[egukim: cherry-pick from mainline to support ATF]
Signed-off-by: egukim <egukim@dignsys.com>
Change-Id: Iae2fd401234c1bebdc9a650dc77ecb065c70547d

6 years agoSPL: FIT: factor out spl_load_fit_image() 90/147690/3
Andre Przywara [Wed, 26 Apr 2017 00:32:36 +0000 (01:32 +0100)]
SPL: FIT: factor out spl_load_fit_image()

At the moment we load two images from a FIT image: the actual U-Boot
image and the .dtb file. Both times we have very similar code, that deals
with alignment requirements the media we load from imposes upon us.
Factor out this code into a new function, which we just call twice.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
[egukim: cherry-pick from mainline to support ATF]
Signed-off-by: egukim <egukim@dignsys.com>
Change-Id: I5db03011b8bd06edcc95a7d8ff9871d9e38ef7e2

6 years agoSPL: FIT: improve error handling 89/147689/3
Andre Przywara [Wed, 26 Apr 2017 00:32:35 +0000 (01:32 +0100)]
SPL: FIT: improve error handling

At the moment we ignore any errors due to missing FIT properties,
instead go ahead and calculate our addresses with the -1 return value.
Fix this and bail out if any of the mandatory properties are missing.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
[egukim: cherry-pick from mainline to support ATF]
Signed-off-by: egukim <egukim@dignsys.com>
Change-Id: I096e7d2fb9da3342994c21a9d341caa4ded2adb1

6 years agoSPL: FIT: rework U-Boot image loading 88/147688/3
Andre Przywara [Wed, 26 Apr 2017 00:32:34 +0000 (01:32 +0100)]
SPL: FIT: rework U-Boot image loading

Currently the SPL FIT loader always looks only for the first image in
the /images node a FIT tree, which it loads and later executes.

Generalize this by looking for a "firmware" property in the matched
configuration subnode, or, if that does not exist, for the first string
in the "loadables" property. Then using the string in that property,
load the image of that name from the /images node.
This still loads only one image at the moment, but refactors the code to
allow extending this in a following patch.
To simplify later re-usage, we also generalize the spl_fit_select_index()
function to not return the image location, but just the node offset.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lokesh Vutla <lokeshvuta@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
[egukim: cherry-pick from mainline to support ATF]
Signed-off-by: egukim <egukim@dignsys.com>
Change-Id: I95c4abf492e1c57b91ce18f66b6568ebb7769bb7

6 years agoSPL: FIT: refactor FDT loading 87/147687/2
Andre Przywara [Wed, 26 Apr 2017 00:32:33 +0000 (01:32 +0100)]
SPL: FIT: refactor FDT loading

Currently the SPL FIT loader uses the spl_fit_select_fdt() function to
find the offset to the right DTB within the FIT image.
For this it iterates over all subnodes of the /configuration node in
the FIT tree and compares all "description" strings therein using a
board specific matching function.
If that finds a match, it uses the string in the "fdt" property of that
subnode to locate the matching subnode in the /images node, which points
to the DTB data.
Now this works very well, but is quite specific to cover this particular
use case. To open up the door for a more generic usage, let's split this
function into:
1) a function that just returns the node offset for the matching
   configuration node (spl_fit_find_config_node())
2) a function that returns the image data any given property in a given
   configuration node points to, additionally using a given index into
   a possbile list of strings (spl_fit_select_index())
This allows us to replace the specific function above by asking for the
image the _first string of the "fdt" property_ in the matching
configuration subnode points to.

This patch introduces no functional changes, it just refactors the code
to allow reusing it later.

(diff is overly clever here and produces a hard-to-read patch, so I
recommend to throw a look at the result instead).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lokesh Vutla <lokeshvuta@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
[egukim: cherry-pick from mainline to support ATF]
Signed-off-by: egukim <egukim@dignsys.com>
Change-Id: I58b26e4090ce22dc2fe0a2e431f10d74dbc8ee7a

6 years agospl: add support to booting with ATF 69/147369/4
Kever Yang [Fri, 5 May 2017 03:47:45 +0000 (11:47 +0800)]
spl: add support to booting with ATF

ATF(ARM Trusted Firmware) is used by ARM arch64 SoCs, find more infomation
about ATF at: https://github.com/ARM-software/arm-trusted-firmware

SPL is considered as BL2 in ATF terminology, it needs to load other parts
of ATF binary like BL31, BL32, SCP-BL30, and BL33(U-Boot). And needs to
prepare the parameter for BL31 which including entry and image information
for all other images. Then the SPL handle PC to BL31 with the parameter,
the BL31 will do the rest of work and at last get into U-Boot(BL33).

This patch needs work with patches from Andre for SPL support multi
binary in FIT.

The entry point of bl31 and bl33 are still using hard code because we
still can not get them from the FIT image information.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
[egukim: Cherry-pick the commit bcc1726a7bdd to support ATF]
Signed-off-by: egukim <egukim@gmail.com>
Signed-off-by: egukim <egukim@dignsys.com>
Change-Id: I0a79558fb2759d6576a3dfdd7a7f99e37f424f07

6 years agorpi3: tizen-boot: Add the ethernet macaddr 50/146750/1 accepted/tizen/4.0/unified/20170830.134209 accepted/tizen/unified/20170830.161405 submit/tizen/20170830.084925 submit/tizen_4.0/20170830.085228
Jaehoon Chung [Wed, 30 Aug 2017 08:39:04 +0000 (17:39 +0900)]
rpi3: tizen-boot: Add the ethernet macaddr

Add the smsc95xx.macaddr for using the unique  macaddr.

Change-Id: I5d74c2d44372ca19d4776c3dd12504f888500748
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agorpi3: tizen-boot: remove duplicated kernel image loading 07/145707/1
Seung-Woo Kim [Wed, 23 Aug 2017 09:22:22 +0000 (18:22 +0900)]
rpi3: tizen-boot: remove duplicated kernel image loading

There are unnecessary duplicated kernel image loading steps in
tizen-boot script. Remove the duplicated loading.

Change-Id: I9f6b98f870dcfb5503513e3ca481335531fc0b96
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorpi3: tizen-boot: Disable to display the log from HDMI 53/143853/2
Jaehoon Chung [Fri, 11 Aug 2017 13:23:16 +0000 (22:23 +0900)]
rpi3: tizen-boot: Disable to display the log from HDMI

"console=tty1" is provided that displayed the log from HDMI.
After finishing the kernel booting, it should not be displayed from HDMI.
(when applied this patch.)
There is no requirement about using HDMI serial log.

Disable the log from HDMI.

Change-Id: I7c6576ba15f6a183ab8c82ca5b2114f9cc1e604c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agorpi: tizen-boot: add the 'ramdisksize' as 12MB for ramdisk-recovery 84/142984/2 submit/tizen/20170808.230223
Jaehoon Chung [Tue, 8 Aug 2017 06:14:03 +0000 (15:14 +0900)]
rpi: tizen-boot: add the 'ramdisksize' as 12MB for ramdisk-recovery

Size of Ramdisk-recovery is 12MB.
It needs to load the 12MB, not 8MB.

Add the 'ramdisksize' as 12MB for ramdisk-recovery.

Change-Id: Idc9111a5b0d7ef150376ee241d39129e114ce368
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoconfigs: tizen: enable the CONFIG_NET_RANDOM_ETHADDR 47/142747/2
Jaehoon Chung [Mon, 7 Aug 2017 07:22:50 +0000 (16:22 +0900)]
configs: tizen: enable the CONFIG_NET_RANDOM_ETHADDR

To use the random macaddr, enable the CONFIG_NET_RANDOM_ETHADDR in
tizeh.h.
In future, it needs to move into configs/tizen_defconfig.

Change-Id: I47ef585a78b06f0ac334fc52e4400140392231cc
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agocmd: usbdown: fix build error without CONFIG_SET_DFU_ALT_INFO 98/142298/4
Seung-Woo Kim [Thu, 3 Aug 2017 09:38:13 +0000 (18:38 +0900)]
cmd: usbdown: fix build error without CONFIG_SET_DFU_ALT_INFO

If CONFIG_SET_DFU_ALT_INFO is not set, there is build error. Fix
the build error with moving dfu related variables and macros to
inside of the config defined area.

Change-Id: Ife977d8cc4da8e3d84a53c8e9cb27280e80d1464
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agotizen: enable nfsdown command support 62/142062/3
Seung-Woo Kim [Wed, 2 Aug 2017 10:26:56 +0000 (19:26 +0900)]
tizen: enable nfsdown command support

Enable nfsdown command support for odroid-u3.

Change-Id: I395ee791ed4da7ed75f84d4357949641622f2148
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agotizen: enable usb host ethernet support 61/142061/3
Seung-Woo Kim [Wed, 2 Aug 2017 10:21:46 +0000 (19:21 +0900)]
tizen: enable usb host ethernet support

Enable usb host ethernet support from tizen config for odroid-u3.

NOTE: to use ethernet card on odroid-u3, it is required to set
usbethaddr on u-boot env.

Change-Id: Ic92f74b45c291ba61efd6630450f050ed3a6909c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agotizen: add default dfu macro for nfsdown 60/142060/2
Seung-Woo Kim [Wed, 2 Aug 2017 10:13:41 +0000 (19:13 +0900)]
tizen: add default dfu macro for nfsdown

The nfsdown without CONFIG_DFU_ALT_SYSTEM causes build error.
Add default dfu macro, CONFIG_DFU_ALT_SYSTEM to tizen.h to support
nfsdown on odroid-u3 family boards.

Change-Id: I716b9235f1b40f4d3b0b19a75ccf67e73375acea
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocmd: nfsdown: add image file name as optional argument 59/142059/2
Seung-Woo Kim [Wed, 2 Aug 2017 10:09:53 +0000 (19:09 +0900)]
cmd: nfsdown: add image file name as optional argument

The nfsdown command takes too much time because it tries to get
all possible image files. Add image file name as optional argument.
With the optional argument, nfsdown command will get only the file
and it reduces time consumption for case of flashing one file.

Change-Id: If2995d128c219d100074153ba00be3f4dc5ee1e6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocmd: nfsdown: fix memory corruption with global memory free 58/142058/2
Seung-Woo Kim [Wed, 2 Aug 2017 10:04:23 +0000 (19:04 +0900)]
cmd: nfsdown: fix memory corruption with global memory free

Calling free() for result of getenv() causes memory corruption
because getenv() returns global memory area. Fix the corruption
with copying result of getenv() because parsing it with strtok()
changes the string.

Change-Id: I21374e7d622b603de9f8d3d036561d00b1e26c23
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocmd: nfsdown: update usage description 57/142057/2
Seung-Woo Kim [Wed, 2 Aug 2017 09:34:08 +0000 (18:34 +0900)]
cmd: nfsdown: update usage description

The nfsdown has optional argument part for server ip address  and
precondition to use nfs command but it is not described from command
usage. Update nfsdown usage description with required steps and
optional argument part.

Change-Id: I16e941ef386e1301f4e1581956e1b0b06dc33246
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoscripts: sd_fusing_rpi3: add the sleep before umounting 70/142270/1
Jaehoon Chung [Thu, 3 Aug 2017 07:47:23 +0000 (16:47 +0900)]
scripts: sd_fusing_rpi3: add the sleep before umounting

When umounting "mnt_tmp", it's appeared "device is busy".
To ensure the unmounting, add the "sleep 1" before unmounting.

Change-Id: Ibab0700f7ef112591576b53c5706b8f850821742
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agorpi: tizen-boot: check reboot parameter to determine booting mode 37/140637/5 accepted/tizen/4.0/unified/20170816.013213 accepted/tizen/4.0/unified/20170829.015917 accepted/tizen/unified/20170801.055005 submit/tizen/20170731.104109 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100004
Junghoon Kim [Tue, 25 Jul 2017 06:36:18 +0000 (15:36 +0900)]
rpi: tizen-boot: check reboot parameter to determine booting mode

The "reboot-param.bin" file is used for passing reboot parameter. For
example, the word "upgr" means that target should be booted with upgrade
mode.

Check the contents of "reboot-param.bin" file to determine booting mode.

Change-Id: I62a6598f84c677c251df3559da9dd58a545e859c
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agoscripts: sd_fusing_rpi3.sh: add inform partition support 90/140690/3
Junghoon Kim [Wed, 26 Jul 2017 05:22:33 +0000 (14:22 +0900)]
scripts: sd_fusing_rpi3.sh: add inform partition support

To implement Tizen upgrade solution, reboot parameter should be
delivered into u-boot so that u-boot can jump to proper partition. But,
new SoC on RPI3 does not support any specific registers (e.g., INFORM
register of Exynos) to store reboot parameter upon SW reset.

Add inform partition and make "reboot-param.bin" file for passing reboot
parameter.

Change-Id: Ic98df1b4ad4aeab9152d3ad5007b97a0e20d8be7
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agotizen: add default dfu macros 64/140664/3 accepted/tizen/unified/20170728.195902 submit/tizen/20170728.011806
Seung-Woo Kim [Wed, 26 Jul 2017 02:18:55 +0000 (11:18 +0900)]
tizen: add default dfu macros

There is CONFIG_SET_DFU_ALT_INFO, but CONFIG_DFU_ALT_BOOT_EMMC is not
set, and it causes build error for usbdown and nfsdown commands.
Add default dfu macros, CONFIG_DFU_ALT_BOOT_EMMC and
CONFIG_DFU_ALT_BOOT_SD to tizen.h which is used odroid-u3 family and
trats2 boards.
The usbdown and nfsdown commands are only possible on odroid-u3
family boards, so default dfu macros are set as odroid dfu macro.

Change-Id: Ic6ea1549492a073b6434e20f7ffcf329475f6670
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoexynos4-dt: fix build error caused by rebase 55/140655/4
Seung-Woo Kim [Wed, 26 Jul 2017 01:53:06 +0000 (10:53 +0900)]
exynos4-dt: fix build error caused by rebase

There are build errors, caused by rebase, with not defiend macro and
not matched function definition with specific config options.
Replace with proper macro and add proper build macro check for pmic
fuinctions to fix the build errors.

Change-Id: Id5e2cf5b87681af22cc362c67262545457130280
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocmd: usbdown: use full path of loaded file for writing fat part 57/140457/6
Seung-Woo Kim [Tue, 25 Jul 2017 05:29:47 +0000 (14:29 +0900)]
cmd: usbdown: use full path of loaded file for writing fat part

The update command to FAT partition has wrong file load command
with file name without path which causes reading failure always.
Use full path of loaded file instead of file name for the case
of writing fat partition.

Change-Id: Iee12f440bd4539c5c7a2ec8d197f067ce1fe34d3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocmd: usbdown: handle error of file load command during update 35/140735/2
Seung-Woo Kim [Tue, 25 Jul 2017 05:20:23 +0000 (14:20 +0900)]
cmd: usbdown: handle error of file load command during update

The error of file load command from usb storage during update command
is not handled, so wrong data is stored in the file for the case.
Handle error of file load command during update not to store
bad file.

Change-Id: I4c7338eaea538e656ef52ce8c7214f71d0089b4a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocmd: usbdown: remove memory leak on usbdown_get_alt() 07/140507/5
Seung-Woo Kim [Tue, 25 Jul 2017 06:30:02 +0000 (15:30 +0900)]
cmd: usbdown: remove memory leak on usbdown_get_alt()

The string name_bkp is duplicated but never deallocated and it
causes memory leak. Remove the memory leak on usb_don_get_alt()
with adding goto label 'out' which calls free.

Change-Id: Iae5a111c3ca4e6e81526374daa06e8be1f6de252
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocmd: usbdown: remove overflow possiblity on fill_entity_usbdown() 72/140872/1
Seung-Woo Kim [Thu, 27 Jul 2017 03:13:22 +0000 (12:13 +0900)]
cmd: usbdown: remove overflow possiblity on fill_entity_usbdown()

The file name parsed from dfu_alo_info can be longer than NAME_SIZE,
so strcpy function has possiblity of overflow.
Remove the possible overflow using strncpy with less length than
NAME_SIZE.

Change-Id: Ib70f539a810e553136421c7faa576144811c3112
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoscripts: sd_fusing_rpi3.sh: fix typo in ramdisk-recovery partition 89/140689/1
Junghoon Kim [Wed, 26 Jul 2017 05:18:49 +0000 (14:18 +0900)]
scripts: sd_fusing_rpi3.sh: fix typo in ramdisk-recovery partition

Fix typo in ramdisk-recovery partition description.

Change-Id: Iaecd73bd2443ed30484159d69f9b90e44ea8966b
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agoscripts: tizen: move the fusing scripts to tizen directory 78/140378/2
Jaehoon Chung [Tue, 25 Jul 2017 02:02:04 +0000 (11:02 +0900)]
scripts: tizen: move the fusing scripts to tizen directory

Move the tizen specific scripts to tizen directory.

Change-Id: I50f004ac078cd7f610e78d668acc94f2aa6b5e0e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoscripts: rpi3: add the fusing script for rpi3 77/140377/2
Jaehoon Chung [Tue, 25 Jul 2017 01:59:18 +0000 (10:59 +0900)]
scripts: rpi3: add the fusing script for rpi3

Add the fusing script for rpi3.
Move from kernel git repository to u-boot repository.

Change-Id: I12d83aa9f5347fb07b4e4bd04471fa800cea9e8d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agocmd: usbdown: add ramdisk.img file 64/139464/2
Seung-Woo Kim [Wed, 19 Jul 2017 05:03:57 +0000 (14:03 +0900)]
cmd: usbdown: add ramdisk.img file

For Tizen 4.0, new ramdisk.img file is added but usbdown command
does not support the file. So add ramdisk.img into usbdown file
list.

Change-Id: Ib3d4a17e34ca9c1089923c80c448fc929e8d437c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoscripts: odroid-xu4: add ramdisk.img flashing support 57/138057/6
Junghoon Kim [Tue, 11 Jul 2017 02:14:26 +0000 (11:14 +0900)]
scripts: odroid-xu4: add ramdisk.img flashing support

In Tizen 4.0, "ramdisk.img" is added in the platform snapshots.

For that reason, this patch supports "ramdisk.img" flashing so that
u-boot can be jumped to initrd instead of rootfs.

Change-Id: Id80d62c9b53190812d5b5dc699729459515b68a1
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agoscripts: odroid-xu4: remove non-necessary FUSE struct 56/138056/3
Junghoon Kim [Tue, 11 Jul 2017 02:06:05 +0000 (11:06 +0900)]
scripts: odroid-xu4: remove non-necessary FUSE struct

This patch removes non-necessary fusing header struct and also aligns the xu4
downloader with xu3.

Change-Id: If434cece21d38854aa7906e1b85c8d2215a3756b
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agoscripts: odroid-xu4: support new version of sfdisk 03/137903/4
Junghoon Kim [Tue, 11 Jul 2017 00:58:24 +0000 (09:58 +0900)]
scripts: odroid-xu4: support new version of sfdisk

In 2.26.0 and later versions of sfdisk, the input data needs to contain
multipliers (MiB) instead of "--unit" option.

For this, This patch fixes sfdisk command to support all versions.

Change-Id: I08e0e02c528d281dafc1a474a839cd4e3baf66e4
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agoscripts: odroid-xu4: add microSD fusing script 02/137702/3
Junghoon Kim [Fri, 7 Jul 2017 06:42:59 +0000 (15:42 +0900)]
scripts: odroid-xu4: add microSD fusing script

This script allows us to make partition for Tizen 3.0 and also to flash Tizen
boot/platform images.

Change-Id: Id09c61be993155818b799dca325e1a0996bfcbc4
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
6 years agoconfigs: odroid-xu3: remove the CONFIG_I2C_COMPAT 47/138147/1
Jaehoon Chung [Tue, 30 May 2017 06:07:29 +0000 (15:07 +0900)]
configs: odroid-xu3: remove the CONFIG_I2C_COMPAT

Remove the CONFIG_I2C_COMPAT, instead enable the CONFIG_SYS_I2C_S3C24X0.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
[Cherry-pick from mainline to remove warning message after building]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id57a2672d240e2f442ceba02e3262bcaf31e693a

6 years agorpi: tizen-boot: check whether there is an init file in sbin directory 35/137435/1 accepted/tizen/unified/20170711.180428 submit/tizen/20170707.021344
Jaehoon Chung [Thu, 6 Jul 2017 02:13:20 +0000 (11:13 +0900)]
rpi: tizen-boot: check whether there is an init file in sbin directory

Check the "init" file in sbin directory.
If there is the "init" file, it should be ramdisk image.

Change-Id: Ic827f42c783668832f7d9201132fee0185d953c5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agorpi: tizen-boot: support the booting without ramdisk image 03/136203/2 accepted/tizen/unified/20170705.162346 submit/tizen/20170705.011711 submit/tizen/20170705.015412
Jaehoon Chung [Wed, 28 Jun 2017 11:46:00 +0000 (20:46 +0900)]
rpi: tizen-boot: support the booting without ramdisk image

If there is not ramdisk image, target can't be booted.
This modification is supported that target can be booted anyway.

NOTE: Assume that ramdisk partition has "sbin".
If want to mount the MMC device, you have to clear the ramdisk
partition.

Change-Id: Ibae4fd7216d0aa7ca11e92842c099dfc5212b714
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoRevert "packaging: u-boot: build only u-boot-tools for arm64" 97/134797/1 submit/tizen/20170704.013951
Seung-Woo Kim [Tue, 20 Jun 2017 05:09:36 +0000 (14:09 +0900)]
Revert "packaging: u-boot: build only u-boot-tools for arm64"

This reverts commit c5bc33d34714a936013cdfedf30800e9d4d4a890.

Now, u-boot tools for arm64 is built from u-boot-rpi3.spec, so it
is not required to build from this spec file.

Change-Id: Ic5d6f9caef8ec31cbce88bbb79e6e4305d9896e3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoTurn off ASan build 72/132172/3 accepted/tizen/unified/20170609.054127 submit/tizen/20170607.041547
Gonzha Dmitriy Evgenevich [Wed, 31 May 2017 18:33:59 +0000 (21:33 +0300)]
Turn off ASan build

Turn off ASan in case of ASan build for u-boot, u-boot-xu3
and u-boot-rpi3 packages

Change-Id: I1a3714f47eb14da53fac8a14e179d90ffa416b7f

6 years agocmd: nfsdown: support FAT type image 97/131097/2 accepted/tizen/unified/20170602.154735 submit/tizen/20170602.011955
Jiho Chu [Thu, 25 May 2017 10:36:06 +0000 (19:36 +0900)]
cmd: nfsdown: support FAT type image

Add function to support FAT type image update, especially
for ramdisk.img. It will download image from nfs server,
and update using fatwrite command.

Change-Id: I8d65a266137f1e6b15899662bb907998ae084879
Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
7 years agopackaging: add the u-boot-rpi3 spec file 12/126112/2 accepted/tizen/unified/20170531.082339 submit/tizen/20170522.064308
Jaehoon Chung [Thu, 20 Apr 2017 03:42:46 +0000 (12:42 +0900)]
packaging: add the u-boot-rpi3 spec file

To build the u-boot for rpi3, add the u-boot-rpi3 spec file.
This spec file should be built to arm64 processor.

Change-Id: I0088cf6a58169e84034a321fdf0ee99904bce997
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoscript: add the boot_script for rpi3 12/125212/3
Jaehoon Chung [Mon, 27 Mar 2017 09:36:16 +0000 (18:36 +0900)]
script: add the boot_script for rpi3

Add the boot_script for rpi3.
It will load this boot script from ditro_bootcmd.
Usage:
$./tools/mkimage -A arm64 -T script -C none -n "Tizen RPI3 u-boot helper"
-d ./board/raspberrypi/rpi/tizen-boot.scr ./boot.scr.uimg

Change-Id: Ia468ee8ce4368c3776b8b9b48fb0d91c1d01db08
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoTPL: TM2: config: fix to use large memory for kernel decompression 66/125166/1
Seung-Woo Kim [Fri, 14 Apr 2017 04:43:52 +0000 (13:43 +0900)]
TPL: TM2: config: fix to use large memory for kernel decompression

TM2 kernel with KASAN and UBSAN is larger than 48MB, so this patch
fixes memory for kernel decompression to 130MB.

Change-Id: Ib8e52b15164a2dd83c42f47a76a3c5c3bcdb2ffa
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoTPL: TM2: config: disable PSCI_RESET 65/125165/1
Seung-Woo Kim [Fri, 14 Apr 2017 04:40:52 +0000 (13:40 +0900)]
TPL: TM2: config: disable PSCI_RESET

The config PSCI_RESET is enabled by default for armv8, but TM2 TPL
does not support PSCI, so it should be disabled for reset command.

Change-Id: I56b8b5f6d77ca39018b14cc024ae5c27ea9d0e64
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agopackaging: change the URL information 40/124640/1 accepted/tizen/unified/20170418.072224 submit/tizen/20170414.042831 tizen_4.0.m1_release
Jaehoon Chung [Wed, 12 Apr 2017 04:27:20 +0000 (13:27 +0900)]
packaging: change the URL information

Current URL is for tizen.rog.
Change to mainline u-boot URL. This code is taken from mainline u-boot.

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