pengutronix add custom files to rootfs

genie
Hi All,

I'm using the bsp from pengutronix.
All seems to work after following  the mini2440 quickstart manual.

I've enable the http server in busy box.
It runs and i can connect to it and after creating a html file in /home/www
i can view it with a browser.

Now I want to add some default html files in the map /home/www and build
the filesystem.
I put the files in <bsp
folder>/configs/platform-friendlyarm-mini2440/projectroot/home/www.
But they will not show up in the created rootfs after running the command
ptxdist images


Can anyone tell me how to do this ?
Should I really follow the (quite complicated) chapter 8.26 in the
quickstart guide, or is there an easier way ?

Gene

davef
Once you have followed the procedure in section 8.26 your life will be made
significantly easier!

I have done some more recent work with these files using the install_tree
macro and that has made things an order of magnitude easier.  You just drop
your files into a folder, ie /home and everything is handled automagically.

daves_rootfs.in

## SECTION=rootfs

menuconfig DAVES_ROOTFS
  bool
  prompt "files in dave's rootfs        "
  help
    Dave's special files to make his target work

if DAVES_ROOTFS

config DAVES_ROOTFS_MSMTPRC_DAVE
  bool
  prompt "install /usr/local/etc/msmtprc-dave"
  help
    If enabled, it installs the "./projectroot/usr/local/etc/msmtprc-dave"
file if present.

config DAVES_ROOTFS_MSMTPRC_CHARLES
  bool
  prompt "install /usr/local/etc/msmtprc-charles"
  help
    If enabled, it installs the
"./projectroot/usr/local/etc/msmtprc-charles" file if present.

config DAVES_ROOTFS_LIB_UDEV_RULESD_TTYACM0
  bool
  prompt "install /lib/udev/rules.d/50-udev-default.rules"
  help
    If enabled, it installs the
"./projectroot/lib/udev/rules.d/50-udev-default.rules"
    file if present, else a generic one from the ptxdist directory.

config DAVES_ROOTFS_INTERFACES
  bool
  prompt "install /etc/network/interfaces"
  help
    If enabled, it installs the "./projectroot/etc/network/interfaces"
    file if present, else a generic one from the ptxdist directory.

config DAVES_ROOTFS_NANORC
  bool
  prompt "install /etc/nanorc"
  help
    If enabled, it installs the "./projectroot/etc/nanorc" file if present.

config DAVES_ROOTFS_NANORC_SCRIPTS
  bool
  prompt "install (PTXDIST_WORKSPACE)/projectroot/usr/share/nano/*"
  help
    If enabled, it installs the "./projectroot/usr/share/nano/*" files if
present.

config DAVES_ROOTFS_MY_HOME_FILES_AND_DIRECTORIES
  bool
  prompt "install (PTXDIST_WORKSPACE)/projectroot/home/*"
  help
    If enabled, it installs the "./projectroot/home/*" files and
directories if present.

endif

*****

daves_rootfs.make

# -*-makefile-*-
#
# Copyright (C) 2002, 2003 by Pengutronix e.K., Hildesheim, Germany
#               2009 by Marc Kleine-Budde <mkl@pengutronix.de>
#           (C) 2010 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_DAVES_ROOTFS) += daves_rootfs

# dummy to make ipkg happy
DAVES_ROOTFS_VERSION  := 1.0.0

#
----------------------------------------------------------------------------
# Target-Install
#
----------------------------------------------------------------------------

$(STATEDIR)/daves_rootfs.targetinstall:
  @$(call targetinfo)

  @$(call install_init,  daves_rootfs)
  @$(call install_fixup, daves_rootfs,PRIORITY,optional)
  @$(call install_fixup, daves_rootfs,SECTION,base)
  @$(call install_fixup, daves_rootfs,AUTHOR,"Dave Festing
<dave_festing@hotmail.com>")
  @$(call install_fixup, daves_rootfs,DESCRIPTION,missing)

# my install_alternative/install_tree files and directories

ifdef PTXCONF_DAVES_ROOTFS_MSMTPRC_DAVE
  @$(call install_alternative, daves_rootfs, 0, 0, 0644,
/usr/local/etc/msmtprc-dave)
endif
ifdef PTXCONF_DAVES_ROOTFS_MSMTPRC_CHARLES
  @$(call install_alternative, daves_rootfs, 0, 0, 0644,
/usr/local/etc/msmtprc-charles)
endif
ifdef PTXCONF_DAVES_ROOTFS_LIB_UDEV_RULESD_TTYACM0
  @$(call install_alternative, daves_rootfs, 0, 0, 0644,
/lib/udev/rules.d/50-udev-default.rules)
endif
ifdef PTXCONF_DAVES_ROOTFS_INTERFACES
  @$(call install_alternative, daves_rootfs, 0, 0, 0644,
/etc/network/interfaces)
endif
ifdef PTXCONF_DAVES_ROOTFS_NANORC
  @$(call install_alternative, daves_rootfs, 0, 0, 0644, /etc/nanorc)
endif
ifdef PTXCONF_DAVES_ROOTFS_NANORC_SCRIPTS
  @$(call install_tree, daves_rootfs, 0, 0,
$(PTXDIST_WORKSPACE)/projectroot/usr/share/nano, /usr/share/nano)
endif
ifdef PTXCONF_DAVES_ROOTFS_MY_HOME_FILES_AND_DIRECTORIES
  @$(call install_tree, daves_rootfs, 0, 0,
$(PTXDIST_WORKSPACE)/projectroot/home, /home)
endif

  @$(call install_finish, daves_rootfs)
  @$(call touch)

# vim: syntax=make

******

Notice the install_tree directive.  Read about this in the
OSELAS.BSP-Pengutronix-Generic-arm-Quickstart.pdf

genie
Thanks Davef

Did copy your files and edited it for my needs and it works.

My life is indeed significantly now (at least for updating the rootfs ;) )


Thanks,

Gene

davef
I am going to do another install_tree macro for /etc as that seems to be
another directory that multiple user files ends up in.

ifdef PTXCONF_DAVES_ROOTFS_MY_ETC_FILES_AND_DIRECTORIES
  @$(call install_tree, daves_rootfs, 0, 0,
$(PTXDIST_WORKSPACE)/projectroot/etc, /etc)
endif

Yes. it made the rootfs easy to update to a later BSP.

Cheers,
Dave