Skip to content

How to enable frame buffer console #52

@NathanChiu95

Description

@NathanChiu95

Hi, I would like to show the boot logs on the mipi LCD with frame buffer console, but I cannot get it working.

I hv added the following in
build\boards\sg200x\sg2002_licheervnano_sd\linux\sg2002_licheervnano_sd_defconfig:

CONFIG_FB=y
# CONFIG_FB_CVITEK=m ## This is origional
CONFIG_FB_CVITEK=y
# CONFIG_FRAMEBUFFER_CONSOLE=y This is new add
CONFIG_FRAMEBUFFER_CONSOLE=y

also, the following in
u-boot-2021.10\include\configs\mars-asic.h:

	/* config uart */
	#ifdef MAP_CONSOLE_TO_FBCON
		#define CONSOLEDEV "tty1\0" // This is for fbcon, new added by user
		#define CONSOLEDEV_SERIAL "ttyS0\0"
		#define MAP_FB_CON " fbcon=map:0\0"
	#else
		#define CONSOLEDEV_SERIAL "ttyS0\0"
		#define MAP_FB_CON " "
	#endif
	#define OTHERBOOTARGS   "earlycon=sbi riscv.fwsz="  __stringify(CVIMMAP_OPENSBI_SIZE) " " \
		EARLYCON_RELEASE CONSOLE_LOGLEVEL MAP_FB_CON
	#ifdef MAP_CONSOLE_TO_FBCON // This is for fbcon, new added by user
		#define CONFIG_EXTRA_ENV_SETTINGS	\
			"netdev=eth0\0"		\
			"consoledev=" CONSOLEDEV  \
			"consoledev_serial=" CONSOLEDEV_SERIAL  \
			"baudrate=115200\0" \
			"uImage_addr=" __stringify(UIMAG_ADDR) "\0" \
			"update_addr=" __stringify(UPDATE_ADDR) "\0" \
			"mtdparts=" PARTS "\0" \
			"mtdids=" MTDIDS_DEFAULT "\0" \
			"root=" ROOTARGS "\0" \
			"sddev=0\0" \
			"sdboot=" SD_BOOTM_COMMAND "\0" \
			"sdbootauto=" SD_BOOTM_COMMAND_AUTO "\0" \
			"othbootargs=" OTHERBOOTARGS "\0" \
			"loadenvcmd=mmc info;load mmc 0:1 ${uImage_addr} uEnv.txt; if test $? -eq 0; then env import ${uImage_addr} - ; fi;\0" \
			PARTS_OFFSET
	#else
	#ifdef MAP_CONSOLE_TO_FBCON // This is for fbcon, new added by user
		#define SET_BOOTARGS "setenv bootargs ${reserved_mem} ${root} ${mtdparts} " \
						"console=$consoledev $othbootargs;"
	#else

so that the bootargs=root=/dev/mmcblk0p2 rootwait rw console=tty1 earlycon=sbi riscv.fwsz=0x80000 loglevel=9 fbcon=map:0

I rebuilt it and created /boot/fb
when I do lsmod, soph_fbis enabled
and there is existing /dev/fb0

But still, no console was shown on the MIPI LCD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions