Rev 3021 | Rev 3046 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3021 | Rev 3028 | ||
|---|---|---|---|
| Line 33... | Line 33... | ||
| 33 | import sys |
33 | import sys |
| 34 | import os |
34 | import os |
| 35 | import struct |
35 | import struct |
| 36 | 36 | ||
| 37 | def align_up(size, alignment): |
37 | def align_up(size, alignment): |
| - | 38 | "Align upwards to a given alignment" |
|
| 38 | return (((size) + ((alignment) - 1)) & ~((alignment) - 1)) |
39 | return (((size) + ((alignment) - 1)) & ~((alignment) - 1)) |
| 39 | 40 | ||
| 40 | def usage(prname): |
41 | def usage(prname): |
| 41 | "Print usage syntax" |
42 | "Print usage syntax" |
| 42 | print prname + " <ALIGNMENT> <PATH> <IMAGE>" |
43 | print prname + " <ALIGNMENT> <PATH> <IMAGE>" |