[OpenWrt-Devel] [PATCH 14/14] target/sdk: Allow building buildroot + kernel only SDK/IB

Felix Fietkau nbd at openwrt.org
Sun Jan 3 10:08:40 EST 2016


On 2016-01-03 07:03, openwrt at daniel.thecshore.com wrote:
> From: Daniel Dickinson <openwrt at daniel.thecshore.com>
> 
> In keeping with the theme of building a common base and branching
> out we introduce the concept of a minimal SDK which is essentially
> the build machinery plus the kernel and it's dependencies (e.g.
> hostapd on which mac80211 depends, and usign on which package
> signing depends).  The minimal package selection may be tailored
> further (e.g. if one does not want to build all kernel modules)
> via the usual means as the minimal SDK package selection is
> done via defaults, not requirements.
> 
> The same build that builds the minimal SDK would be used to
> build a non-standalone SDK (since by default with minimal SDK
> not all packages required for a working image are built) which
> can be used with repositories containing the packages built at
> the various stages to create viable images.
> 
> Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
> ---
>  config/Config-build.in      |  13 +++++
>  config/Config-images.in     |  13 +++++
>  include/target.mk           | 124 ++++++++++++++++++++++++++++++++++++++++++++
>  scripts/metadata.pl         |  19 ++++++-
>  scripts/metadata.pm         |   1 +
>  target/convert-config.pl    |   3 ++
>  target/sdk/Config-in-sdk.in |   4 ++
>  7 files changed, 176 insertions(+), 1 deletion(-)
> 
> diff --git a/config/Config-images.in b/config/Config-images.in
> index a60dd50..1731f94 100644
> --- a/config/Config-images.in
> +++ b/config/Config-images.in
> @@ -8,6 +8,7 @@ menu "Target Images"
>  
>  	menuconfig TARGET_ROOTFS_INITRAMFS
>  		bool "ramdisk"
> +		default n if SDK_CORE
>  		default y if USES_INITRAMFS
>  		help
>  		  Embed the root filesystem into the kernel (initramfs).
Why not just hide the entire menu if SDK_CORE is set?

> diff --git a/include/target.mk b/include/target.mk
> index f129298..30c02de 100644
> --- a/include/target.mk
> +++ b/include/target.mk
> @@ -11,6 +11,129 @@ __target_inc=1
>  # default device type
>  DEVICE_TYPE?=router
>  
> +# Default packages when building SDK_CORE (minimal set of source packages
> +# required by a 'build machinery plus all kernel module build', but do build
> +# all packages of the same variant from dependency chain source packages
> +# by default).  This approach is taken to avoid potentially conflicting packages,
> +# which could be an issue with multiple builds of the same variant (e.g. due to
> +# one binary package of the variant built for the SDK and another by the SDK in
> +# a separate build).
> +#   Hostapd source package is required by mac80211, ubus by hostapd, libubox
> +#   by ubus, lua by ubus, libjson-c by libubox,
> +#   usign is required for package signing, and wireless-tools is required by
> +#   broadcom-wl and hostap-driver, toolchain by the toolchain, various firmware
> +#   are required by kernel packages, iptables by netfilter kernel modules,
> +#  and opkg by by build system, and signing-key is required for the signing key
> +#
> +# Note this is done one package per-line for both ease of editing
> +# and because as one long line it exceed's git send-email's line
> +# length limit.
> +DEFAULT_SDK_CORE_PACKAGES:=\
> +hostapd-common \
> +hostadp-common-old \
> +hostapd-mini \
> +hostapd-utils \
> +wpad-mini \
> +wpa-supplicant-mini \
> +wpa-cli \
> +libubus \
> +libubus-lua \
> +ubus \
> +ubusd \
> +libubox \
> +libblobmsg-json \
> +jshn \
> +libjson-script \
> +libubox-lua \
> +liblua \
> +lua \
> +luac \
> +lua-examples \
> +usign \
> +wireless-tools \
> +libiw \
> +libgcc \
> +libatomic \
> +libssp \
> +libstdcpp \
> +libc \
> +libpthread \
> +libphtread-db \
> +librt \
> +libgfortran \
> +ldd \
> +ldconfig \
> +glibc \
> +musl \
> +uClibc \
> +wlc \
> +wl \
> +nas \
> +om-watchdog \
> +ltq-vdsl-vr9 \
> +kmod-ltq-adsl-danube-fw-a \
> +kmod-ltq-adsl-danube-fw-ba \
> +kmod-ltq-adsl-ase-fw-a \
> +kmod-ltq-adsl-ase-fw-b \
> +kmod-ltq-adsl-ar9-fw-a \
> +kmod-ltq-adsl-ar9-fw-b \
> +ltq-vsdl-mei_test \
> +ar3k-firmware \
> +ibt-firmware \
> +r8169-firmware \
> +r8189eu-firmware \
> +iptables \
> +iptables-mod-conntrack-extra \
> +iptables-mod-extra \
> +iptables-mod-filter \
> +iptables-mod-ipopt \
> +iptables-mod-ipsec \
> +iptables-mod-ipset \
> +iptables-mod-nat-extra \
> +iptables-mod-iprange \
> +iptables-mod-cluster \
> +iptables-mod-clusterip \
> +iptables-mod-ulog \
> +iptables-mod-hashlimit \
> +iptables-mod-led \
> +iptables-mod-tproxy \
> +iptables-mod-tee \
> +iptables-mod-u32 \
> +iptables-mod-nflog \
> +iptables-mod-nfqueue \
> +ip6tables \
> +ip6tables-extra \
> +ip6tables-mod-nat \
> +libiptc \
> +libip4tc \
> +libip6tc \
> +libxtables \
> +iptables-mod-compat-xtables \
> +iptables-mod-nathelper-rtsp \
> +iptables-mod-account \
> +iptables-mod-chaos \
> +iptables-mod-condition \
> +iptables-mod-delude \
> +iptables-mod-dhcpmac \
> +iptables-mod-dnetmap \
> +iptables-mod-fuzzy \
> +iptables-mod-geoip \
> +iptables-mod-iface \
> +iptables-mod-ipmark \
> +iptables-mod-ipp2p \
> +iptables-mod-ipv4options \
> +iptables-mod-length2 \
> +iptables-mod-logmark \
> +iptables-mod-lscan \
> +iptables-mod-lua \
> +iptables-mod-psd \
> +iptables-mod-quota2 \
> +iptables-mod-sysrq \
> +iptables-mod-tarpit \
> +iptaccount \
> +opkg \
> +signing-key
> +
>  # Default packages - the really basic set
>  DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools
>  # For nas targets
Please rip out all this Default-SDK-Core-Packages nonsense. This looks
entirely arbitrary and use case specific.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list