Skip to content

Commit

Permalink
Miscellaneous cleanup.
Browse files Browse the repository at this point in the history
Signed-off-by: nubecoder <nubecoder@gmail.com>
  • Loading branch information
nubecoder committed Aug 12, 2011
1 parent 21f8f48 commit 82c70a7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 31 deletions.
29 changes: 17 additions & 12 deletions README
@@ -1,23 +1,28 @@
Create an image as 480x800 24bit RGB.
In gimp save as "C Header"

Edit makelogo.cpp to include this file
Instructions:

g++ -o makelogo makelogo.cpp
Create a 480x800 (24bit) RGB color image in gimp and save as "C source code header".
Edit makelogo.cpp to include the path to the newly created "C source code header" file.

./makelogo > mybootlogo
Build the makelogo binary:
g++ -o makelogo makelogo.cpp

cat start_logo.h > my_logo_rgb24_wvga_portrait.h
cat mybootlogo >> my_logo_rgb24_wvga_portrait.h
cat end_logo.h >> my_logo_rgb24_wvga_portrait.h
Chmod the binary to be executable:
chmod +x makelogo

cp my_logo_rgb24_wvga_portrait.h ../Kernel/drivers/video/samsung/logo_rgb24_wvga_portrait.h
Run the binary and create the data file:
./makelogo > mybootlogo

Combine all the files to create the needed source file:
cat start_logo.h > my_logo_rgb24_wvga_portrait.h
cat mybootlogo >> my_logo_rgb24_wvga_portrait.h
cat end_logo.h >> my_logo_rgb24_wvga_portrait.h

Copy the file into the Kernel's source path:
cp my_logo_rgb24_wvga_portrait.h ../Kernel/drivers/video/samsung/logo_rgb24_wvga_portrait.h

Compile your kernel as usual.

look at end_logo.h if you plan on replacing the charge image.

I never got to just doing it all at once, that would be on my todo list.



1 change: 1 addition & 0 deletions changelog
@@ -1,4 +1,5 @@
Changelog:

08-12-2011:
Miscellaneous cleanup.
Added changelog and .gitignore.
46 changes: 27 additions & 19 deletions makelogo.cpp
@@ -1,31 +1,39 @@
#include <iostream>
#include </home/morfic/NSDEV/logo/trinity2.h> //this is the logo, saved in gimp as "C header" change this to include yours, don't try to build it with my path
/*
* Below is the logo, saved in gimp as type "C source code header".
* Change this to include your file's path.
* Don't try to build it with my path.
*/
#include </home/morfic/NSDEV/logo/trinity2.h>
using namespace std;

int main( )
int main()
{
int totalpixels = 480 * 800;
int breakcount=1;
for( int i = 0; i < totalpixels; i++ )
{
unsigned char pixel[6]="";
HEADER_PIXEL(header_data,pixel);

int breakcount = 1;
for (int i = 0; i < totalpixels; i++)
{
unsigned char pixel[6] = "";
HEADER_PIXEL(header_data, pixel);
cout << "0x00";
for (int j = 0; j <3 ; j++)
for (int j = 0; j < 3; j++)
{
if ( pixel[j] < 16)
cout << "0";
if (pixel[j] < 16)
{
cout << "0";
}
cout << std::hex << (int)pixel[j];
}
if ( breakcount == 10) {
breakcount = 1;
cout << ",\n";
}
else {
breakcount++;
cout << ",";
}
if (breakcount == 10)
{
breakcount = 1;
cout << ",\n";
}
else
{
breakcount++;
cout << ",";
}
}
return 0;
}

0 comments on commit 82c70a7

Please sign in to comment.