blob: e2368c000d0c01e5245a01960c74de1618733695 [file] [log] [blame]
Peer Chen8d782ee2011-01-18 21:34:18 -05001/**
2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
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
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23/*
24 * set.h - Definitions for the cbootimage state setting code.
25 */
26
27#ifndef INCLUDED_SET_H
28#define INCLUDED_SET_H
29
30#include "cbootimage.h"
31#include "parse.h"
32#include "string.h"
33#include "sys/stat.h"
34
35int
36context_set_array(build_image_context *context,
37 u_int32_t index,
38 parse_token token,
39 u_int32_t value);
40
41int
42set_bootloader(build_image_context *context,
43 char *filename,
44 u_int32_t load_addr,
45 u_int32_t entry_point);
46
47int
48context_set_value(build_image_context *context,
49 parse_token token,
50 u_int32_t value);
51
52int
53set_addon_filename(build_image_context *context,
54 char *filename,
55 int index);
56
57int
58set_addon_attr(build_image_context *context,
59 u_int32_t file_attr,
60 int index);
61
62int
63set_unique_name(build_image_context *context,
64 char *uname,
65 int index);
66
67int
68set_other_field(build_image_context *context,
69 char *other_str,
70 int other,
71 int index);
72
73int
Peer Chen053d5782011-03-03 10:12:58 -080074set_nand_param(build_image_context *context,
75 u_int32_t index,
76 parse_token token,
77 u_int32_t value);
78
79int
Peer Chen7557d9b2011-02-24 09:29:23 -080080set_sdmmc_param(build_image_context *context,
81 u_int32_t index,
82 parse_token token,
83 u_int32_t value);
84
85int
86set_spiflash_param(build_image_context *context,
87 u_int32_t index,
88 parse_token token,
89 u_int32_t value);
90
91int
Peer Chen3a834ed2011-03-04 09:30:05 -080092set_sdram_param(build_image_context *context,
93 u_int32_t index,
94 parse_token token,
95 u_int32_t value);
96
97int
Peer Chen8d782ee2011-01-18 21:34:18 -050098read_from_image(char *filename,
99 u_int32_t page_size,
100 u_int8_t **Image,
101 u_int32_t *storage_size,
102 u_int32_t *actual_size,
103 file_type f_type);
104
105#endif /* #ifndef INCLUDED_SET_H */