Hi all -
I've been working on making the kernel configs easier to work with from the developer
side. Currently, we have 42 kernel flavors across 9 architectures. For the most part,
the configs should be similar. At least within an architecture family, they should be
very similar with only slight differences between them to differentiate the flavor.
I have some scripts that I'm still working on that will ultimately "reduce" the configs
so that they really only contain the differences between them. For now, I'm looking at
getting rid of the -ec2 and -vanilla flavors as targets to be manually configured.
The following patch adds the concept of "meta" configs where you can specify that a
config is based on another one. This is really only to be used for specific configs
like -vanilla and -ec2. My long-term plan is to have config/common, config/$arch/common,
and config/$arch/$flavor (and config/$arch/$flavor.meta), all combining to create a single
config. It makes it obvious where the differences are between the configs which makes our
release kernels more consistent.
As part of this patch, config/{x86_64,i386}/{vanilla,ec2} are removed. That part of patch
application is left to the reader since it seemed to lower the signal/noise ratio to include
them.
The gist is that "# meta:<flavor>" acts as a #include. We can't use cpp because all of
the "# CONFIG_BLAHBLAH is not set" will break it. When 'make oldconfig' is run there is a
bunch of noise but the output is correct. The -ec2 configs are identical to the current ones.
The vanilla ones aren't because they diverged from -default a bit. (I may sync them up before
applying this, just to remove that bit of confusion).
The vanilla config will always be a one-off of the default or desktop flavor and so adding
the few options to it is easy.
One obvious problem is how to deal with the fact that the -ec2 flavor essentially reflects a
static set of hardware so that new drivers shouldn't be enabled in it -- but should be enabled
in the -xen flavor. I'm open to suggestions on how to handle that easily. Right now it requires
manual intervention.
-Jeff
diff --git a/config/i386/ec2.meta b/config/i386/ec2.meta
new file mode 100644
index 0000000..bd8c30b
--- /dev/null
+++ b/config/i386/ec2.meta
@@ -0,0 +1,203 @@
+# meta:xen
+CONFIG_LOCALVERSION="-ec2"
+CONFIG_IPV6=m
+CONFIG_BLK_DEV_MD=m
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_XEN_UNPRIVILEGED_GUEST=y
+CONFIG_XEN_NR_GUEST_DEVICES=64
+CONFIG_XEN_COMPAT_030004_AND_LATER=y
+CONFIG_XEN_COMPAT=0x030004
+CONFIG_EXT3_FS=m
+CONFIG_JBD=m
+CONFIG_ISO9660_FS=m
+CONFIG_ROMFS_BACKED_BY_BLOCK=y
+CONFIG_NLS=m
+CONFIG_STRICT_DEVMEM=y
+CONFIG_LSM_MMAP_MIN_ADDR=4096
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRC_T10DIF=m
+CONFIG_LZO_COMPRESS=m
+# CONFIG_OPROFILE is not set
+# CONFIG_BLK_DEV_BSGLIB is not set
+# CONFIG_SWIOTLB is not set
+# CONFIG_TOSHIBA is not set
+# CONFIG_I8K is not set
+# CONFIG_PM_RUNTIME is not set
+# CONFIG_PM_DEBUG is not set
+# CONFIG_PCI is not set
+# CONFIG_ISA_DMA_API is not set
+# CONFIG_SCx200 is not set
+# CONFIG_ALIX is not set
+# CONFIG_PCCARD is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_IEEE802154 is not set
+# CONFIG_OPENVSWITCH is not set
+# CONFIG_BAYCOM_SER_FDX is not set
+# CONFIG_BAYCOM_SER_HDX is not set
+# CONFIG_YAM is not set
+# CONFIG_CAN_SLCAN is not set
+# CONFIG_CAN_DEV is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_CAIF is not set
+# CONFIG_NFC is not set
+# CONFIG_DMA_SHARED_BUFFER is not set
+# CONFIG_OMAP_OCP2SCP is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+# CONFIG_SENSORS_LIS3LV02D is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MII is not set
+# CONFIG_ATM_DRIVERS is not set
+# CONFIG_ETHERNET is not set
+# CONFIG_PHYLIB is not set
+# CONFIG_WLAN is not set
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+# CONFIG_WAN is not set
+# CONFIG_ISDN is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_OMAP4 is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_SERIO_ALTERA_PS2 is not set
+# CONFIG_SERIO_PS2MULT is not set
+# CONFIG_GAMEPORT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_N_GSM is not set
+# CONFIG_TRACE_ROUTER is not set
+# CONFIG_SERIAL_8250 is not set
+# CONFIG_SERIAL_TIMBERDALE is not set
+# CONFIG_SERIAL_ALTERA_JTAGUART is not set
+# CONFIG_SERIAL_ALTERA_UART is not set
+# CONFIG_SERIAL_XILINX_PS_UART is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_MWAVE is not set
+# CONFIG_PC8736x_GPIO is not set
+# CONFIG_NSC_GPIO is not set
+# CONFIG_TCG_TIS is not set
+# CONFIG_TCG_NSC is not set
+# CONFIG_TCG_ATMEL is not set
+# CONFIG_TELCLOCK is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_HSI is not set
+# CONFIG_PPS is not set
+# Enable Device Drivers -> PPS to see the PTP clock options.
+# CONFIG_GPIOLIB is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_POWER_AVS is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_ACQUIRE_WDT is not set
+# CONFIG_ADVANTECH_WDT is not set
+# CONFIG_F71808E_WDT is not set
+# CONFIG_SC520_WDT is not set
+# CONFIG_SBC_FITPC2_WATCHDOG is not set
+# CONFIG_EUROTECH_WDT is not set
+# CONFIG_IB700_WDT is not set
+# CONFIG_IBMASR is not set
+# CONFIG_WAFER_WDT is not set
+# CONFIG_IT8712F_WDT is not set
+# CONFIG_IT87_WDT is not set
+# CONFIG_SC1200_WDT is not set
+# CONFIG_PC87413_WDT is not set
+# CONFIG_60XX_WDT is not set
+# CONFIG_SBC8360_WDT is not set
+# CONFIG_SBC7240_WDT is not set
+# CONFIG_CPU5_WDT is not set
+# CONFIG_SMSC_SCH311X_WDT is not set
+# CONFIG_SMSC37B787_WDT is not set
+# CONFIG_W83627HF_WDT is not set
+# CONFIG_W83697HF_WDT is not set
+# CONFIG_W83697UG_WDT is not set
+# CONFIG_W83877F_WDT is not set
+# CONFIG_W83977F_WDT is not set
+# CONFIG_MACHZ_WDT is not set
+# CONFIG_SBC_EPX_C3_WATCHDOG is not set
+# CONFIG_SSB is not set
+# CONFIG_BCMA is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MEDIA_SUPPORT is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_ARC is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_UVESA is not set
+# CONFIG_FB_N411 is not set
+# CONFIG_FB_HGA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_BROADSHEET is not set
+# CONFIG_FB_AUO_K190X is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_SOUND is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB_ARCH_HAS_XHCI is not set
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_EZUSB_FX2 is not set
+# CONFIG_OMAP_USB2 is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+# CONFIG_XEN_PRIVILEGED_GUEST is not set
+# CONFIG_XEN_BACKEND is not set
+# CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND is not set
+# CONFIG_XEN_COMPAT_040100_AND_LATER is not set
+# CONFIG_STAGING is not set
+# CONFIG_X86_PLATFORM_DEVICES is not set
+# CONFIG_EXTCON is not set
+# CONFIG_MEMORY is not set
+# CONFIG_PWM is not set
+# CONFIG_PSTORE is not set
+# CONFIG_BUILD_DOCSRC is not set
+# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_DDR is not set
diff --git a/config/i386/vanilla.meta b/config/i386/vanilla.meta
new file mode 100644
index 0000000..1d30495
--- /dev/null
+++ b/config/i386/vanilla.meta
@@ -0,0 +1,5 @@
+# meta:default
+# CONFIG_SCHED_OMIT_FRAME_POINTER is not set
+# CONFIG_XEN is not set
+# CONFIG_XEN_PRIVILEGED_GUEST is not set
+CONFIG_FRAME_POINTER=y
diff --git a/config/x86_64/ec2.meta b/config/x86_64/ec2.meta
new file mode 100644
index 0000000..12a2477
--- /dev/null
+++ b/config/x86_64/ec2.meta
@@ -0,0 +1,204 @@
+# meta:xen
+CONFIG_LOCALVERSION="-ec2"
+CONFIG_NR_CPUS=32
+CONFIG_IPV6=m
+CONFIG_IP_VS_SH_TAB_BITS=12
+CONFIG_BLK_DEV_MD=m
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_XEN_UNPRIVILEGED_GUEST=y
+CONFIG_XEN_NR_GUEST_DEVICES=64
+CONFIG_XEN_COMPAT_030004_AND_LATER=y
+CONFIG_XEN_COMPAT=0x030004
+CONFIG_EXT3_FS=m
+CONFIG_JBD=m
+CONFIG_ISO9660_FS=m
+CONFIG_ROMFS_BACKED_BY_BLOCK=y
+CONFIG_NLS=m
+CONFIG_STRICT_DEVMEM=y
+CONFIG_LSM_MMAP_MIN_ADDR=4096
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRC_T10DIF=m
+CONFIG_LZO_COMPRESS=m
+# CONFIG_OPROFILE is not set
+# CONFIG_BLK_DEV_BSGLIB is not set
+# CONFIG_SWIOTLB is not set
+# CONFIG_I8K is not set
+# CONFIG_PM_RUNTIME is not set
+# CONFIG_PM_DEBUG is not set
+# CONFIG_PCI is not set
+# CONFIG_ISA_DMA_API is not set
+# CONFIG_PCCARD is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_IEEE802154 is not set
+# CONFIG_OPENVSWITCH is not set
+# CONFIG_BAYCOM_SER_FDX is not set
+# CONFIG_BAYCOM_SER_HDX is not set
+# CONFIG_YAM is not set
+# CONFIG_CAN_SLCAN is not set
+# CONFIG_CAN_DEV is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_CAIF is not set
+# CONFIG_NFC is not set
+# CONFIG_DMA_SHARED_BUFFER is not set
+# CONFIG_OMAP_OCP2SCP is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+# CONFIG_SENSORS_LIS3LV02D is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MII is not set
+# CONFIG_ATM_DRIVERS is not set
+# CONFIG_ETHERNET is not set
+# CONFIG_PHYLIB is not set
+# CONFIG_WLAN is not set
+# CONFIG_WAN is not set
+# CONFIG_ISDN is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_OMAP4 is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_SERIO_ALTERA_PS2 is not set
+# CONFIG_SERIO_PS2MULT is not set
+# CONFIG_GAMEPORT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_N_GSM is not set
+# CONFIG_TRACE_ROUTER is not set
+# CONFIG_SERIAL_8250 is not set
+# CONFIG_SERIAL_TIMBERDALE is not set
+# CONFIG_SERIAL_ALTERA_JTAGUART is not set
+# CONFIG_SERIAL_ALTERA_UART is not set
+# CONFIG_SERIAL_XILINX_PS_UART is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_MWAVE is not set
+# CONFIG_TCG_TIS is not set
+# CONFIG_TCG_NSC is not set
+# CONFIG_TCG_ATMEL is not set
+# CONFIG_TELCLOCK is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_HSI is not set
+# CONFIG_PPS is not set
+# CONFIG_GPIOLIB is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_POWER_AVS is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_ACQUIRE_WDT is not set
+# CONFIG_ADVANTECH_WDT is not set
+# CONFIG_F71808E_WDT is not set
+# CONFIG_SC520_WDT is not set
+# CONFIG_SBC_FITPC2_WATCHDOG is not set
+# CONFIG_EUROTECH_WDT is not set
+# CONFIG_IB700_WDT is not set
+# CONFIG_IBMASR is not set
+# CONFIG_WAFER_WDT is not set
+# CONFIG_IT8712F_WDT is not set
+# CONFIG_IT87_WDT is not set
+# CONFIG_SC1200_WDT is not set
+# CONFIG_PC87413_WDT is not set
+# CONFIG_60XX_WDT is not set
+# CONFIG_SBC8360_WDT is not set
+# CONFIG_CPU5_WDT is not set
+# CONFIG_SMSC_SCH311X_WDT is not set
+# CONFIG_SMSC37B787_WDT is not set
+# CONFIG_W83627HF_WDT is not set
+# CONFIG_W83697HF_WDT is not set
+# CONFIG_W83697UG_WDT is not set
+# CONFIG_W83877F_WDT is not set
+# CONFIG_W83977F_WDT is not set
+# CONFIG_MACHZ_WDT is not set
+# CONFIG_SBC_EPX_C3_WATCHDOG is not set
+# CONFIG_SSB is not set
+# CONFIG_BCMA is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MEDIA_SUPPORT is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_ARC is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_UVESA is not set
+# CONFIG_FB_N411 is not set
+# CONFIG_FB_HGA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_BROADSHEET is not set
+# CONFIG_FB_AUO_K190X is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_SOUND is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB_ARCH_HAS_XHCI is not set
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_EZUSB_FX2 is not set
+# CONFIG_OMAP_USB2 is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+# CONFIG_XEN_PRIVILEGED_GUEST is not set
+# CONFIG_XEN_BACKEND is not set
+# CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND is not set
+# CONFIG_XEN_COMPAT_040100_AND_LATER is not set
+# CONFIG_STAGING is not set
+# CONFIG_X86_PLATFORM_DEVICES is not set
+# CONFIG_EXTCON is not set
+# CONFIG_MEMORY is not set
+# CONFIG_PWM is not set
+# CONFIG_QNX6FS_FS is not set
+# CONFIG_PSTORE is not set
+# CONFIG_BUILD_DOCSRC is not set
+# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_DDR is not set
+# CONFIG_TOSHIBA is not set
+# CONFIG_SCx200 is not set
+# CONFIG_ALIX is not set
+# CONFIG_PC8736x_GPIO is not set
+# CONFIG_NSC_GPIO is not set
+# CONFIG_SBC7240_WDT is not set
diff --git a/config/x86_64/vanilla.meta b/config/x86_64/vanilla.meta
new file mode 100644
index 0000000..1d30495
--- /dev/null
+++ b/config/x86_64/vanilla.meta
@@ -0,0 +1,5 @@
+# meta:default
+# CONFIG_SCHED_OMIT_FRAME_POINTER is not set
+# CONFIG_XEN is not set
+# CONFIG_XEN_PRIVILEGED_GUEST is not set
+CONFIG_FRAME_POINTER=y
diff --git a/scripts/run_oldconfig.sh b/scripts/run_oldconfig.sh
index a7cdf86..76c61d5 100755
--- a/scripts/run_oldconfig.sh
+++ b/scripts/run_oldconfig.sh
@@ -302,6 +302,13 @@ for config in $config_files; do
if test -L "${prefix}config/$config"; then
continue
fi
+
+ # skip meta configs like vanilla and ec2
+ if ! test -e "${prefix}config/$config" -a \
+ test -e "${prefix}config/$config.meta"; then
+ continue
+ fi
+
set -- kernel-$flavor $flavor $(case $flavor in (rt|rt_*) echo RT ;; esac)
${prefix}scripts/guards $* $EXTRA_SYMBOLS \
< ${prefix}series.conf > $TMPDIR/patches
diff --git a/scripts/sequence-patch.sh b/scripts/sequence-patch.sh
index 62fa5b2..cb1c400 100755
--- a/scripts/sequence-patch.sh
+++ b/scripts/sequence-patch.sh
@@ -500,9 +500,22 @@ if test -e supported.conf; then
fi
if test -n "$CONFIG"; then
- if test -e "config/$CONFIG_ARCH/$CONFIG_FLAVOR"; then
- echo "[ Copying config/$CONFIG_ARCH/$CONFIG ]"
- cp -a "config/$CONFIG_ARCH/$CONFIG_FLAVOR" "$SP_BUILD_DIR/.config"
+ SOURCE="config/$CONFIG_ARCH/$CONFIG_FLAVOR"
+ TARGET="$SP_BUILD_DIR/.config"
+ if test -e "${SOURCE}"; then
+ echo "[ Copying ${SOURCE} ]"
+ cp -a "${SOURCE}" "${TARGET}"
+ elif test -e "${SOURCE}.meta"; then
+ echo "[ Expanding ${SOURCE} ]"
+ base=$(head -1 "${SOURCE}.meta"|grep meta:|sed -e 's/^.*meta://')
+ if [ -n "$base" -a -e "$(dirname ${SOURCE}/$base" ]; then
+ cp -a "$(dirname ${SOURCE}/$base" "${TARGET}"
+ cat "${SOURCE}.meta" >> "${TARGET}"
+ elif [ -n "$base" ]; then
+ echo "[ Meta-config $CONFIG references non-existent base config $base ]"
+ else
+ echo "[ Meta-config $CONFIG is missing base config ]"
+ fi
else
echo "[ Config $CONFIG does not exist. ]"
fi
diff --git a/scripts/tar-up.sh b/scripts/tar-up.sh
index 49c54e8..0090837 100755
--- a/scripts/tar-up.sh
+++ b/scripts/tar-up.sh
@@ -276,7 +276,7 @@ stable_tar() {
# The first directory level determines the archive name
all_archives="$(
echo "$referenced_files" \
- | sed -e 's,/.*,,' \
+ | sed -e 's,/.*,,' |grep config/ \
| uniq )"
for archive in $all_archives; do
echo "$archive.tar.bz2"
@@ -291,6 +291,35 @@ for archive in $all_archives; do
fi
done
+echo "config.tar.bz2"
+tmpdir3=$(mktemp -dt ${0##*/}.XXXXXX)
+CLEANFILES=("${CLEANFILES[@]}" "$tmpdir3")
+mkdir -p $tmpdir3
+
+config_files="$( echo "$referenced_files" | grep config/)"
+for config in $config_files; do
+ if [ -e "$config" ]; then
+ cp --parents -a $config $tmpdir3
+ elif [ -e "${config}.meta" ]; then
+ base=$(head -1 "${config}.meta"|grep meta:|sed -e 's/^.*meta://')
+ if [ -n "$base" -a -e "$(dirname "${config}")/$base" ]; then
+ cp -a "$(dirname ${config})/$base" $tmpdir3/${config}
+ cat "${config}.meta" >> $tmpdir3/${config}
+ elif [ -n "$base" ]; then
+ echo "Missing base config $base for config $config" >&2
+ exit 1
+ else
+ echo "Meta config $config is malformed." >&2
+ exit 1
+ fi
+ else
+ echo "Missing config $config" >&2
+ exit 1
+ fi
+done
+
+tar jcf $build_dir/config.tar.bz2 -C $tmpdir3 ${config_files}
+
echo "kabi.tar.bz2"
stable_tar $build_dir/kabi.tar.bz2 kabi
--
Jeff Mahoney
SUSE Labs
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-kernel+owner(a)opensuse.org