From d3aa8b8be2204e709fe307787dfbd8234316b41b Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 26 Sep 2012 13:01:00 +0200 Subject: env: Enable getenv_f() for SPL_BUILD With this patch, getenv_f() can be included easily into the SPL binary. With this, SPL boards can now use getenv_f() to read environment variables (e.g. to detect if the OS or U-Boot shall be executed). In the approach this is done for env stored in NOR flash, as this will be used by an upcoming MPC5200 board port. Signed-off-by: Stefan Roese --- common/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index 9e43322..c29a7d8 100644 --- a/common/Makefile +++ b/common/Makefile @@ -195,6 +195,9 @@ COBJS-$(CONFIG_CMD_DFU) += cmd_dfu.o endif ifdef CONFIG_SPL_BUILD +COBJS-y += cmd_nvedit.o +COBJS-y += env_common.o +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o -- cgit v1.1 From 53fdc7ef2e43902c4415a81a434c35f9ed8713bc Mon Sep 17 00:00:00 2001 From: Anton Staaf Date: Wed, 5 Dec 2012 14:46:29 +0000 Subject: Add gettime command Gettime returns the current timer value. If CONFIG_SYS_HZ is defined then the timer value is also converted to seconds. Tegra20 (SeaBoard) # gettime Timer val: 7754 Seconds : 7 Remainder : 754 sys_hz = 1000 There has been some discussion about whether this is useful enough to be included in U-Boot. The following boards do not have CONFIG_SYS_HZ defined: M52277EVB M52277EVB_stmicro M53017EVB M54418TWR M54418TWR_nand_mii M54418TWR_nand_rmii M54418TWR_nand_rmii_lowfreq M54418TWR_serial_mii M54418TWR_serial_rmii Signed-off-by: Anton Staaf Signed-off-by: Simon Glass --- common/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index c29a7d8..b3a6032 100644 --- a/common/Makefile +++ b/common/Makefile @@ -100,6 +100,7 @@ ifdef CONFIG_FPGA COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o endif COBJS-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o +COBJS-$(CONFIG_CMD_GETTIME) += cmd_gettime.o COBJS-$(CONFIG_CMD_GPIO) += cmd_gpio.o COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o -- cgit v1.1 From ff048ea916f74a40c18b5aaa5f357dce1c75bffa Mon Sep 17 00:00:00 2001 From: Kenneth Waters Date: Wed, 5 Dec 2012 14:46:30 +0000 Subject: Add a command to read raw blocks from a partition Sometimes data is on a block device and within a partition, but not in a particular filesystem. This commands permits reading raw data from a partition. Signed-off-by: Kenneth Waters Signed-off-by: Simon Glass --- common/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index b3a6032..07a93d1 100644 --- a/common/Makefile +++ b/common/Makefile @@ -142,6 +142,7 @@ endif COBJS-y += cmd_pcmcia.o COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o COBJS-$(CONFIG_CMD_PXE) += cmd_pxe.o +COBJS-$(CONFIG_CMD_READ) += cmd_read.o COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o -- cgit v1.1 From 460408ef9a14b8f8896d1bc8aa0f702b47c26bb8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 5 Dec 2012 14:46:36 +0000 Subject: Add generic hash API We have a SHA1 command and want to add a SHA256 command also. Instead of duplicating the code, create a generic hash API which can process commands for different algorithms. Signed-off-by: Simon Glass --- common/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index 07a93d1..068598b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -30,6 +30,7 @@ ifndef CONFIG_SPL_BUILD COBJS-y += main.o COBJS-y += command.o COBJS-y += exports.o +COBJS-y += hash.o COBJS-$(CONFIG_SYS_HUSH_PARSER) += hush.o COBJS-y += s_record.o COBJS-y += xyzModem.o -- cgit v1.1 From bf36c5d521c17460553e39d82232a51273b83aed Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 5 Dec 2012 14:46:38 +0000 Subject: Add hash command to perform hashing using various algorithms This new command supports hashing SHA1 and SHA256. It could be extended to others such as MD5 and the CRC algorithms. The syntax is modeled on those: hash
[* | ] to calculate a hash, and: hash -v
[* | ] to verify a hash. Use CONFIG_CMD_HASH to enable the command, CONFIG_SHA1 to enable SHA1 and CONFIG_SHA256 to enable SHA256. The existing sha1sum command remains. Signed-off-by: Simon Glass --- common/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index 068598b..ce5ee6e 100644 --- a/common/Makefile +++ b/common/Makefile @@ -104,6 +104,7 @@ COBJS-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o COBJS-$(CONFIG_CMD_GETTIME) += cmd_gettime.o COBJS-$(CONFIG_CMD_GPIO) += cmd_gpio.o COBJS-$(CONFIG_CMD_I2C) += cmd_i2c.o +COBJS-$(CONFIG_CMD_HASH) += cmd_hash.o COBJS-$(CONFIG_CMD_IDE) += cmd_ide.o COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o COBJS-$(CONFIG_CMD_INI) += cmd_ini.o -- cgit v1.1 From d46b5f7dcbf294141d6bba1dc8e2b98d742d0562 Mon Sep 17 00:00:00 2001 From: Tom Wai-Hong Tam Date: Wed, 5 Dec 2012 14:46:39 +0000 Subject: edid: Library of EDID decode and print This implements a library for accessing EDID data from an LCD panel. This is used to obtain information about the panel such as its resolution and type. This is a tidied-up version of the original code pulled from https://github.com/ynezz/u-boot-edid. The changes we made are: - removed bit fields in the struct; - removed endianness cases in the struct; - fixed some wrong definitions; - fixed to fit 80 columns; - fixed some code styles. Signed-off-by: Tom Wai-Hong Tam Signed-off-by: Simon Glass --- common/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index ce5ee6e..ebb7635 100644 --- a/common/Makefile +++ b/common/Makefile @@ -188,6 +188,7 @@ COBJS-$(CONFIG_BOOTSTAGE) += bootstage.o COBJS-$(CONFIG_CONSOLE_MUX) += iomux.o COBJS-y += flash.o COBJS-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o +COBJS-$(CONFIG_I2C_EDID) += edid.o COBJS-$(CONFIG_KALLSYMS) += kallsyms.o COBJS-$(CONFIG_LCD) += lcd.o COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o -- cgit v1.1 From 9ad557be2fc45bb0207cb6cb5de5bf51c9daa689 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Wed, 5 Dec 2012 14:46:42 +0000 Subject: Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury Signed-off-by: Simon Glass --- common/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index ebb7635..083df17 100644 --- a/common/Makefile +++ b/common/Makefile @@ -120,6 +120,7 @@ COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o COBJS-$(CONFIG_ID_EEPROM) += cmd_mac.o COBJS-$(CONFIG_CMD_MD5SUM) += cmd_md5sum.o COBJS-$(CONFIG_CMD_MEMORY) += cmd_mem.o +COBJS-$(CONFIG_CMD_IO) += cmd_io.o COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o COBJS-$(CONFIG_MII) += miiphyutil.o COBJS-$(CONFIG_CMD_MII) += miiphyutil.o -- cgit v1.1 From 8b096237667d0993c6900bd10068a25ce368fe16 Mon Sep 17 00:00:00 2001 From: Piotr Wilczek Date: Tue, 11 Dec 2012 11:09:47 +0100 Subject: gpt: Support for new "gpt" command New command - "gpt" is supported. It restores the GPT partition table. It looks into the given environment variable for partitions definition. It can be enabled at target configuration file with CONFIG_CMD_GPT. Signed-off-by: Lukasz Majewski Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park --- common/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index 083df17..ce30359 100644 --- a/common/Makefile +++ b/common/Makefile @@ -198,6 +198,7 @@ COBJS-$(CONFIG_MODEM_SUPPORT) += modem.o COBJS-$(CONFIG_UPDATE_TFTP) += update.o COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o COBJS-$(CONFIG_CMD_DFU) += cmd_dfu.o +COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o endif ifdef CONFIG_SPL_BUILD -- cgit v1.1 From 170ab11075d3be56e89d6444abf1148329130f4b Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Tue, 11 Dec 2012 22:16:24 -0600 Subject: env: Add support for callbacks to environment vars Add support for per-variable callbacks to the "hashtable" functions. Signed-off-by: Joe Hershberger !!!fix comment in callback --- common/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index ce30359..04812e9 100644 --- a/common/Makefile +++ b/common/Makefile @@ -44,6 +44,8 @@ COBJS-y += cmd_nvedit.o COBJS-y += cmd_version.o # environment +COBJS-y += env_attr.o +COBJS-y += env_callback.o COBJS-y += env_common.o COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o @@ -207,6 +209,8 @@ COBJS-y += env_common.o COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o +COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o +COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o -- cgit v1.1 From 2598090b7e17f8bdca95b22e7f27217054730e02 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Tue, 11 Dec 2012 22:16:31 -0600 Subject: env: Add environment variable flags Currently just validates variable types as decimal, hexidecimal, boolean, ip address, and mac address. If the entry is not found in the env ".flags", then look in the static one. This allows the env to override the static definitions, but prevents the need to have every definition in the environment distracting you. Signed-off-by: Joe Hershberger --- common/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/Makefile') diff --git a/common/Makefile b/common/Makefile index 04812e9..c774395 100644 --- a/common/Makefile +++ b/common/Makefile @@ -47,6 +47,7 @@ COBJS-y += cmd_version.o COBJS-y += env_attr.o COBJS-y += env_callback.o COBJS-y += env_common.o +COBJS-y += env_flags.o COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o XCOBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o @@ -212,6 +213,7 @@ COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o +COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o endif -- cgit v1.1