~deeptik/linaro-image-tools/fix_bug_Bug816767

« back to all changes in this revision

Viewing changes to linaro_image_tools/hwpack/hardwarepack.py

  • Committer: Mattias Backman
  • Date: 2011-08-30 08:52:00 UTC
  • mfrom: (427.1.9 hwpacks-v2-samsung)
  • Revision ID: mattias.backman@linaro.org-20110830085200-usy40ehdrtto8odg
Add hwpacks V2 support for Samsung boards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
                      dtb_addr=None, extra_boot_options=None,
86
86
                      boot_script=None, uboot_in_boot_part=None,
87
87
                      extra_serial_opts=None, loader_start=None,
88
 
                      snowball_startup_files_config=None):
 
88
                      snowball_startup_files_config=None,
 
89
                      samsung_bl1_start=None, samsung_bl1_len=None,
 
90
                      samsung_env_len=None, samsung_bl2_len=None):
89
91
        """Add fields that are specific to the new format.
90
92
 
91
93
        These fields are not present in earlier config files.
92
94
        """
93
95
        self.u_boot = None
 
96
        self.spl = None
94
97
        self.serial_tty = serial_tty
95
98
        self.kernel_addr = kernel_addr
96
99
        self.initrd_addr = initrd_addr
113
116
        self.uboot_in_boot_part = uboot_in_boot_part
114
117
        self.extra_serial_opts = extra_serial_opts
115
118
        self.snowball_startup_files_config = snowball_startup_files_config
 
119
        self.samsung_bl1_start = samsung_bl1_start
 
120
        self.samsung_bl1_len = samsung_bl1_len
 
121
        self.samsung_env_len = samsung_env_len
 
122
        self.samsung_bl2_len = samsung_bl2_len
116
123
 
117
124
    @classmethod
118
125
    def from_config(cls, config, version, architecture):
158
165
                                   boot_script=config.boot_script,
159
166
                                   uboot_in_boot_part=config.uboot_in_boot_part,
160
167
                                   extra_serial_opts=config.extra_serial_opts,
161
 
                                   snowball_startup_files_config=config.snowball_startup_files_config)
 
168
                                   snowball_startup_files_config=config.snowball_startup_files_config,
 
169
                                   samsung_bl1_start=config.samsung_bl1_start,
 
170
                                   samsung_bl1_len=config.samsung_bl1_len,
 
171
                                   samsung_env_len=config.samsung_env_len,
 
172
                                   samsung_bl2_len=config.samsung_bl2_len)
162
173
        return metadata
163
174
 
164
175
    def __str__(self):
178
189
            
179
190
        if self.u_boot is not None:
180
191
            metadata += "U_BOOT=%s\n" % self.u_boot
 
192
        if self.spl is not None:
 
193
            metadata += "SPL=%s\n" % self.spl
181
194
        if self.serial_tty is not None:
182
195
            metadata += "SERIAL_TTY=%s\n" % self.serial_tty
183
196
        if self.kernel_addr is not None:
223
236
            metadata += "EXTRA_SERIAL_OPTIONS=%s\n" % self.extra_serial_opts
224
237
        if self.snowball_startup_files_config is not None:
225
238
            metadata += "SNOWBALL_STARTUP_FILES_CONFIG=%s\n" % self.snowball_startup_files_config
 
239
        if self.samsung_bl1_start is not None:
 
240
            metadata += "SAMSUNG_BL1_START=%s\n" % self.samsung_bl1_start
 
241
        if self.samsung_bl1_len is not None:
 
242
            metadata += "SAMSUNG_BL1_LEN=%s\n" % self.samsung_bl1_len
 
243
        if self.samsung_env_len is not None:
 
244
            metadata += "SAMSUNG_ENV_LEN=%s\n" % self.samsung_env_len
 
245
        if self.samsung_bl2_len is not None:
 
246
            metadata += "SAMSUNG_BL2_LEN=%s\n" % self.samsung_bl2_len
226
247
 
227
248
        return metadata
228
249