How do i change the BIOS boot splash screen?
- by YumYumYum
I have a Dell PC which has very ugly and bad luck looking Alien face on every boot. I want to change it or disable it forever, but in Bios they do not have any options.
How can i change this from my linux Fedora or ArchLinux which is running now?
Tried following does not work. ( http://www.pixelbeat.org/docs/bios/ )
./flashrom -r firmware.old #save current flash ROM just in case
./flashrom -wv firmware.new #write and verify new flash ROM image
Also tried:
$ cat c.c
#include <stdio.h>
#include <inttypes.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#define lengthof(x) (sizeof(x)/sizeof(x[0]))
uint16_t checksum(const uint8_t* data, int len)
{
uint16_t sum = 0;
int i;
for (i=0; i<len; i++)
sum+=*(data+i);
return htons(sum);
}
void usage(void)
{
fprintf(stderr,"Usage: therm_limit [0,50,53,56,60,63,66,70]\n");
fprintf(stderr,"Report therm limit of terminal in BIOS\n");
fprintf(stderr,"If temp specifed, it is changed if required.\n");
exit(EXIT_FAILURE);
}
#define CHKSUM_START 51
#define CHKSUM_END 109
#define THERM_OFFSET 67
#define THERM_SHIFT 0
#define THERM_MASK (0x7 << THERM_SHIFT)
#define THERM_OFF 0
uint8_t thermal_limits[]={0,50,53,56,60,63,66,70};
#define THERM_MAX (lengthof(thermal_limits)-1)
#define DEV_NVRAM "/dev/nvram"
#define NVRAM_MAX 114
uint8_t nvram[NVRAM_MAX];
int main(int argc, char* argv[])
{
int therm_request = -1;
if (argc>2) usage();
if (argc==2) {
if (*argv[1]=='-') usage();
therm_request=atoi(argv[1]);
int i;
for (i=0; i<lengthof(thermal_limits); i++)
if (thermal_limits[i]==therm_request)
break;
if (i==lengthof(thermal_limits))
usage();
else
therm_request=i;
}
int fd_nvram=open(DEV_NVRAM, O_RDWR);
if (fd_nvram < 0) {
fprintf(stderr,"Error opening %s [%m]\n", DEV_NVRAM);
exit(EXIT_FAILURE);
}
if (read(fd_nvram, nvram, sizeof(nvram))==-1) {
fprintf(stderr,"Error reading %s [%m]\n", DEV_NVRAM);
close(fd_nvram);
exit(EXIT_FAILURE);
}
uint16_t chksum = *(uint16_t*)(nvram+CHKSUM_END);
printf("%04X\n",chksum); exit(0);
if (chksum == checksum(nvram+CHKSUM_START, CHKSUM_END-CHKSUM_START)) {
uint8_t therm_byte = *(uint16_t*)(nvram+THERM_OFFSET);
uint8_t therm_status=(therm_byte & THERM_MASK) >> THERM_SHIFT;
printf("Current thermal limit: %d°C\n", thermal_limits[therm_status]);
if (
(therm_status == therm_request)
) therm_request=-1;
if (therm_request != -1) {
if (therm_status != therm_request)
printf("Setting thermal limit to %d°C\n", thermal_limits[therm_request]);
uint8_t new_therm_byte = (therm_byte & ~THERM_MASK) | (therm_request << THERM_SHIFT);
*(uint8_t*)(nvram+THERM_OFFSET) = new_therm_byte;
*(uint16_t*)(nvram+CHKSUM_END) = checksum(nvram+CHKSUM_START, CHKSUM_END-CHKSUM_START);
(void) lseek(fd_nvram,0,SEEK_SET);
if (write(fd_nvram, nvram, sizeof(nvram))!=sizeof(nvram)) {
fprintf(stderr,"Error writing %s [%m]\n", DEV_NVRAM);
close(fd_nvram);
exit(EXIT_FAILURE);
}
}
} else {
fprintf(stderr,"checksum failed. Aborting\n");
close(fd_nvram);
exit(EXIT_FAILURE);
}
return EXIT_SUCCESS;
}
$ gcc c.c -o bios
# ./bios
16DB