2 years agoAdd configuration files for TrimSlice board factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B factory-4128.B factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-3842.B factory-spring-4131.B factory-spring-4262.B firmware-butterfly-2788.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-link-2348.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-pit-4482.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B firmware-stout-2817.B firmware-wolf-4389.24.B master release-R21-2465.B release-R22-2723.B release-R23-2913.B release-R25-3428.B release-R26-3701.B release-R27-3912.B release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-bluetooth-smart stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize-spring-4100.53.B stabilize2 toolchain-3428.65.B toolchain-3701.42.B toolchainA toolchainB
Stephen Warren [Wed, 20 Apr 2011 17:10:45 +0000 (20:10 +0300)]
Add configuration files for TrimSlice board

This content of the configuration files mainly comes from commit d16cda0
"Add sample .cfg files for MMC and SPI boot" from
git:// trimslice
authored by Konstantin Sinyuk <>.

* Create configs/${board} layout for config files.
* Add configurations for Trimslice, booting from SPI and MMC/SD.
* Create separate BCT- and image-generation config files.
* Add OdmData, based on Compulab's U-Boot code, with debug UART value fixed
  to be UART A not UART D.
* Switch U-Boot load/entry address from 0x00e08000 to 0x00108000 to match
  upstream U-Boot.
* Set Bctcopy=1 for MMC, to match the recovery images provided by Compulab.
* Add script to build the BCTs and images
* Add .gitignore file

Signed-off-by: Stephen Warren <>
Change-Id: Ic1dd11f387d774cb67ac1115db725210b255bb03
Reviewed-by: Simon Glass <>
3 years agoAdd top-level .gitignore file
Stephen Warren [Wed, 16 May 2012 23:01:06 +0000 (17:01 -0600)]
Add top-level .gitignore file

This prevents "git status" from displaying generated files as new, and
hence needing commit.

Signed-off-by: Stephen Warren <>
Change-Id: I2c0319183ba3e8d4222f533229474cf6bc0c4049
Reviewed-by: Simon Glass <>
3 years agoAdd PreBctPadBlocks config file option
Stephen Warren [Wed, 16 May 2012 20:56:55 +0000 (14:56 -0600)]
Add PreBctPadBlocks config file option

This allows the BCT to be offset within the memory device. This is a port
of commit 883a7d0 "Add suport for MMC boot image preparation" from
git://'s trimslice branch. The
description there is:

    Add suport for MMC boot image preparation

    In order to allow the MBR to be placed at offset 0,
    BCT is copied to 128K offset.

Signed-off-by: Stephen Warren <>
Change-Id: Icde53082f5a4645fefb70deb408a42f9920aed1f
Reviewed-by: Simon Glass <>
3 years agoUse correct limit in find_new_bct_blk()
Stephen Warren [Wed, 16 May 2012 20:49:21 +0000 (14:49 -0600)]
Use correct limit in find_new_bct_blk()

The limit is max_bct_search_blks not hash_size.

Signed-off-by: Stephen Warren <>
Change-Id: Idbde21ef75f03c2d6d4adbbe62bd623e4ad6b70e
Reviewed-by: Rhyland Klein <>
Reviewed-by: Simon Glass <>
3 years agoAllow OdmData to be specified in the config file factory-2338.B
Stephen Warren [Wed, 16 May 2012 20:38:17 +0000 (14:38 -0600)]
Allow OdmData to be specified in the config file

Signed-off-by: Stephen Warren <>
Change-Id: I795131b39de2b09f77d53f2cb03a68d8ef07e2fb
Reviewed-by: Rhyland Klein <>
Reviewed-by: Simon Glass <>
3 years agoCHROMIUM: cbootimage: Specify the ODM_DATA factory-2268.16.B factory-2305.B release-R20-2268.B
Peer Chen [Mon, 16 Apr 2012 08:51:27 +0000 (16:51 +0800)]
CHROMIUM: cbootimage: Specify the ODM_DATA

Add the ODM_DATA argument, u-boot remove the hardcode ODM_DATA,
need to use the ODM_DATA from BCT.


Change-Id: I215ed99f42d02b82450130129badef2b36e6d370
Signed-off-by: Peer Chen <>
Reviewed-by: Tom Warren <>
Reviewed-by: Jimmy Zhang <>
Reviewed-by: Simon Glass <>
3 years agoCHROMIUM: cbootimage: Add t30 support
Peer Chen [Tue, 13 Mar 2012 03:12:39 +0000 (11:12 +0800)]
CHROMIUM: cbootimage: Add t30 support

