Power & Source of Big Ideas

NanoPiM2A UBoot kernel command line params with fw_setenv

Moderators: chensy, FATechsupport

Hello all,

I'm trying to change the boot command line parameters on the Nanopi, in order to isolate one of the CPUs.
This is pretty straightforward on an x86 machine via the GRUB line:
GRUB_CMDLINE_LINUX_DEFAULT="isolcpus=1"

However on Arm-Uboot you have to do it with the 'fw_setenv' utility. But the setup is quite complicated, as you first have to create the config files for the utility itself. And those parameters really have to match the system -i.e. the exact location of uboot on the sd card or something like that, or bad things will happen.

My question, has anyone successfully used 'fw_setenv' with the NanoPi boards? A small clarification or example would be really appreciated. Again I just want to set the 'isolcpus' option.

Thank you very much

Note: I also tried the boot.cmd ->mkimage -> boot.src scheme. It 'worked' as in no errors were shown and the .scr file was created (under /boot) but it had no effect :(
droid wrote:
Hello all,

I'm trying to change the boot command line parameters on the Nanopi, in order to isolate one of the CPUs.
This is pretty straightforward on an x86 machine via the GRUB line:
GRUB_CMDLINE_LINUX_DEFAULT="isolcpus=1"

However on Arm-Uboot you have to do it with the 'fw_setenv' utility. But the setup is quite complicated, as you first have to create the config files for the utility itself. And those parameters really have to match the system -i.e. the exact location of uboot on the sd card or something like that, or bad things will happen.

My question, has anyone successfully used 'fw_setenv' with the NanoPi boards? A small clarification or example would be really appreciated. Again I just want to set the 'isolcpus' option.

Thank you very much

Note: I also tried the boot.cmd ->mkimage -> boot.src scheme. It 'worked' as in no errors were shown and the .scr file was created (under /boot) but it had no effect :(


U-boot boot loader must have enabled support for loading and executing boot.scr ... this might not be by default. Usually, it's possible to break the boot process via (serial) console and manually set & save u-boot environment. Adding isocpus=1 at the end of bootarg variable ...

Setting this from Linux with gw_setenv ... not sure if it is supported either.
Wow that was fast, thanks igorp, I will look into it some more.

Also I forgot to mention on the NanoPi wiki it says:

Insert your MicroSD card into a PC host running Linux, mount the boot and rootfs sections of the SD card and follow the steps below:
1) If you want to change your kernel command line parameters you can do it via the fw_setevn utility under "sd-fuse_nanopi2/tools".
Check the current Command Line:

cd sd-fuse_nanopi2/tools
./fw_printenv /dev/sdc | grep bootargs


I don't know what the hell it means to 'mount' the boot and rootfs. Although I know you can 'mount' the sd card image to se the contents. it's all a bit confusing.
I can see the two 'partitions' under /dev/disk/by-label, (on the NP file manager) but as far as 'mounting' them on the PC, it makes no sense.

Thanks for any further help guys
Also I forgot to mention on the NanoPi wiki it says:


This means you need to insert this SD card into some Linux computer. Some deskop Linuxes "mount" this removable media (USB keys, SD cards, ...) automatically, on others you need to mount it manually. Than edit referred files, "unmount" SD card and boot it on your board.

I don't know if this will work, but its worth trying on FriendlyARMs manual.

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 42 on Fri Jul 15, 2016 1:04 am

Users browsing this forum: No registered users and 1 guest