Skip to content

Commit

Permalink
Add quiet parameter to kernel to skip print dmesg to console on start…
Browse files Browse the repository at this point in the history
…up, and calculated lpj
  • Loading branch information
tiopex committed Dec 14, 2023
1 parent 9e41cdc commit cabb797
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
2 changes: 2 additions & 0 deletions configs/miyoo_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=1
CONFIG_VIDEO_LCD_MODE="x:480,y:272,depth:18,pclk_khz:9000,le:39,ri:8,up:2,lo:4,hs:4,vs:10,sync:3,vmode:0"
CONFIG_SPL_SPI_SUNXI=y
CONFIG_BOOTDELAY=0
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=tty0 console=ttyS1,115200 panic=5 rootwait quiet lpj=1015808 root=/dev/mmcblk0p2 ro"
CONFIG_BOOTCOMMAND="setenv lcd_bl_pin 134; run distro_bootcmd;"
CONFIG_CMD_DFU=y
CONFIG_CMD_MTD=y
Expand Down
48 changes: 24 additions & 24 deletions drivers/video/sunxi/sunxi_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "r61520fb.ko");
env_set("CONSOLE_PARAMETERS", "version=1 lowcurrent=1");
env_set("FORCE_VERSION", "bittboy2x_v1");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=1");
writeScreenReg = 0x2c;
madctlCmd = 0xe0;
invert = 0x20;
Expand All @@ -203,7 +203,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "st7789sfb.ko");
env_set("CONSOLE_PARAMETERS", "flip=1 lowcurrent=1");
env_set("FORCE_VERSION", "bittboy2x_v2");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
writeScreenReg = 0x2c;
madctlCmd = 0x70;
invert = 0x20;
Expand All @@ -213,7 +213,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "st7789sfb.ko");
env_set("CONSOLE_PARAMETERS", "flip=1 lowcurrent=1");
env_set("FORCE_VERSION", "bittboy3.5");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=7 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=7 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
writeScreenReg = 0x2c;
madctlCmd = 0x70;
invert = 0x20;
Expand All @@ -223,7 +223,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "r61520fb.ko");
env_set("CONSOLE_PARAMETERS", "version=1 flip=1 invert=1 lowcurrent=1");
env_set("FORCE_VERSION", "m3_r61520");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
writeScreenReg = 0x2c;
madctlCmd = 0x38;
invert = 0x21;
Expand All @@ -233,39 +233,39 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "rm68090fb.ko");
env_set("CONSOLE_PARAMETERS", "");
env_set("FORCE_VERSION", "m3_rm68090");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
writeScreenReg = 0x22;
return 5;
}
if (console_variant && !strcmp(console_variant, "m3_hx8347d")) {
env_set("CONSOLE_VIDEO", "hx8347dfb.ko");
env_set("CONSOLE_PARAMETERS", "");
env_set("FORCE_VERSION", "m3_hx8347d");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
writeScreenReg = 0x22;
return 6;
}
if (console_variant && !strcmp(console_variant, "m3_gc9306")) {
env_set("CONSOLE_VIDEO", "gc9306fb.ko");
env_set("CONSOLE_PARAMETERS", "");
env_set("FORCE_VERSION", "m3_gc9306");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
writeScreenReg = 0x2c;
return 4;
}
if (console_variant && !strcmp(console_variant, "xyc_gc9306")) {
env_set("CONSOLE_VIDEO", "gc9306fb.ko");
env_set("CONSOLE_PARAMETERS", "");
env_set("FORCE_VERSION", "xyc_gc9306");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=4 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=3");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=4 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=3");
writeScreenReg = 0x2c;
return 4;
}
if (console_variant && !strcmp(console_variant, "pocketgo")) {
env_set("CONSOLE_VIDEO", "st7789sfb.ko");
env_set("CONSOLE_PARAMETERS", "lowcurrent=1");
env_set("FORCE_VERSION", "pocketgo");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
writeScreenReg = 0x2c;
madctlCmd = 0xB0;
invert = 0x20;
Expand All @@ -275,7 +275,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "st7789sTEfb.ko");
env_set("CONSOLE_PARAMETERS", "");
env_set("FORCE_VERSION", "pocketgo_TE");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
writeScreenReg = 0x2c;
madctlCmd = 0xB0;
invert = 0x20;
Expand All @@ -288,7 +288,7 @@ static uint8_t readID(void) {
env_set("FORCE_VERSION", "q20");
else
env_set("FORCE_VERSION", "q90");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=6 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=6 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
writeScreenReg = 0x2c;
madctlCmd = 0xB0;
invert = 0x20;
Expand All @@ -298,7 +298,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "st7789sfb.ko");
env_set("CONSOLE_PARAMETERS", "lowcurrent=1");
env_set("FORCE_VERSION", "v90");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=5 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=5 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
writeScreenReg = 0x2c;
madctlCmd = 0xB0;
invert = 0x20;
Expand All @@ -324,7 +324,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "rm68090fb.ko");
env_set("CONSOLE_PARAMETERS", "");
env_set("DETECTED_VERSION", "RM68090 controller");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
writeScreenReg = 0x22;
return 5;
}
Expand All @@ -350,7 +350,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "r61520fb.ko");
env_set("CONSOLE_PARAMETERS", "version=1 lowcurrent=1");
env_set("DETECTED_VERSION", "R61520 controller");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=1");
madctlCmd = 0xe0;
invert = 0x20;
writeScreenReg = 0x2c;
Expand All @@ -364,7 +364,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "r61520fb.ko");
env_set("CONSOLE_PARAMETERS", "version=1 lowcurrent=1");
env_set("DETECTED_VERSION", "bittboy2x_v1 r61520fb controller");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=1");
return 1;
}
miyoo_ver = 2;
Expand All @@ -373,14 +373,14 @@ static uint8_t readID(void) {
env_set("DETECTED_VERSION", "bittboy3.5/bittboy2x_v2 ST7789S controller");
env_set("CONSOLE_PARAMETERS", "lowcurrent=1 flip=1");
if (!strcmp(console_variant, "bittboy3"))
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=7 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=7 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
else
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=3 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
} else {
madctlCmd = 0xB0;
env_set("DETECTED_VERSION", "V90/Q90/Q20/PocketGo ST7789S controller");
env_set("CONSOLE_PARAMETERS", "lowcurrent=1");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1 pwm-suniv.motor_ver=2");
}
invert = 0x20;
writeScreenReg = 0x2c;
Expand All @@ -391,7 +391,7 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "r61520fb.ko");
env_set("CONSOLE_PARAMETERS", "version=3");
env_set("DETECTED_VERSION", "R61505W controller");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1");
madctlCmd = 0xB0;
invert = 0x20;
writeScreenReg = 0x2c;
Expand All @@ -402,17 +402,17 @@ static uint8_t readID(void) {
env_set("CONSOLE_PARAMETERS", "");
env_set("DETECTED_VERSION", "GC9306/GC9305 controller from gc9306fb");
if (!strcmp(console_variant, "xyc"))
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=4 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=3");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=4 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=3");
else
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
writeScreenReg = 0x2c;
return 4;
}
if ((ver[0] == 0x00) && (ver[1] == 0x98) && (ver[2] == 0x51) && (ver[3] == 0x01)) { // SUP M3 unknown controller Works with R61520.
env_set("CONSOLE_VIDEO", "r61520fb.ko");
env_set("CONSOLE_PARAMETERS", "version=1 flip=1 invert=1 lowcurrent=1");
env_set("DETECTED_VERSION", "SUP M3 unknown controller Works with R61520");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
madctlCmd = 0x38;
invert = 0x21;
writeScreenReg = 0x2c;
Expand All @@ -422,15 +422,15 @@ static uint8_t readID(void) {
env_set("CONSOLE_VIDEO", "hx8347dfb.ko");
env_set("CONSOLE_PARAMETERS", "");
env_set("DETECTED_VERSION", "HX8347-D controller");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=3 miyoo_kbd.miyoo_layout=4 miyoo.miyoo_snd=2 miyoo-battery.use_charge_status=1");
writeScreenReg = 0x22;
return 6;
}

env_set("CONSOLE_VIDEO", "r61520fb.ko");
env_set("CONSOLE_PARAMETERS", "debug=1");
env_set("DETECTED_VERSION", "UNKNOWN");
env_set("bootcmd_args", "setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 ro miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1");
env_set("bootcmd_args", "setenv bootargs ${bootargs} miyoo_kbd.miyoo_ver=1 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1");
writeScreenReg = 0x2c;
madctlCmd = 0xe0;
invert = 0x20;
Expand Down

0 comments on commit cabb797

Please sign in to comment.