Add the t30 chip support to cbootimage file, use can append
-t20/-t30 chipname option to support the different chip
explicitly, the default is t20 if without this chipname option.

TEST=Test done locally with .cfg file

Change-Id: I0e77f0e0ce2a324bee3287787dcab1c15f3512e4
Commit-Ready: Peer Chen <>
Tested-by: Peer Chen <>
Reviewed-by: Simon Glass <>
3 years agoCHROMIUM: cbootimage: Add Bctcopy parameter factory-1235.B factory-1284.B factory-1412.B factory-1987.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B release-R16-1193.B release-R17-1412.B release-R18-1660.B release-R19-2046.B
Peer Chen [Wed, 27 Jul 2011 06:59:41 +0000 (02:59 -0400)]
CHROMIUM: cbootimage: Add Bctcopy parameter

Add the Bctcopy parameter for the bct number in final boot image
file to save the NAND space.
In .cfg file, add "Bctcopy = n(n >= 1)" to specify the bct count.


Change-Id: I873a000f9165017db9dec25fb7b18cf082e535ba
Reviewed-by: Anton Staaf <>
Tested-by: Doug Anderson <>
4 years agoFinish conversion of bct_dump to generate config files that cbootimage can parse. 0.12.362.B 0.12.369.B 0.12.392.B 0.12.433.B 0.12.433.B109 0.12.433.B62 0.13.434.B 0.13.509.B 0.13.558.B 0.13.587.B 0.14.811.B 0.15.877.B 780.B factory-1020.B factory-980.B firmware-881-u-boot-v1 firmware-u-boot-v1 release-1011.B test-982.B
Anton Staaf [Mon, 14 Mar 2011 22:38:59 +0000 (15:38 -0700)]
Finish conversion of bct_dump to generate config files that cbootimage can parse.

This includes code to look up the human readable string names for enum
values.  The next step will be to convert all of our existing BCT files
from binary to config file format.  Then the cros_write_firmware and
cros_sign_bootstub tools will need to be changed to read the config file
instead of a binary BCT.  The tegra-bct ebuilds will also need to change
to install config files instead of binary BCT files.

TEST=manually dump a working BCT and run cbootimage to reconstruct the BCT.
flash and boot with the new BCT.

Change-Id: I056735d0638b349580c6993b2976ca55bf4d0ea2

Review URL:

4 years agoExpose and augment parser enum and field name tables to bct_dump.
Anton Staaf [Mon, 14 Mar 2011 19:28:06 +0000 (12:28 -0700)]
Expose and augment parser enum and field name tables to bct_dump.

This adds the nvbctlib id value to the field_item struct and makes
the parser tables available outside of parse.c.  This lets bct_dump
use these to pretty print a BCT in a format that the parser can
later read back in.

TEST=Sign and boot a U-Boot image on Seaboard using:

sudo emerge -av cbootimage
USE="recovery flasher" emerge-tegra2_seaboard -av chromeos-u-boot-next
cros_write_firmware --board tegra2_seaboard --firmware /build/tegra2_seaboard/u-boot/u-boot-recovery.bin --sign

Change-Id: Ibcc8ce5c2c62cbfea8ca2850ddd8122b84c0f78f

Review URL:

4 years agoInitialize the bad block table when create the bct file from scratch,
Anton Staaf [Fri, 11 Mar 2011 21:56:27 +0000 (13:56 -0800)]
Initialize the bad block table when create the bct file from scratch,
bct file can't work if miss the bad block table field.

Change-Id: Icf4e64d761e6160f022d4934c4670f435a299933

TEST= Test with config file on Seaboard.

Review URL:

4 years agoAdd support for SDRAM registers printing to bct_dump. 0.11.241.B 0.11.257.B 0.11.257.B90 11.1.241.B
Vincent Palatin [Mon, 7 Mar 2011 21:09:25 +0000 (16:09 -0500)]
Add support for SDRAM registers printing to bct_dump.

This adds human readable output for RAM controller registers default
values stored in a BCT file.

TEST=bct_dump burn-u-boot/bct/default.bct and check EMC_CFG value.

This CL depends on

Change-Id: I4451d17c144d0273d375e490511e2534accd6de1

Review URL:

4 years agoAdd the SDRAM parameters support for cbootimage.
Peer Chen [Fri, 4 Mar 2011 17:30:05 +0000 (09:30 -0800)]
Add the SDRAM parameters support for cbootimage.

Change-Id: I15a6cacbf8b19b16b4bcccd6ea0e2740cacadee3

TEST=Test with config file.

Review URL:
Patch from Peer Chen <>.

