Re: [beagleboard] PocketBeagle SD Card Extra Storage

2018-02-11 Thread Jason Kridner
With Robert’s integration, there’s no longer a need to debug my steps. Use 
/opt/scripts/tools/update_kernel.sh to get the latest 4.9 kernel. Googling for 
that script name should get sufficient instructions. Once on that kernel, do 
the /boot/uEnv.txt edit as indicated. 

> On Feb 11, 2018, at 7:34 PM, jackgig2...@tamu.edu wrote:
> 
> Im having trouble executing this command
> 
> git fetch origin/4.9 --depth 1
> 
> Im consistently getting the error
> 
> fatal: 'origin/4.9' does not appear to be a git repository
> fatal: Could not read from remote repository.
> 
> Please make sure you have the correct access rights
> and the repository exists.4
> 
> How can I get the correct access rights to run the 4.9 kernel?
> 
>> On Saturday, February 3, 2018 at 10:18:57 PM UTC-6, Jason Kridner wrote:
>>> On Fri, Feb 2, 2018 at 5:00 PM Robert Nelson  wrote:
>>> On Fri, Feb 2, 2018 at 9:15 AM, Jack_H  wrote:
>>> > Hello all.
>>> >
>>> >
>>> >  I was wondering if there were any resources for adding an additional
>>> > microSD card to the pocketbeagle for storage. I currently have a microSD
>>> > click from MikroElektronika but it’s not listed under the pocketbeagle
>>> > "working" mikrobus.
>>> 
>>> Oh, that's easy, prove it can work, and provide a pull request here
>>> for both spix positions:
>>> 
>>> https://github.com/beagleboard/bb.org-overlays/
>>> 
>>> Then update the wiki.
>>> 
>>> Just because I haven't purchased that click doesn't mean it 'will not' 
>>> work.. ;)
>>> 
>>> 
>>> > I currently have an ethernet click working with my pocketbealge and
>>> > beaglebone black using very similar code snippets. I have found resources
>>> > for using a microSD card for the beaglebone black from
>>> >
>>> > here
>>> >
>>> > and here
>>> >
>>> > and this tutorial
>>> >
>>> > Will any of this translate over to the pocketbeagle?
>>> 
>>> There's a new driver in v4.14.x? and a device tree node; "mmc-slot"
>>> CONFIG_MMC_SPI
>>> 
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
>> 
>> I found it in the 4.9 driver and made an attempt to build it natively as a 
>> module and give it a try:
>> 
>> https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa 
>> 
>> I optimized the loading time for the git clone with a shallow checkout. The 
>> build happens pretty fast. It didn't load for me at first. I was able to 
>> load it, by doing a depmod and modprobe manually, but it never reports 
>> anything beyond:
>> mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff
>> 
>> So, got any ideas? How should I specify the interrupts?
>> 
>> 
>> sudo apt-get update
>> sudo apt-get install linux-headers-`uname -r`
>> cd
>> mkdir linux
>> cd linux/
>> git init
>> git config core.sparsecheckout true
>> git remote add origin https://github.com/beagleboard/linux
>> echo drivers/mmc/host > .git/info/sparse-checkout
>>
>> git fetch origin/4.9 --depth 1
>> git checkout 4.9
>> cd drivers/mmc/host
>> CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD
>> sudo make -C /lib/modules/`uname -r`/build M=$PWD 
>> INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install
>> 
>> cd /lib/modules/`uname -r`
>> sudo depmod -a
>> sudo /opt/scripts/tools/developers/update_initrd.sh
>> cd /opt/source/bb.org-overlays
>> echo < src/arm/PB-SPI1-MICROSD-CLICK.dts
>> /*
>>  * Copyright (C) 2018 Texas Instruments, Jason Kridner 
>>  *
>>  * This program is free software; you can redistribute it and/or modify
>>  * it under the terms of the GNU General Public License version 2 as
>>  * published by the Free Software Foundation.
>>  *
>>  * https://www.mikroe.com/microsd-click
>>  * 
>> https://download.mikroe.com/documents/add-on-boards/click/microsd/microsd-click-schematic.pdf
>>  */
>> 
>> /dts-v1/;
>> /plugin/;
>> 
>> #include 
>> #include 
>> #include 
>> 
>> / {
>>  /*
>>   * Free up the pins used by the cape from the pinmux helpers.
>>   */
>>  fragment@0 {
>>  target = <>;
>>  __overlay__ {
>>  P1_36_pinmux { status = "disabled"; };  /* CD - 
>> gpio3_14*/
>>  P2_25_pinmux { status = "disabled"; };  /* MOSI - 
>> gpio1_9 */
>>  P2_27_pinmux { status = "disabled"; };  /* MISO - 
>> gpio1_8 */
>>  P2_29_pinmux { status = "disabled"; };  /* CLK - 
>> gpio0_7 */
>>  P2_31_pinmux { status = "disabled"; };  /* CS - 
>> gpio0_19 */
>>  cape-universal { status = "disabled"; };
>>  cape-universal@1 { status = "disabled"; };
>>  };
>>  };
>> 
>>  fragment@1 {
>>  target = <>;
>>  __overlay__ {
>>  #address-cells = <1>;
>>  #size-cells = <0>;
>>  status = "okay";
>> 
>>  

[beagleboard] Cannot re-flash beaglebone black wireless via SD card

2018-02-11 Thread rustybots
I had a running BBBW and all was well. The unit was running the latest 
January image and had been configured and working on wifi nicely.  Now the 
unit boots to a host prompt of  root@beaglebone:/home/debian# and there are 
no directories except bin.


root@beaglebone:/# ls -a
bash: /bin/ls: No such file or directory
root@beaglebone:/# cd /etc
root@beaglebone:/etc# pwd
/etc
root@beaglebone:/etc#

I cannot access /opt

I have tried to boot from SD card using the usual method without success.  
Any help restoring this board is very welcome.  

Thanks




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ff376b3d-43d2-43b9-9a7e-d836614fefab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] PocketBeagle SD Card Extra Storage

2018-02-11 Thread jackgig2014


Im having trouble executing this command


git fetch origin/4.9 --depth 1


Im consistently getting the error


fatal: 'origin/4.9' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.4


How can I get the correct access rights to run the 4.9 kernel?


On Saturday, February 3, 2018 at 10:18:57 PM UTC-6, Jason Kridner wrote:
>
> On Fri, Feb 2, 2018 at 5:00 PM Robert Nelson  > wrote:
>
>> On Fri, Feb 2, 2018 at 9:15 AM, Jack_H  
>> wrote:
>> > Hello all.
>> >
>> >
>> >  I was wondering if there were any resources for adding an additional
>> > microSD card to the pocketbeagle for storage. I currently have a microSD
>> > click from MikroElektronika but it’s not listed under the pocketbeagle
>> > "working" mikrobus.
>>
>> Oh, that's easy, prove it can work, and provide a pull request here
>> for both spix positions:
>>
>> https://github.com/beagleboard/bb.org-overlays/
>>
>> Then update the wiki.
>>
>> Just because I haven't purchased that click doesn't mean it 'will not' 
>> work.. ;)
>>
>>
>> > I currently have an ethernet click working with my pocketbealge and
>> > beaglebone black using very similar code snippets. I have found 
>> resources
>> > for using a microSD card for the beaglebone black from
>> >
>> > here
>> >
>> > and here
>> >
>> > and this tutorial
>> >
>> > Will any of this translate over to the pocketbeagle?
>>
>> There's a new driver in v4.14.x? and a device tree node; "mmc-slot"
>> CONFIG_MMC_SPI
>>
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
>
>
> I found it in the 4.9 driver and made an attempt to build it natively as a 
> module and give it a try:
>
> https://gist.github.com/jadonk/53ae22d550021bf32a299acbd7b546aa 
>
> I optimized the loading time for the git clone with a shallow checkout. 
> The build happens pretty fast. It didn't load for me at first. I was able 
> to load it, by doing a depmod and modprobe manually, but it never reports 
> anything beyond:
>
> mmc_spi spi2.1: SD/MMC host mmc3, no WP, no poweroff
>
> So, got any ideas? How should I specify the interrupts?
>
> sudo apt-get update
> sudo apt-get install linux-headers-`uname -r`
> cd
> mkdir linux
> cd linux/
> git init
> git config core.sparsecheckout true
> git remote add origin https://github.com/beagleboard/linux
> echo drivers/mmc/host > .git/info/sparse-checkout 
>   
> git fetch origin/4.9 --depth 1
> git checkout 4.9
> cd drivers/mmc/host
> CONFIG_MMC_SPI=m make -C /lib/modules/`uname -r`/build M=$PWD
> sudo make -C /lib/modules/`uname -r`/build M=$PWD 
> INSTALL_MOD_DIR=kernel/drivers/mmc/host modules_install
>
> cd /lib/modules/`uname -r`
> sudo depmod -a
>
> sudo /opt/scripts/tools/developers/update_initrd.sh
> cd /opt/source/bb.org-overlays
> echo < src/arm/PB-SPI1-MICROSD-CLICK.dts
> /*
>  * Copyright (C) 2018 Texas Instruments, Jason Kridner  >
>  *
>  * This program is free software; you can redistribute it and/or modify
>  * it under the terms of the GNU General Public License version 2 as
>  * published by the Free Software Foundation.
>  *
>  * https://www.mikroe.com/microsd-click
>  * 
> https://download.mikroe.com/documents/add-on-boards/click/microsd/microsd-click-schematic.pdf
>  */
>
> /dts-v1/;
> /plugin/;
>
> #include 
> #include 
> #include 
>
> / {
>   /*
>* Free up the pins used by the cape from the pinmux helpers.
>*/
>   fragment@0 {
>   target = <>;
>   __overlay__ {
>   P1_36_pinmux { status = "disabled"; };  /* CD - 
> gpio3_14*/
>   P2_25_pinmux { status = "disabled"; };  /* MOSI - 
> gpio1_9 */
>   P2_27_pinmux { status = "disabled"; };  /* MISO - 
> gpio1_8 */
>   P2_29_pinmux { status = "disabled"; };  /* CLK - 
> gpio0_7 */
>   P2_31_pinmux { status = "disabled"; };  /* CS - 
> gpio0_19 */
>   cape-universal { status = "disabled"; };
>   cape-universal@1 { status = "disabled"; };
>   };
>   };
>
>   fragment@1 {
>   target = <>;
>   __overlay__ {
>   #address-cells = <1>;
>   #size-cells = <0>;
>   status = "okay";
>
>   channel@0 {
>   status = "disabled";
>   };
>   channel@1 {
>   status = "disabled";
>   };
>
>   mikroe_microsd: mikroe_microsd@0{
>   compatible = "mmc-spi-slot";
>   pinctrl-names = "default";
>   pinctrl-0 = <
>

[beagleboard] Re: detecting interrupt on GPIO in kernel module

2018-02-11 Thread rakshithp . 46

use of gpio_int_name 
On Tuesday, 26 August 2014 19:38:01 UTC+5:30, Siddarth Sharma wrote:
>
> I am toggling the input into a GPIO line on my BeagleBone from high to low 
> every 500 ms using an Atmel uC. I have registered a handler for this in my 
> Linux Kernel Module, but the handler is not being called for some reason.
>
> My module code is -
>
> #define GPIO 54
> #define GPIO_INT_NAME  "gpio_int"
>
> #define GPIO_HIGH gpio_get_value(GPIO)
> #define GPIO_LOW (gpio_get_value(GPIO) == 0)
> short int irq_any_gpio= 0;
> int count =0;
>
> enum { falling, rising } type; 
> static irqreturn_t r_irq_handler(int irq, void *dev_id)
>  {
>   count++;
> printk(KERN_DEBUG "interrupt received (irq: %d)\n", irq);
> if (irq == gpio_to_irq(GPIO)) 
> {
>
> type = GPIO_LOW ? falling : rising;
>
> if(type == falling)
> {
> printk("gpio pin is low\n");
> }
> else
> printk("gpio pin is high\n");
>
> }
>
> return IRQ_HANDLED;
> }
>
>
> void r_int_config(void) {
>
>if (gpio_request(GPIO, GPIO_INT_NAME )) 
>{
>   printk("GPIO request failure: %s\n", GPIO_INT_NAME );
>   return;
>}
>
>if ( (irq_any_gpio = gpio_to_irq(GPIO)) < 0 ) {
>   printk("GPIO to IRQ mapping failure %s\n",GPIO_INT_NAME );
>   return;
>}
>
>printk(KERN_NOTICE "Mapped int %d\n", irq_any_gpio);
>
>if (request_irq(irq_any_gpio,(irq_handler_t ) r_irq_handler, 
> IRQF_TRIGGER_HIGH, GPIO_INT_NAME, NULL)) 
>{
>   printk("Irq Request failure\n");
>   return;
>}
>
>return;
> }
>
> void r_int_release(void) {
>
>free_irq(gpio_to_irq(GPIO), NULL);
> gpio_free(GPIO);;
>return;
> }
>
> int init_module(void)
> {
> printk("<1>Hello World\n"); 
> r_int_config();
> return 0;
> }
>
> On calling insmod interrupt_test.ko, i get the following message
>
> [   76.594543] Hello World
>   
> [   76.597137] Mapped int 214  
>
> But now when I start toggling the input into this gpio pin, the interrupt 
> handler doesn't get called and the message - "interrupt received" is not 
> being displayed.
>
> How do I solve this ? What's causing the problem?
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/58c134dc-0d16-4359-8406-c7ec9794895c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] How to solve signal to be detected in same time?

2018-02-11 Thread Mr.W1026
Excuse me.
I am a process engineer.

Recently, I got a BBB board from a old control box in office room.
Now I want to make a monitoring system of product line by BBB board.
I don't know electronic circuit, but I read a book of BBB board. 
I am difficult to understand GPIO, I2C, PWM, ADC and real-time interface.
Plz help me. Thank you very much.

I think 20 photosensors and 10 PIR sensors will connect BBB board. 
The photosensor will check quantity of products passed on conveyor belt. 
The PIR sensor will check whether person is at workstation.

Now I have some questions.
1. I think it check rising edge or falling edge of sensor signal, so I can 
know a product is passed. Now I don't know which kind of ports is 
connected? GPIO, ADC, PWM or real-time?
2. photosensor output analog signal or digital signal?
3. Does the BB Black have enough ports?
3. In book, I know sampling rate. I don't know how to calculate it.
4. If two or more sensors are detected in same time, I don't know how to 
solve this problem.
5. Should I use python or C/C++ for programming?

Thank you very much!
Have a nice day.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7899b7ff-d321-41b4-aad7-3c299fab45bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: BeagleBone Black Root Access Step-by-Step

2018-02-11 Thread Mark Graves
I'm a newbie and recently dusted off my BBB and updated to Debian 9.  I 
followed the steps you listed for but instead instead of "PermitRootLogin 
without-password" it showed "PermitRootLogin prohibit-password", so I 
changed it to "PermitRootLogin yes".  Now, when I try to SSH in and login 
as root, I tried using "root" as the password and got access denied.  Any 
ideas?

On Monday, June 12, 2017 at 6:26:33 PM UTC+7, cesar.te...@gmail.com wrote:
>
> Hello all !
> For those who are stuck in root login on Debian I've passed the last hours 
> figuring out how to do it, and to help you guys which have the same problem 
> here comes a quick guide:
>
> PROBLEM: Be unable to access root on Debian 8
>
> SOLUTION: 
>
> Login as: debian
> Password: temppwd
>
> Give the command:
>
> sudo passwd root
> Type a password for SUDO
>
> Give the command:
>
> su root
>
> Type a password for root
>
> Open SSH file to enable root login:
>
> vim /etc/ssh/sshd_config
>
> Change the line:
> From: 
> PermitRootLogin wihtout-password
> To:
> PermitRootLogin Yes
>
> Once you made the change,restart the SSH server
> /etc/init.d/ssh restart
>
> From now on you will be able to ssh login as a root
>
> Any question you reach me up !
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3331fde5-7860-44c6-8501-969722b31f56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.