From 5ffdc3c9b4ae282c4ab09779657ffcbe7a97a5d1 Mon Sep 17 00:00:00 2001 From: yafen Date: Wed, 31 Mar 2021 17:43:04 +0800 Subject: [PATCH 1/3] bug fix --- build-image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-image.sh b/build-image.sh index 8e38a60..917887e 100644 --- a/build-image.sh +++ b/build-image.sh @@ -241,8 +241,8 @@ make_rootfs(){ mkdir -p $rootfs_dir/etc/sysconfig/network-scripts fi cp ${euler_dir}/ifcfg-eth0 $rootfs_dir/etc/sysconfig/network-scripts/ifcfg-eth0 - mkdir -p ${rootfs_dir}/usr/bin ${rootfs_dir}/lib/udev/rules.d ${rootfs_dir}/lib/systemd/system - if [ -d ${rootfs_dir}/usr/share/licenses/raspi ]; then + mkdir -p ${rootfs_dir}/lib/udev/rules.d + if [ ! -d ${rootfs_dir}/usr/share/licenses/raspi ]; then mkdir -p ${rootfs_dir}/usr/share/licenses/raspi fi cp ${euler_dir}/*.rules ${rootfs_dir}/lib/udev/rules.d/ -- Gitee From c630d606c647ac8f8bdbf75d400014a7acbb8226 Mon Sep 17 00:00:00 2001 From: yafen Date: Thu, 12 Aug 2021 05:00:38 +0800 Subject: [PATCH 2/3] change uuid to partuuid in fstab and cmdline --- build-image.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build-image.sh b/build-image.sh index 917887e..d1ce42c 100644 --- a/build-image.sh +++ b/build-image.sh @@ -295,19 +295,19 @@ make_img(){ fstab_array=("" "" "" "") for line in `blkid | grep /dev/mapper/${loopX}p` do - uuid=${line#*UUID=\"} - fstab_array[${line:18:1}]=${uuid%%\"*} + partuuid=${line#*PARTUUID=\"} + fstab_array[${line:18:1}]=${partuuid%%\"*} done - echo "UUID=${fstab_array[3]} / ext4 defaults,noatime 0 0" > ${rootfs_dir}/etc/fstab - echo "UUID=${fstab_array[1]} /boot vfat defaults,noatime 0 0" >> ${rootfs_dir}/etc/fstab - echo "UUID=${fstab_array[2]} swap swap defaults,noatime 0 0" >> ${rootfs_dir}/etc/fstab + echo "PARTUUID=${fstab_array[3]} / ext4 defaults,noatime 0 0" > ${rootfs_dir}/etc/fstab + echo "PARTUUID=${fstab_array[1]} /boot vfat defaults,noatime 0 0" >> ${rootfs_dir}/etc/fstab + echo "PARTUUID=${fstab_array[2]} swap swap defaults,noatime 0 0" >> ${rootfs_dir}/etc/fstab if [ -d ${rootfs_dir}/boot/grub2 ]; then rm -rf ${rootfs_dir}/boot/grub2 fi cp -a ${rootfs_dir}/boot/* ${boot_mnt}/ 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 + echo "console=serial0,115200 console=tty1 root=PARTUUID=${fstab_array[3]} rootfstype=ext4 elevator=deadline rootwait" > ${boot_mnt}/cmdline.txt rm -rf ${rootfs_dir}/boot rsync -avHAXq ${rootfs_dir}/* ${root_mnt} -- Gitee From b3cf6dbce972136f5efa6a989713a4cacf2de216 Mon Sep 17 00:00:00 2001 From: yafen Date: Sat, 18 Sep 2021 20:56:29 +0800 Subject: [PATCH 3/3] install bc --- config/rpmlist | 1 + 1 file changed, 1 insertion(+) diff --git a/config/rpmlist b/config/rpmlist index 3c6a98c..f923649 100644 --- a/config/rpmlist +++ b/config/rpmlist @@ -18,4 +18,5 @@ raspberrypi-kernel raspberrypi-firmware raspberrypi-bluetooth sudo +bc openEuler-repos \ No newline at end of file -- Gitee