Seung-Woo Kim [Wed, 31 Mar 2021 07:40:22 +0000 (16:40 +0900)]
scripts: tizen: sd_fusing: Adjust log print
Show with proper tab indent for partition table when formatting
and show default behavior from warnning about format.
Change-Id: I36aac38f40780cf936a450c8f083c5ec1f207e6c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 30 Mar 2021 07:40:27 +0000 (16:40 +0900)]
scripts: tizen: sd_fusing: Use array for partition information
Use array for partition information to remove duplication.
Change-Id: I6a8c5e3921cda24dc075321dcd5383dfda64149b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 31 Mar 2021 11:31:57 +0000 (20:31 +0900)]
scripts: tizen: sd_fusing_rpi3.sh: Add flashing hal.img
As like dfu information of tizen_rpi, add flashing hal.img.
Change-Id: Ibfc26456dd6bf3a56df25573b9fb7b5f05d38dee
Ref: commit
9809b292e7c3 ("samsung: tizen_rpi: add hal.img in dfu information")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 30 Mar 2021 07:33:05 +0000 (16:33 +0900)]
scripts: tizen: sd_fusing_rpi3.sh: Change variable name properly
The variable names, COL and ROW are used crossly from meaning.
Change the variable name properly.
Change-Id: If0ea313d2a275baf2c23261b2145141d2d79c276
Ref: commit
5dacf71810d7 ("scripts: odroid-xu4: remove non-necessary FUSE struct")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 30 Mar 2021 02:14:30 +0000 (11:14 +0900)]
scripts: tizen: sd_fusing: Use only part type from block device for fusing
Current block device parsing result gives both disk and part
types of block device and this can break parsing 1st partition
for "mmcblk1" case. Use only part type from block device for
fusing when flashing partition image.
Change-Id: I0ca393fd5ecd26d77939f16c9c412d00d18cb912
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Jaehoon Chung [Mon, 1 Mar 2021 22:50:05 +0000 (07:50 +0900)]
packaging: update u-boot git repository url
Update u-boot git repository URL from git.denx.de
to source.denx.de.
Change-Id: Ib9645ae340d9d0c45546baa0bc819d2ca1a1e395
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Marek Szyprowski [Wed, 3 Feb 2021 14:36:14 +0000 (15:36 +0100)]
board: amlogic: odroid: add runtime detection of the N2/N2+/C4/HC4 variants
Use the ADC channel 1 to check the hardware revision of the board and
detect the N2 vs. N2+ and the C4 vs. HC4 variants. Each of them use
different dtb file, so adjust fdtfile environment variable to the
detected variant.
The ADC min/max values for each variant are taken from the vendor code,
adjusted to the 12-bit ADC driver operation mode (vendor code use 10-bit
mode).
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I702a531c24b0fa9bdc1618defa1e0cc2b55c81c5
Marek Szyprowski [Wed, 3 Feb 2021 08:35:48 +0000 (09:35 +0100)]
samsung: tizen_amlogic: add support for optional mainline kernel boot
Add support for optional mainline Linux kernel and DTBs. This requires
adjusting DTB file nameand console kernel cmdline parameters.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I977ec72596ddded6ed961ce0709ab40612682168
Marek Szyprowski [Fri, 5 Feb 2021 13:58:20 +0000 (14:58 +0100)]
samsung: tizen_amlogic: Use only meson64_odroidn2.dtb for OdroidN2 boards
Switch OdroidN2 board to use meson64_odroidn2.dtb. For Tizen, the DRM
subsystem is enabled for the all Amlogic boards, so there is no need to
have separate dtb with the DRM enabled for OdroidN2 board.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ie44445f950c8ffe1663ce8997dc5b15c7e0aaf79
Marek Szyprowski [Wed, 3 Feb 2021 07:20:23 +0000 (08:20 +0100)]
tizen: amlogic: remove obsolete TIZEN_AMLOGIC_USE_VENDOR_KERNEL option
After a fix to vendor kernel, the workaround enabled by the
TIZEN_AMLOGIC_USE_VENDOR_KERNEL option is no longer needed.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ie83030aa131779965ca09fcd8603b27b0d8fc87f
Marek Szyprowski [Wed, 3 Feb 2021 07:11:29 +0000 (08:11 +0100)]
samsung: tizen_amlogic: improve messages on boot
Show proper button name while checking THOR download mode and change
'reboot' to 'reboot reason' to make it clear what it is being checked.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I543b020ea3a9ae3459f7a57d07db410945f45676
Marek Szyprowski [Mon, 1 Feb 2021 10:53:07 +0000 (11:53 +0100)]
rpi: limit size of the RAM to the multiple of the MMU_SECTION_SIZE
When RPi4 is booted from USB Mass Storage, the firmware reports 947MiB of
the ARM memory (948 in case of the standard SD-card boot). This value is
not MMU_SECTION_SIZE aligned, so the dram_bank_mmu_setup() skips mapping
of the last 1MiB. This later causes u-boot in ARM 32bit mode to freeze,
because it relocated itself into that unmapped memory and fails to
execute.
Fix this by limiting the size of the first bank to the multiple of
MMU_SECTION_SIZE.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I9734e7a3a2b791afff211f57eb872f99bf6f2672
Marek Szyprowski [Fri, 29 Jan 2021 12:03:03 +0000 (13:03 +0100)]
rpi: use board_early_init_r to init PCI/USB and detect boot device
Move initialization of the PCI and the USB subsystems from the 'preboot'
command to the board's early_init_r() function and then try to detect a
boot device by accessing the MMC0 device. If it works, then set boot
device interface to 'mmc', if not, use 'usb'.
This allows the environment variales to be loaded from the proper
storage interface.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Idf06ba827167479510206587308875c8eedce892
Marek Szyprowski [Fri, 29 Jan 2021 12:01:31 +0000 (13:01 +0100)]
env: fat: allow to dynamically set storage interface
Add support for setting the FAT env storage interface dynamically by
defining board's own env_fat_get_interface() function.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I80eef53b9adff942524061c5a8be1bb583fea21f
Marek Szyprowski [Thu, 28 Jan 2021 10:08:57 +0000 (11:08 +0100)]
tizen: rpi: add temporary workaround for usb boot
rootfs on USB device requires a bit more time to initialize and it is
probed asynchronously. This might happen after the initramfs is mounted
and init started, so add 2 seconds delay in case of USB boot to let
initramfs to detect the rootfs.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If4c1f12bd556ee3811b035c403ce832cf16c940b
Marek Szyprowski [Thu, 28 Jan 2021 08:55:49 +0000 (09:55 +0100)]
tizen: rpi: move MBR check to tizen-boot-rpi{3,4}.scr
Move the MBR check to tizen-boot-rpi{3,4}.scr and adjust it to the
optional USB boot. User request is changed to 'Press ENTER to continue'
if verify fails to allow script continuation.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I45e530d63c449a21b4befbfeee0d55551d95b3c4
Marek Szyprowski [Wed, 27 Jan 2021 22:01:15 +0000 (23:01 +0100)]
tizen: rpi: adjust commands to the optional usb boot
Properly set and use $bootdev instead of mmc to support optional usb boot
in the future.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ib09bf36ade9062634f11538607768f65c2f6fc80
Marek Szyprowski [Tue, 26 Jan 2021 11:11:59 +0000 (12:11 +0100)]
samsung: tizen_amlogic: use 'reserved1' partition for HAL
Use the 'reserved1' (64M) partition for the Tizen HAL partition image and
adjust the name of the remaining reserved partitions.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ieb879e48d55e7c25b3cf29bbd522cab22162ccbf
Marek Szyprowski [Fri, 22 Jan 2021 10:24:04 +0000 (11:24 +0100)]
samsung: tizen_rpi: check MBR partition layout from preboot
Verify if the MBR partition layout on SD card matches the one defined in
the bootloader.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I7c296a4f64e294a9dc510e0a248e83375bacf9cb
Marek Szyprowski [Thu, 21 Jan 2021 15:21:11 +0000 (16:21 +0100)]
samsung: tizen_rpi: remove support for the obsolete files
Remove no longer used 'u-boot.img' and 'optee.bin' images from the 'boot'
partition and dfu_alt_info image list.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iaecb24070f80bb8860dc7c1faebff2cf6b2d1581
Marek Szyprowski [Tue, 17 Nov 2020 10:16:28 +0000 (11:16 +0100)]
samsung: tizen_rpi: make 'dfu_alt_info' static
The data layout on the storage device is the same all the time for RPi3/4
boards and 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 RPi boards.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I8f7211cdde50701418464419b774aeecc795efa1
Marek Szyprowski [Thu, 21 Jan 2021 14:52:05 +0000 (15:52 +0100)]
samsung: tizen_rpi: add support for the MBR command
Enable recently added 'mbr' command and define MBR partition table layout
based on the values from the current sd_fusing_rpi3.sh script.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I25e44f10365f95624cf6b85e09962671cf0c12c0
Marek Szyprowski [Fri, 22 Jan 2021 10:43:35 +0000 (11:43 +0100)]
cmd: misc: Fix return value for sleep command
If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1
(CMD_RET_USAGE).
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ieec0d9552770aed06b405fa83fff0bc4f762285f
Marek Szyprowski [Mon, 25 Jan 2021 08:48:31 +0000 (09:48 +0100)]
scripts: tizen: sd_fusing_rpi3: rename 'RESERVED1' to 'HAL'
10th partition is used for HAL partition image, so use that name instead
of the 'RESERVED1'.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3db5acd3a16954b7af4721c28223373f6ccc5aef
Marek Szyprowski [Mon, 25 Jan 2021 08:42:32 +0000 (09:42 +0100)]
scripts: tizen: sd_fusing_rpi3: fix size of the RESERVED2 partition
Older version of sd_fusing_rpi3.sh script had a bug, which results in
reduced size of the RESERVED2 partition to 125.5M instead of 128M. Adjust
the size of the RESERVED2 partition to 125M after the fixing sd_fusing
script to avoid further confusion, especially with the upcoming MBR
layout validation in the u-boot.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I41baf2e626aed0473539898b81fe809b4f7256b8
Marek Szyprowski [Fri, 22 Jan 2021 10:57:03 +0000 (11:57 +0100)]
scripts: tizen: sd_fusing_rpi3: adjust extended partition size calculation
With so many partitions defined (currently 11), the extended partition
has to be larger regardless the sfdisk tool version, otherwise, the last
partition will be smaller than the requested size.
Without this fix, fdisk from util-linux 2.33.1 creates the last partition
of 125,5M instead of 128M.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ib4cc3608bc6050b59ece57e803246d465185d65b
Jaehoon Chung [Tue, 19 Jan 2021 04:45:11 +0000 (13:45 +0900)]
script: tizen: remove sd_fusing_amlogic script
Remove sd_fusing_amlogic script.
Insteade, use 0-format.cmd file that is created from build script.
- ./tizen/build-amlogic.sh all
- It will be created tar file under output directory
- There should be amlogic_format_bootloader.tar.gz
- Use its format_bootloader.tar.gz
Change-Id: I9ef4dceb71d0830ebb2f69380f38d3ff63213bd9
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Tue, 19 Jan 2021 04:44:09 +0000 (13:44 +0900)]
samsung: tizen_amlogic: increase system-data size to 1.3G
Increase system-data size from 512M to 1.3G.
Change-Id: I39398a900260eca7fd96d232ea95dc348a593804
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Mon, 18 Jan 2021 09:18:16 +0000 (18:18 +0900)]
configs: rpi4: disable CONFIG_USB_KEYBOARD
It doesn't need to enable CONFIG_USB_KEYBOARD on Tizen.
- It needs to enable USB_KEYBOARD when grub mode is used.
Change-Id: I8c7572d6f903037a9367351422010f72306e252f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Fri, 15 Jan 2021 04:27:34 +0000 (13:27 +0900)]
board: rpi: add print_archinfo to display arch information
Current U-boot doesn't display a message about which architecture is
used. So Developer is difficult to know it by intuition.
This patch is displaying to CPU information with CONFIG_SYS_CPU.
- In mainline, it's used to display cpuinfo with CONFIG_DISPLAY_CPUINFO.
But PRI4 doesn't implement print_cpuinfo(). Instead, display a cpuinfo
in get_board_rev about RPI4 boards.
In RPI4 case,
U-Boot 2020.10-drity (Jan 15 2021 - 13:24:55 +0900)
DARM: 3.9 GiB
RPI 4 Model B (0xc03111)
CPU: armv7
Change-Id: I485194baa965065f44bac966d014ccfb31b9da60
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Marek Szyprowski [Tue, 12 Jan 2021 20:03:16 +0000 (21:03 +0100)]
amlogic: vim3: fix MAC address reading code
It turned out that MAC address is stored in ASCII format in EFUSE, so fix
the code reading it to use ASCII format.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: If3723f3aa8570de04e6e753e958ada624e3482fe
Jaehoon Chung [Mon, 11 Jan 2021 07:36:57 +0000 (16:36 +0900)]
samsung: tizen_rpi: add swiotlb value to 8192 on 32bit
When 32bit kernel is booting, kernel is reserving memory for SWIOTLB about
64MB. It seems that doesn't need to use full size.
After set 'swiotlb=8192', SWIOTLB is reserved to 16MB.
Then it can save 48MB memory to use ZONE_DMA.
Change-Id: I1a1659cbff2120da755b14f1b373715bc10027c4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Thu, 7 Jan 2021 07:54:47 +0000 (16:54 +0900)]
tizen: support recovery and fota mode
Support recovery and fota mode.
It will be entered to recovery or fota mode with value by passed
from reboot command.
Change-Id: Ia7d3c80de2fb28491e6cabfcfb37059e7325f259
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Seung-Woo Kim [Wed, 6 Jan 2021 10:46:42 +0000 (19:46 +0900)]
tizen: bootscript: amlogic: support gpio power key for odroid-c4
With gpio button, odroid-c4 can support gpio power. Set gpio power
key with PIN_11 from kernel boot_args.
GPIO pins are connected for ELB060675 button as like below:
- out : PIN_11
- vcc : PIN_9 (ground)
- gnd : Not used.
Change-Id: I3aac017fe4a699b8576100cf3ee025a82054ee2d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Jaehoon Chung [Wed, 6 Jan 2021 10:33:57 +0000 (19:33 +0900)]
ARM: dts: meson: change from ACTIVE_HIGH to ACTIVE_LOW
Whne button doesn't connect, it's always high.
So it needs to fix its case.
In our button's case,
- out : PIN_11
- vcc : GND
- gnd : Not used.
Change-Id: Ic8cf0f5853045cf181ad3c1c53e14e0fceb73b41
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 6 Jan 2021 08:20:35 +0000 (17:20 +0900)]
samsung: tizen_amlogic: fix build error about not defined BUTTON_LAEBL
Fix build error about not defined BUTTON_LABEL.
Change-Id: Ifdc916c56c82aaac129ca764d8d501f4c0edcb26
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 6 Jan 2021 05:10:03 +0000 (14:10 +0900)]
configs: odroid-c4: support a button download mode
Support a button download mode.
If button is pressed, it will be entered to thor mode.
Change-Id: I1c1a4b8ff0d5d8b9b10b277876109b69ce2f02f8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 6 Jan 2021 05:08:36 +0000 (14:08 +0900)]
samsung: tizen_amlogic: add button_label variable
Add button_label variable to clarify button about each boards.
- KVIM3(L) : Function
- Odroid-C4 : PowerKey
Change-Id: I7580cce0c580df14debbe40c48a70f5b6aa532bd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 6 Jan 2021 05:01:03 +0000 (14:01 +0900)]
ARM: dts: meson: add gpio-keys node to use PowerKey
Add gpio-keys node to use PowerKey.
PowerKey - GPIOX_3 <PIN_11>
Change-Id: I99dae986119d4dc355c02b114a318a727134374c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Seung-Woo Kim [Wed, 6 Jan 2021 05:50:04 +0000 (14:50 +0900)]
tizen: bootscript: rpi3: fix booting issue on 32bit
For 32bit, it should use bootz, but there was typo. Fix the
booting issue on 32bit.
Change-Id: I98ab0cd8cd88f1998c5dd30d649cfc7c4cf0e495
Fixes: commit
01cd50f4c3af ("tizen: rpi: move bootscripts to tizen specific directory")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Jaehoon Chung [Tue, 5 Jan 2021 08:06:27 +0000 (17:06 +0900)]
configs: enable SQUASFS configurations
Enable SQUASHFS configuration about reference targets.
It will be used when checking ramdisk image.
Change-Id: I42adf176d352508836b202fecf81f83a09bafd66
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Richard Genoud [Tue, 24 Nov 2020 17:07:52 +0000 (18:07 +0100)]
fs/squashfs: sqfs_close/sqfs_read_sblk: set ctxt.sblk to NULL after free
This will prevent a double free error if sqfs_close() is called twice.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
7e932ac790b3615a67a3c24041c194aa748c0d98]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I31166f8f9d6ec6d4772e7b51b5d0bb8d20ef1a4b
Richard Genoud [Tue, 3 Nov 2020 11:11:26 +0000 (12:11 +0100)]
fs/squashfs: implement exists() function
This permits to find a file and use the distro_bootcmd
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
dd4866b43754b18f0c06672e341d93e16b8bf674]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Idafbcb37c30445e3731d40924f1c43499f149b1a
Richard Genoud [Tue, 3 Nov 2020 11:11:24 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read: remove buggy offset functionality
offset is the offset in the file read, not the offset in the destination
buffer.
If the offset is not null, this will lead to a memory corruption.
So, for now, we are returning an error if the offset is used.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
21b1b3bad58b50e5464b1bf016e7c96bf18ddb8d]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ie50645e5fcb2f06a21c8f88e16da9b0d1db35cca
Richard Genoud [Tue, 3 Nov 2020 11:11:23 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read: don't write beyond buffer size
The length of the buffer wasn't taken into account when writing to the
given buffer.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
cbd5e40ede4e5c6aedce9475325bdf80b7fa839b]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I14d9af77ac0a2c0d3e52c39824f3854dbbc4d58a
Richard Genoud [Tue, 3 Nov 2020 11:11:22 +0000 (12:11 +0100)]
fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return value
sqfs_decompressor_init() returns a value, so it's better to use it than
to force the return value to EINVAL (it could be ENOMEM)
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
6d25bd3e9c1d317cdbd52a4c6bba11f912bb4d6a]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I7fcad9cd4d7ecb4aff6aa353aee78c7aac69a0e6
Richard Genoud [Tue, 3 Nov 2020 11:11:21 +0000 (12:11 +0100)]
fs/squashfs: sqfs_probe: reset cur_dev/cur_part_info to NULL on error
Resetting the context on error will prevent some checks like:
if (!ctx.cur_dev)
To pass when the probe method has failed
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
56cf1ceee38435a0c105d40336d12d19e1db8b1d]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I998b1fa2d790bf9618d0d652663edb220a32c610
Richard Genoud [Tue, 3 Nov 2020 11:11:19 +0000 (12:11 +0100)]
fs/squashfs: sqfs_probe: fix possible memory leak on error
If SquashFS magic number is invalid, there's a memory leak.
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
ccd4c08a452b3703ee16ba730a84b7caadcff97a]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I3be0a354f3407d13902c244580109eb0a9ff71e9
Richard Genoud [Tue, 3 Nov 2020 11:11:18 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read: fix memory leak on finfo.blk_sizes
finfo.blk_sizes may not be freed in case of error in the for loop
Setting it to null and freeing it at the end makes prevents that from
happening.
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
571b67ee1dcb989dc50575f14e87bfdef6bfd8db]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I97086373caa5a031f3ba12aa4997de3eab10c530
Richard Genoud [Tue, 3 Nov 2020 11:11:17 +0000 (12:11 +0100)]
fs/squashfs: sqfs_get_abs_path: fix possible memory leak on error
if sqfs_tokenize(rel_tokens, rc, rel); fails, the function exits
without freeing the array base_tokens.
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
33686804d29e676177d408f1ce047b8c35185ddb]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I377f5aeda3ed3f6b889ce9f9c506629c21f45d3d
Richard Genoud [Tue, 3 Nov 2020 11:11:16 +0000 (12:11 +0100)]
fs/squashfs: sqfs_get_abs_path: fix error check
the return value of sqfs_tokenize(rel_tokens, rc, rel); wasn't checked.
(but "ret" value was !)
This is obviouly a typo.
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
53db0e24a8f981c1e303a1c745b8f0e28544096f]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ib9ff7ebded9de101a0d929414c8ecdf6137e8621
Richard Genoud [Tue, 3 Nov 2020 11:11:15 +0000 (12:11 +0100)]
fs/squashfs: sqfs_frag_lookup: simplify error handling
For consistency with other functions.
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
c9b8e86f8bd238421b35ec15d88b4d3cac8a0992]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: If6a955583f876fe4399982e58ade2784c2da1b30
Richard Genoud [Tue, 3 Nov 2020 11:11:14 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read: fix another memory leak
data_buffer was allocated in a loop and freed only once.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
555459e7931f7ae34a4e10d1e21ce7aada7aa59b]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I69dc9bf407d07c7af28f7c3bb1b1b2966f1ee216
Richard Genoud [Tue, 3 Nov 2020 11:11:13 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read: fix memory leak
sqfs_closedir() should be called to free memory allocated by
sqfs_opendir()
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
7ce9745cbeae7733a7068f19a7fc3ec8f21dc38c]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I200f764bb6ce2bb828e2217d1b0f949e1db14597
Richard Genoud [Tue, 3 Nov 2020 11:11:12 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read: remove useless sqfs_closedir()
as sqfs_opendir failed, there's no need to call sqfs_closedir
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
b34949fe9baaae49003b2981213495bab3afef9b]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Id61d825b7976f151a77738dadf5c99ba0613d955
Richard Genoud [Tue, 3 Nov 2020 11:11:11 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read: fix dangling pointer dirs->entry
dirs->entry shouldn't be left dangling as it could be freed twice.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ie76becc6bfb30341d1964a34154ebe4014def678
Richard Genoud [Tue, 3 Nov 2020 11:11:10 +0000 (12:11 +0100)]
fs/squashfs: sqfs_size: remove useless sqfs_closedir()
as sqfs_opendir failed, there's no need to call sqfs_closedir
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
35475f83a107901551c31f7bc70f5266862a33e4]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I809ae83d5949f86d547b52982cf318e7202a6868
Richard Genoud [Tue, 3 Nov 2020 11:11:09 +0000 (12:11 +0100)]
fs/squashfs: sqfs_size: fix dangling pointer dirs->entry
dirs->entry shouldn't be left dangling as it could be freed twice.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
508a9dc7f694df11c7de7460f888f508e40a2046]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I9f03d0d18e49f3ad0b5b7f1ca6f48625c00e46aa
Richard Genoud [Tue, 3 Nov 2020 11:11:08 +0000 (12:11 +0100)]
fs/squashfs: sqfs_concat_tokens: check if malloc succeeds
memory allocation should always be checked
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
dc3312c43c82ff9335b2bf4ee4f72365e824adfd]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I160a321fe56fc63476d19adbbaa62129daa03f79
Richard Genoud [Tue, 3 Nov 2020 11:11:07 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read_inode_table: fix dangling pointer
inode_table should not be left dangling as it may be freed in sqfs_opendir
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
4c83d2755776d4dd5e15a930d48db1082fc0d1cc]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I0d63396f7885f68140e78623df8e06b8b00049ac
Richard Genoud [Tue, 3 Nov 2020 11:11:06 +0000 (12:11 +0100)]
fs/squashfs: sqfs_search_dir: fix memory leaks
path, target, res, rem and sym_tokens were not free on error nor success.
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
cd54591afd42c547f43a7d509862f20e09264cde]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I9417cb0f010dc267eeef4d0ee1aa8ba45a6678bd
Richard Genoud [Tue, 3 Nov 2020 11:11:05 +0000 (12:11 +0100)]
fs/squashfs: sqfs_search_dir: fix dangling pointer
dirs->entry shouldn't be left dangling as it could be freed twice.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
01e71ec61ab84bcdd4df708f8930d5acf1c2674d]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I51db60ce9c428536c10a72a9ff4a6466629b6a4a
Richard Genoud [Tue, 3 Nov 2020 11:11:04 +0000 (12:11 +0100)]
fs/squashfs: sqfs_read_directory_table: fix memory leak
pos_list wasn't freed on every error
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
7d23b2c5fb093142400467d8b81ba84786ed6f2c]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I152e9c306a194261b7b98e408a02000830194ba1
Richard Genoud [Tue, 3 Nov 2020 11:11:03 +0000 (12:11 +0100)]
fs/squashfs: sqfs_split_path: fix memory leak and dangling pointers
*file and *dir were not freed on error
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
5487477802e0ad7bfad046af25f4a04cfd98cb7a]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I185e3bb66f52d16eb02a2b2076aa723aab5cb753
Richard Genoud [Tue, 3 Nov 2020 11:11:02 +0000 (12:11 +0100)]
fs/squashfs: sqfs_closedir: fix memory leak
sqfs_dirs wasn't freed anywhere.
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
87d11e08e4792b3d188143972ba3a1651a52beee]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Icd463416ec6b70ee90c912faf077d3795f055f29
Richard Genoud [Tue, 3 Nov 2020 11:11:00 +0000 (12:11 +0100)]
fs/squashfs: sqfs_opendir: fix some memory leaks and dangling pointers
When trying to load an non-existing file, the cpu hangs!
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
f268768d43bbf11c7107597abef57c6b86b6b229]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I8273a22d76a36e39cf4ca0f48afd9fd409280217
Gerard Koskamp [Fri, 30 Oct 2020 13:41:58 +0000 (13:41 +0000)]
fs/squashfs: Fix index off by 1 for inode SQFS_LDIR_TYPE
I've created a squashfs file system with Yocto (it use squashfs-tools)
and u-boot command sqfsls give the error:'Error while searching inode:
unknown type.'
After some digging in the code I found that the index is off by 1.
This patch fix this issue and I can successful use the sqfsls command.
After search for the squashfs format I found a link talk about a
similar issue but this time in the documentation. The link is:
https://github.com/AgentD/squashfs-tools-ng/commit/
e6588526838caece9529
Signed-off-by: Gerard Koskamp <gerard.koskamp@nedap.com>
Tested-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
[jh80.chung: cherry picked from mainline commit
c49b0eb034710f08fc68cbfa2c23811e10667ad9]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I02ba72c07ea7c57ebace7103357e2b81bcf48772
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>
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>
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>
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>
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>
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
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>
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>
Ł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>
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>
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>
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>
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>
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>
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>
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
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
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
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
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
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
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>
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>
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>
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>
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
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>
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>
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>
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
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>
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>
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>