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.
Categories
- 287 All Categories
- 104 Announcements & News
- 47 Product News - New Product/Product Change Notice/ End-of-life
- 179 Welcome Developers!
- 49 Unboxing & Project Sharing
- 18 Tech Updates
- 380 UP Products
- 6 UP Xtreme i11
- 15 UP Squared 6000
- 38 UP Squared Pro
- 126 UP Xtreme
- 796 UP Squared
- 1.4K UP Board
- 86 UP Core Plus
- 217 UP Core
- 3 UP Xtreme Lite
- 41 UP AI Edge
- 213 Starter Kits & Peripheral