Simple Kernel Loading Isse
 
            
                
                    Yuan Feng                
                
                    New Member Posts: 5 ✭                
            
                        
            
                    Hi Everyone,
I wrote a simple kernel which is unix-based. How can I use upboard to boot with this OS image.
Could any one tell me the steps?
Many Thanks
                        
        
        
      I wrote a simple kernel which is unix-based. How can I use upboard to boot with this OS image.
Could any one tell me the steps?
Many Thanks
Comments
- 
            Hi Michael,
 The question is very generic and the step may vary depending on the distribution you are using.
 Is it a Unix or Linux system?
 Does it support EFI boot?
- 
            Hi,
 Yes, I support EFI. I put this on my thinkpad notebookt and it works. Thinkpad is sandybridge chip.
 Linux system based.
- 
            The solution I use is
 add the following to /boot/grub/grub.cfg on ubuntu
 menuentry ' '{
 multiboot /boot/kernel....
 }
 It works on my thinkpad, but does not work on up board. It cannot display anything.
- 
            The code I am using is similar to this
 "
 const char *str = "my first kernel";
 char *vidptr = (char*)0xb8000; //video mem begins here.
 unsigned int i = 0;
 unsigned int j = 0;
 while(j < 80 * 25 * 2) {
 /* blank character */
 vidptr[j] = ' ';
 vidptr[j+1] = 0x07;
 j = j + 2;
 }
 j = 0;
 /* this loop writes the string to video memory */
 while(str[j] != '\0') {
 vidptr = str[j];
 vidptr[i+1] = 0x07;
 ++j;
 i = i + 2;
 }
 return;
 "
- 
            Hi michaelyuanfeng,
 If you are compiling a custom kernel for ubuntu I would suggest to start from our kernel on launchpad: https://launchpad.net/~ubilinux/+archive/ubuntu/up
 Also, to simplify the installation of the new kernel you should try to compile with the option to create a deb package.
 You can then easily install with dpkg your new kernel from a ubuntu 14.04/16.04 system already installed in the UP board.
