diff --git a/build-image.sh b/build-image.sh index c7ccb2a48afeae760e4c5e0b1180f0573f369d39..8e38a60ec4b1cfbe795af3442e5dacc940dbdb79 100644 --- a/build-image.sh +++ b/build-image.sh @@ -172,7 +172,7 @@ prepare(){ LOG "prepare begin..." dnf clean all dnf makecache - # dnf install -y dnf-plugins-core tar parted dosfstools grep bash xz kpartx + # dnf install -y dnf-plugins-core rsync parted dosfstools grep bash xz kpartx if [ -d ${rootfs_dir} ]; then rm -rf ${rootfs_dir} @@ -309,20 +309,11 @@ make_img(){ cp ${euler_dir}/config.txt ${boot_mnt}/ echo "console=serial0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline rootwait" > ${boot_mnt}/cmdline.txt - if [ -f ${tmp_dir}/rootfs.tar ]; then - rm ${tmp_dir}/rootfs.tar - fi - pushd ${rootfs_dir} - rm -rf boot - tar cpf ${tmp_dir}/rootfs.tar . - popd - pushd ${root_mnt} - tar xpf ${tmp_dir}/rootfs.tar -C . - popd + rm -rf ${rootfs_dir}/boot + rsync -avHAXq ${rootfs_dir}/* ${root_mnt} sync sleep 10 LOSETUP_D_IMG - rm ${tmp_dir}/rootfs.tar rm -rf ${rootfs_dir} losetup -D pushd ${img_dir} diff --git a/config/chroot.sh b/config/chroot.sh index 9ab787fb204b7ddfa4bb7b52ffc03f1766a840cb..2652fab099d0023c1b3f7994b87bcd87eda79127 100644 --- a/config/chroot.sh +++ b/config/chroot.sh @@ -18,4 +18,5 @@ cd /etc/rc.d/init.d chmod +x extend-root.sh chkconfig --add extend-root.sh chkconfig extend-root.sh on -cd - \ No newline at end of file +cd - +ln -s /lib/firmware /etc/firmware \ No newline at end of file