- 31 Jul, 2017 1 commit
-
-
Yann E. MORIN authored
Setting the root pasword is done in a target-finalize hook, so we do not need to enforce a dependency from the skeleton onto host-mkpasswd. Dropping that dependency will simplify making skeleton a virtual package (in up-coming changes). Instead, it is now selected as any other package. As such, it is guaranteed to be built before target-finalize. This however introduces a slight change in behaviour: previously, host-mkpasswd would only be built if we needed to hash the root password from its plain-text value. Now, host-mkpasswd is always built as soon as the root password is non-empty, even if already pre-hashed. Since host-mkpasswd is a really tiny weeny package bundled in Buildroot, with only two C files, built as a single unit with a single gcc call, the overhead is really minimal. Compared to the simplifications this will allow in the skeleton packages (plural: common, sysv, systemd, custom) to come, this overhead is acceptable. Yet another simplification, even if small, to ease providing multiple skeletons. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 25 Jul, 2017 1 commit
-
-
Yann E. MORIN authored
We've had this mkdir, in various forms, for aeons. It dates back to the inception of Buildroot, at the dawn of ages, when the toolchain support was still nascent. Evolution had it morph from /include, to a tuple-prefixed directory and a symlink there-to, then back to the /include directory, to the final /usr/include directory we've had for the last 9 years. Anything that wants to install headers is supposed to be creating that directory beforehand; we don't need this legacy mkdir now. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
-
- 22 Jul, 2017 6 commits
-
-
Yann E. MORIN authored
Currently, remounting / read-write (or not) is done by the skeleton package when the init system is either busybox or sysvinit, by registering a target-finalize hook; it is not done at all for systemd. Move registering this target-finalize hook to both of busybox and sysvinit. Leave systemd alone, we'll take care of it later. Rename the macro to a more meaningful name, and move it to system.mk with the other such macros. Yet a little bit less init-system knowledge in the skeleton. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> [Thomas: remove not-so-useful comments, as pointed by Arnout.] Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Yann E. MORIN authored
Currently, setting the getty is done: - by the skeleton package when the init system is either busybox or sysvinit; - by the systemd package when the init system is systemd; both by registering a target-finalize hook. This is not very consistent. Move setting the getty out of the skeleton and into the package that provides the init system, by registering a per-package target-fialize hook. This offloads yet a bit more out of the skeleton, so that it is easier to properly separate the skeletons for the various init systems. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Yann E. MORIN authored
Some macros, soon some variables, currently defined in the skeleton are going to be used by other packages. Some of those variables will be used as Makefile conditions (e.g. in ifeq() conditions), so they *must* be defined before being used. Since the skeleton package, starting with an 's', is included quite late, those variables would not be available to most packages. Offload the existing macros into the new system/system.mk file, that is included early, before any package is. Rename the macros to appropriate names. Future commits will add new macros and variables in that file. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Yann E. MORIN authored
Rather than duplicate that code in all skeleton packages, make this a macro, so that it is easier to use. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Yann E. MORIN authored
The rsync command is currently called from a single location. In follow-up patches, it will be called from various places then. It will be easier to update and fix this command if it is defined in a single location, rather than if duplicated in many places. Define a macro that skeleton packages can call to install their skeleton directories. Since at least one occurrence of it will want to install in staging, the macro must accept a destination path, rather than hard-code target as the destination. Since it is to be used by other skeleton packages, define it early, outside of any conditional block. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Romain Naour <romain.naour@gmail.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Yann E. MORIN authored
We currently skip the skeleton dependency by checking if the current package is the skeleton. We are going to introduce more skeleton-related packages, so we need a way to exclude the skeleton dependency for those, or we'd get a circular dependency, for the same reason we need to skip the toolchain dependency. Instead of checking for all the skeleton-providing packages in the core infra, add a new package options so that packages can express they do not need the dependency on the skeleton, like we have an option to avoid the depednency on the toolchain. The only packages that will use that option are probably the skeletons, so we need not document this variable, like we did not document the option to exclude the dependency on the toolchain. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Romain Naour <romain.naour@gmail.com> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 04 Jul, 2017 1 commit
-
-
Yann E. MORIN authored
The ifupdown scripts can be used independently of the init system, be it sysv, busybox or systemd; they could even be used when there is no init system (i.e. the user is providing his own). Currently, those ifupdown scripts are bundled in the skeleton. But we soon will have a skeleton specific to systemd, so we would be missing those scripts (when systemd-networkd is not enabled). So, move those scripts to their own package. To keep the current behaviour (before it is changed in future commits), we make that package default to y, but depend on the default skeleton. Instead of being a target-finalize hook, the scripts are installed as any other package are, with a package install-target command. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: drop empty IFUPDOWN_SCRIPTS_SOURCE] Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 22 Apr, 2017 1 commit
-
-
Adam Duskett authored
The check-package script when ran gave warnings on only using one space before backslashes on all of these makefiles. This patch cleans up all warnings related to the one space before backslashes rule in the make files in the package directory. Signed-off-by:
Adam Duskett <aduskett@codeblue.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 29 Mar, 2017 1 commit
-
-
Thomas Petazzoni authored
The BR2_SYSTEM_BIN_SH hidden option defines to what binary the /bin/sh symlinks should point to. If busybox is chosen, then /bin/sh is created to point to /bin/busybox. This works fine with the default installation mode of Busybox, but it fails with the upcoming "individual binaries" mode, in which each applet is installed as its own binary, and /bin/busybox doesn't exist: we get /bin/sh as a broken symlink to /bin/busybox. Since Busybox already installs its own /bin/sh symlink, properly pointing to /bin/ash or /bin/hush depending on the selected shell, it doesn't make sense for the BR2_SYSTEM_BIN_SH logic to override this. Just let Busybox install its own /bin/sh by making BR2_SYSTEM_BIN_SH empty when Busybox shell is selected as /bin/sh. Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by:
Matthew Weber <matthew.weber@rockwellcollins.com> Acked-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 18 Jul, 2016 3 commits
-
-
Yann E. MORIN authored
We expect the custom skeleton to be fully filled with the necessary files, now. There is definitely no reason we should handle setting the hostname and the issue file in there. A user using a custom skeleton should be fully responsible for providing a functional skeleton. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Romain Naour <romain.naour@gmail.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Yann E. MORIN authored
We expect the custom skeleton to be fully filled with the necessary files, now. There is definitely no reason we should handle network settings in there. A user using a custom skeleton should be fully responsible for providing a functional skeleton. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Romain Naour <romain.naour@gmail.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Yann E. MORIN authored
Being custom means that our default one is not suitable to start with. So there is no reason to offer it as the default path. Add a check that it is not empty. Add a separating empty line, for good measure, too. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Romain Naour <romain.naour@openwide.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by:
Romain Naour <romain.naour@gmail.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 05 Jul, 2016 1 commit
-
-
Yann E. MORIN authored
In makefiles, variables have global scope. We traditionally ensure that we get no name clashing by prefixing all variables with the package name. Currently, this is not the case in the skeleton package, for historical reasons (code snippets copied over from the common Makefiles). We currently have a mix of naming for the variables: - some are indeed prefixed with SKELETON_ - some are prefixed with SYSTEM_ - some are prefixed with both - some are not prefixed Clean up these discrepancies, and prefix all variables with just SKELETON_ and drop the SYSTEM_ prefix. Also include SET_ in all variables that do set something (getty) for consistency across all the variables. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Romain Naour <romain.naour@gmail.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 03 Jul, 2016 1 commit
-
-
Thomas Petazzoni authored
Now that the package infrastructure doesn't attempt to download a package that has an empty version string, there's no need to define the SOURCE variable in the skeleton package. Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
- 24 May, 2016 1 commit
-
-
Yann E. MORIN authored
Use of a merged /usr is not restricted to systemd anymore, thus the current error message is misleading, as it only speaks about systemd. Fix the message by just ditching the reference to systemd altogether. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
- 20 Jan, 2016 1 commit
-
-
Thomas De Schampheleire authored
Commit 7a6b83a2 introduced the skeleton package, which took over the lib32/lib64 -> lib symlink creation from the main Makefile. However, the definition of the LIB_SYMLINK variable did not move along, for no real reason. Signed-off-by:
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 11 Jan, 2016 1 commit
-
-
Luca Ceresoli authored
The generated $(TARGET_DIR)/etc/network/interfaces mixes spaces and tabs. Fix by using tabs only. Signed-off-by:
Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
- 31 Dec, 2015 1 commit
-
-
Nathan Ford authored
There is a typo in skeleton.mk preventing rsync from excluding VCS folders such as .svn. Signed-off-by:
Nathan Ford <nford@westpond.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 28 Nov, 2015 2 commits
-
-
Yann E. MORIN authored
When the target uses a merged /usr setup, gdbserver will only report paths in /lib to the remote gdb, which in turn will only look for libraries in staging/lib and never in staging/usr/lib. So. the merged (or non-merged) /usr setup must be replicated in the staging. The best solution where to do so is in the skeleton package, since it is guaranteed to come before any package that installs things in the staging, and even before the (internal or external) toolchain as well. Reported-by:
Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
Yann E. MORIN authored
currently, we only make the merged symlinks or non-merged mkdirs in the target directory. This is fine, as long as one does not run gdb. However, as soon as one wants to run gdbserver on the target, gdb will only search for libraries in /lib in the sysroot. In preparation for a patch to fix that, make the symlink-or-mkdir macro a function that takes as parameter the base directory where to create symlinks or mkdir in. Move the function declarations out of the custom/non-custom skeleton conditional block, so they are always available. Reported-by:
Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
- 18 Nov, 2015 1 commit
-
-
Trent Piepho authored
Configuring the network interface with DHCP via /etc/network/interfaces generally does not work when NFS booting. The DHCP configuration will initially bring the interface down and system then hangs at that point as the root filesystem is no longer accessable. This adds a script to be run via a pre-up line in /etc/network/interfaces. It checks for a NFS root filesystem and if the interface to be configured is used for access to the NFS server. If this is the case, then it returns a failure code so that ifup will not configure the interface. This works for DHCP and another config methods (static, bootp, etc.). This system does detect if the interface to be configured isn't the one used for NFS and doesn't skip it when that is the case. NFS filesystems that aren't the root fs aren't considered. Fixes bug #4790. Signed-off-by:
Trent Piepho <tpiepho@kymetacorp.com> Reviewed-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 10 Nov, 2015 3 commits
-
-
Yann E. MORIN authored
When using systemd, the policy in Buildroot is to use a merged /usr (see c5bd8af6 , "system: add options for /bin /sbin and /lib to be symlinks into /usr" for more info). So, we apply a few tricks in some packages to account for the merged /usr case. However, when using a custom skeleton, we have no say in how that skeleton is organised, so it may well have a split /usr. In that case, our little tricks might not work as expected. So, when the user uses a custom skeleton and wants systemd as an init system, we must check that the custom skeleton is setup with a merged /usr. We do that by checking that each pair of {/lib,/usr/lib} {/bin,/usr/bin} and {/sbin,/usr/sbin} have the same inode numbers, i.e. /lib must have the same inode number as /usr/lib (and so on...). When a pair does not share the same inode number, this is not a merged /usr and we abort. We implement that check with make constructs, so it is done very early in the build process, and we can abort early if need be. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
Yann E. MORIN authored
In case the user wants to use a custom skeleton, we should not try to handle the symlinks (resp. mkdir) to handle merged (resp. split) /usr. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
Yann E. MORIN authored
Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by:
Peter Korsgaard <peter@korsgaard.com>
-
- 02 Nov, 2015 1 commit
-
-
Jérôme Pouiller authored
This patch has same purpose than 49964858 : On some machines, the network interface is slow to appear. For example, on the Raspberry Pi, the network interface eth0 is an ethernet-over-USB, and our standard boot process is too fast, so our network startup script is called before the USB bus is compeltely enumerated, thus it can't configure eth0. Closes #8116. However, wait-delay hook is enabled only if wait-delay property appears in /etc/network/interfaces. This patch enable it automaticaly when interface is configured through DHCP at bootup. But, if user choose to write /etc/network/interface himself, he have to explicitly set wait-delay. Signed-off-by:
Jérôme Pouiller <jezz@sysmic.org> Reviewed-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 14 Oct, 2015 1 commit
-
-
Yann E. MORIN authored
systemd is increasingly expecting things to live in /usr/bin, /usr/sbin or /usr/lib nad not in /bin, /sbin or /lib. It has inherited those expectations from a Fedora change: https://fedoraproject.org/wiki/Features/UsrMove Note however, that systemd does support /usr being on a separate filesystem; it just expects an initramfs to mount it before the final switchroot over to the actual rootfs. But the traditional use-case for Buildroot is not to boot with an initramfs; although that is totally feasible, that's probably not what is commonly done in the vast majority of cases. However, a lot of packages still install stuff directly into /bin, /sbin or /lib, which systemd may need early-on in the boot process, even before it may have a chance to mount /usr. Even though we can tell systemd, at configure-time, where it should expect programs to be at runtime, it does not make sense to go head-first against an upstream wa^Hill. Add an option so that /bin, /sbin and /lib be symlinks to /usr/bin and /usr/sbin. That option is forcibly enabled when the init system is systemd. Note: we need not handle /lib32 or /lib64, as they already are symlinks to /lib, which means they will automatically be redirected to /usr/lib, as /usr/lib32 and /usr/lib64 already are. Furthermore, this means we're no longer supporting a split-usr setup, so the corresponding configure options have been removed as well for systemd and, when using a merged /usr, for eudev as well. In Buildroot, we decided (with this patch) not to support a split-usr when systemd is used as an init system. This is a design decision, not a systemd issue. Thus the select is with BR2_INIT_SYSTEMD rather than with BR2_PACKAGE_SYSTEMD. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Mike Williams <mike@mikebwilliams.com> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Cc: Baruch Siach <baruch@tkos.co.il> Tested-by:
Mike Williams <mike@mikebwilliams.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
- 14 Jul, 2015 2 commits
-
-
Arnout Vandecappelle authored
Only the instance for setting the root password is changed. The instance in SYSTEM_GETTY is harmless since it just uses echo and tail. If SKELETON_TARGET_GENERIC_ROOT_PASSWD is passed as a hashed password by the user, it contains $, so the '-quotes are needed. If it is not, we need the backtick to be expanded so "-quotes are needed. Therefore, the quoting is moved to the definition of SYSTEM_ROOT_PASSWORD. Signed-off-by:
Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
Maxime Hadjinlian authored
Create a proper package for the skeleton. The main Makefile is modified to remove the skeleton support. The 'dirs' target, will create the $(TARGET_DIR). The file 'output/target/.root' doesn't exists anymore, as there's no Make rule to statisfy. The infrastructure are modified to filter host-skeleton. It's needed becauses the host-dependencies are derived from the dependencies of the target package where 'host-' is preprended to the depedency name. In the pkg-generic we add skeleton as a dependency to every package. The whole system/system.mk is now removed at the profit of package/skeleton/skeleton.mk [Thomas: - rebase on top of master and fix some minor conflicts - remove the 'select BR2_PACKAGE_SKELETON' in BR2_ROOTFS_SKELETON_DEFAULT and BR2_ROOTFS_SKELETON_CUSTOM, since anyway the skeleton package is always enabled. - fixup a few mistakes in the getty handling due to misnamed variables.] Signed-off-by:
Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by:
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-