Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /** | 1 /** |
| 2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. | 2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. |
| 3 * | 3 * |
| 4 * See file CREDITS for list of people who contributed to this | 4 * See file CREDITS for list of people who contributed to this |
| 5 * project. | 5 * project. |
| 6 * | 6 * |
| 7 * This program is free software; you can redistribute it and/or | 7 * This program is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU General Public License as | 8 * modify it under the terms of the GNU General Public License as |
| 9 * published by the Free Software Foundation; either version 2 of | 9 * published by the Free Software Foundation; either version 2 of |
| 10 * the License, or (at your option) any later version. | 10 * the License, or (at your option) any later version. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 printf("Error opening raw file %s.\n", | 169 printf("Error opening raw file %s.\n", |
| 170 context.image_filename); | 170 context.image_filename); |
| 171 goto fail; | 171 goto fail; |
| 172 } | 172 } |
| 173 | 173 |
| 174 /* Parse & process the contents of the config file. */ | 174 /* Parse & process the contents of the config file. */ |
| 175 process_config_file(&context); | 175 process_config_file(&context); |
| 176 | 176 |
| 177 /* Generate the new bct file */ | 177 /* Generate the new bct file */ |
| 178 if (context.generate_bct != 0) { | 178 if (context.generate_bct != 0) { |
| 179 /* Update the BCT */ | |
| 180 begin_update(&context); | |
|
robotboy
2011/03/03 18:08:46
Is this required for the NAND support or is it a s
| |
| 179 /* Signing the bct. */ | 181 /* Signing the bct. */ |
| 180 e = sign_bct(&context, context.bct); | 182 e = sign_bct(&context, context.bct); |
| 181 if (e != 0) | 183 if (e != 0) |
| 182 printf("Signing BCT failed, error: %d.\n", e); | 184 printf("Signing BCT failed, error: %d.\n", e); |
| 183 | 185 |
| 184 fwrite(context.bct, 1, sizeof(nvboot_config_table), | 186 fwrite(context.bct, 1, sizeof(nvboot_config_table), |
| 185 context.raw_file); | 187 context.raw_file); |
| 186 printf("New BCT file %s has been successfully generated!\n", | 188 printf("New BCT file %s has been successfully generated!\n", |
| 187 context.image_filename); | 189 context.image_filename); |
| 188 goto fail; | 190 goto fail; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 212 fail: | 214 fail: |
| 213 /* Close the file(s). */ | 215 /* Close the file(s). */ |
| 214 if (context.raw_file) | 216 if (context.raw_file) |
| 215 fclose(context.raw_file); | 217 fclose(context.raw_file); |
| 216 | 218 |
| 217 /* Clean up memory. */ | 219 /* Clean up memory. */ |
| 218 cleanup_context(&context); | 220 cleanup_context(&context); |
| 219 | 221 |
| 220 return e; | 222 return e; |
| 221 } | 223 } |
| OLD | NEW |