Re: [HelenOS-devel] Fwd: Running HelenOS on beaglebone-black

2017-03-12 Thread sourav punoriyar
Hi Jakub,

I tried to change it to UART0. Also disabled kernel console.
All other registrations seems to be fine without error.
boots_args are also obtained in userspace.

but, it gets stuck in *fibril_condvar_wait.*
while (!discovery_finished) {
*fibril_condvar_wait*(_cv, _lock);
}

I am going through the source code to know its workflow.
Could you give a hint on what this api does.

I am also going through documents present in http://www.helenos.org/wiki/
Documentation.
Can you also point me towards the documents which gives some insight of IPC
implementation in HelenOS.


On Sun, Mar 12, 2017 at 8:37 AM, Jakub Jermář <ja...@jermar.eu> wrote:

> On 03/12/2017 01:15 PM, Jakub Jermář wrote:
> > On 03/11/2017 09:06 AM, sourav punoriyar wrote:
> >> I am able to propagate boot_args to usrspace.
> >
> > Nice, now you should be able to get a userspace console if the input,
> > output and console tasks are present in the boot image.
>
> Forgot about the driver :-) We also need to have a functional driver.
>
> Jakub
>
> ___
> HelenOS-devel mailing list
> HelenOS-devel@lists.modry.cz
> http://lists.modry.cz/listinfo/helenos-devel
>

Sorry for disturbing so much.
But i am enjoying HelenOS. :-)

I will add logs and also update, if i find something.

-- 
Regards,
Sourav Punoriyar
Bazaar identity: Sourav Punoriyar <sourav.punoriyar@spunor>
___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel


Re: [HelenOS-devel] Passing boot arguments in case of arm32 (beaglebone black)

2017-03-06 Thread sourav punoriyar
Thanks Jakub

I will remove the extra copy as it is not required .Kernel can read it
directly from bootinfo.
I will try to check the code to find some reasons on whether kernel
guarantees it would not overwrite bootinfo,

Also i will look forward to second step to get serial working and studying
more about HelenOS.

Happy vacations :-)

On Mon, Mar 6, 2017 at 12:25 PM, Jakub Jermář <ja...@jermar.eu> wrote:

