diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image.bbappend b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image.bbappend index 81fe7b794a1fb890fa591fb0e73c1636f6e3ee75..80594cb9ba6da3a688adb1991002210422273135 100644 --- a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image.bbappend +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/openeuler-image.bbappend @@ -1 +1,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +#fix mkfs.ext4 running error, add -E no_copy_xattrs to mkfs.ext4 +WKS_FILE = "sdimage-rpi.wks" +WKS_FILE_DEPENDS = "" diff --git a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc index 4a5350cfda909ce0e23d2329be5044d24e441a4f..bf36e9d4324ced773866ea951eeb606d6d4cdce1 100644 --- a/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc +++ b/bsp/meta-openeuler-bsp/raspberrypi/recipes-core/images/rpi.inc @@ -18,3 +18,19 @@ copy_openeuler_distro() { IMAGE_PREPROCESS_COMMAND += "delete_boot_from_rootfs;" IMAGE_POSTPROCESS_COMMAND += "copy_openeuler_distro;" + + +#IMAGE_FEATURES += "splash" +IMAGE_FSTYPES = "wic.gz" + +#not depends to native parted/mtools and so on, use host command +export OPENEULER_WIC_IMAGE_REMOVE = "parted gptfdisk dosfstools mtools" +python() { + all_depends = d.getVarFlag("do_image_wic", "depends") + bb.note("all depends of do_image_wic: %s" % all_depends) + for dep in ('parted', 'gptfdisk', 'dosfstools', 'mtools'): + all_depends = all_depends.replace('%s-native:do_populate_sysroot' % dep, "") + new_depends = all_depends + d.setVarFlag("do_image_wic", "depends", new_depends) + bb.note("new depends of do_image_wic: %s" % new_depends) +} diff --git a/bsp/meta-openeuler-bsp/wic/sdimage-rpi.wks b/bsp/meta-openeuler-bsp/wic/sdimage-rpi.wks new file mode 100644 index 0000000000000000000000000000000000000000..283d94e9d2a2562529d365f03514126132943105 --- /dev/null +++ b/bsp/meta-openeuler-bsp/wic/sdimage-rpi.wks @@ -0,0 +1,6 @@ +# short-description: Create Raspberry Pi SD card image +# long-description: Creates a partitioned SD card image for use with +# Raspberry Pi. Boot files are located in the first vfat partition. + +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 20 +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --mkfs-extraopts='-E no_copy_xattrs' diff --git a/meta-openeuler/conf/local.conf.sample b/meta-openeuler/conf/local.conf.sample index 37723d459765b4725437ed63649c29568d1c9f8c..897468e94b193f8bd4103205a9d93613e1eda3d5 100644 --- a/meta-openeuler/conf/local.conf.sample +++ b/meta-openeuler/conf/local.conf.sample @@ -274,7 +274,8 @@ CONF_VERSION = "2" HOSTTOOLS += "python chrpath rpmbuild pkg-config flex bison bc automake autoreconf libtool \ ninja xz autopoint autoreconf aclocal libtoolize autoscan autom4te autoconf autoheader \ autoupdate libtool libtoolize pkg-config cmake fmt gperf m4 createrepo_c dnf ldconfig \ - msgfmt msgmerge rpcgen makeinfo meson" + msgfmt msgmerge rpcgen makeinfo meson mkdosfs mcopy mkfs.ext4 debugfs fsck.ext4 dumpe2fs \ + parted" HOSTTOOLS_remove += "diffstat lz4c pzstd" SANITY_REQUIRED_UTILITIES_remove += "diffstat chrpath" CONNECTIVITY_CHECK_URIS = "" @@ -286,7 +287,9 @@ ASSUME_PROVIDED += "rpm-native dwarfsrcfiles-native depmodwrapper-cross kmod-nat m4-native flex-native unifdef-native rsync-native init-system-helpers automake-native \ autoconf-native libtool-native opkg-utils-native patch-native pkgconfig-native \ init-system-helpers update-rc.d-native run-postinsts cmake-native ninja-native \ - cross-localedef-native nativesdk-glibc-locale nativesdk-qemuwrapper-cross \ + cross-localedef-native nativesdk-glibc-locale nativesdk-qemuwrapper-cross gzip-native \ + parted-native gptfdisk-native dosfstools-native mtools-native meson-native ninja-native \ + bmap-tools-native \ " PATCHTOOL = "patch" TCMODE = "gcc-bin" diff --git a/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb b/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb index b936163f612d20b0584f2ea0bf31364e149223f7..c96fa978367000284c27aeb9c3c0bd3dcf07137a 100644 --- a/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb +++ b/meta-openeuler/recipes-kernel/linux/linux-openeuler.bb @@ -4,7 +4,6 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM ?= "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" inherit kernel -#require recipes-kernel/linux/linux-yocto.inc SRC_URI = "file://kernel-5.10 \ file://yocto-embedded-tools/config/${ARCH}/defconfig-kernel \