aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools/media_create/rootfs.py
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2013-08-17 08:10:14 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2013-08-17 08:10:14 +0300
commit47a68988c7c6042cb373402355fa16663b0c62f1 (patch)
treeb7ad8fcbe669d2c7678300b261828cd2877d7e1a /linaro_image_tools/media_create/rootfs.py
parente66296ece4e18d3137f5af96138f3461e3fc48f4 (diff)
parent51605ba19ca3a77c5e52b5e078f804ce78d790e1 (diff)
Add initial support for Fedora rootfs
Diffstat (limited to 'linaro_image_tools/media_create/rootfs.py')
-rw-r--r--linaro_image_tools/media_create/rootfs.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/linaro_image_tools/media_create/rootfs.py b/linaro_image_tools/media_create/rootfs.py
index 73bc8eb..765cc99 100644
--- a/linaro_image_tools/media_create/rootfs.py
+++ b/linaro_image_tools/media_create/rootfs.py
@@ -43,7 +43,8 @@ def rootfs_mount_options(rootfs_type):
def populate_rootfs(content_dir, root_disk, partition, rootfs_type,
rootfs_id, should_create_swap, swap_size,
- mmc_device_id, partition_offset, board_config=None):
+ mmc_device_id, partition_offset, os_release_id,
+ board_config=None):
"""Populate the rootfs and make the necessary tweaks to make it usable.
This consists of:
@@ -86,13 +87,14 @@ def populate_rootfs(content_dir, root_disk, partition, rootfs_type,
append_to_fstab(root_disk, fstab_additions)
- print "\nCreating /etc/flash-kernel.conf\n"
- create_flash_kernel_config(
- root_disk, mmc_device_id, 1 + partition_offset)
+ if os_release_id == 'debian' or os_release_id == 'ubuntu':
+ print "\nCreating /etc/flash-kernel.conf\n"
+ create_flash_kernel_config(
+ root_disk, mmc_device_id, 1 + partition_offset)
- if board_config is not None:
- print "\nUpdating /etc/network/interfaces\n"
- update_network_interfaces(root_disk, board_config)
+ if board_config is not None:
+ print "\nUpdating /etc/network/interfaces\n"
+ update_network_interfaces(root_disk, board_config)
def update_network_interfaces(root_disk, board_config):
@@ -136,7 +138,8 @@ def _list_files(directory):
not be world-readable.
"""
p = cmd_runner.run(
- ['find', directory, '-maxdepth', '1', '-mindepth', '1'],
+ ['find', directory, '-maxdepth', '1', '-mindepth', '1',
+ '!', '-name', 'lost+found'],
stdout=subprocess.PIPE, as_root=True)
stdout, _ = p.communicate()
return stdout.split()