4 years agoAdd the nand device support for cbootimage tool.
Peer Chen [Thu, 3 Mar 2011 18:12:58 +0000 (10:12 -0800)]
Add the nand device support for cbootimage tool.

Change-Id: Ic24dd4c971c16d00742d90830be168b41483be7a

TEST=Test with the config file.

Review URL:
Patch from Peer Chen <>.

4 years agoAdd the SDRAM parameter header file.
Peer Chen [Wed, 2 Mar 2011 18:30:32 +0000 (10:30 -0800)]
Add the SDRAM parameter header file.

Change-Id: I9d48b5c9222a50695df00694a97f8c52729657e7


Review URL:
Patch from Peer Chen <>.

4 years agoAdd support for flash device parameters printing to bct_dump.
Anton Staaf [Wed, 2 Mar 2011 17:23:27 +0000 (09:23 -0800)]
Add support for flash device parameters printing to bct_dump.

This adds human readable output for SPI and SDMMC device
parameters stored in a BCT file.  This includes clock
divisors, boot flash type and various flash type specific

TEST=bct_dump /build/tegra2_seaboard/u-boot/image.bin

Change-Id: I9f233abf53627ddb00159e105cfa3ff01d38ce5c

This CL depends on:

Review URL:

4 years agoFix tab stops to be 8-spaces instead of 4.
Anton Staaf [Wed, 2 Mar 2011 17:22:25 +0000 (09:22 -0800)]
Fix tab stops to be 8-spaces instead of 4.

Change-Id: If70ee0c550a37ad7401552c231021b966b8e368f


Review URL:

4 years agoAdd bct_dump tool.
Anton Staaf [Thu, 24 Feb 2011 18:17:50 +0000 (10:17 -0800)]
Add bct_dump tool.

This tool dumps a human readable version of the BCT file provided on
the command line to stdout.

Change-Id: Ic9609b16aee307fd78c2d5d472d8d08072573df6

TEST=run bct_dump on SPI and NAND BCT files and verify that the expected values are displayed.

This CL depends on:

Review URL:

4 years agoAdd the device type/parameters support for cbootimage tool.
Peer Chen [Thu, 24 Feb 2011 17:29:23 +0000 (09:29 -0800)]
Add the device type/parameters support for cbootimage tool.
Add the bct generated function for cbootimage tool.

Change-Id: I2ad282d7dbce1d06d54fa3ee2ef5f550598089b0

TEST=Test using the cfg file.

Review URL:
Patch from Peer Chen <>.

4 years agoAdd initial CREDITS file.
Anton Staaf [Thu, 17 Feb 2011 23:34:50 +0000 (15:34 -0800)]
Add initial CREDITS file.

Change-Id: I2eb4291c9844ca78e4cb2a14f64487c528cc4168


Review URL:

4 years agoFactor out the context specific functions into their own file.
Anton Staaf [Thu, 17 Feb 2011 17:22:32 +0000 (09:22 -0800)]
Factor out the context specific functions into their own file.

These will be reused by my BCT display tool.

Change-Id: I88d595412ec439a96231b81253eb04ed4bfd377d

TEST=run cbootimage on test config.

Review URL:

4 years agoAdd emacs coding style configuration file.
Anton Staaf [Fri, 11 Feb 2011 17:41:20 +0000 (09:41 -0800)]
Add emacs coding style configuration file.

Change-Id: I49818d167126659c499ec5716bdf841560487826


Review URL:

4 years agoCheck return code of fwrite in raw image writing code.
Anton Staaf [Thu, 10 Feb 2011 18:34:15 +0000 (10:34 -0800)]
Check return code of fwrite in raw image writing code.

Change-Id: I8c52a205ae1dc559c9f8b41d4d2c50e821b3b05c


Review URL:

4 years agoFix pointer to integer cast warning.
Anton Staaf [Fri, 28 Jan 2011 19:19:05 +0000 (11:19 -0800)]
Fix pointer to integer cast warning.

Change-Id: I149b901885ab09260b0d9c7d82f41a41397d4b44

TEST=build and observe no compiler warnings.

Review URL:

4 years agoRemove extra path element.
Allen Martin [Tue, 25 Jan 2011 20:56:10 +0000 (12:56 -0800)]
Remove extra path element.

Remove extra path element that came as part of the git I cloned
this from.

4 years agotegra tools: add the cbootimage for google request
Peer Chen [Wed, 19 Jan 2011 02:34:18 +0000 (21:34 -0500)]
tegra tools: add the cbootimage for google request

cbootimage is a tool used to combine binary .bct, bootloader
and google's component to a spi rom image file.

Change-Id: I25b6fee13d7449fc83ec3802b79cbbbcaae54494