Skip to content

Commit

Permalink
Separate out SOC specific configuration based on platform architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
antony-rheneus committed Nov 28, 2020
1 parent 1823653 commit f4699e3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :

# Optionally add/remove kernel options
if [ -f ../manage-config ]; then
../manage-config $(CONFIGURED_ARCH)
../manage-config $(CONFIGURED_ARCH) $(CONFIGURED_PLATFORM)
fi

# Building a custom kernel from Debian kernel source
Expand Down
10 changes: 7 additions & 3 deletions manage-config
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@

# Configuration file to change
ARCH=amd64
if [ $# = 1 ]; then
PLATFORM=
if [ $# -ge 1 ]; then
ARCH=$1
fi
if [ $# -ge 2 ]; then
PLATFORM=$2
fi
case "$ARCH" in
amd64)
CONFIG_FILE_LOC=debian/build/build_amd64_none_amd64
Expand Down Expand Up @@ -61,7 +65,7 @@ if [ -e ${exclusion_file} -o -e ${inclusion_file} ]; then

# Process any exclusions in the kernel
if [ -f ${exclusion_file} ]; then
exclusion_opts=$(get_section_opts ${exclusion_file} "common" ${ARCH})
exclusion_opts=$(get_section_opts ${exclusion_file} "common" ${ARCH} ${PLATFORM})
while read -r opt; do
if [ ! -z "$opt" ] && [[ ! "$opt" =~ ^#.* ]]; then
scripts/config --file ${CONFIG_FILE} -d $opt
Expand All @@ -71,7 +75,7 @@ if [ -e ${exclusion_file} -o -e ${inclusion_file} ]; then

# Process any inclusions in the kernel
if [ -f ${inclusion_file} ]; then
inclusion_opts=$(get_section_opts ${inclusion_file} "common" ${ARCH})
inclusion_opts=$(get_section_opts ${inclusion_file} "common" ${ARCH} ${PLATFORM})
while read -r opt; do
if [ ! -z "$opt" ] && [[ ! "$opt" =~ ^#.* ]]; then
echo $opt >> ${CONFIG_FILE}
Expand Down
3 changes: 3 additions & 0 deletions patch/kconfig-exclusions
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ CONFIG_MLXSW_PCI
[arm64]

[armhf]

[marvell-armhf]

1 change: 1 addition & 0 deletions patch/kconfig-inclusions
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ CONFIG_MAX1363=m

[armhf]

[marvell-armhf]

0 comments on commit f4699e3

Please sign in to comment.