Hello,
Using merge recipe, I can copy files and folder to /home/root/etc/*
but no to /etc
directly which is what I want.
This is what I have done so far.
I Added the directories and files structure I wanted to transfer to rootfs in this path:
~/fsl-community-bsp/sources/meta-freescale/recipes-extended/merge-files/merge-files/merge
merge
├── etc
│ ├── esp8266
│ │ ├── esp_configure
│ │ ├── esp_getInfo
│ │ ├── EspPinsInit.sh
│ │ ├── esp_reset.sh
│ │ ├── flash
│ │ │ ├── 0x00000.bin
│ │ │ ├── 0x10000.bin
│ │ │ ├── EspFlash.sh
│ │ │ └── esptool.py
│ │ ├── GpioPinInit.sh
│ │ ├── README
│ │ ├── setEnv
│ │ ├── wirelessConnect.sh
│ │ ├── wirelessGetDns.sh
│ │ └── wirelessInit.sh
│ └── yum.repos.d
│ └── mybuild.repo
└── README
I wrote proper dependencies into the recipe & select proper path ~/fsl-community-bsp/sources/meta-freescale/recipes-extended/merge-files/merge-files_1.0.bb
RDEPENDS_${PN} += "bash expect
Add package in local.conf
IMAGE_INSTALL_append += " merge-files \
Then, when I check the tar.gz:
tar tvf core-image-minimal-colibri-imx6ull.tar.xz |grep esp8266
drwxr-xr-x 0/0 0 2019-08-21 15:26 ./home/root/etc/esp8266/
-rwxr-xr-x 0/0 892 2019-08-21 14:37 ./home/root/etc/esp8266/wirelessGetDns.sh
`
If I change MERGED_DST
within the recipe, no files are copied. If I erase it, same thing happens.
Here is the recipe:
DESCRIPTION = "Merge prebuilt/extra files into rootfs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
inherit allarch
SRC_URI = "file://merge"
S = "${WORKDIR}"
MERGED_DST ?= "${ROOT_HOME}"
do_install () {
install -d ${D}/${MERGED_DST}
find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -not -name README \
-exec cp -fr '{}' ${D}/${MERGED_DST}/ \;
find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -exec rm -fr '{}' \;
}
do_configure[noexec] = "1"
do_compile[noexec] = "1"
FILES_${PN} = "/*"
ALLOW_EMPTY_${PN} = "1"
INSANE_SKIP_${PN} = "debug-files dev-so"
RDEPENDS_${PN} += "bash expect"