[PATCH] riscv: defconfig: k210: Disable CONFIG_VT
Geert Uytterhoeven
geert at linux-m68k.org
Wed Nov 25 03:51:19 EST 2020
Hi Damien,
On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal at wdc.com> wrote:
> On 2020/11/25 3:57, Geert Uytterhoeven wrote:
> > There is no need to enable Virtual Terminal support in the Canaan
> > Kendryte K210 defconfigs, as no terminal devices are supported and
> > enabled. Hence disable CONFIG_VT, and remove the no longer needed
> > override for CONFIG_VGA_CONSOLE.
> >
> > This reduces kernel size by ca. 65 KiB.
>
> Indeed, nice saving. Just tested, and all is good.
I used my old script[1] to check the impact of disabling config options.
I don't see any other low-hanging fruits:
Disabling CONFIG_BLOCK saves 492890 bytes
Disabling CONFIG_EXT4_FS saves 322528 bytes
Disabling CONFIG_PRINTK saves 214612 bytes
Disabling CONFIG_SMP saves 214486 bytes
Disabling CONFIG_FRAME_POINTER saves 166368 bytes
Disabling CONFIG_TTY saves 156618 bytes
Disabling CONFIG_PROC_FS saves 110274 bytes
Disabling CONFIG_MMC saves 87656 bytes
Disabling CONFIG_VT saves 70350 bytes
Disabling CONFIG_SYSFS saves 62298 bytes
Disabling CONFIG_BUG saves 50882 bytes
Disabling CONFIG_SPI saves 34420 bytes
Disabling CONFIG_SOC_CANAAN saves 34286 bytes
Disabling CONFIG_I2C saves 34086 bytes
Disabling CONFIG_PROC_SYSCTL saves 23890 bytes
Disabling CONFIG_POSIX_TIMERS saves 18388 bytes
Disabling CONFIG_I2C_DESIGNWARE_PLATFORM saves 17530 bytes
Disabling CONFIG_MMC_BLOCK saves 17200 bytes
Disabling CONFIG_UNIX98_PTYS saves 16360 bytes
Disabling CONFIG_MULTIUSER saves 16148 bytes
Disabling CONFIG_NEW_LEDS saves 15964 bytes
Disabling CONFIG_SPI_DESIGNWARE saves 15434 bytes
Disabling CONFIG_GPIO_CDEV saves 15352 bytes
Disabling CONFIG_MMC_SPI saves 14754 bytes
Disabling CONFIG_SOC_CANAAN_K210_DTB_BUILTIN saves 13864 bytes
(Yes, I have ext4 enabled ;-)
I haven't done enough riscv kernel development yet to assess if I need
CONFIG_FRAME_POINTER or not.
[1] https://github.com/geertu/linux-scripts/blob/master/linux-analyze-marginal-sizes
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the linux-riscv
mailing list