diff --git a/bbb-convert-stage-3.sh b/bbb-convert-stage-3.sh index 20ae0a2..8600db0 100755 --- a/bbb-convert-stage-3.sh +++ b/bbb-convert-stage-3.sh @@ -11,10 +11,6 @@ embedded_rootfs_dir=$2 # Copy rootfs partition. sudo cp -ar ${embedded_rootfs_dir}/* ${sdimg_primary_dir} -# Add mountpoints. -sudo install -d -m 755 ${sdimg_primary_dir}/boot/efi -sudo install -d -m 755 ${sdimg_primary_dir}/data - log "\tDone." exit 0 diff --git a/convert-stage-4.sh b/convert-stage-4.sh index 3139459..6db352f 100755 --- a/convert-stage-4.sh +++ b/convert-stage-4.sh @@ -171,26 +171,18 @@ install_files() { sudo ln -sf /data/${databootdir}/fw_env.config ${primary_dir}/etc/fw_env.config - # Prepare 'primary' partition - [ ! -d "$primary_dir/data" ] && \ - { log "\t'data' mountpoint missing. Adding"; \ - sudo install -d -m 755 ${primary_dir}/data; } + # Create mount-points + # + # Note that only one of /boot/efi or /uboot will be used depending on what + # type of Mender integration is used (GRUB or U-boot). I do not see any + # problems with keeping an empty directory to reduce complexity of creating + # this directory structure. + sudo install -d -m 755 ${primary_dir}/data + sudo install -d -m 755 ${primary_dir}/boot/efi + sudo install -d -m 755 ${primary_dir}/uboot case "$device_type" in - "beaglebone") - [ ! -d "$primary_dir/boot/efi" ] && \ - { log "\t'/boot/efi' mountpoint missing. Adding"; \ - sudo install -d -m 755 ${primary_dir}/boot/efi; } - ;; - "raspberrypi3"|"raspberrypi0w") - [ ! -d "$primary_dir/uboot" ] && \ - { log "\t'/uboot' mountpoint missing. Adding"; \ - sudo install -d -m 755 ${primary_dir}/uboot; } - ;; "qemux86_64") - [ ! -d "$primary_dir/boot/efi" ] && \ - { log "\t'/boot/efi' mountpoint missing. Adding"; \ - sudo install -d -m 755 ${primary_dir}/boot/efi; } sudo install -d ${primary_dir}/lib64 sudo ln -sf /lib/ld-linux-x86-64.so.2 ${primary_dir}/lib64/ld-linux-x86-64.so.2 ;; diff --git a/mender-convert b/mender-convert index 2cca1e8..6108c0e 100755 --- a/mender-convert +++ b/mender-convert @@ -401,10 +401,6 @@ do_make_sdimg_raspberrypi3() { mount_mender_disk ${mender_disk_mappings[@]} - # Add mountpoints. - sudo install -d -m 755 ${sdimg_primary_dir}/uboot - sudo install -d -m 755 ${sdimg_primary_dir}/data - log "$step/$total Setting file system table..." ((step++)) set_fstab $device_type @@ -448,10 +444,6 @@ do_make_sdimg_qemux86_64() { mount_mender_disk ${mender_disk_mappings[@]} - # Add mountpoints. - sudo install -d -m 755 ${sdimg_primary_dir}/boot/efi - sudo install -d -m 755 ${sdimg_primary_dir}/data - log "$step/$total Setting file system table..." ((step++)) set_fstab $device_type