diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2013-08-17 08:10:14 +0300 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2013-08-17 08:10:14 +0300 |
commit | 47a68988c7c6042cb373402355fa16663b0c62f1 (patch) | |
tree | b7ad8fcbe669d2c7678300b261828cd2877d7e1a /linaro-media-create | |
parent | e66296ece4e18d3137f5af96138f3461e3fc48f4 (diff) | |
parent | 51605ba19ca3a77c5e52b5e078f804ce78d790e1 (diff) |
Add initial support for Fedora rootfs
Diffstat (limited to 'linaro-media-create')
-rwxr-xr-x | linaro-media-create | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/linaro-media-create b/linaro-media-create index d28eaff..2d41f46 100755 --- a/linaro-media-create +++ b/linaro-media-create @@ -181,12 +181,6 @@ if __name__ == '__main__': # The binary image is in the new live format. filesystem_dir = 'binary/boot/filesystem.dir' - # if not a debian compatible system, just extract the kernel packages - extract_kpkgs = False - if not path_in_tarfile_exists( - os.path.join(filesystem_dir, 'etc', 'debian_version'), args.binary): - extract_kpkgs = True - ROOTFS_DIR = os.path.join(BIN_DIR, filesystem_dir) try: @@ -209,6 +203,24 @@ if __name__ == '__main__': unpack_binary_tarball(args.binary, BIN_DIR) + # if compatible system, extract all packages + os_release_id = 'linux' + os_release_file = '%s/etc/os-release' % ROOTFS_DIR + if os.path.exists(os_release_file): + for line in open(os_release_file): + if line.startswith('ID='): + os_release_id = line[(len('ID=')):] + os_release_id = os_release_id.strip('\"\n') + break + + if os_release_id == 'debian' or os_release_id == 'ubuntu' or \ + os.path.exists('%s/etc/debian_version' % ROOTFS_DIR): + extract_kpkgs = False + elif os_release_id == 'fedora': + extract_kpkgs = False + else: + extract_kpkgs = True + hwpacks = args.hwpacks lmc_dir = os.path.dirname(__file__) if lmc_dir == '': @@ -263,6 +275,6 @@ if __name__ == '__main__': populate_rootfs(ROOTFS_DIR, ROOT_DISK, root_partition, args.rootfs, rootfs_id, create_swap, str(args.swap_file), board_config.mmc_device_id, board_config.mmc_part_offset, - board_config) + os_release_id, board_config) logger.info("Done creating Linaro image on %s" % media.path) |