> Hi Sourav,
>
> On 03/05/2017 07:47 PM, sourav punoriyar wrote:
> > 2>copied boot_args to loaders local memory and then passed to kernel.
>
> Thanks for continuing to improve your patch!
>
> I noticed you attempt to copy out the boot args from bootinfo to a
> kernel global variable (you should not define it in a .h file though).
> I'd rather keep this in bootinfo and let the kernel read it from there.
>
> At the same time, I think there has been a preexisting kernel bug in
> code that uses bootinfo as I can't find or justify to myself how the
> kernel guarantees it will not not overwrite it (in a similar way it
> guarantees it won't overwrite ballocs). I will deal with this when I
> come back from vacation.
>
> Cheers,
> Jakub
>
> ___
> HelenOS-devel mailing list
> HelenOS-devel@lists.modry.cz
> http://lists.modry.cz/listinfo/helenos-devel
>



-- 
Regards,
Sourav Punoriyar
Bazaar identity: Sourav Punoriyar <sourav.punoriyar@spunor>
___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel


Re: [HelenOS-devel] Fwd: Passing boot arguments in case of arm32 (beaglebone black)

2017-03-02 Thread sourav punoriyar
Hi Jakub,


I will create a patch and share it with as soon as possible.

Regards,
Sourav Punoriyar

On Fri, Mar 3, 2017 at 1:23 AM, Jakub Jermář <ja...@jermar.eu> wrote:

> Hi Sourav,
>
> would you mind sharing a patch? This is really not that helpful as I can
> only guess what you have done.
>
> Thanks,
> Jakub
>
> On 03/02/2017 08:14 PM, sourav punoriyar wrote:
> > Hi Jakub,
> >
> > I was able to pass boot_args from uboot till kernel.
> >
> > The issue was i was looking in wrong direction.
> > After going through uboot for Netbsd i found the solution..
> >
> > *Some assumptions i made i kernel.*
> >
> > As no length is passed , i have taken max arguments size to be 4096
> bytes.
> > I have used str_cpy in (arm32_pre_main) so that no buffer overflow
> happens.
> >
> > I will come up with a structure to keep parsed arguments and a parser
> > function to collect the arguments separately.
> >
> > Please give your opinion and suggestions so that i can make it better.
> >
> >
> > Regards,
> > Sourav Punoriyar
> >
> > On Sun, Feb 26, 2017 at 4:29 AM, Jakub Jermář <ja...@jermar.eu
> > <mailto:ja...@jermar.eu>> wrote:
> >
> > Hi Sourav,
> >
> > On 02/25/2017 08:59 PM, sourav punoriyar wrote:
> > > Before Loading HelenOS
> > > U-Boot# bdinfo
> > > *arch_number = 0x0E05*
> > > boot_params = 0x8100
> > 
> > > After loading HelenOS
> > > U-Boot# bootm 0x80007FC0 - {Booting HelenOS}
> > > ## Transferring control to NetBSD stage-2 loader (at address
> 8000) ...
> > 
> > > I am just trying to read bdinfo , just to build confidence.
> > > But, I am not getting the expected values :-(
> > > I doubt is it something related to LOAD ADDRESS = 8000 ?
> > > beagebone _black Load = 80008000 ?
> >
> > Yes, the address to which the bbxm and bbone loader is linked seems
> to
> > conflict with the address where u-boot puts the arguments. You can
> try
> > moving the link/load address a little bit higher and see if it helps.
> > See boot/arch/arm32/Makefile.inc.
> >
> > Jakub
> >
> > ___
> > HelenOS-devel mailing list
> > HelenOS-devel@lists.modry.cz <mailto:HelenOS-devel@lists.modry.cz>
> > http://lists.modry.cz/listinfo/helenos-devel
> > <http://lists.modry.cz/listinfo/helenos-devel>
> >
> >
> >
> >
> > ___
> > HelenOS-devel mailing list
> > HelenOS-devel@lists.modry.cz
> > http://lists.modry.cz/listinfo/helenos-devel
> >
>
> ___
> HelenOS-devel mailing list
> HelenOS-devel@lists.modry.cz
> http://lists.modry.cz/listinfo/helenos-devel
>
___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel


Re: [HelenOS-devel] Fwd: Passing boot arguments in case of arm32 (beaglebone black)

2017-03-02 Thread sourav punoriyar
Hi Jakub,

I was able to pass boot_args from uboot till kernel.

The issue was i was looking in wrong direction.
After going through uboot for Netbsd i found the solution..

*Some assumptions i made i kernel.*

As no length is passed , i have taken max arguments size to be 4096 bytes.
I have used str_cpy in (arm32_pre_main) so that no buffer overflow happens.

I will come up with a structure to keep parsed arguments and a parser
function to collect the arguments separately.

Please give your opinion and suggestions so that i can make it better.


Regards,
Sourav Punoriyar

On Sun, Feb 26, 2017 at 4:29 AM, Jakub Jermář <ja...@jermar.eu> wrote:

> Hi Sourav,
>
> On 02/25/2017 08:59 PM, sourav punoriyar wrote:
> > Before Loading HelenOS
> > U-Boot# bdinfo
> > *arch_number = 0x0E05*
> > boot_params = 0x8100
> 
> > After loading HelenOS
> > U-Boot# bootm 0x80007FC0 - {Booting HelenOS}
> > ## Transferring control to NetBSD stage-2 loader (at address 8000)
> ...
> 
> > I am just trying to read bdinfo , just to build confidence.
> > But, I am not getting the expected values :-(
> > I doubt is it something related to LOAD ADDRESS = 8000 ?
> > beagebone _black Load = 80008000 ?
>
> Yes, the address to which the bbxm and bbone loader is linked seems to
> conflict with the address where u-boot puts the arguments. You can try
> moving the link/load address a little bit higher and see if it helps.
> See boot/arch/arm32/Makefile.inc.
>
> Jakub
>
> ___
> HelenOS-devel mailing list
> HelenOS-devel@lists.modry.cz
> http://lists.modry.cz/listinfo/helenos-devel
>
___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel


Re: [HelenOS-devel] Fwd: Passing boot arguments in case of arm32 (beaglebone black)

2017-02-24 Thread sourav punoriyar
Hi,

Thanks a lot.

from : HelenOS/boot/arch/arm32/src/asm.S and map files.

SYMBOL(start)
ldr sp, =boot_stack
b bootstrap

If we keep an inline assembly in

void bootstrap(void)
{
  int *store_r2_for_atags = 0;
  asm volatile ("mov %%r2, %0" : "=r" (store_r2_for_atags)); //TODO: Sourav
Punoriyar
  

Uboot store the params info in r2 and passes..
As r2 is not used before branching to bootstrap( ). Will the above line of
code will give me the value stored in r2. Are there possibilities of r2
getting modified before reaching to this line ?


Regards,
Sourav Punoriyar


On Thu, Feb 23, 2017 at 3:33 AM, Jakub Jermář <ja...@jermar.eu> wrote:

> On 02/22/2017 09:40 PM, Jakub Jermář wrote:
> >> Confusions i am having:
> >> 1> The bootargs info are given in r2 register. How do i preserve it when
> >> stage-2 boot-loader comes into action , because till the kernel comes
> >> into picture i will loose the info passed from uboot.
> >> ---> i feel i need to preserve the info passed from Uboot so that i
> >> can pass it down to the kernel and initialize boot_args via NetBSD
> >> stage-2 loader .
> >
> > Yes, the best way to communicate information between the loader and the
> > kernel is via the bootinfo structure. Just feel free to add a member
> > which will hold the address from r2. Note that this structure needs to
> > be modified in two places: in the loader and also in the kernel. We
> > should probably fix this dichotomy by moving it under abi/.
>
> One more thing - the arguments can theoretically overlap with memory
> used by the kernel, so it may be a good idea to actually pass them as a
> copy rather than by reference to the kernel.
>
> Jakub
>
> ___
> HelenOS-devel mailing list
> HelenOS-devel@lists.modry.cz
> http://lists.modry.cz/listinfo/helenos-devel
>
___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel


Re: [HelenOS-devel] Fwd: Running HelenOS on beaglebone-black

2017-02-10 Thread sourav punoriyar
Thank you Jakub for the quick guidance.
I will work accordingly and soon update you with my progress. :-)


Regards,
Sourav Punoriyar

On Thu, Feb 9, 2017 at 9:57 AM, Jakub Jermář <ja...@jermar.eu> wrote:

> Hi Sourav,
>
> On 02/08/2017 08:05 PM, sourav punoriyar wrote:
> > I was able to merge omap_uart changes with the existing code and build.
>
> There should really be virtually no difference as the branch contains a
> recent mainline already.
>
> > Could you please help me little bit more related to console boot
> > argument in *HelenOS* , like with an example.
> > "console= devices/\hw\path\to\the\serial\device\function"
> >
> > "\the\serial\device\function"--- ???
> >
> > "In linux i used to give console = ttyO0"
>
> On HelenOS, this must be a full location service path (relative to
> /loc/). Unfortunately, it is machine-specific.
>
> For example, the sparc64 sun4u QEMU machine uses (can be passed via a
> QEMU argument):
>
>   devices/\hw\pci0\00:03.0\com1\a
>
> On amd64/ia32 QEMU this will be (must be set in grub configuration):
>
>   devices/\hw\pci0\00:01.0\com1\a
>
> Note that the backslashes usually need to be escaped.
>
> The omap_uart driver and the am35x platform driver construct a different
> path. Looking at the sources, the pathname will be something like:
>
>   devices/\hw\serial\a
>
> You can try to verify this by printing the function name in the
> omap_uart driver eg. by changing the severity of the ddf_msg that prints
> uart->dev from LVL_NOTE to LVL_ERROR or by setting a higher log level
> for omap_uart or the whole system. Let me reiterate that on arm we are
> still missing code that passes boot arguments from the boot loader to
> the kernel, so there is currently no way to pass this string.
>
> Best,
> Jakub
>
> ___
> HelenOS-devel mailing list
> HelenOS-devel@lists.modry.cz
> http://lists.modry.cz/listinfo/helenos-devel
>
___
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel


[HelenOS-devel] Fwd: Running HelenOS on beaglebone-black

2017-01-21 Thread sourav punoriyar
-- Forwarded message --
From: sourav punoriyar <souravpunp...@gmail.com>
Date: Sat, Jan 21, 2017 at 3:37 AM
Subject: Running HelenOS on beaglebone-black
To: helenos-comm...@lists.modry.cz


Hi All,

I am trying to run HelenOS beaglebone black.
I have built uImage.bin for beaglebone.

I am using the same uImage.bin for beaglebone black.

It gets stuck at

*init: Spawning /app/getterm term/vc5 /loc --wait -- /app/bdsh*



*but i can get into kconsole>*

*After some time it automatically reboots.*
with the following error:-
*[spl_load_image_fat_os: error reading image args, err - -1]*

Could you please give some advice on this ?

Also:
I have connected BBB serially.
I don't have a GUI. Is it required to get bdsh terminal.
how do i get it using my serial connection ?

*example:*

*/#*


I will try to port the differences between beaglebone and beaglebone black
a bit later !!!

[*Logs*]
output: HelenOS output service
output: Accepting connections
init: Unable to stat /srv/hound
init: Starting /srv/compositor
compositor: HelenOS Compositor server
compositor: Accepting connections
init: Spawning /app/barber comp:0/winreg
init: Spawning /app/vlaunch comp:0/winreg
init: Spawning /app/vterm comp:0/winreg
init: Starting /srv/console
console: HelenOS Console service
console: Accepting connections
init: Spawning /app/getterm term/vc0 /loc --msg --wait -- /app/bdsh
init: Spawning /app/getterm term/vc1 /loc --wait -- /app/bdsh
init: Spawning /app/getterm term/vc2 /loc --wait -- /app/bdsh
init: Spawning /app/getterm term/vc3 /loc --wait -- /app/bdsh
init: Spawning /app/getterm term/vc4 /loc --wait -- /app/bdsh
*init: Spawning /app/getterm term/vc5 /loc --wait -- /app/bdsh*

U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
reading args
*spl_load_image_fat_os: error reading image args, err - -1*
reading u-boot.img
reading u-boot.img


U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)

I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using def



PFA text file for full logs.
I eagerly await for your response.


Regards,
Sourav Punoriyar

U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)

I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net:not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  1  0 
U-Boot# setenv ipaddr 192.168.0.250
U-Boot# V setenv serverip 192.168.0.251
U-Boot# ping 192.168.0.251
link up on port 0, speed 100, full duplex
Using cpsw device
host 192.168.0.251 is alive
U-Boot# tftpboot 0x80007FC0 uImage.bin
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.0.251; our IP address is 192.168.0.250
Filename 'uImage.bin'.
Load address: 0x80007fc0
Loading: *#
 #
 #
 #
 #T 
Abort
U-Boot# tftpboot 0x80007FC0 uImage.bin
  ping 192.168.0.251
link up on port 0, speed 100, full duplex
Using cpsw device

Abort
ping failed; host 192.168.0.251 is not alive
U-Boot# ping 192.168.0.251
link up on port 0, speed 100, full duplex
Using cpsw device
host 192.168.0.251 is alive
U-Boot# ping 192.168.0.251  
ping 192.168.0.251  
tftpboot 0x80007FC0 uImage.bin
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.0.251; our IP address is 192.168.0.250
Filename 'uImage.bin'.
Load address: 0x80007fc