Help With Patricknet Development
- babylon2233
- Member
- Posts: 66
- Joined: Fri May 23, 2008 5:30 pm
- Location: Malaysia
Re: Help With Patricknet Development
Tools like us? I don't use anything besides PC with Ubuntu installed (Internet-enabled).
Re: Help With Patricknet Development
same here, ubuntu comes with gcc and ld/make/conf and I 'think' bochs comes preinstalled.
*trick question*
Also, how are you posting if you have no internet access?
I asked earlier if there was an alternative method for you to get internet access to acquire the previously mentioned packages.
*trick question*
Also, how are you posting if you have no internet access?
I asked earlier if there was an alternative method for you to get internet access to acquire the previously mentioned packages.
Website: https://joscor.com
Re: Help With Patricknet Development
I am posting from a "windows me" computer and from school. The Win Me machine can not handel virtual software plus i am not allowed. Right now at home i am going to try that command you suggested and i will post back when i am back at school tommrow
Re: Help With Patricknet Development
I looked at the linux version of mine and i forgot it was an older one than fiesty fawn. I have to got to **** smith and get my self an newer copy because dail-up take months to down load that size of an iso
ERGENT HELP
Hey i manage to get gcc, gas, and ld to work by using a newer version DVD to update the software. I had no problem with gcc and gas when compiling. But "LD" is a diffrent story. I think that barebone must of left something out to make an error when linking
Here is my error when linking in terminal
I don't know if anything is leftout of my source code or not so i will upload it for you
Loader.s
This is My code compiled in GAS - Done Successfuly
Kernel.c
My Kernel Compiled in GCC - Done Successfuly
linker.ld
My Linker File for 'LD"
Can you please help me out.
Here is my error when linking in terminal
Code: Select all
loader.o: In function `loader':
(.text+0x14): undefined reference to `kmain'
Loader.s
This is My code compiled in GAS - Done Successfuly
Code: Select all
.global loader # making entry point visible to linker
# setting up the Multiboot header - see GRUB docs for details
.set ALIGN, 1<<0 # align loaded modules on page boundaries
.set MEMINFO, 1<<1 # provide memory map
.set FLAGS, ALIGN | MEMINFO # this is the Multiboot 'flags' field
.set MAGIC, 0x1BADB002 # 'magic number' lets bootloader find the header
.set CHECKSUM, -(MAGIC + FLAGS) # checksum required
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
# reserve initial kernel stack space
.set STACKSIZE, 0x4000 # that is, 16k
.comm stack, STACKSIZE, 32 # reserve 16k stack on a quadword boundary
loader:
mov $(stack + STACKSIZE), %esp # set up the stack
push %eax # Multiboot magic number
push %ebx # Multiboot data structure
call kmain # call kernel proper
hlt # halt machine should kernel return
My Kernel Compiled in GCC - Done Successfuly
Code: Select all
void Kmain( void* mmbdd, unsigned int magic )
{
/* Write your kernel here. Example: */
unsigned char *videoram =(unsigned char *) 0xb8000;
videoram[0] = 65; /* character 'A' */
videoram[1] = 0x07; /* forground, background color. */
}
My Linker File for 'LD"
Code: Select all
ENTRY (loader)
SECTIONS{
. = 0x00100000;
.text :{
*(.text)
}
.rodata ALIGN (0x1000) : {
*(.rodata)
}
.data ALIGN (0x1000) : {
*(.data)
}
.bss : {
sbss = .;
*(COMMON)
*(.bss)
ebss = .;
}
}
Re: Help With Patricknet Development
you need to specify kmain() as external (.extern kmain or [extern kmain])
Website: https://joscor.com
Re: Help With Patricknet Development
Would be that in "loader.s" Can you give me more detail where to put it or correct my code
Re: Help With Patricknet Development
You're using an uppercase 'K' in kernel.c and a lowercase 'k' in Loader.s. Symbol names are case-sensitive on most platforms
Re: Help With Patricknet Development
indeed.froggey wrote:You're using an uppercase 'K' in kernel.c and a lowercase 'k' in Loader.s. Symbol names are case-sensitive on most platforms
you should specify .extern in your loader, something to the effect of .extern kmain, or [extern kmain] before you actually call kmain which is in a different file.
Website: https://joscor.com
Re: Help With Patricknet Development
Hey thanks 01000101. It worked. Patricknet beta 0.2 I feel is coming very soon. And it is all thanks to you guys esp 01000101 because you help me out a lot. 1 Questions 01000101 i never seen your Operating System. With all that knowlege surely you put it to good use
Re: Help With Patricknet Development
no problem.
My OS is proprietary and designed around a very small hardware base, therefore excluding 95+% of potential testers. It is also not designed to have any sort of graphical interface or command line interface, therefore it would once again not be suitable for testing. The only reason there is video at the moment, is for debugging only.
My OS is proprietary and designed around a very small hardware base, therefore excluding 95+% of potential testers. It is also not designed to have any sort of graphical interface or command line interface, therefore it would once again not be suitable for testing. The only reason there is video at the moment, is for debugging only.
Website: https://joscor.com
- babylon2233
- Member
- Posts: 66
- Joined: Fri May 23, 2008 5:30 pm
- Location: Malaysia
Re: Help With Patricknet Development
01000101 wrote:no problem.
My OS is proprietary and designed around a very small hardware base, therefore excluding 95+% of potential testers. It is also not designed to have any sort of graphical interface or command line interface, therefore it would once again not be suitable for testing. The only reason there is video at the moment, is for debugging only.
I guess you're planning to sell network filtering appliance instead of your OS alone.
Re: Help With Patricknet Development
yes. Currently there is a rack mountable prototype (demo machine) and there are plans for some sort of pedestal setup, but that's not extremely important at the moment as most places where this would be usable, rack mountable would most definitely be preferred.
Also, because my OS is so fused with the hardware and cuts out unnecessary features/drivers, it boots and runs incredibly fast due to the high demand of dual/quad gigabit NIC packet filtering. Also, in order for optimal filtering, at least a dual-core or dual-processor setup must be in place in order to execute parallel packet reception/transmission/filtering/etc...
Also, because my OS is so fused with the hardware and cuts out unnecessary features/drivers, it boots and runs incredibly fast due to the high demand of dual/quad gigabit NIC packet filtering. Also, in order for optimal filtering, at least a dual-core or dual-processor setup must be in place in order to execute parallel packet reception/transmission/filtering/etc...
Website: https://joscor.com
Re: Help With Patricknet Development
Wat so special about Patricknet is that is opensource and you can freely modify under gpl licence. We want you to have a look at the code that i have done so far. If their is anyhting that needs to be added or changes before it is releaseed in Beta 0.2. Post an updated version of the code on this forum or send it to [email protected]. PLEASE NOTE: This code is c language and is complied in gcc and linked in LD for GRUB
Code: Select all
void kmain( void* mmbdd, unsigned int magic )
{
/* Patricknet Kernel */
unsigned char *videoram =(unsigned char *) 0xb8000;
videoram[0] = 80; //P
videoram[1] = 0x07;
videoram[2] = 97; //a
videoram[3] = 0x07;
videoram[4] = 116; //t
videoram[5] = 0x07;
videoram[6] = 114; //r
videoram[7] = 0x07;
videoram[8] = 105; //i
videoram[9] = 0x07;
videoram[10] = 99; //c
videoram[11] = 0x07;
videoram[12] = 107; //k
videoram[13] = 0x07;
videoram[14] = 110; //n
videoram[15] = 0x07;
videoram[16] = 101; //e
videoram[17] = 0x07;
videoram[18] = 116; //t
videoram[19] = 0x07;
videoram[20] = 32; //space
videoram[21] = 0x07;
videoram[22] = 66; //B
videoram[23] = 0x07;
videoram[24] = 101; //e
videoram[25] = 0x07;
videoram[26] = 116; //t
videoram[27] = 0x07;
videoram[28] = 97; //a
videoram[29] = 0x07;
videoram[30] = 32; //space
videoram[31] = 0x07;
videoram[32] = 48; //0
videoram[33] = 0x07;
videoram[34] = 46; //.
videoram[35] = 0x07;
videoram[36] = 50; //2
videoram[37] = 0x07;
}
Re: Help With Patricknet Development
you don't need to specify the numerical equivelant for characters for video memory. You can just say and so on. Also, I would recommend writing to video memory in words (2-bytes) so that you don't need to do two writes to place both the character and then the color into video memory.
Try something along these lines:
Code: Select all
videoram[0] = 'P';
Try something along these lines:
Code: Select all
unsigned short *videoram = (unsigned short *)0xB8000;
basic_print(unsigned char ch, unsigned char color)
{
*videoram = ((color << 8) | ch);
videoram += 2;
}
Website: https://joscor.com