27deb91511
* Thu Jul 29 2021 Juri Lelli <juri.lelli@redhat.com> [5.14.0-0.rc3.29.rt2.1] - 20bf31765163 rebase - config: disable KASAN for kernel-rt-debug kernels (Luis Claudio R. Goncalves) [1977862] - redhat: Add realtime-setup dependecy for kernel-rt metapackage (Juri Lelli) [1937013] - spec: Generate separate kernel-rt-kvm packages (Juri Lelli) - Add RT config options (Juri Lelli) - specfile: Add with_realtime (Juri Lelli) - RTize build scripts (Juri Lelli) - Add localversion for -RT release (Thomas Gleixner) - POWERPC: Allow to enable RT (Sebastian Andrzej Siewior) - powerpc: Avoid recursive header includes (Sebastian Andrzej Siewior) - powerpc/stackprotector: work around stack-guard init from atomic (Sebastian Andrzej Siewior) - powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT (Bogdan Purcareata) - powerpc/pseries/iommu: Use a locallock instead local_irq_save() (Sebastian Andrzej Siewior) - powerpc: traps: Use PREEMPT_RT (Sebastian Andrzej Siewior) - ARM64: Allow to enable RT (Sebastian Andrzej Siewior) - ARM: Allow to enable RT (Sebastian Andrzej Siewior) - arm64: fpsimd: Delay freeing memory in fpsimd_flush_thread() (Sebastian Andrzej Siewior) - KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable() (Josh Cartwright) - ARM: enable irq in translation/section permission fault handlers (Yadi.hu) - arch/arm64: Add lazy preempt support (Anders Roxell) - powerpc: Add support for lazy preemption (Thomas Gleixner) - arm: Add support for lazy preemption (Thomas Gleixner) - entry: Fix the preempt lazy fallout (Thomas Gleixner) - x86: Support for lazy preemption (Thomas Gleixner) - x86/entry: Use should_resched() in idtentry_exit_cond_resched() (Sebastian Andrzej Siewior) - sched: Add support for lazy preemption (Thomas Gleixner) - x86: Enable RT also on 32bit (Sebastian Andrzej Siewior) - x86: Allow to enable RT (Sebastian Andrzej Siewior) - x86: kvm Require const tsc for RT (Thomas Gleixner) - signal/x86: Delay calling signals in atomic (Oleg Nesterov) - sysfs: Add /sys/kernel/realtime entry (Clark Williams) - tpm_tis: fix stall after iowrite*()s (Haris Okanovic) - tty/serial/pl011: Make the locking work on RT (Thomas Gleixner) - tty/serial/omap: Make the locking RT aware (Thomas Gleixner) - drm/i915/gt: Only disable interrupts for the timeline lock on !force-threaded (Sebastian Andrzej Siewior) - drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with NOTRACE (Sebastian Andrzej Siewior) - drm/i915: disable tracing on -RT (Sebastian Andrzej Siewior) - drm/i915: Don't disable interrupts on PREEMPT_RT during atomic updates (Mike Galbraith) - drm,radeon,i915: Use preempt_disable/enable_rt() where recommended (Mike Galbraith) - random: Make it work on rt (Thomas Gleixner) - x86: stackprotector: Avoid random pool on rt (Thomas Gleixner) - panic: skip get_random_bytes for RT_FULL in init_oops_id (Thomas Gleixner) - crypto: cryptd - add a lock instead preempt_disable/local_bh_disable (Sebastian Andrzej Siewior) - crypto: limit more FPU-enabled sections (Sebastian Andrzej Siewior) - scsi/fcoe: Make RT aware. (Thomas Gleixner) - md: raid5: Make raid5_percpu handling RT aware (Thomas Gleixner) - drivers/block/zram: Replace bit spinlocks with rtmutex for -rt (Mike Galbraith) - block/mq: do not invoke preempt_disable() (Sebastian Andrzej Siewior) - net: Remove preemption disabling in netif_rx() (Priyanka Jain) - net: dev: always take qdisc's busylock in __dev_xmit_skb() (Sebastian Andrzej Siewior) - net: Dequeue in dev_cpu_dead() without the lock (Sebastian Andrzej Siewior) - net: Use skbufhead with raw lock (Thomas Gleixner) - sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() (Mike Galbraith) - net/core: use local_bh_disable() in netif_rx_ni() (Sebastian Andrzej Siewior) - net: Properly annotate the try-lock for the seqlock (Sebastian Andrzej Siewior) - net/Qdisc: use a seqlock instead seqcount (Sebastian Andrzej Siewior) - rcutorture: Avoid problematic critical section nesting on RT (Scott Wood) - rcu: Delay RCU-selftests (Sebastian Andrzej Siewior) - fs: namespace: Use cpu_chill() in trylock loops (Thomas Gleixner) - rt: Introduce cpu_chill() (Thomas Gleixner) - fs/dcache: disable preemption on i_dir_seq's write side (Sebastian Andrzej Siewior) - fs/dcache: use swait_queue instead of waitqueue (Sebastian Andrzej Siewior) - ptrace: fix ptrace vs tasklist_lock race (Sebastian Andrzej Siewior) - signal: Revert ptrace preempt magic (Thomas Gleixner) - mm/memcontrol: Disable on PREEMPT_RT (Thomas Gleixner) - mm/scatterlist: Do not disable irqs on RT (Thomas Gleixner) - mm/vmalloc: Another preempt disable region which sucks (Thomas Gleixner) - mm/zsmalloc: copy with get_cpu_var() and locking (Mike Galbraith) - u64_stats: Disable preemption on 32bit-UP/SMP with RT during updates (Sebastian Andrzej Siewior) - mm/vmstat: Protect per cpu variables with preempt disable on RT (Ingo Molnar) - mm: page_alloc: Use migrate_disable() in drain_local_pages_wq() (Sebastian Andrzej Siewior) - mm, slub: Duct tape lockdep_assert_held(local_lock_t) on RT (Sebastian Andrzej Siewior) - irqwork: push most work into softirq context (Sebastian Andrzej Siewior) - softirq: Disable softirq stacks for RT (Thomas Gleixner) - softirq: Check preemption after reenabling interrupts (Thomas Gleixner) - cpuset: Convert callback_lock to raw_spinlock_t (Mike Galbraith) - sched: Disable TTWU_QUEUE on RT (Thomas Gleixner) - sched: Do not account rcu_preempt_depth on RT in might_sleep() (Thomas Gleixner) - kernel/sched: move stack + kprobe clean up to __put_task_struct() (Sebastian Andrzej Siewior) - sched: Move mmdrop to RCU on RT (Thomas Gleixner) - sched: Limit the number of task migrations per batch (Thomas Gleixner) - kernel/sched: add {put|get}_cpu_light() (Sebastian Andrzej Siewior) - preempt: Provide preempt_*_(no)rt variants (Thomas Gleixner) - lockdep: disable self-test (Sebastian Andrzej Siewior) - lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals (Josh Cartwright) - lockdep: selftest: Only do hardirq context test for raw spinlock (Yong Zhang) - lockdep: Make it RT aware (Thomas Gleixner) - locking: don't check for __LINUX_SPINLOCK_TYPES_H on -RT archs (Sebastian Andrzej Siewior) - locking/RT: Add might sleeping annotation. (Sebastian Andrzej Siewior) - locking/local_lock: Add RT support (Thomas Gleixner) - locking/local_lock: Prepare for RT support (Thomas Gleixner) - locking/rtmutex: Add adaptive spinwait mechanism (Steven Rostedt) - locking/rtmutex: Implement equal priority lock stealing (Gregory Haskins) - preempt: Adjust PREEMPT_LOCK_OFFSET for RT (Thomas Gleixner) - rtmutex: Prevent lockdep false positive with PI futexes (Thomas Gleixner) - futex: Prevent requeue_pi() lock nesting issue on RT (Thomas Gleixner) - futex: Clarify comment in futex_requeue() (Thomas Gleixner) - futex: Restructure futex_requeue() (Thomas Gleixner) - futex: Correct the number of requeued waiters for PI (Thomas Gleixner) - futex: Cleanup stale comments (Thomas Gleixner) - futex: Validate waiter correctly in futex_proxy_trylock_atomic() (Thomas Gleixner) - lib/test_lockup: Adapt to changed variables. (Sebastian Andrzej Siewior) - locking/rtmutex: Add mutex variant for RT (Thomas Gleixner) - locking/ww_mutex: Implement rtmutex based ww_mutex API functions (Peter Zijlstra) - locking/rtmutex: Extend the rtmutex core to support ww_mutex (Peter Zijlstra) - locking/ww_mutex: Add rt_mutex based lock type and accessors (Peter Zijlstra) - locking/ww_mutex: Add RT priority to W/W order (Peter Zijlstra) - locking/ww_mutex: Implement rt_mutex accessors (Peter Zijlstra) - locking/ww_mutex: Abstract internal lock access (Thomas Gleixner) - locking/ww_mutex: Abstract mutex types (Peter Zijlstra) - locking/ww_mutex: Abstract mutex accessors (Peter Zijlstra) - locking/ww_mutex: Abstract waiter enqueueing (Peter Zijlstra) - locking/ww_mutex: Abstract waiter iteration (Peter Zijlstra) - locking/ww_mutex: Remove __sched annotation (Peter Zijlstra) - locking/ww_mutex: Split W/W implementation logic (Peter Zijlstra) - locking/ww_mutex: Split up ww_mutex_unlock() (Peter Zijlstra) - locking/ww_mutex: Gather mutex_waiter initialization (Peter Zijlstra) - locking/ww_mutex: Simplify lockdep annotation (Peter Zijlstra) - locking/mutex: Make mutex::wait_lock raw (Thomas Gleixner) - locking/ww_mutex: Move ww_mutex declarations into ww_mutex.h (Thomas Gleixner) - locking/mutex: Move waiter to core header (Thomas Gleixner) - locking/mutex: Consolidate core headers (Thomas Gleixner) - locking/rwlock: Provide RT variant (Thomas Gleixner) - locking/spinlock: Provide RT variant (Thomas Gleixner) - locking/rtmutex: Provide the spin/rwlock core lock function (Thomas Gleixner) - locking/spinlock: Provide RT variant header (Thomas Gleixner) - locking/spinlock: Provide RT specific spinlock type (Thomas Gleixner) - locking/rtmutex: Include only rbtree types (Sebastian Andrzej Siewior) - rbtree: Split out the rbtree type definitions (Sebastian Andrzej Siewior) - locking/lockdep: Reduce includes in debug_locks.h (Sebastian Andrzej Siewior) - locking/rtmutex: Prevent future include recursion hell (Sebastian Andrzej Siewior) - locking/spinlock: Split the lock types header (Thomas Gleixner) - locking/rtmutex: Guard regular sleeping locks specific functions (Thomas Gleixner) - locking/rtmutex: Prepare RT rt_mutex_wake_q for RT locks (Thomas Gleixner) - locking/rtmutex: Use rt_mutex_wake_q_head (Thomas Gleixner) - locking/rtmutex: Provide rt_wake_q and helpers (Thomas Gleixner) - locking/rtmutex: Add wake_state to rt_mutex_waiter (Thomas Gleixner) - locking/rwsem: Add rtmutex based R/W semaphore implementation (Thomas Gleixner) - locking: Add base code for RT rw_semaphore and rwlock (Thomas Gleixner) - rtmutex: Provide rt_mutex_base_is_locked() (Thomas Gleixner) - locking/rtmutex: Provide rt_mutex_slowlock_locked() (Thomas Gleixner) - rtmutex: Split out the inner parts of struct rtmutex (Peter Zijlstra) - rtmutex: Split API and implementation (Thomas Gleixner) - rtmutex: Switch to try_cmpxchg() (Thomas Gleixner) - rtmutex: Convert macros to inlines (Sebastian Andrzej Siewior) - rtmutex: Remove rt_mutex_is_locked() (Peter Zijlstra) - media/atomisp: Use lockdep instead of *mutex_is_locked() (Peter Zijlstra) - sched/wake_q: Provide WAKE_Q_HEAD_INITIALIZER (Thomas Gleixner) - sched: Provide schedule point for RT locks (Thomas Gleixner) - sched: Rework the __schedule() preempt argument (Thomas Gleixner) - sched: Prepare for RT sleeping spin/rwlocks (Thomas Gleixner) - sched: Introduce TASK_RTLOCK_WAIT (Thomas Gleixner) - sched: Split out the wakeup state check (Thomas Gleixner) - debugobjects: Make RT aware (Thomas Gleixner) - trace: Add migrate-disabled counter to tracing output (Thomas Gleixner) - pid.h: include atomic.h (Grygorii Strashko) - wait.h: include atomic.h (Sebastian Andrzej Siewior) - efi: Allow efi=runtime (Sebastian Andrzej Siewior) - efi: Disable runtime services on RT (Sebastian Andrzej Siewior) - net/core: disable NET_RX_BUSY_POLL on RT (Sebastian Andrzej Siewior) - sched: Disable CONFIG_RT_GROUP_SCHED on RT (Thomas Gleixner) - mm: Allow only SLUB on RT (Ingo Molnar) - kconfig: Disable config options which are not RT compatible (Thomas Gleixner) - leds: trigger: disable CPU trigger on -RT (Sebastian Andrzej Siewior) - jump-label: disable if stop_machine() is used (Thomas Gleixner) - genirq: Disable irqpoll on -rt (Ingo Molnar) - genirq: update irq_set_irqchip_state documentation (Josh Cartwright) - smp: Wake ksoftirqd on PREEMPT_RT instead do_softirq(). (Sebastian Andrzej Siewior) - samples/kfifo: Rename read_lock/write_lock (Sebastian Andrzej Siewior) - tcp: Remove superfluous BH-disable around listening_hash (Sebastian Andrzej Siewior) - net: Move lockdep where it belongs (Thomas Gleixner) - shmem: Use raw_spinlock_t for ->stat_lock (Sebastian Andrzej Siewior) - mm: workingset: replace IRQ-off check with a lockdep assert. (Sebastian Andrzej Siewior) - cgroup: use irqsave in cgroup_rstat_flush_locked() (Sebastian Andrzej Siewior) - notifier: Make atomic_notifiers use raw_spinlock (Valentin Schneider) - genirq: Move prio assignment into the newly created thread (Thomas Gleixner) - kthread: Move prio/affinite change into the newly created thread (Sebastian Andrzej Siewior) - mm/slub: Disable CONFIG_SLUB_PARTIAL on RT (Thomas Gleixner) - mm/slub: Replace local_lock_irqsave/restore() calls in PREEMPT_RT scope (Mike Galbraith) - mm/slub: Fix kmem_cache_alloc_bulk() error path (Mike Galbraith) - mm, slub: Correct ordering in slab_unlock() (Sebastian Andrzej Siewior) - mm, slub: Convert kmem_cpu_slab protection to local_lock (Vlastimil Babka) - mm, slub: Use migrate_disable() on PREEMPT_RT (Vlastimil Babka) - mm, slub: Make slab_lock() disable irqs with PREEMPT_RT (Vlastimil Babka) - mm, slub: Optionally save/restore irqs in slab_[un]lock()/ (Vlastimil Babka) - mm: slub: Make object_map_lock a raw_spinlock_t (Sebastian Andrzej Siewior) - mm: slub: Move flush_cpu_slab() invocations __free_slab() invocations out of IRQ context (Sebastian Andrzej Siewior) - mm, slab: Make flush_slab() possible to call with irqs enabled (Vlastimil Babka) - mm, slub: Don't disable irqs in slub_cpu_dead() (Vlastimil Babka) - mm, slub: Only disable irq with spin_lock in __unfreeze_partials() (Vlastimil Babka) - mm, slub: Detach percpu partial list in unfreeze_partials() using this_cpu_cmpxchg() (Vlastimil Babka) - mm, slub: Detach whole partial list at once in unfreeze_partials() (Vlastimil Babka) - mm, slub: Discard slabs in unfreeze_partials() without irqs disabled (Vlastimil Babka) - mm, slub: Move irq control into unfreeze_partials() (Vlastimil Babka) - mm, slub: Call deactivate_slab() without disabling irqs (Vlastimil Babka) - mm, slub: Make locking in deactivate_slab() irq-safe (Vlastimil Babka) - mm, slub: Move reset of c->page and freelist out of deactivate_slab() (Vlastimil Babka) - mm, slub: Stop disabling irqs around get_partial() (Vlastimil Babka) - mm, slub: Check new pages with restored irqs (Vlastimil Babka) - mm, slub: Validate slab from partial list or page allocator before making it cpu slab (Vlastimil Babka) - mm, slub: Restore irqs around calling new_slab() (Vlastimil Babka) - mm, slub: Move disabling irqs closer to get_partial() in ___slab_alloc() (Vlastimil Babka) - mm, slub: Do initial checks in ___slab_alloc() with irqs enabled (Vlastimil Babka) - mm, slub: Move disabling/enabling irqs to ___slab_alloc() (Vlastimil Babka) - mm, slub: Simplify kmem_cache_cpu and tid setup (Vlastimil Babka) - mm, slub: Restructure new page checks in ___slab_alloc() (Vlastimil Babka) - mm, slub: Return slab page from get_partial() and set c->page afterwards (Vlastimil Babka) - mm, slub: Dissolve new_slab_objects() into ___slab_alloc() (Vlastimil Babka) - mm, slub: Extract get_partial() from new_slab_objects() (Vlastimil Babka) - mm, slub: Unify cmpxchg_double_slab() and __cmpxchg_double_slab() (Vlastimil Babka) - mm, slub: Remove redundant unfreeze_partials() from put_cpu_partial() (Vlastimil Babka) - mm, slub: Don't disable irq for debug_check_no_locks_freed() (Vlastimil Babka) - mm, slub: Allocate private object map for validate_slab_cache() (Vlastimil Babka) - mm, slub: Allocate private object map for sysfs listings (Vlastimil Babka) - mm, slub: Don't call flush_all() from slab_debug_trace_open() (Vlastimil Babka) - timers: Move clearing of base::timer_running under base::lock (Thomas Gleixner) - highmem: Don't disable preemption on RT in kmap_atomic() (Sebastian Andrzej Siewior) - printk: Enhance the condition check of msleep in pr_flush() (Chao Qin) - printk: add pr_flush() (John Ogness) - printk: add console handover (John Ogness) - printk: remove deferred printing (John Ogness) - printk: move console printing to kthreads (John Ogness) - printk: introduce kernel sync mode (John Ogness) - printk: use seqcount_latch for console_seq (John Ogness) - printk: call boot_delay_msec() in printk_delay() (John Ogness) - printk: relocate printk_delay() (John Ogness) - serial: 8250: implement write_atomic (John Ogness) - kdb: only use atomic consoles for output mirroring (John Ogness) - console: add write_atomic interface (John Ogness) - printk: rename printk cpulock API and always disable interrupts (John Ogness) - printk: syslog: close window between wait and read (John Ogness) - printk: convert @syslog_lock to mutex (John Ogness) - printk: remove NMI tracking (John Ogness) - printk: remove safe buffers (John Ogness) - printk: track/limit recursion (John Ogness) - lib/nmi_backtrace: explicitly serialize banner and regs (John Ogness) - printk/console: Check consistent sequence number when handling race in console_unlock() (Petr Mladek) - arm64: mm: Make arch_faults_on_old_pte() check for migratability (Valentin Schneider) - rcu/nocb: Check for migratability rather than pure preemptability (Valentin Schneider) - sched: Introduce is_pcpu_safe() (Valentin Schneider) - eventfd: Make recursion protection RT safe (Thomas Gleixner) - configs/process_configs.sh: Handle config items with no help text (Patrick Talbert) - fedora: sound config updates for 5.14 (Peter Robinson) - fedora: Only enable FSI drivers on POWER platform (Peter Robinson) - The CONFIG_RAW_DRIVER has been removed from upstream (Peter Robinson) - fedora: updates for 5.14 with a few disables for common from pending (Peter Robinson) - fedora: migrate from MFD_TPS68470 -> INTEL_SKL_INT3472 (Peter Robinson) - fedora: Remove STAGING_GASKET_FRAMEWORK (Peter Robinson) - Fedora: move DRM_VMWGFX configs from ark -> common (Peter Robinson) - fedora: arm: disabled unused FB drivers (Peter Robinson) - fedora: don't enable FB_VIRTUAL (Peter Robinson) - redhat/configs: Double MAX_LOCKDEP_ENTRIES (Waiman Long) [1940075] - rpmspec: fix verbose output on kernel-devel installation (Herton R. Krzesinski) [1981406] Resolves: rhbz#1891873
366 lines
8.8 KiB
Bash
Executable File
366 lines
8.8 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# This script takes the merged config files and processes them through oldconfig
|
|
# and listnewconfig
|
|
#
|
|
# Globally disable suggestion of appending '|| exit' or '|| return' to cd/pushd/popd commands
|
|
# shellcheck disable=SC2164
|
|
|
|
usage()
|
|
{
|
|
# alphabetical order please
|
|
echo "process_configs.sh [ options ] package_name kernel_version"
|
|
echo " -a: report all errors, equivalent to [-c -n -w -i]"
|
|
echo " -c: error on mismatched config options"
|
|
echo " -i: continue on error"
|
|
echo " -n: error on unset config options"
|
|
echo " -t: test run, do not overwrite original config"
|
|
echo " -w: error on misconfigured config options"
|
|
echo " -z: commit new configs to pending directory"
|
|
echo ""
|
|
echo " A special CONFIG file tag, process_configs_known_broken can be added as a"
|
|
echo " comment to any CONFIG file. This tag indicates that there is no way to "
|
|
echo " fix a CONFIG's entry. This tag should only be used in extreme cases"
|
|
echo " and is not to be used as a workaround to solve CONFIG problems."
|
|
exit 1
|
|
}
|
|
|
|
die()
|
|
{
|
|
echo "$1"
|
|
exit 1
|
|
}
|
|
|
|
get_cross_compile()
|
|
{
|
|
arch=$1
|
|
if [[ "$CC_IS_CLANG" -eq 1 ]]; then
|
|
echo "$arch"
|
|
else
|
|
echo "scripts/dummy-tools/"
|
|
fi
|
|
}
|
|
|
|
# stupid function to find top of tree to do kernel make configs
|
|
switch_to_toplevel()
|
|
{
|
|
path="$(pwd)"
|
|
while test -n "$path"
|
|
do
|
|
test -e "$path"/MAINTAINERS && \
|
|
test -d "$path"/drivers && \
|
|
break
|
|
|
|
path=$(dirname "$path")
|
|
done
|
|
|
|
test -n "$path" || die "Can't find toplevel"
|
|
echo "$path"
|
|
}
|
|
|
|
checkoptions()
|
|
{
|
|
/usr/bin/awk '
|
|
|
|
/is not set/ {
|
|
split ($0, a, "#");
|
|
split(a[2], b);
|
|
if (NR==FNR) {
|
|
configs[b[1]]="is not set";
|
|
} else {
|
|
if (configs[b[1]] != "" && configs[b[1]] != "is not set")
|
|
print "Found # "b[1] " is not set, after generation, had " b[1] " " configs[b[1]] " in Source tree";
|
|
}
|
|
}
|
|
|
|
/=/ {
|
|
split ($0, a, "=");
|
|
if (NR==FNR) {
|
|
configs[a[1]]=a[2];
|
|
} else {
|
|
if (configs[a[1]] != "" && configs[a[1]] != a[2])
|
|
print "Found "a[1]"="a[2]" after generation, had " a[1]"="configs[a[1]]" in Source tree";
|
|
}
|
|
}
|
|
' "$1" "$2" > .mismatches
|
|
|
|
checkoptions_error=false
|
|
if test -s .mismatches
|
|
then
|
|
while read -r LINE
|
|
do
|
|
if find ./ -name "$(echo "$LINE" | awk -F "=" ' { print $1 } ' | awk ' { print $2 }')" -print0 | xargs -0 grep ^ | grep -q "process_configs_known_broken"; then
|
|
# This is a known broken config.
|
|
# See script help warning.
|
|
checkoptions_error=false
|
|
else
|
|
checkoptions_error=true
|
|
break
|
|
fi
|
|
done < .mismatches
|
|
|
|
! $checkoptions_error && return
|
|
|
|
echo "Error: Mismatches found in configuration files"
|
|
cat .mismatches
|
|
RETURNCODE=1
|
|
[ "$CONTINUEONERROR" ] || exit 1
|
|
fi
|
|
}
|
|
|
|
parsenewconfigs()
|
|
{
|
|
tmpdir=$(mktemp -d)
|
|
|
|
# This awk script reads the output of make listnewconfig
|
|
# and puts it into CONFIG_FOO files. Using the output of
|
|
# listnewconfig is much easier to ensure we get the default
|
|
# output.
|
|
/usr/bin/awk -v BASE="$tmpdir" '
|
|
/is not set/ {
|
|
split ($0, a, "#");
|
|
split(a[2], b);
|
|
OUT_FILE=BASE"/"b[1];
|
|
print $0 >> OUT_FILE;
|
|
}
|
|
|
|
/=/ {
|
|
split ($0, a, "=");
|
|
OUT_FILE=BASE"/"a[1];
|
|
if (a[2] == "n")
|
|
print "# " a[1] " is not set" >> OUT_FILE;
|
|
else
|
|
print $0 >> OUT_FILE;
|
|
}
|
|
|
|
' .newoptions
|
|
|
|
# This awk script parses the output of helpnewconfig.
|
|
# Each option is separated between ----- markers
|
|
# The goal is to put all the help text as a comment in
|
|
# each CONFIG_FOO file. Because of how awk works
|
|
# there's a lot of moving files around and catting to
|
|
# get what we need.
|
|
/usr/bin/awk -v BASE="$tmpdir" '
|
|
BEGIN { inpatch=0;
|
|
outfile="none";
|
|
symbol="none"; }
|
|
/^Symbol: .*$/ {
|
|
split($0, a, " ");
|
|
symbol="CONFIG_"a[2];
|
|
outfile=BASE "/fake_"symbol
|
|
}
|
|
/-----/ {
|
|
if (inpatch == 0) {
|
|
inpatch = 1;
|
|
}
|
|
else {
|
|
if (symbol != "none") {
|
|
system("cat " outfile " " BASE "/" symbol " > " BASE "/tmpf");
|
|
system("mv " BASE "/tmpf " BASE "/" symbol);
|
|
symbol="none"
|
|
}
|
|
outfile="none"
|
|
inpatch = 0;
|
|
}
|
|
}
|
|
!/-----/ {
|
|
if (inpatch == 1 && outfile != "none") {
|
|
print "# "$0 >> outfile;
|
|
}
|
|
}
|
|
|
|
|
|
' .helpnewconfig
|
|
|
|
pushd "$tmpdir" &> /dev/null
|
|
rm fake_*
|
|
popd &> /dev/null
|
|
for f in "$tmpdir"/*; do
|
|
[[ -e "$f" ]] || break
|
|
cp "$f" "$SCRIPT_DIR/pending$FLAVOR/generic/"
|
|
done
|
|
|
|
rm -rf "$tmpdir"
|
|
}
|
|
|
|
function commit_new_configs()
|
|
{
|
|
# assume we are in $source_tree/configs, need to get to top level
|
|
pushd "$(switch_to_toplevel)" &>/dev/null
|
|
|
|
for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config
|
|
do
|
|
arch=$(head -1 "$cfg" | cut -b 3-)
|
|
cfgtmp="${cfg}.tmp"
|
|
cfgorig="${cfg}.orig"
|
|
cat "$cfg" > "$cfgorig"
|
|
|
|
if [ "$arch" = "EMPTY" ]
|
|
then
|
|
# This arch is intentionally left blank
|
|
continue
|
|
fi
|
|
echo -n "Checking for new configs in $cfg ... "
|
|
|
|
make ${MAKEOPTS} ARCH="$arch" CROSS_COMPILE=$(get_cross_compile $arch) KCONFIG_CONFIG="$cfgorig" listnewconfig >& .listnewconfig
|
|
grep -E 'CONFIG_' .listnewconfig > .newoptions
|
|
if test -s .newoptions
|
|
then
|
|
make ${MAKEOPTS} ARCH="$arch" CROSS_COMPILE=$(get_cross_compile $arch) KCONFIG_CONFIG="$cfgorig" helpnewconfig >& .helpnewconfig
|
|
parsenewconfigs
|
|
fi
|
|
rm .newoptions
|
|
echo "done"
|
|
done
|
|
|
|
git add "$SCRIPT_DIR/pending$FLAVOR"
|
|
git commit -m "[redhat] AUTOMATIC: New configs"
|
|
}
|
|
|
|
function process_configs()
|
|
{
|
|
# assume we are in $source_tree/configs, need to get to top level
|
|
pushd "$(switch_to_toplevel)" &>/dev/null
|
|
|
|
for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config
|
|
do
|
|
arch=$(head -1 "$cfg" | cut -b 3-)
|
|
cfgtmp="${cfg}.tmp"
|
|
cfgorig="${cfg}.orig"
|
|
cat "$cfg" > "$cfgorig"
|
|
|
|
if [ "$arch" = "EMPTY" ]
|
|
then
|
|
# This arch is intentionally left blank
|
|
continue
|
|
fi
|
|
echo -n "Processing $cfg ... "
|
|
|
|
make ${MAKEOPTS} ARCH="$arch" CROSS_COMPILE=$(get_cross_compile $arch) KCONFIG_CONFIG="$cfgorig" listnewconfig >& .listnewconfig
|
|
grep -E 'CONFIG_' .listnewconfig > .newoptions
|
|
if test -n "$NEWOPTIONS" && test -s .newoptions
|
|
then
|
|
echo "Found unset config items, please set them to an appropriate value"
|
|
cat .newoptions
|
|
rm .newoptions
|
|
RETURNCODE=1
|
|
[ "$CONTINUEONERROR" ] || exit 1
|
|
fi
|
|
rm .newoptions
|
|
|
|
grep -E 'config.*warning' .listnewconfig > .warnings
|
|
if test -n "$CHECKWARNINGS" && test -s .warnings
|
|
then
|
|
echo "Found misconfigured config items, please set them to an appropriate value"
|
|
cat .warnings
|
|
rm .warnings
|
|
RETURNCODE=1
|
|
[ "$CONTINUEONERROR" ] || exit 1
|
|
fi
|
|
rm .warnings
|
|
|
|
rm .listnewconfig
|
|
|
|
make ${MAKEOPTS} ARCH="$arch" CROSS_COMPILE=$(get_cross_compile $arch) KCONFIG_CONFIG="$cfgorig" olddefconfig > /dev/null || exit 1
|
|
echo "# $arch" > "$cfgtmp"
|
|
cat "$cfgorig" >> "$cfgtmp"
|
|
if test -n "$CHECKOPTIONS"
|
|
then
|
|
checkoptions "$cfg" "$cfgtmp"
|
|
fi
|
|
# if test run, don't overwrite original
|
|
if test -n "$TESTRUN"
|
|
then
|
|
rm -f "$cfgtmp"
|
|
else
|
|
mv "$cfgtmp" "$cfg"
|
|
fi
|
|
rm -f "$cfgorig"
|
|
echo "done"
|
|
done
|
|
rm "$SCRIPT_DIR"/*.config*.old
|
|
popd > /dev/null
|
|
|
|
echo "Processed config files are in $SCRIPT_DIR"
|
|
}
|
|
|
|
CHECKOPTIONS=""
|
|
CONTINUEONERROR=""
|
|
NEWOPTIONS=""
|
|
TESTRUN=""
|
|
CHECKWARNINGS=""
|
|
MAKEOPTS=""
|
|
CC_IS_CLANG=0
|
|
|
|
RETURNCODE=0
|
|
|
|
while [[ $# -gt 0 ]]
|
|
do
|
|
key="$1"
|
|
case $key in
|
|
-a)
|
|
CHECKOPTIONS="x"
|
|
CONTINUEONERROR="x"
|
|
NEWOPTIONS="x"
|
|
CHECKWARNINGS="x"
|
|
;;
|
|
-c)
|
|
CHECKOPTIONS="x"
|
|
;;
|
|
-h)
|
|
usage
|
|
;;
|
|
-i)
|
|
CONTINUEONERROR="x"
|
|
;;
|
|
-n)
|
|
NEWOPTIONS="x"
|
|
;;
|
|
-t)
|
|
TESTRUN="x"
|
|
;;
|
|
-w)
|
|
CHECKWARNINGS="x"
|
|
;;
|
|
-z)
|
|
COMMITNEWCONFIGS="x"
|
|
;;
|
|
-m)
|
|
shift
|
|
if [ "$1" = "CC=clang" -o "$1" = "LLVM=1" ]; then
|
|
CC_IS_CLANG=1
|
|
fi
|
|
MAKEOPTS="$MAKEOPTS $1"
|
|
;;
|
|
*)
|
|
break;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
PACKAGE_NAME="${1:-kernel-rt}" # defines the package name used
|
|
KVERREL="$(test -n "$2" && echo "-$2" || echo "")"
|
|
SUBARCH="$(test -n "$3" && echo "-$3" || echo "")"
|
|
FLAVOR="$(test -n "$4" && echo "-$4" || echo "-common")"
|
|
SCRIPT=$(readlink -f "$0")
|
|
SCRIPT_DIR=$(dirname "$SCRIPT")
|
|
|
|
# Most RHEL options are options we want in Fedora so RHEL pending settings head
|
|
# to common/
|
|
if [ "$FLAVOR" = "-rhel" ]
|
|
then
|
|
FLAVOR="-common"
|
|
fi
|
|
|
|
# to handle this script being a symlink
|
|
cd "$SCRIPT_DIR"
|
|
|
|
if test -n "$COMMITNEWCONFIGS"; then
|
|
commit_new_configs
|
|
else
|
|
process_configs
|
|
fi
|
|
|
|
exit $RETURNCODE
|