Kernel Surgery in a Script
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm writing a bash script to install a certain development environment on a computer. In order to do this I need to enable the CONFIG_USB_ACM module in the kernel. I am doing this through:
cd ~/l4t-kernel-surgery-kernel/kernel-4.4
zcat /proc/config.gz > .config
# PART I NEED IDEAS
vim .config # change the line that says CONFIG_USB_ACM=n to CONFIG_USB_ACM=m
make clean
make prepare
make modules_prepare
make M=drivers/usb/class
...
Would it work for me to append the =m line to the end of the config file? Will that overwrite the previous setting of =n? Is there a better way to edit the file in this way from bash?
text-processing configuration nvidia kernel-modules
add a comment |
up vote
0
down vote
favorite
I'm writing a bash script to install a certain development environment on a computer. In order to do this I need to enable the CONFIG_USB_ACM module in the kernel. I am doing this through:
cd ~/l4t-kernel-surgery-kernel/kernel-4.4
zcat /proc/config.gz > .config
# PART I NEED IDEAS
vim .config # change the line that says CONFIG_USB_ACM=n to CONFIG_USB_ACM=m
make clean
make prepare
make modules_prepare
make M=drivers/usb/class
...
Would it work for me to append the =m line to the end of the config file? Will that overwrite the previous setting of =n? Is there a better way to edit the file in this way from bash?
text-processing configuration nvidia kernel-modules
Yeah I did, thanks for your answer btw. After closer inspection I realized that the =n line didn't even exist so I had to append it to the end of the file.
– Sauhaarda Chowdhuri
May 22 '17 at 17:22
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm writing a bash script to install a certain development environment on a computer. In order to do this I need to enable the CONFIG_USB_ACM module in the kernel. I am doing this through:
cd ~/l4t-kernel-surgery-kernel/kernel-4.4
zcat /proc/config.gz > .config
# PART I NEED IDEAS
vim .config # change the line that says CONFIG_USB_ACM=n to CONFIG_USB_ACM=m
make clean
make prepare
make modules_prepare
make M=drivers/usb/class
...
Would it work for me to append the =m line to the end of the config file? Will that overwrite the previous setting of =n? Is there a better way to edit the file in this way from bash?
text-processing configuration nvidia kernel-modules
I'm writing a bash script to install a certain development environment on a computer. In order to do this I need to enable the CONFIG_USB_ACM module in the kernel. I am doing this through:
cd ~/l4t-kernel-surgery-kernel/kernel-4.4
zcat /proc/config.gz > .config
# PART I NEED IDEAS
vim .config # change the line that says CONFIG_USB_ACM=n to CONFIG_USB_ACM=m
make clean
make prepare
make modules_prepare
make M=drivers/usb/class
...
Would it work for me to append the =m line to the end of the config file? Will that overwrite the previous setting of =n? Is there a better way to edit the file in this way from bash?
text-processing configuration nvidia kernel-modules
text-processing configuration nvidia kernel-modules
edited Nov 18 at 9:27
Rui F Ribeiro
38.2k1475123
38.2k1475123
asked May 18 '17 at 1:19
Sauhaarda Chowdhuri
183
183
Yeah I did, thanks for your answer btw. After closer inspection I realized that the =n line didn't even exist so I had to append it to the end of the file.
– Sauhaarda Chowdhuri
May 22 '17 at 17:22
add a comment |
Yeah I did, thanks for your answer btw. After closer inspection I realized that the =n line didn't even exist so I had to append it to the end of the file.
– Sauhaarda Chowdhuri
May 22 '17 at 17:22
Yeah I did, thanks for your answer btw. After closer inspection I realized that the =n line didn't even exist so I had to append it to the end of the file.
– Sauhaarda Chowdhuri
May 22 '17 at 17:22
Yeah I did, thanks for your answer btw. After closer inspection I realized that the =n line didn't even exist so I had to append it to the end of the file.
– Sauhaarda Chowdhuri
May 22 '17 at 17:22
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
zcat /proc/config.gz | sed 's/CONFIG_USB_ACM=n/CONFIG_USB_ACM=m/' > .config
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
zcat /proc/config.gz | sed 's/CONFIG_USB_ACM=n/CONFIG_USB_ACM=m/' > .config
add a comment |
up vote
1
down vote
accepted
zcat /proc/config.gz | sed 's/CONFIG_USB_ACM=n/CONFIG_USB_ACM=m/' > .config
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
zcat /proc/config.gz | sed 's/CONFIG_USB_ACM=n/CONFIG_USB_ACM=m/' > .config
zcat /proc/config.gz | sed 's/CONFIG_USB_ACM=n/CONFIG_USB_ACM=m/' > .config
answered May 18 '17 at 1:36
Jeff Schaller
36.3k952119
36.3k952119
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f365748%2fkernel-surgery-in-a-script%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Yeah I did, thanks for your answer btw. After closer inspection I realized that the =n line didn't even exist so I had to append it to the end of the file.
– Sauhaarda Chowdhuri
May 22 '17 at 17:22