~lool/linaro-image-tools/igep-support

« back to all changes in this revision

Viewing changes to linaro_media_create/populate_boot.py

  • Committer: Loïc Minier
  • Date: 2011-03-10 23:37:08 UTC
  • mfrom: (287.1.9 trunk)
  • Revision ID: lool@dooz.org-20110310233708-tjeezguoaeo860ix
Merge with lp:linaro-image-tools; rework tests for new bootcmd/bootargs dict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# You should have received a copy of the GNU General Public License
18
18
# along with Linaro Image Tools.  If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
 
import errno
21
20
import os
22
21
 
23
22
from linaro_media_create import cmd_runner
32
31
        parts_dir = 'casper'
33
32
    uboot_parts_dir = os.path.join(chroot_dir, parts_dir)
34
33
 
35
 
    try:
36
 
        os.makedirs(boot_disk)
37
 
    except OSError, exc:
38
 
        if exc.errno == errno.EEXIST:
39
 
            pass
40
 
        else:
41
 
            raise
 
34
    cmd_runner.run(['mkdir', '-p', boot_disk]).wait()
42
35
    cmd_runner.run(['mount', boot_partition, boot_disk], as_root=True).wait()
43
36
 
44
 
    uboot_flavor = board_config.uboot_flavor
45
 
    if uboot_flavor is not None:
 
37
    if board_config.uboot_in_boot_part:
 
38
        uboot_flavor = board_config.uboot_flavor
 
39
        assert uboot_flavor is not None, (
 
40
            "uboot_in_boot_part is set but not uboot_flavor")
46
41
        uboot_bin = os.path.join(
47
42
            chroot_dir, 'usr', 'lib', 'u-boot', uboot_flavor, 'u-boot.bin')
48
43
        cmd_runner.run(