[poky] Installing GDB or the saga of getting RPM/Zypp to run on JFFS2
Holger Hans Peter Freyther
holger at freyther.de
Sun Jul 3 05:28:42 PDT 2011
On 07/01/2011 03:44 PM, Mark Hatle wrote:
>
> macro files are being loaded from:
>
> %{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros
>
> The key above is the /etc/rpm/macros.*
>
> I would recommend a new file be generated called /etc/rpm/macros.jffs2 that
> changes the setting as appropriate for that filesystem. (How it's placed into
> the filesystem I'm not sure. I think it all comes down to detecting we're
> building a jffs2 filesystem and doing it there. Perhaps in the rootfs_rpm.bbclass?)
What do you think about something like the change below? Alternatively one
could write a post-inst script that checks if one is on jffs2 and then creates
the config file.
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 3a11858..70459e5 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -139,6 +139,14 @@ EOF
install -d ${IMAGE_ROOTFS}/${sysconfdir}
echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
+
+ # check if there is a jffs2 install, it requires a workaround
+ # due lacking support for MMAP read/write.
+ (echo "${IMAGE_FSTYPES}" | grep "jffs2" > /dev/null)
+ if [ $? == 0 ]; then
+ echo "%__dbi_txn create lock log txn auto_commit nommap
private" > ${IMAGE_ROOTFS}/etc/rpm/macros.jffs2
+ fi
+
${RPM_POSTPROCESS_COMMANDS}
${ROOTFS_POSTPROCESS_COMMAND}
@@ -164,6 +172,7 @@ EOF
}
remove_packaging_data_files() {
+ rm -rf ${IMAGE_ROOTFS}/etc/rpm/macros.jffs2
rm -rf ${IMAGE_ROOTFS}${rpmlibdir}
rm -rf ${IMAGE_ROOTFS}${opkglibdir}
}
More information about the poky
mailing list