Lukasz Majewski [Mon, 23 Jun 2014 07:39:16 +0000 (09:39 +0200)]
thor: defer parsing of device string to IO backend
Commit
d4f5ef59cc7 "dfu: defer parsing of device string to IO backend" changed
the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c
to match that change.
Also, apply the same change as commit
d6d37d737b58e "dfu: free entities
when parsing fails" to cmd_thordown.c.
Fixes: d4f5ef59cc7 ("dfu: defer parsing of device string to IO backend")
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Conflicts:
common/cmd_thordown.c
[jino.cho: Fixed conflicts from original commit of tizen.org]
Signed-off-by: jino.cho <jino.cho@samsung.com>
Change-Id: I8478952aaa6968b2684d06e1a6ca7f082771db33
jino.cho [Tue, 29 Mar 2016 00:33:38 +0000 (09:33 +0900)]
usb: s3c-otg: Add Clock control for EXYNOS3250
In EXYNOS3250, reset value of the phy_fsel is 0x7(50MHz). So, We have to clean
the bits before setting to 0x5(24MHz).
Change-Id: I173ab48dcc8190ecaf959ea253f938946f31ee0b
Signed-off-by: jino.cho <jino.cho@samsung.com>
Lukasz Majewski [Wed, 5 Feb 2014 09:10:43 +0000 (10:10 +0100)]
usb:udc:samsung: Allow burst transfers for non EP0 endpints
This patch removed obscure restriction on the HW setting of DMA transfers.
Before this change each transaction sent up to 512 bytes (with packet count
equal to 1) for non EP0 transfer.
Now it is possible to setup DMA transaction up to DMA_BUFFER_SIZE.
Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`
Measurement:
Transmission speed: 20.74 MiB/s
Change-Id: I4b70ba0c607e125f851bfec9965c77e8e6cd000f
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Lukasz Majewski [Wed, 5 Feb 2014 09:10:42 +0000 (10:10 +0100)]
usb:udc:samsung: Remove redundant cache operation from Samsung UDC driver
A set of cache operations (both invalidation and flush) were redundant
in the S3C HS OTG Samsung driver:
1. s3c_udc_ep0_zlp - to transmit EP0's ZLP packets one don't need to flush
the cache (since it is the zero length transmission)
2. s3c_udc_pre_setup and s3c_ep0_complete_out - cache invalidation is not
needed when the buffer for OUT EP0 transmission is setup, since no data
has yet arrived.
Cache cleanups presented above don't contribute much to transmission speed
up, hence shall be regarded as cosmetic changes.
3. setdma_rx - here the s3c UDC driver's internal buffers were invalidated.
This call is not needed anymore since we reuse the buffers passed from
gadgets. This is a key contribution to transmission speed improvement.
Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`
Measurements:
Base values (without improvement):
Transmission speed: 9.51 MiB/s
After the change:
Transmission speed: 10.15 MiB/s
Change-Id: Ie3222fb1a1170b47218442f5763a082aa2fac403
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Lukasz Majewski [Tue, 8 Oct 2013 12:30:37 +0000 (14:30 +0200)]
usb:udc:s3c: Reduce dcache invalidate range for UDC receive buffer
The s3c udc driver sends data in a max packet size. Therefore the dcache
invalidate range shall be equal to max packet, not the entire
DMA_BUFFER_SIZE.
Change-Id: I60a08c3365cf5f43ad3dcef3baed940337d250ef
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
jino.cho [Tue, 22 Mar 2016 06:16:58 +0000 (15:16 +0900)]
packaging: Add generating params.bin
This patch generates params.bin file
Change-Id: I0377190ed4b85e4afe0197e0a817de14d07d09b3
Signed-off-by: jino.cho <jino.cho@samsung.com>
Stanislaw Wadas [Fri, 18 Mar 2016 10:51:05 +0000 (11:51 +0100)]
Fix .spec name for proper obs build
Change-Id: I96784cb62cb882e1b4fd704de6e3df3446908989
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
jino.cho [Wed, 16 Mar 2016 08:26:04 +0000 (17:26 +0900)]
packaging: Add ARTIK-5/10 spec files for GBS build
This patch adds the .spec files to make possible gbs build.
Change-Id: I8e48e93d730ce3e409725b9eead28008695fd616
Signed-off-by: jino.cho <jino.cho@samsung.com>
Chanho Park [Fri, 19 Feb 2016 08:26:54 +0000 (17:26 +0900)]
artik: configs: add factory_set_ethaddr environment
This patch adds factory_set_ethaddr env to help easy generation
of the mac address and store it into factory information.
Change-Id: I6d0e97add46c1f9a369629917acf5c7d5b22960e
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 19 Feb 2016 08:25:56 +0000 (17:25 +0900)]
common: introduce gen_eth_addr command
This patch adds gen_eth_addr command to generate a random
ethernet mac address and set the address into ethaddr env.
Change-Id: I5823d9ddc380569ee0f3853996f5d1cea641f880
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
sowon.na [Tue, 16 Feb 2016 12:59:31 +0000 (21:59 +0900)]
board:samsung:remove routine to fastboot/recovery
This patch removes special routine to fastboot or recovery mode while booting.
Before this patch, u-boot goes to fastboot mode with Pin 13
grounded on J27 or Pin 7 grounded on J26 of artik5 while booting.
We remove this routine for preventing unintended booting error.
Change-Id: I2459d518bbf23fe78ea885390f8140856d6f9fb4
Signed-off-by: sowon.na <sowon.na@samsung.com>
Jim Lin [Fri, 17 May 2013 09:41:03 +0000 (17:41 +0800)]
NET: Fix system hanging if NET device is not installed
If we try to boot from NET device, NetInitLoop in net.c will be invoked.
If NET device is not installed, eth_get_dev() function will return
eth_current value, which is NULL.
When NetInitLoop is called, "eth_get_dev->enetaddr" will access
restricted memory area and therefore cause hanging.
This issue is found on Tegra30 Cardhu platform after adding
CONFIG_CMD_NET and CONFIG_CMD_DHCP in config header file.
Change-Id: I8bf18901842043f33a06c96ab5201c406fe0f605
Signed-off-by: Jim Lin <jilin@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Jeroen Hofstee [Thu, 26 Jun 2014 18:18:31 +0000 (20:18 +0200)]
common: main.c: make show_boot_progress __weak
This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).
Change-Id: I76061ab498572895bf3b864add2c18c4bcd9585c
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Jeroen Hofstee [Mon, 23 Jun 2014 21:20:19 +0000 (23:20 +0200)]
common: board_f: cosmetic use __weak for leds
First of all this looks a lot better, but it also
prevents a gcc warning (W=1), that the weak function
has no previous prototype.
Change-Id: Icaabc39bf74587659b1070374b61e4022419a01a
cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Jeroen Hofstee [Sun, 22 Jun 2014 21:10:39 +0000 (23:10 +0200)]
ARM:asm:io.h use static inline
When compiling u-boot with W=1 the extern inline void for
read* is likely causing the most noise. gcc / clang will
warn there is never a actual declaration for these functions.
Instead of declaring these extern make them static inline so
it is actually declared.
Change-Id: Ic42b514a030de64b3f12a4ed427f3ffc71f60ef8
cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Hans de Goede [Sat, 7 Feb 2015 21:52:40 +0000 (22:52 +0100)]
Add linux/compiler-gcc5.h to fix builds with gcc5
Add linux/compiler-gcc5/h from the kernel sources at:
commit
5631b8fba640a4ab2f8a954f63a603fa34eda96b
Author: Steven Noonan <steven@uplinklabs.net>
Date: Sat Oct 25 15:09:42 2014 -0700
compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
Change-Id: I8c22aebe7c2e39059b05b3a19ae4dc3f69e10d1a
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:26:14 +0000 (10:26 +0900)]
artik5: configs: enable ax88796c spi ethernet
This patch enables ax88796c spi ethernet driver. It supports
to load a kernel image from tftp server.
Change-Id: Ie3b53ff66433a278474047a5e407cfd99a051015
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:15:11 +0000 (10:15 +0900)]
board: artik5: initialize ax88796c spi ethernet
This patsh supports initialization of ax88796c spi ethernet
driver for artik5. It requires to control a cs gpio pin according
to cs activation/deactivation.
Change-Id: I6ac0dbcad20ae46ee1f217e47e31252d176a0b4b
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:13:30 +0000 (10:13 +0900)]
arm: exynos4: support spi pinmux configuration
This patch supports spi pinmux configuration for exynos4 and
exynos3.
Change-Id: If526783f161e2c1863b5bec110940b5aeb2c6c1d
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:11:22 +0000 (10:11 +0900)]
arm: exynos: support spi clock setting for exynos4
This patch supports spi clock setting of exynos4. The exynos3250
also uses same setting with exynos4.
Change-Id: Ibfb255f9c6dcac5b35732d9387e39a90af2545f9
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 05:39:57 +0000 (14:39 +0900)]
net: ax88796c_spi: fix timeout unit
This patch fixes timeout unit of ax88796c_spi driver because
get_timer function returns HZ unit thus we should convert the
unit according to HZ.
Change-Id: I2ab5fa138a714ede7862abe7ef0b5b16c2c4a558
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 05:34:33 +0000 (14:34 +0900)]
net: ax88796c_spi: support old miiphy.h definitions
This patch supports old style miiphy.h definitions because the
ax88796c_spi driver only supports old version u-boot. To match
the code style, just copied the definitions from previous u-boot.
Change-Id: I6c1b108a229f5aed7de031cdb31d341192c5cad6
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 05:27:23 +0000 (14:27 +0900)]
drivers: net: introduce ax88796c spi ethernet driver
This patch adds an new ax88796c spi ethernet driver. This codes
were imported from asix homepage without any changes. However,
we need some patches to apply them into this u-boot version.
Change-Id: I3042c5eb1a1012c95ae8f1b4b6eb662384c8dc26
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 04:58:37 +0000 (13:58 +0900)]
board: samsung: artik5: initialize spi
This patch calls an initialization routine of spi for exynos3250.
Change-Id: I0f323f4bf051e06505bea13e64bd9e2140dd937f
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Rajeshwari Shinde [Fri, 2 Nov 2012 01:15:36 +0000 (01:15 +0000)]
SPI: Add SPI Driver for EXYNOS.
This patch adds SPI driver for EXYNOS.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Gabe Black <gabeblack@google.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: jy0922.shim@samsung.com
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Hatim RV [Fri, 2 Nov 2012 01:15:35 +0000 (01:15 +0000)]
EXYNOS5: Add base address for SPI
Add base address definition for SPI device on Exynos.
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Conflicts:
arch/arm/include/asm/arch-exynos/cpu.h
Change-Id: I749b88d32490d28d386dead9b637184f90dc2d0a
Hatim RV [Fri, 2 Nov 2012 01:15:34 +0000 (01:15 +0000)]
EXYNOS: Add clock for SPI
Add api to calculate and set the clock for SPI channels
Signed-off-by: James Miller <jamesmiller@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Conflicts:
arch/arm/cpu/armv7/exynos/clock.c
arch/arm/include/asm/arch-exynos/clk.h
Change-Id: Ie772ece94f18e66a5e0836b833a6cdf3c3562811
Rajeshwari Shinde [Sun, 28 Oct 2012 19:32:54 +0000 (19:32 +0000)]
EXYNOS5: Add pinmux support for SPI
This patch adds pinmux support for SPI channels
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Chanho Park [Wed, 2 Dec 2015 05:19:09 +0000 (14:19 +0900)]
board: samsung: configure emmc_dev environment rework
This patch is enhanced and fixed version of previous(
895ce33)
patch. Previous patch was reverted due to panic issue because
setenv was failed during board_mmc_init. Thus, I move the
OmPin check and setenv to board_late_init function.
Change-Id: I4194a5669ae53f302229f820dac8159c06de52b3
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 2 Dec 2015 05:02:21 +0000 (14:02 +0900)]
Revert "board: samsung: configure emmc_dev environment"
This reverts commit
895ce33b05292ee7309c7cd75f2b22eaa554ab22.
When board is initialized, setenv will cause "Signal #8".
Change-Id: Icddfd03e5b0a84bf7d73da65275245033a23b51b
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 2 Dec 2015 04:33:27 +0000 (13:33 +0900)]
arm: exynos: fix gpio map of exynos3
The gpio part2 map of exynos3 was incorrect. The gpio part2 is
started from 0x11000000 and the register map of gpk0 is
0x11000040. Thus, two gpio pads should be before gpk0.
The gpx0 is started from 0x11000c00 so we should fix the count
of res5 pad from 0x4a to 0x48.
Change-Id: I8ceae5009227daf0e4cff4d3d73aeb2318c640de
Reported-by: Jaeyoung Lee <jaeyoung2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 1 Dec 2015 12:21:19 +0000 (21:21 +0900)]
artik: common: enable factory_info command
This patch enables the factory_info command which is to
retrieve some factory information such as board S/N.
The default location to store the data is early offset of eMMC
because we don't use the location for any other purpose.
"run factory_load" command will load the information from eMMC
and configure them into environment variables.
"ethaddr" is ethernet mac address and it will be passed to kernel.
"bd_addr" is bluetooth address and it also be passed to kernel.
Change-Id: Ifa5660c3e765be84d00732593ca2005a5fc9f749
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 1 Dec 2015 12:18:17 +0000 (21:18 +0900)]
board: samsung: configure emmc_dev environment
This patch enable to set the emmc_dev number because it's
varied by boot order. If the board is booted from sdcard,
the emmc device number will be 1 not default 0. Thus, I
set a "emmc_dev" environment to retrieve the number anywhere.
Change-Id: I9324f855151bcfee85e351749ae91cab51ec4a22
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 1 Dec 2015 10:39:02 +0000 (19:39 +0900)]
common: introduce factory_info command
This patch introduces factory_info command to save/load
the factory information such as s/n, mac address.
The command supports mmc interface to save/load data into
mmc device. Please refer below command usage.
"Factory Information commands",
"list - List factory information\n"
"factory_info load <interface> <device> <offset> <cnt>\n"
" - Load factory information from the interface\n"
"factory_info save <interface> <device> <offset> <cnt>\n"
" - Save factory information to the interface\n"
"factory_info read <entity name> - Read a value of entity name\n"
"factory_info write <entity name> <val> - Write a value of entity name\n"
"factory_info clean - Clean factioy information\n"
Change-Id: Ia1f4cebf264f6f573000d001fe24a6cc88c5a8e8
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 26 Nov 2015 04:28:32 +0000 (13:28 +0900)]
common: movi: remove unnecessary partition
This patch removes unnecessary emmc boot partition because they
are not used anymore.
Change-Id: I4f15db025d2756007aa89d5ec3c15142df2b7ce5
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 19 Nov 2015 06:43:53 +0000 (15:43 +0900)]
artik: configs: support tizen partition tables
This patch supports tizen partition tables. The partition tables
of the tizen are consisted three partition, such as rootfs,
system-data and user partition.
Change-Id: I66ce9678405b97cb57adf049256d1832bc812aae
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 22 Oct 2015 07:02:14 +0000 (16:02 +0900)]
artik: configs: support modules partition
This patch adds a modules partition which contains kernel modules.
The size of partition is 32MB and located in second partition.
Change-Id: Id4178f90f769b8f1ab1dfe135669f911f24a4a99
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 22 Oct 2015 07:00:35 +0000 (16:00 +0900)]
cmd: fastboot: support module flashing
This patch supports flashing of modules partition which contains
kernel modules. The partition is second partion of total partitions.
Change-Id: I16f3f1848d630e8dcb2f66d98d1b23a4c9157640
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 19 Oct 2015 00:55:41 +0000 (09:55 +0900)]
artik: configs: set ramfsboot to default boot method
This patch changes the default boot method from mmcboot to
ramfsboot which is booted from initrd.
Change-Id: I01cfc644dc059c01fd873f48f2c529f99d64d6e0
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 16 Sep 2015 10:38:38 +0000 (19:38 +0900)]
board: artik5: change pmic wrstbi pin to GPE2_0
This patch changes the wrstbi pin of pmic from GPE1_2 to GPE2_0.
The pin was changed since artik5 board ver3.0.
Change-Id: I6a56c31995bdffa04bfeb7e6396112cd707a5e9b
Signed-off-by: nermy <nermy@insignal.co.kr>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 2 Sep 2015 02:48:06 +0000 (11:48 +0900)]
common: fastboot: support fatfs for sdfuse
This patch allows fat file system for sd_fuse. When ext4 is not
available of the partition, sdfuse will fall back to fat file system.
For example, fatfs is in the first partition:
sdfuse flash 1 kernel zImage
sdfuse flash 1 dtb exynos5422-artik10.dtb
Change-Id: If66e64ab3b7529469dc2902b90470a6a575ececb
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 20 Aug 2015 05:53:38 +0000 (14:53 +0900)]
artik: config: support android partition and booting
This patch supports android partition tables and booting to android. The
system partition is 1GB and cache partiton is 128MB and userdata
partition is remained size.
1. Generate uInitrd from ramdisk.img
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d ramdisk.img uInitrd
2. Create a android partition from the u-boot shell
run android_format
3. flash android images
fastboot flash ramdisk uInitrd
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
4. Build android kernel and flash the kernel
ARCH=arm ./scripts/kconfig/merge_config.sh \
arch/arm/configs/artik10_defconfig android/configs/android-base.cfg \
android/configs/android-recommended.cfg \
android/configs/artik10-android-graphic.cfg
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- exynos5422-artik10.dtb
fastboot flash kernel arch/arm/boot/zImage
fastboot flash dtb arch/arm/boot/dts/exynos5422-artik10.dtb
5. Set up androidboot.hardware from the u-boot shell
setenv opts loglevel=4 androidboot.hardware=odroidxu3
saveenv
run android_boot
Change-Id: Ic55fa4925b5ae9586bc2c9733e2f1f36df5d04d1
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 20 Aug 2015 04:30:33 +0000 (13:30 +0900)]
commmon: fastboot: cast 64bit when converting sectors to bytes
This patch fixes a cast error when converting sectors to bytes. The
start and size types of the disk_partition_t are 32bit until the
SYS_64BIT_LBA is defined. To prevent the converting error, we should
cast the value to 64bit values.
Change-Id: Ibc71207642aba2d78091123f311b8a30f33e78c7
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 12 Aug 2015 09:26:56 +0000 (18:26 +0900)]
usb: gadget: fastboot: ignore call if not fastboot mode
This patch adds return code if it is not in the fastboot mode.
On sdfuse recovery mode which is using fastboot function, it doesn't
need to reply a message through usb interface.
Change-Id: I3007c3f12579dc95a5e108e5a6afa1563638dd20
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Maxime Ripard [Thu, 8 Jan 2015 11:26:44 +0000 (12:26 +0100)]
gpt: Fix the protective MBR partition size
According to the UEFI Spec (Table 16, section 5.2.3 of the version 2.4 Errata
B), the protective MBR partition record size must be set to the size of the
disk minus one, in LBAs.
However, the current code was setting the size as the total number of LBAs on
the disk, resulting in an off-by-one error.
This confused the AM335x ROM code, and will probably confuse other tools as
well.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Steve Rae [Mon, 26 May 2014 18:52:24 +0000 (11:52 -0700)]
disk: part_efi: add get_partition_info_efi_by_name()
Add function to find a GPT table entry by name.
Tested on little endian ARMv7 and ARMv8 configurations
Signed-off-by: Steve Rae <srae@broadcom.com>
Steve Rae [Mon, 26 May 2014 18:52:23 +0000 (11:52 -0700)]
disk: part_efi: clarify lbaint_t usage
- update the comments regarding lbaint_t usage
- cleanup casting of values related to the lbaint_t type
- cleanup of a type that requires a u64
Tested on little endian ARMv7 and ARMv8 configurations
Signed-off-by: Steve Rae <srae@broadcom.com>
Steve Rae [Mon, 26 May 2014 18:52:22 +0000 (11:52 -0700)]
disk: part_efi: resolve endianness issues
Tested on little endian ARMv7 and ARMv8 configurations
Signed-off-by: Steve Rae <srae@broadcom.com>
Steve Rae [Mon, 5 May 2014 20:00:08 +0000 (13:00 -0700)]
disk: part_efi: add support for the Backup GPT
Check the Backup GPT table if the Primary GPT table is invalid.
Renamed "Secondary GPT" to "Backup GPT" as per:
UEFI Specification (Version 2.3.1, Errata A)
Signed-off-by: Steve Rae <srae@broadcom.com>
Hector Palacios [Thu, 13 Feb 2014 08:48:24 +0000 (09:48 +0100)]
part_efi: fix protective mbr struct allocation
The calloc() call was allocating space for the sizeof the struct
pointer rather than for the struct contents.
Besides, since this buffer is passed to mmc for writing and some
platforms may use cache, the legacy_mbr struct should be cache-aligned.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Chanho Park [Tue, 11 Aug 2015 11:57:07 +0000 (20:57 +0900)]
artik: configs: disable data partition
Until we support a data partition for rw, the partition is disabled.
Change-Id: I68673de0ff7dcf6c1a90131ab1451b9a74e0be04
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 11 Aug 2015 09:45:56 +0000 (18:45 +0900)]
artik: config: do not specify initrd addr for mmcboot
This patch prevents loading initrd addr in case of mmc booting. When
warm resetting, the initrd address is filled invalid data until power
off. Thus, we should not pass the initrd address if mmc_boot.
Change-Id: I2fee8c6ac7df28a9aa83b6bd69aff27ce2522100
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 11 Aug 2015 05:48:29 +0000 (14:48 +0900)]
artik: config: enable sdfuse recovery
This patch enables sdfuse recovery which is recovered the bootloader and
boot partition from sdcard. The action of sd_recovery will do
repartitioning rootfs and fuse binaries from second ext4 partition.
Change-Id: I1320401709abe1843ee793f685aa89b8cc1f2646
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 11 Aug 2015 05:45:36 +0000 (14:45 +0900)]
common: fastboot: force to use emmc device
This patch forces to use emmc device for fastboot and sdfuse command.
The fastboot command is for writing a data to emmc device through
external device like usb or sdcard. Thus, we should use eMMC device even
the board is booted from sdcard.
Change-Id: Ib91a9f6c1bde2e140f5b336bbe26ee5fd7e3f330
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 7 Aug 2015 07:38:38 +0000 (16:38 +0900)]
artik: configs: split initrd boot command
This patch splits initrd boot command from normal command to avoid
loading ramdisk during mmc booting.
Change-Id: Ie6cba2008dec9b6c4e9953b171468c810fbe684a
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Stephen Warren [Wed, 11 Jun 2014 18:47:26 +0000 (12:47 -0600)]
fs: implement size/fatsize/ext4size
These commands may be used to determine the size of a file without
actually reading the whole file content into memory. This may be used
to determine if the file will fit into the memory buffer that will
contain it. In particular, the DFU code will use it for this purpose
in the next commit.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Conflicts:
common/cmd_fs.c
Change-Id: I2dc81095d94901aa604f970a5578b342b0009390
Stephen Warren [Mon, 3 Feb 2014 20:21:07 +0000 (13:21 -0700)]
sandbox: implement exists() function
This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the sandbox test environment.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Chanho Park [Thu, 6 Aug 2015 11:04:02 +0000 (20:04 +0900)]
artik: config: use uInitrd instead of initrd
This patch changes the default initrd file to uInitrd. The uInitrd is
the default initrd format of u-boot. It don't need to pass initrd size
because the size is calculated during making the uInitrd.
Change-Id: I11743df10f12ebf7ad9f662174290ca4c57c7bfa
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 6 Aug 2015 06:47:32 +0000 (15:47 +0900)]
common: fastboot: support sdfuse command
This patch implements sdfuse command which is a variant version of
fastboot to use sdcard images. The sdfuse command consists of three simple
commands.
flashall: flash whole image files from the first ext4 partition of
sdcards
flash: flash a image file which is specified from command line
format: format eMMC partition to gpt partition
All commands use facilities of fastboot commands to implement easily.
Change-Id: I5eb316ee0f852fe7e74dacb7ff8c17eec7dd83ca
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Egbert Eich [Tue, 9 Apr 2013 21:11:56 +0000 (21:11 +0000)]
part/dev_desc: Add log2 of blocksize to block_dev_desc data struct
log2 of the device block size serves as the shift value used to calculate
the block number to read in file systems when implementing avaiable block
sizes.
It is needed quite often in file systems thus it is pre-calculated and
stored in the block device descriptor.
Signed-off-by: Egbert Eich <eich@suse.com>
Egbert Eich [Tue, 9 Apr 2013 06:03:36 +0000 (06:03 +0000)]
disk/gpt: Fix GPT partition handling for blocksize != 512
Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of
code in u-boot still assumes a 512 byte blocksize.
This patch fixes the handling of GPTs.
Signed-off-by: Egbert Eich <eich@suse.com>
Wu, Josh [Wed, 4 Jun 2014 03:01:24 +0000 (11:01 +0800)]
fs: fatwrite: use map_sysmem before use file_fat_write
When the map_sysmem, then the fatwrite command can support sandbox.
Following command will show how to use it:
=> sb bind 0 sd.img
=> fatls host 0
=> fatwrite host 0 $memaddr filename $filesize
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
Wu, Josh [Thu, 8 May 2014 08:14:07 +0000 (16:14 +0800)]
fs/fat: correct FAT16/12 file finding in root dir
When write a file into FAT file system, it will search a match file in
root dir. So the find_directory_entry() will get the first cluster of
root dir content and search the directory item one by one. If the file
is not found, we will call get_fatent_value() to get next cluster of root
dir via lookup the FAT table and continue the search.
The issue is in FAT16/12 system, we cannot get root dir's next clust
from FAT table. The FAT table only be use to find the clust of data
aera in FAT16/12.
In FAT16/12 if the clust is in root dir, the clust number is a negative
number or 0, 1. Since root dir is located in front of the data area.
Data area start clust #2. So the root dir clust number should < 2.
This patch will check above situation before call get_fatenv_value().
If curclust is < 2, include minus number, we just increase one on the
curclust since root dir is in continous cluster.
The patch also add a sanity check for entry in get_fatenv_value().
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Wu, Josh [Thu, 8 May 2014 08:14:06 +0000 (16:14 +0800)]
fs: fat_write: fix the incorrect last cluster checking
In fat_write.c, the last clust condition check is incorrect:
if ((curclust >= 0xffffff8) || (curclust >= 0xfff8)) {
... ...
}
For example, in FAT32 if curclust is 0x11000. It is a valid clust.
But on above condition check, it will be think as a last clust.
So the correct last clust check should be:
in fat32, curclust >= 0xffffff8
in fat16, curclust >= 0xfff8
in fat12, curclust >= 0xff8
This patch correct the last clust check.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Nobuhiro Iwamatsu [Tue, 8 Apr 2014 02:12:46 +0000 (11:12 +0900)]
fs: fat: Fix cache align error message in fatwrite
Use of malloc of do_fat_write() causes cache error on ARM v7 platforms.
Perhaps, the same problem will occur at any other CPUs.
This replaces malloc with memalign to fix cache buffer alignment.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Yoshiyuki Ito <yoshiyuki.ito.ub@renesas.com>
Tested-by: Hector Palacios <hector.palacios@digi.com>
Stephen Warren [Mon, 3 Feb 2014 20:21:10 +0000 (13:21 -0700)]
fat: implement exists() for FAT fs
This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the FAT filesystem.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Stephen Warren [Mon, 3 Feb 2014 20:21:09 +0000 (13:21 -0700)]
ext4: implement exists() for ext4fs
This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the ext4 filesystem.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Stephen Warren [Mon, 3 Feb 2014 20:21:01 +0000 (13:21 -0700)]
fs: don't pass NULL dev_desc to most filesystems
FAT and ext4 expect that the passed in block device descriptor not be
NULL. This causes problems on sandbox, where get_device_and_partition()
succeeds for the "host" device, yet passes back a NULL device descriptor.
Add special handling for this situation, so that the generic filesystem
commands operate as expected on sandbox.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Mon, 3 Feb 2014 20:21:00 +0000 (13:21 -0700)]
fs: implement infrastructure for an 'exists' function
This could be used in scripts such as:
if test -e mmc 0:1 /boot/boot.scr; then
load mmc 0:1 ${scriptaddr} /boot/boot.scr
source ${scriptaddr}
fi
rather than:
if load mmc 0:1 ${scriptaddr} /boot/boot.scr; then
source ${scriptaddr}
fi
This prevents errors being printed by attempts to load non-existent
files, which can be important when checking for a large set of files,
such as /boot/boot.scr.uimg, /boot/boot.scr, /boot/extlinux.conf,
/boot.scr.uimg, /boot.scr, /extlinux.conf.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Stephen Warren [Mon, 3 Feb 2014 20:20:59 +0000 (13:20 -0700)]
fs: fix generic save command implementation
Fix a few issues with the generic "save" shell command, and fs_write()
function.
1) fstypes[].write wasn't filled in for some file-systems, and isn't
checked when used, which could cause crashes/... if executing save
on e.g. fat/ext filesystems.
2) fs_write() requires the length argument to be non-zero, since it needs
to know exactly how many bytes to write. Adjust the comments and code
according to this.
3) fs_write() wasn't prototyped in <fs.h> like other generic functions;
other code should be able to call this directly rather than invoking
the "save" shell command.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Egbert Eich [Tue, 9 Apr 2013 21:11:55 +0000 (21:11 +0000)]
fs/fat: Don't multiply fatsize with sector size
Bugfix:
Here at this place we need the fat size in sectors not bytes.
This was found during code review when adding support for storage
devices with blocksizes != 512.
Signed-off-by: Egbert Eich <eich@suse.com>
Stephen Warren [Wed, 11 Jun 2014 18:46:16 +0000 (12:46 -0600)]
fs: ext4: fix writing zero-length files
ext4fs_allocate_blocks() always allocates at least one block for a file.
If the file size is zero, this causes total_remaining_blocks to
underflow, which then causes an apparent hang while 2^32 blocks are
allocated.
To solve this, check that total_remaining_blocks is non-zero as part of
the loop condition (i.e. before each loop) rather than at the end of
the loop.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Jeroen Hofstee [Mon, 9 Jun 2014 13:29:00 +0000 (15:29 +0200)]
ext4: correctly zero filename
Since ALLOC_CACHE_ALIGN_BUFFER declares a char* for filename
sizeof(filename) is not the size of the buffer. Use the already
known length instead.
cc: Uma Shankar <uma.shankar@samsung.com>
cc: Manjunatha C Achar <a.manjunatha@samsung.com>
cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Marek Vasut <marex@denx.de>
Łukasz Majewski [Tue, 6 May 2014 07:36:05 +0000 (09:36 +0200)]
fs:ext4:write:fix: Reinitialize global variables after updating a file
This bug shows up when file stored on the ext4 file system is updated.
The ext4fs_delete_file() is responsible for deleting file's (e.g. uImage)
data.
However some global data (especially ext4fs_indir2_block), which is used
during file deletion are left unchanged.
The ext4fs_indir2_block pointer stores reference to old ext4 double
indirect allocated blocks. When it is unchanged, after file deletion,
ext4fs_write_file() uses the same pointer (since it is already initialized
- i.e. not NULL) to return number of blocks to write. This trunks larger
file when previous one was smaller.
Lets consider following scenario:
1. Flash target with ext4 formatted boot.img (which has uImage [*] on itself)
2. Developer wants to upload their custom uImage [**]
- When new uImage [**] is smaller than the [*] - everything works
correctly - we are able to store the whole smaller file with corrupted
ext4fs_indir2_block pointer
- When new uImage [**] is larger than the [*] - theCRC is corrupted,
since truncation on data stored at eMMC was done.
3. When uImage CRC error appears, then reboot and LTHOR/DFU reflashing causes
proper setting of ext4fs_indir2_block() and after that uImage[**]
is successfully stored (correct uImage [*] metadata is stored at an
eMMC on the first flashing).
Due to above the bug was very difficult to reproduce.
This patch sets default values for all ext4fs_indir* pointers/variables.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Łukasz Majewski [Tue, 6 May 2014 07:36:04 +0000 (09:36 +0200)]
fs:ext4:cleanup: Remove superfluous code
Code responsible for handling situation when ext4 has block size of 1024B
can be ordered to take less space.
This patch does that for ext4 common and write files.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Ionut Nicu [Mon, 13 Jan 2014 11:00:08 +0000 (12:00 +0100)]
ext4fs: fix "invalid extent block" error
For files where we actually have extent indexes following
an extent header (ext_block->eh_depth != 0), the do/while
loop from ext4fs_get_extent_block() does not select the
proper extent index structure.
For example, if we have:
ext_block->eh_depth = 1
ext_block->eh_entries = 1
fileblock = 0
index[0].ei_block = 0
the do/while loop will exit with i set to 0 and the
ext4fs_get_extent_block() function will return 0, even if
there was a valid extent index structure following the
header.
Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>
Ionut Nicu [Mon, 13 Jan 2014 10:59:24 +0000 (11:59 +0100)]
ext4fs: use EXT2_BLOCK_SIZE instead of fs->blksz
Using fs->blksz in ext4fs_get_extent_block() is not
correct since fs->blksz is not initialized on the
read path. Use EXT2_BLOCK_SIZE() instead which will
produce the desired output.
Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>
Ma Haijun [Wed, 8 Jan 2014 00:15:33 +0000 (08:15 +0800)]
fs/ext4: fix calling put_ext4 with truncated offset
Curently, we are using 32 bit multiplication to calculate the offset,
so the result will always be 32 bit.
This can silently cause file system corruption when performing a write
operation on partition larger than 4 GiB.
This patch address the issue by simply promoting the terms to 64 bit,
and let compilers decide how to do the multiplication efficiently.
Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
Ma Haijun [Tue, 7 Jan 2014 22:49:43 +0000 (06:49 +0800)]
fs/ext4: fix partition size get truncated in calculation
It may cause file system corruption when do a write operation.
This issue only affects boards that use 32 bit lbaint_t.
Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
Frederic Leroy [Wed, 26 Jun 2013 16:11:25 +0000 (18:11 +0200)]
Fix ext2/ext4 filesystem accesses beyond 2TiB
With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
which is required to represent block numbers for storage devices that
exceed 2TiB (the block size usually is 512B), e.g. recent hard drives
We now use lbaint_t for partition offset to reflect the lbaint_t change,
and access partitions beyond or crossing the 2.1TiB limit.
This required changes to signature of ext4fs_devread(), and type of all
variables relatives to block sector.
ext2/ext4 fs uses logical block represented by a 32 bit value. Logical
block is a multiple of device block sector. To avoid overflow problem
when calling ext4fs_devread(), we need to cast the sector parameter.
Signed-off-by: Frédéric Leroy <fredo@starox.org>
Stephen Warren [Thu, 23 May 2013 10:22:10 +0000 (10:22 +0000)]
ext4: assign get_fs()->dev_desc before using it
Commit
50ce4c0 "fs/ext4: Support device block sizes != 512 bytes"
modified ext4fs_set_blk_dev() to calculate total_sect based on
get_fs()->dev_desc->log2blksz rather than SECTOR_SIZE. However, this
value wasn't yet assigned. Move the assignment earlier so the code
doesn't crash or hang.
Cc: Egbert Eich <eich@suse.com>
Tested-by: Tom Rini <trini@ti.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Egbert Eich [Wed, 1 May 2013 01:13:19 +0000 (01:13 +0000)]
fs/ext4: Support device block sizes != 512 bytes
The 512 byte block size was hard coded in the ext4 file systems.
Large harddisks today support bigger block sizes typically 4096
bytes.
This patch removes this limitation.
Signed-off-by: Egbert Eich <eich@suse.com>
Chanho Park [Wed, 5 Aug 2015 10:45:50 +0000 (19:45 +0900)]
common: fastboot: determine emmc and sdcard order
This patch allows to determine eMMC and microSD order. If Ompin is 0x3,
the first mmc device is microSD. In that case, mmc1 is eMMC and mmc0 is
sdcard.
Change-Id: I1b35aff4bfd0d8020037d1a387a1f3aa0508e2fc
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 10:12:49 +0000 (19:12 +0900)]
artik: enable fat boot partition
This patch enables boot partition is fat file system. The kernel, dtb
and initrd will be in the boot partition. The only difference between
artik5 and artik10 is dtb file name.
Change-Id: I2be882a1a8da79326ba94802a096a290d6194c03
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 10:11:14 +0000 (19:11 +0900)]
common: fastboot: support fat boot partition
This patch supports a boot partition which is formatted to fat file
system. The boot partition contains a kernel, dtb and initrd image. The
file can be retrived from u-boot environment variables. To avoid
conflict android's boot partition, just disables the android boot
partition.
Change-Id: I5c275ce61b211aef8e39701daabaa79527ac865d
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 05:26:48 +0000 (14:26 +0900)]
artik: configs: unify common configurations
This patch adds a artik_common.h configuration file to unify common
features between artik5 and artik10. This will reduce overhead of
changing common features both files.
Change-Id: Ied70bf479b4157f42e22efd913e67d0955aa4d97
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 05:18:58 +0000 (14:18 +0900)]
board: samsung: clean up exynos5422 board
If the definitions are not defined in the config file, build error will
be occurred. This patch corrects compile errors.
Change-Id: I5511c5f464a27d644b3ae12fdf7f5782bd19d785
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 05:16:33 +0000 (14:16 +0900)]
board: samsung: clean up exynos3250 board
This patch clean up exynos3250 board file only to be compiled the source with
macro definition.
Change-Id: I34c95aecd05be0161a45b4cda15ccedc3e21c0bc
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 03:27:31 +0000 (12:27 +0900)]
common: fastboot: support oem format command
This patch implements fastboot's oem format command. The default
partition format is gpt and dos partition will be supported later.
The "fastboot oem format" executes "gpt write mmc $partitions" command.
Thus, you should define the "$partitions" environment variable. After
creating gpt partition, the board will be rebooted automatically and
enter fastboot again.
Change-Id: Ia05194d150e3ccd7ea3ee68f2d67cbc6b5414d09
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 02:41:47 +0000 (11:41 +0900)]
artik5: configs: enable FASTBOOT_AUTO_REBOOT
To enter fastboot automatically during reboot, we'll check a inform4
register and it has FASTBOOT_AUTO_REBOOT_MODE.
Change-Id: I8df0a89879f5845613fb16b99751999c7fab7b77
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 02:36:48 +0000 (11:36 +0900)]
artik5: configs: enable FASTBOOT_AUTO_REBOOT
To enter fastboot automatically during reboot, we'll check a inform4
register and it has FASTBOOT_AUTO_REBOOT_MODE.
Change-Id: I623695ae8ff12f187f1b69f7732b24c8f03164b4
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 02:34:25 +0000 (11:34 +0900)]
board: samsung: auto reboot fastboot mode for exynos5422
This patch allow entering fastboot mode during reboot for exynos5422. If
sysip_dat0 register is set, fastboot is executed automatically during
boot.
Change-Id: If47647c9bd6c9da4a16b92acf7ebf65ab39a0dc8
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 02:24:57 +0000 (11:24 +0900)]
board: samsung: support auto reboot fastboot for exynos3
This patch allow entering fastboot mode if inform4 register is set.
Change-Id: I704fda8b030db37a87f7d3fa287164016544b88b
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 5 Aug 2015 02:22:27 +0000 (11:22 +0900)]
common: fastboot: support reboot-bootloader command
This patch supports reboot-bootloader command of fastboot. To enter
fastboot mode during reboot, we use INFORM4 register which is used for
FACTORY_RESET_MODE.
Change-Id: Ic3e28774ca128296deebd0ca184ed11f849301ad
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 4 Aug 2015 09:30:05 +0000 (18:30 +0900)]
artik5: config: enable fastboot chunk download
This patch enables a chunk download feature of fastboot to download huge
size of file system image.
Change-Id: I1e2636de69e71db9afd73e5dafc0bcbd38b4eee6
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 4 Aug 2015 09:28:27 +0000 (18:28 +0900)]
artik10: config: enable fastboot chunk download
This patch enables a chunk download feature of fastboot to download huge
size of file system image.
Change-Id: I8487aa0b6c402bd7231a8d99c4f1c68ba1de1483
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 4 Aug 2015 08:28:59 +0000 (17:28 +0900)]
common: fastboot: support chunk download
The original policy of the fastboot is first download and after flash.
We can't flash a huge size image because some boards don't have enough
size of ram buffer. Thus, we need to split the image into small size
buffer. Unfortunately, we can't get the partition information in normal
way. But, we could get the info through partition-type command of
fastboot. The partition information should be stored during
partition-type command and use them when download stage. If download
bytes reach chunk size for example 64MB, we could flash the buffer into
storage.
|--------------------192MB------------------|
|-----64MB-----|-----64MB-----|-----64MB----|
|=======A======|=======B======|======C======|
If 'A' chunk is downloaded, the 'A' will be flashed into mmc partition.
After B and C will be downloaded and flashed, the whole download will be
done.
Change-Id: If1321b8660103b7a18fa60ae6631b09e8e171464
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 4 Aug 2015 04:51:27 +0000 (13:51 +0900)]
common: decompress_ext4: support multiple chain downloads
This patch supports multiple chain downloads which splits a large buffer to
small buffers. The sparse image of android consists of file header,
chunk header and raw data. The file header is the first 28 bytes of the
buffer and it indicates meta information like total size, total chunk
count. Following the file header, there is multiple chunks which has a
chunk header and raw data. The types of the chunks are RAW, FILL and
NONE. The RAW type has raw data in the chunk and the FILL type means
there is no raw data thus we could skip the sectors.
The original scheme of fastboot is flashing after we download the whole
data. However, there is no way to store a huge image if we don't have
sufficient ram buffers. Thus, we need to flash the image into small size
buffers. To support chain download, we need to keep meta information
like current sector position.
|------------------------80MB---------------------|
|-----32MB---------|-------32MB-----|----16MB-----|
|FH|CH|----RAW------|CH|FILL|CH|-------RAW--------|
For example, there is 80MB image to download and flash, we could split
them into three chunks which the max is 32MB or predefined size. We
should consider residue bytes in boundary of chunks. The residue bytes
should be stored a buffer and flash them when next chunks will be
flashed.
Change-Id: Idabb738fa1c2fac1b1e2c561e3cbdb7fa5d5ac8f
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 30 Jul 2015 04:53:17 +0000 (13:53 +0900)]
artik10: configs: support boot environment
This patch updates the artik10 config to support boot environment. This
also includes gpt table configurations for future works. You could
convert and change boot mode easily from u-boot shell.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 28 Jul 2015 07:18:28 +0000 (16:18 +0900)]
artik5: config: disable static kernel offset
This patch disables static position of kernel offset because the flash
program should be changed.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>