diff options
-rwxr-xr-x | rpi2-debian-stdkernel/copy-to-sdcard.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/rpi2-debian-stdkernel/copy-to-sdcard.py b/rpi2-debian-stdkernel/copy-to-sdcard.py index bb2c652..9b6805f 100755 --- a/rpi2-debian-stdkernel/copy-to-sdcard.py +++ b/rpi2-debian-stdkernel/copy-to-sdcard.py @@ -40,12 +40,8 @@ def get_fresh_firmware(firmware_dir): def copy_to_boot(firmware_dir, boot_mountpoint): - for path in glob.glob(firmware_dir + '/boot/*'): - if os.path.isfile(path): - shutil.copy(path, boot_mountpoint) - elif os.path.isdir(path): - shutil.copytree(path, boot_mountpoint + '/' - + os.path.basename(path.rstrip('/'))) + run(['rsync', '-aHX', join(firmware_dir, 'boot/.'), + join(boot_mountpoint, '.')], check=True) shutil.copy('files/cmdline.txt', boot_mountpoint) shutil.copy('files/config.txt', boot_mountpoint) shutil.copy('debootstrapdir/vmlinuz', join(boot_mountpoint, 'vmlinuz'), |