Re: [beagleboard] Switching a GPIO to and LED via the device tree

2020-08-27 Thread Ren W
*> tutorials such as these included a description of what version of code 
this was developed/tested on.*

This ^
As a beginner, it's been quite frustrating to have to wade through all the 
tutorials referring to a cape manager that no longer exists.
Not only have I learnt how things work today, I've also had to learn how 
they used to work — which I could have done without. 


On Thursday, August 27, 2020 at 11:17:24 AM UTC-7 jimf...@gmail.com wrote:

> Hi Mark,
>
> Nice tutorial. Wish I'd had that quite some time ago, I had to pull all 
> those pieces together myself.
>
> From having read a bunch of posts here, I have a few suggestions for your 
> consideration.
>
> 1. User needs to be in the gpio group. This isn't mentioned.
> 2. People often ignore parts of instructions. If your prompt included the 
> current directory name, it would be slightly more obvious where each 
> command is run. 
> 3. It would be AMAZING if tutorials such as these included a description 
> of what version of code this was developed/tested on. You could either 
> mention the RCN release number or the kernel build, but it would be so 
> great if this were a standard thing to mention. Consider how much things 
> have changed with device trees over the past five (?) years. There's tons 
> of now-wrong notes on how to do things. (I know you mention a kernel in the 
> compilation section, I guess it would be nice to spell this out up top, 
> i.e. "This tutorial is applicable to Beaglebone release xxx").
> 4. Not sure this comment is welcome, but a top level Tutorials page 
> containing all the EBC## tutorials would be cool. I found the others by 
> clicking on your ECE497 link, but that isn't exactly obvious (to me). Those 
> look like some great materials that I hadn't come across before, for some 
> reason.
>
> Best,
>
> Jim
>
> On Wed, Aug 26, 2020 at 10:23 PM Mark A. Yoder  
> wrote:
>
>> Beagler's:
>>   I just wrote up some notes on how to edit the device tree to change a 
>> GPIO into an LED.
>>
>> Switching_a_GPIO_to_an_LED 
>> 
>>
>> It's are rather involved process that requires understanding some deeper 
>> magic.
>>
>> Let me know what you think.
>>
>> --Mark
>>
>> -- 
>>
> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/61317cde-fb07-4c98-bc56-c968e58e7a10n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/b084091f-5dd0-4f5d-9953-c68bd30b7a3en%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 1:51 PM Pavel Yermolenko  wrote:
>
> I apologize for my ignorance, but I don't know what "mainline u-boot" is.

master branch of https://github.com/u-boot/u-boot

>
> Just use the dd commands for MLO/u-boot.img if you want the BOOTROM to
> use it.  The "file" version requires a very specific location and
> format.
>
> Doing sd-card setup I used dd commands ... as you described here.
> https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
> Running these commands was the first step in this setup.
> Last step was copying MLO and u-boot.img in rootfs partition of sd-card ... 
> also as you described in above-mentioned link.
> Where did I go wrong?

hold the boot button down, to force it to read from the microSD.. eMMC
is first on power up, unless teh button is pressed.

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYi2EY1%3DCsApdjD9EwoEKJrbeQdYwko1p28Yoc1CsuCwWQ%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
I apologize for my ignorance, but I don't know what "mainline u-boot" is.



*Just use the dd commands for MLO/u-boot.img if you want the BOOTROM to use 
it.  The "file" version requires a very specific location and format.*

Doing *sd-card *setup I used dd commands ... as you described here.
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
Running these commands was the first step in this setup.
Last step was copying *MLO* and *u-boot.img* in *rootfs* partition of 
sd-card ... also as you described in above-mentioned link.
Where did I go wrong?

On Thursday, August 27, 2020 at 7:12:23 PM UTC+2, RobertCNelson wrote:
>
> On Thu, Aug 27, 2020 at 12:05 PM Pavel Yermolenko  > wrote: 
> > 
> > I feel a little lost. 
> > In one of your previous mails you mentioned this document: 
> > 
> https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
>  
> > And there is no mention on extlinux.conf. 
> > So, I don't understand what is its actual role in sd-card setup ! 
>
>
> On, Thu, Aug 20, 7:18 AM (7 days ago) you wrote: 
>
>  
> For building U-Boot I cloned "master" image from 
> gitlab.denx.de/u-boot/ and used am335x_evm_defconfig for default 
> configuration. 
>
> Any suggestions ? 
>  
>
> So I recommended you use "extlinux.conf" to achieve that situation.. 
> Now you can use mainline u-boot.. 
>
> > Anyway, I terminated my sd-card setup by this two commands: 
> > cp -v MLO /media/rootfs/ 
> > cp -v u-boot.img /media/rootfs/ 
>
> Just use the dd commands for MLO/u-boot.img if you want the BOOTROM to 
> use it.  The "file" version requires a very specific location and 
> format. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/9326d6b0-be3f-496a-9135-a75ec29a0e99o%40googlegroups.com.


Re: [beagleboard] Switching a GPIO to and LED via the device tree

2020-08-27 Thread Jim F
Hi Mark,

Nice tutorial. Wish I'd had that quite some time ago, I had to pull all
those pieces together myself.

>From having read a bunch of posts here, I have a few suggestions for your
consideration.

1. User needs to be in the gpio group. This isn't mentioned.
2. People often ignore parts of instructions. If your prompt included the
current directory name, it would be slightly more obvious where each
command is run.
3. It would be AMAZING if tutorials such as these included a description of
what version of code this was developed/tested on. You could either mention
the RCN release number or the kernel build, but it would be so great if
this were a standard thing to mention. Consider how much things have
changed with device trees over the past five (?) years. There's tons of
now-wrong notes on how to do things. (I know you mention a kernel in the
compilation section, I guess it would be nice to spell this out up top,
i.e. "This tutorial is applicable to Beaglebone release xxx").
4. Not sure this comment is welcome, but a top level Tutorials page
containing all the EBC## tutorials would be cool. I found the others by
clicking on your ECE497 link, but that isn't exactly obvious (to me). Those
look like some great materials that I hadn't come across before, for some
reason.

Best,

Jim

On Wed, Aug 26, 2020 at 10:23 PM Mark A. Yoder 
wrote:

> Beagler's:
>   I just wrote up some notes on how to edit the device tree to change a
> GPIO into an LED.
>
> Switching_a_GPIO_to_an_LED
> 
>
> It's are rather involved process that requires understanding some deeper
> magic.
>
> Let me know what you think.
>
> --Mark
>
> --
> 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/61317cde-fb07-4c98-bc56-c968e58e7a10n%40googlegroups.com
> 
> .
>

-- 
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/CAGS%2B2h_NunGgGZ1mP6AXDObVf870zJETZk6CjipO6wuTX4j9OQ%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 12:05 PM Pavel Yermolenko  wrote:
>
> I feel a little lost.
> In one of your previous mails you mentioned this document:
> https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
> And there is no mention on extlinux.conf.
> So, I don't understand what is its actual role in sd-card setup !


On, Thu, Aug 20, 7:18 AM (7 days ago) you wrote:


For building U-Boot I cloned "master" image from
gitlab.denx.de/u-boot/ and used am335x_evm_defconfig for default
configuration.

Any suggestions ?


So I recommended you use "extlinux.conf" to achieve that situation..
Now you can use mainline u-boot..

> Anyway, I terminated my sd-card setup by this two commands:
> cp -v MLO /media/rootfs/
> cp -v u-boot.img /media/rootfs/

Just use the dd commands for MLO/u-boot.img if you want the BOOTROM to
use it.  The "file" version requires a very specific location and
format.

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYgBa_MRtMKtfVsCQV6EgqXhyUa_f32rE%2BvJCdEXAbFhOA%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
I feel a little lost.
In one of your previous mails you mentioned this document:
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
And there is no mention on *extlinux.conf*.
So, I don't understand what is its actual role in sd-card setup !
Anyway, I terminated my sd-card setup by this two commands:
cp -v MLO /media/rootfs/
cp -v u-boot.img /media/rootfs/



Then I tried to boot from sd-card and boot process failed ... BBB switched 
to eMMC and booted from it.

5 min ago, I repeated to setup the SD card fearing that the previous time I 
missed something.
To my amazement I found out that after formatting the card (i.e. sudo 
mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}1) the *MLO* and 
*u-boot.img* files are still there - in the *rootfs* partition, they 
weren't erased during formatting:

pavel@ALABAMA:~/u-boot_chris$ sudo mkfs.ext4 -L rootfs -O 
^metadata_csum,^64bit ${DISK}1
mke2fs 1.44.1 (24-Mar-2018)
Creating filesystem with 3888512 4k blocks and 972944 inodes
Filesystem UUID: bd1ae1cd-6b3e-4899-acf5-c4f05e298a9f
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done   

pavel@ALABAMA:~/u-boot_chris$ ls /media/
pavel/  rootfs/ 
pavel@ALABAMA:~/u-boot_chris$ ls /media/rootfs/
MLO  u-boot.img
pavel@ALABAMA:~/u-boot_chris$ ls /media/rootfs/ -l
total 620
-rw-r--r-- 1 root root 108408 août  27 17:04 MLO
-rw-r--r-- 1 root root 523429 août  27 17:05 u-boot.img
pavel@ALABAMA:~/u-boot_chris$ 





On Thursday, August 27, 2020 at 5:41:55 PM UTC+2, RobertCNelson wrote:

> On Thu, Aug 27, 2020 at 10:36 AM Pavel Yermolenko  > wrote: 
> > 
> > I copied MLO and u-boot.img in /rootfs and tried to boot from sd-card. 
> > Didn't work - 
>
> Correct, the BOOTROM is very picky, i thought, we went over this in 
> your discussion thread previously. 
>
> > boot from sd-card filed and BBB was booted from eMMC: 
>
> > U-Boot 2019.04-2-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: 
> jenkins-github_Bootloader-Builder-137 
> > 
>
> > Found /boot/extlinux/extlinux.conf 
> > Retrieving file: /boot/extlinux/extlinux.conf 
> > 256 bytes read in 14 ms (17.6 KiB/s) 
> > 1:Linux 4.19.94-ti-r42 
> > Retrieving file: /boot/vmlinuz-4.19.94-ti-r42 
> > 10095592 bytes read in 648 ms (14.9 MiB/s) 
> > append: console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 
> coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 
> quiet 
> > Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb 
> > 59483 bytes read in 25 ms (2.3 MiB/s) 
> > ## Flattened Device Tree blob at 8800 
> >Booting using the fdt blob at 0x8800 
> >Loading Device Tree to 8ffee000, end 885a ... OK 
> > 
> > Starting kernel ... 
> > 
> > [0.000763] timer_probe: no matching timers found 
> > [0.115067] l4_wkup_cm:clk:0010:0: failed to disable 
> > [0.765905] omap_voltage_late_init: Voltage driver support not added 
> > 
> > Debian GNU/Linux 10 beaglebone ttyS0 
> > 
> > BeagleBoard.org Debian Buster IoT Image 2020-04-06 
> > 
> > Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian 
> > 
> > default username:password is [debian:temppwd] 
> > 
> > beaglebone login: 
>
> Congrates, you've got a working  /boot/extlinux/extlinux.conf so my 
> free job is done. ;) 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/1a0b66f0-7485-4a22-89de-21f7d9da8e80o%40googlegroups.com.


Re: [beagleboard] Switching a GPIO to and LED via the device tree

2020-08-27 Thread Mark A. Yoder
Jon:
  Thanks for the suggestions.  I'll address each in line..

--Mark

On Thursday, August 27, 2020 at 12:11:56 PM UTC-4 jonn...@gmail.com wrote:

> Very cool Mark.
>
> A couple of notes:
> 1.  It might be a good idea to put a note in there for the folks to back 
> up their currently booted dts/dtb files before editing them.
>  *Good idea, but this is a git repo, so I added the following: *
> https://elinux.org/EBC_Exercise_17_Switching_a_GPIO_to_an_LED#Recovering_from_a_miss-edit
> 2. Under "Finding which device tree to edit" I believe there is a typo:
>  Note: If you want to edit the source using cloud9 us the following 
> trick ...
>Should be:
>  Note: If you want to edit the source using cloud9 *use* the 
> following trick ...
> *Fixed.  Thanks.*
> 3. When you run make, would it be best to just run it against the file 
> that was edited rather than the whole folder?
>  Maybe the build script is smart enough to figure this out.
> *You can do the individual file, but it more typing.  I guess I'm lazy.  
> And it still installs everything.*
> 4.  Under "Adding our LED" there is the following without explaining the 
> why.  Was this intentional?
> "How did I know to use *gpio1* and *18*?"
> *That was intentional to get my students to think a bit.  Should I include 
> the answer for the broader **audience**? *
> This is a nice series.  Thanks for sharing.
>
> Cheers,
>
> Jon
>
> On Thu, Aug 27, 2020 at 8:31 AM Renaud Waldura  wrote:
>
>> Good stuff, thank you Mark!
>>
>> How are the triggers defined? They're more or less self explanatory, I'm 
>> just curious how it works.
>>
>>
>> On Thu, Aug 27, 2020, 6:06 AM Mark A. Yoder  wrote:
>>
>>>
>>> Yup, years for facing blank stares has taught me a few things.
>>>
>>> This particular example touched on so many different things it could be 
>>> a nice final exam.
>>>
>>> --Mark
>>> On Wednesday, August 26, 2020 at 9:59:23 PM UTC-4 lazarman wrote:
>>>

 Well presented I like your approach at documentation I bet that comes 
 from teaching 


 Sent from Yahoo Mail on Android 
 

 On Wed, Aug 26, 2020 at 5:30 PM, Mark A. Yoder
  wrote:

 Beagler's:
   I just wrote up some notes on how to edit the device tree to change a 
 GPIO into an LED.

 Switching_a_GPIO_to_an_LED 
 

 It's are rather involved process that requires understanding some 
 deeper magic.

 Let me know what you think.

 --Mark

 -- 
 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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/beagleboard/61317cde-fb07-4c98-bc56-c968e58e7a10n%40googlegroups.com
  
 
 .

 -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beagleboard/6203e02e-107b-4404-b952-0ef40ad12118n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/CAN%2B%3DRhG066CY6W8sC8M%3D2-fPbqEv8uTHJEShNiAU4_CgN2pJWw%40mail.gmail.com
>>  
>> 
>> .
>>
>

-- 
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/792ec4de-54ab-48da-8662-dc48137500ccn%40googlegroups.com.


Re: [beagleboard] Switching a GPIO to and LED via the device tree

2020-08-27 Thread jonnymo
Very cool Mark.

A couple of notes:
1.  It might be a good idea to put a note in there for the folks to back up
their currently booted dts/dtb files before editing them.

2. Under "Finding which device tree to edit" I believe there is a typo:
 Note: If you want to edit the source using cloud9 us the following
trick ...
   Should be:
 Note: If you want to edit the source using cloud9 *use* the following
trick ...

3. When you run make, would it be best to just run it against the file that
was edited rather than the whole folder?
 Maybe the build script is smart enough to figure this out.

4.  Under "Adding our LED" there is the following without explaining the
why.  Was this intentional?
"How did I know to use *gpio1* and *18*?"

This is a nice series.  Thanks for sharing.

Cheers,

Jon

On Thu, Aug 27, 2020 at 8:31 AM Renaud Waldura  wrote:

> Good stuff, thank you Mark!
>
> How are the triggers defined? They're more or less self explanatory, I'm
> just curious how it works.
>
>
> On Thu, Aug 27, 2020, 6:06 AM Mark A. Yoder 
> wrote:
>
>>
>> Yup, years for facing blank stares has taught me a few things.
>>
>> This particular example touched on so many different things it could be a
>> nice final exam.
>>
>> --Mark
>> On Wednesday, August 26, 2020 at 9:59:23 PM UTC-4 lazarman wrote:
>>
>>>
>>> Well presented I like your approach at documentation I bet that comes
>>> from teaching
>>>
>>>
>>> Sent from Yahoo Mail on Android
>>> 
>>>
>>> On Wed, Aug 26, 2020 at 5:30 PM, Mark A. Yoder
>>>  wrote:
>>>
>>> Beagler's:
>>>   I just wrote up some notes on how to edit the device tree to change a
>>> GPIO into an LED.
>>>
>>> Switching_a_GPIO_to_an_LED
>>> 
>>>
>>> It's are rather involved process that requires understanding some deeper
>>> magic.
>>>
>>> Let me know what you think.
>>>
>>> --Mark
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beagleboard/61317cde-fb07-4c98-bc56-c968e58e7a10n%40googlegroups.com
>>> 
>>> .
>>>
>>> --
>> 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/6203e02e-107b-4404-b952-0ef40ad12118n%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAN%2B%3DRhG066CY6W8sC8M%3D2-fPbqEv8uTHJEShNiAU4_CgN2pJWw%40mail.gmail.com
> 
> .
>

-- 
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/CAG99bkp8xq%3D%2BZDHLJQ2qqaTg4d0_bkJy_AcYOU%2BztnN2Quow2Q%40mail.gmail.com.


Re: [beagleboard] Switching a GPIO to and LED via the device tree

2020-08-27 Thread Mark A. Yoder
Ren:
  Good question.  I poked around the kernel source 

 a 
bit hoping to create an example for my students.  
But it was more complicated than what I wanted for my students.

--Mark

On Thursday, August 27, 2020 at 11:30:59 AM UTC-4 Ren W wrote:

> Good stuff, thank you Mark!
>
> How are the triggers defined? They're more or less self explanatory, I'm 
> just curious how it works.
>
>
> On Thu, Aug 27, 2020, 6:06 AM Mark A. Yoder  wrote:
>
>>
>> Yup, years for facing blank stares has taught me a few things.
>>
>> This particular example touched on so many different things it could be a 
>> nice final exam.
>>
>> --Mark
>> On Wednesday, August 26, 2020 at 9:59:23 PM UTC-4 lazarman wrote:
>>
>>>
>>> Well presented I like your approach at documentation I bet that comes 
>>> from teaching 
>>>
>>>
>>> Sent from Yahoo Mail on Android 
>>> 
>>>
>>> On Wed, Aug 26, 2020 at 5:30 PM, Mark A. Yoder
>>>  wrote:
>>>
>>> Beagler's:
>>>   I just wrote up some notes on how to edit the device tree to change a 
>>> GPIO into an LED.
>>>
>>> Switching_a_GPIO_to_an_LED 
>>> 
>>>
>>> It's are rather involved process that requires understanding some deeper 
>>> magic.
>>>
>>> Let me know what you think.
>>>
>>> --Mark
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beagleboard/61317cde-fb07-4c98-bc56-c968e58e7a10n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/6203e02e-107b-4404-b952-0ef40ad12118n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/ee0a5f7c-3939-4227-bc4d-a94dffdea591n%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 10:36 AM Pavel Yermolenko  wrote:
>
> I copied MLO and u-boot.img in /rootfs and tried to boot from sd-card.
> Didn't work -

Correct, the BOOTROM is very picky, i thought, we went over this in
your discussion thread previously.

> boot from sd-card filed and BBB was booted from eMMC:

> U-Boot 2019.04-2-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: 
> jenkins-github_Bootloader-Builder-137
>

> Found /boot/extlinux/extlinux.conf
> Retrieving file: /boot/extlinux/extlinux.conf
> 256 bytes read in 14 ms (17.6 KiB/s)
> 1:Linux 4.19.94-ti-r42
> Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
> 10095592 bytes read in 648 ms (14.9 MiB/s)
> append: console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 
> coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
> Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb
> 59483 bytes read in 25 ms (2.3 MiB/s)
> ## Flattened Device Tree blob at 8800
>Booting using the fdt blob at 0x8800
>Loading Device Tree to 8ffee000, end 885a ... OK
>
> Starting kernel ...
>
> [0.000763] timer_probe: no matching timers found
> [0.115067] l4_wkup_cm:clk:0010:0: failed to disable
> [0.765905] omap_voltage_late_init: Voltage driver support not added
>
> Debian GNU/Linux 10 beaglebone ttyS0
>
> BeagleBoard.org Debian Buster IoT Image 2020-04-06
>
> Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
>
> default username:password is [debian:temppwd]
>
> beaglebone login:

Congrates, you've got a working  /boot/extlinux/extlinux.conf so my
free job is done. ;)

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYir1mXzN541hn-zyYDVzokbavHBPEjCaj9GR5QLe5_5Ng%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
I copied *MLO* and *u-boot.img* in /rootfs and tried to boot from sd-card.
Didn't work - boot from sd-card filed and BBB was booted from eMMC:

U-Boot SPL 2019.04-2-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4... ** No partition table - mmc 0 **


U-Boot 2019.04-2-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: 
jenkins-github_Bootloader-Builder-137

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** No partition table - mmc 0 **
Board: BeagleBone Black
 not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[000C] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
** No partition table - mmc 0 **
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
** No partition table - mmc 0 **
Checking for: /uEnv.txt ...
** No partition table - mmc 0 **
Checking for: /boot.scr ...
** No partition table - mmc 0 **
Checking for: /boot/boot.scr ...
** No partition table - mmc 0 **
Checking for: /boot/uEnv.txt ...
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
256 bytes read in 14 ms (17.6 KiB/s)
1:Linux 4.19.94-ti-r42
Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
10095592 bytes read in 648 ms (14.9 MiB/s)
append: console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 
coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 
quiet
Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb
59483 bytes read in 25 ms (2.3 MiB/s)
## Flattened Device Tree blob at 8800
   Booting using the fdt blob at 0x8800
   Loading Device Tree to 8ffee000, end 885a ... OK

Starting kernel ...

[0.000763] timer_probe: no matching timers found
[0.115067] l4_wkup_cm:clk:0010:0: failed to disable
[0.765905] omap_voltage_late_init: Voltage driver support not added

Debian GNU/Linux 10 beaglebone ttyS0

BeagleBoard.org Debian Buster IoT Image 2020-04-06

Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

default username:password is [debian:temppwd]

beaglebone login:

On Thursday, August 27, 2020 at 4:51:49 PM UTC+2, Pavel Yermolenko wrote:
>
> It doesn't matter, a Host PC/BBB/PI, it just doesn't matter ...
> Ok, I suppose here is misunderstanding.
> At the beginning of this post I mentioned that I built *u-boot *on host 
> machine, *not on BBB*.
> Then I misunderstood your suggestions ... thinking that there are versions 
> of these 2 files on BBB.
> So running generate_extlinux.sh is useless because whole job is done on 
> host.
>
> 
> Correct ?
>
> What about copying *MLO* and *u-boot.img* in /rootfs/opt/backup/uboot/ ?
> Probably just in /rootfs ?
>
> On Thursday, August 27, 2020 at 4:37:10 PM UTC+2, RobertCNelson wrote:
>>
>> On Thu, Aug 27, 2020 at 9:25 AM Pavel Yermolenko  
>> wrote: 
>> > 
>> > So, all these actions should be done on the host PC and not on BBB ? 
>> > Correct ? 
>>
>> It doesn't matter, a Host PC/BBB/PI, it just doesn't matter, all you 
>> need is a Linux system with a way to modify a microSD/etc.. 
>>
>> Regards, 
>>
>> -- 
>> Robert Nelson 
>> https://rcn-ee.com/ 
>>
>

-- 
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/2cddf257-844c-40cc-a7b0-061056e58d2ao%40googlegroups.com.


Re: [beagleboard] Switching a GPIO to and LED via the device tree

2020-08-27 Thread Renaud Waldura
Good stuff, thank you Mark!

How are the triggers defined? They're more or less self explanatory, I'm
just curious how it works.


On Thu, Aug 27, 2020, 6:06 AM Mark A. Yoder  wrote:

>
> Yup, years for facing blank stares has taught me a few things.
>
> This particular example touched on so many different things it could be a
> nice final exam.
>
> --Mark
> On Wednesday, August 26, 2020 at 9:59:23 PM UTC-4 lazarman wrote:
>
>>
>> Well presented I like your approach at documentation I bet that comes
>> from teaching
>>
>>
>> Sent from Yahoo Mail on Android
>> 
>>
>> On Wed, Aug 26, 2020 at 5:30 PM, Mark A. Yoder
>>  wrote:
>>
>> Beagler's:
>>   I just wrote up some notes on how to edit the device tree to change a
>> GPIO into an LED.
>>
>> Switching_a_GPIO_to_an_LED
>> 
>>
>> It's are rather involved process that requires understanding some deeper
>> magic.
>>
>> Let me know what you think.
>>
>> --Mark
>>
>> --
>> 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/61317cde-fb07-4c98-bc56-c968e58e7a10n%40googlegroups.com
>> 
>> .
>>
>> --
> 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/6203e02e-107b-4404-b952-0ef40ad12118n%40googlegroups.com
> 
> .
>

-- 
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/CAN%2B%3DRhG066CY6W8sC8M%3D2-fPbqEv8uTHJEShNiAU4_CgN2pJWw%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 9:52 AM Pavel Yermolenko  wrote:
>
> It doesn't matter, a Host PC/BBB/PI, it just doesn't matter ...
> Ok, I suppose here is misunderstanding.
> At the beginning of this post I mentioned that I built u-boot on host 
> machine, not on BBB.
> Then I misunderstood your suggestions ... thinking that there are versions of 
> these 2 files on BBB.
> So running generate_extlinux.sh is useless because whole job is done on host.
> Correct ?

generate_extlinux.sh needs to be run on "host" and the "drive" you
want to convert..

It was written to help users 'migrate' from a default booting BBB, to
something that could boot a pure mainline version of u-boot.

>
> What about copying MLO and u-boot.img in /rootfs/opt/backup/uboot/ ?
> Probably just in /rootfs ?

Sure, if you want to, that doesn't follow FHS standards... I typically
use /opt/...

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

/opt Optional application software packages.


Regards,

--
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYjaSBwmhkHoya829QykfyQ0gYMOYqHSPjMwOxABnkkJPg%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
It doesn't matter, a Host PC/BBB/PI, it just doesn't matter ...
Ok, I suppose here is misunderstanding.
At the beginning of this post I mentioned that I built *u-boot *on host 
machine, *not on BBB*.
Then I misunderstood your suggestions ... thinking that there are versions 
of these 2 files on BBB.
So running generate_extlinux.sh is useless because whole job is done on 
host.

Correct ?

What about copying *MLO* and *u-boot.img* in /rootfs/opt/backup/uboot/ ?
Probably just in /rootfs ?

On Thursday, August 27, 2020 at 4:37:10 PM UTC+2, RobertCNelson wrote:
>
> On Thu, Aug 27, 2020 at 9:25 AM Pavel Yermolenko  > wrote: 
> > 
> > So, all these actions should be done on the host PC and not on BBB ? 
> > Correct ? 
>
> It doesn't matter, a Host PC/BBB/PI, it just doesn't matter, all you 
> need is a Linux system with a way to modify a microSD/etc.. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/03eb1a49-76a7-4610-91a9-8d21de557065o%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 9:30 AM Pavel Yermolenko  wrote:
>
> Another question: at the end of this scenario the files MLO and u-boot.img 
> are located in:
> /rootfs/opt/backup/uboot/
> Will BBB boot from sd-card in such case ?

NOPE, it will not.. That's only a 'backup' location for end user's
"sanity".. As dd'ing files to a partition is a terrible file storage
medium for later retrieval..

Regards,


-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYgTtUMoNEtcos-p8g6yLaRYNN3Ua0Hz4RVVusbXRHDycQ%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 9:25 AM Pavel Yermolenko  wrote:
>
> So, all these actions should be done on the host PC and not on BBB ?
> Correct ?

It doesn't matter, a Host PC/BBB/PI, it just doesn't matter, all you
need is a Linux system with a way to modify a microSD/etc..

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYjkQsEAEHU8P92sH%2Bd%3DZUx0nQf42Qd7-znA0cX6%3D5s9RQ%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
Another question: at the end of this scenario the files *MLO* and 
*u-boot.img* are located in:
/rootfs/opt/backup/uboot/
Will BBB boot from sd-card in such case ?

On Thursday, August 27, 2020 at 4:25:28 PM UTC+2, Pavel Yermolenko wrote:
>
> So, all these actions should be done on the host PC and not on BBB ?
> Correct ?
>
> On Thursday, August 27, 2020 at 4:17:31 PM UTC+2, RobertCNelson wrote:
>>
>>
>> I have this documented here: 
>>
>>
>> https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
>>  
>>
>> Regards, 
>>
>> -- 
>> Robert Nelson 
>> https://rcn-ee.com/ 
>>
>

-- 
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/4e5aab21-eeaf-4262-91b4-5ed0e544ef07o%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
So, all these actions should be done on the host PC and not on BBB ?
Correct ?

On Thursday, August 27, 2020 at 4:17:31 PM UTC+2, RobertCNelson wrote:
>
>
> I have this documented here: 
>
>
> https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
>  
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/6fef1ba4-b914-4b08-94d5-9efbc7030d32o%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 9:10 AM Pavel Yermolenko  wrote:
>
> So, the sequence of instructions would be as follows:
>
> 1. > Parition the sd-card with a 4MB hole:
> sudo sfdisk ${DISK} <<-__EOF__
> 4M,,L,*
> __EOF__
>
> 2. Format sd-card as ext4:
> sudo mkfs.ext4 -L rootfs ${DISK}1
>
> 3. Copy MLO and u-boot.img to sd-card:
> sudo mkdir -p /media/rootfs/opt/backup/uboot/
> sudo cp -v ./u-boot/MLO /media/rootfs/opt/backup/uboot/
> sudo cp -v ./u-boot/u-boot.img /media/rootfs/opt/backup/uboot/
>
> Question: From where should I execute these commands ?
> There is no u-boot in /boot folder on BBB !

I have this documented here:

https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYio3X4Si5HvoiTgS_iDEPTqdYwUzKOYghW4O%2BMmZKqNeQ%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
So, the sequence of instructions would be as follows:

1. > Parition the *sd-card* with a 4MB hole: 
sudo sfdisk ${DISK} <<-__EOF__ 
4M,,L,* 
__EOF__ 

2. Format *sd-card *as ext4: 
sudo mkfs.ext4 -L rootfs ${DISK}1 

3. Copy *MLO* and *u-boot.img* to sd-card:
sudo mkdir -p /media/rootfs/opt/backup/uboot/ 
sudo cp -v ./u-boot/MLO /media/rootfs/opt/backup/uboot/ 
sudo cp -v ./u-boot/u-boot.img /media/rootfs/opt/backup/uboot/

Question: From where should I execute these commands ?
There is no *u-boot* in */boot* folder on BBB !

On Thursday, August 27, 2020 at 3:51:13 PM UTC+2, RobertCNelson wrote: 

>
> You can use 'dd' to extract them from the original drive.. 
>
> Or the really simple solution, just back them up somewhere on your 
> drive, like i do here: 
>
>
> https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-BackupBootloader
>  
>
> sudo mkdir -p /media/rootfs/opt/backup/uboot/ 
> sudo cp -v ./u-boot/MLO /media/rootfs/opt/backup/uboot/ 
> sudo cp -v ./u-boot/u-boot.img /media/rootfs/opt/backup/uboot/ 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/2f9d354d-6e15-48d2-8f5e-c95b563c344bo%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 8:46 AM Pavel Yermolenko  wrote:
>
> It's the case.
>
> Then keeping sd-card in BBB (not inserting it in the host, where I built 
> u-boot ?) execute these instructions:
>
> sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 bs=128k
> sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 bs=384k
>
> Parition the media with a 4MB hole:
> sudo sfdisk ${DISK} <<-__EOF__
> 4M,,L,*
> __EOF__
>
> Format as ext4:
> sudo mkfs.ext4 -L rootfs ${DISK}1
>
> Then find somewhere on BBB these two files MLO and u-boot.img and copy them 
> to the rootfs on sd-card.
> Correct ?

You can use 'dd' to extract them from the original drive..

Or the really simple solution, just back them up somewhere on your
drive, like i do here:

https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-BackupBootloader

sudo mkdir -p /media/rootfs/opt/backup/uboot/
sudo cp -v ./u-boot/MLO /media/rootfs/opt/backup/uboot/
sudo cp -v ./u-boot/u-boot.img /media/rootfs/opt/backup/uboot/

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYhyXxEutnCNqwO0xX3U_7WvzeC51O%2BQRNs4zm0bP-CRzQ%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
It's the case.

Then *keeping sd-card in BBB* (not inserting it in the host, where I built 
u-boot ?) execute these instructions:

sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 bs=128k 
sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 bs=384k 

Parition the media with a 4MB hole: 
sudo sfdisk ${DISK} <<-__EOF__ 
4M,,L,* 
__EOF__ 

Format as ext4: 
sudo mkfs.ext4 -L rootfs ${DISK}1 

Then find somewhere on BBB these two files *MLO* and *u-boot.img* and copy 
them to the *rootfs* on *sd-card*.
Correct ?

On Thursday, August 27, 2020 at 3:32:03 PM UTC+2, RobertCNelson wrote:
>
> On Thu, Aug 27, 2020 at 8:29 AM Pavel Yermolenko  > wrote: 
> > 
> > just before I've run "old" version. 
> > Should I just merely rerun the new one ... or some other additional 
> actions are needed ? 
> > Thanks. 
>
> do whatever, just open the file and make sure it's "root=/dev/mmcblk1p1" 
>
> sudo nano /boot/extlinux/extlinux.conf 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/ac0eb8d0-39c8-41e5-b560-da997502728co%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 8:29 AM Pavel Yermolenko  wrote:
>
> just before I've run "old" version.
> Should I just merely rerun the new one ... or some other additional actions 
> are needed ?
> Thanks.

do whatever, just open the file and make sure it's "root=/dev/mmcblk1p1"

sudo nano /boot/extlinux/extlinux.conf

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYg7N-rH-xd1qEKASnyAChe5ZZGeeZ9GPptAebUUXchEuw%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
just before I've run "old" version.
Should I just merely rerun the new one ... or some other additional actions 
are needed ?
Thanks.

On Thursday, August 27, 2020 at 3:21:17 PM UTC+2, RobertCNelson wrote:
>
> On Thu, Aug 27, 2020 at 7:31 AM Robert Nelson  > wrote: 
> > 
> > On Thu, Aug 27, 2020 at 12:58 AM Pavel Yermolenko  > wrote: 
> > > 
> > > Actually I have to start from scratch because as I mentioned before 
> BBB fails to boot from eMMC and the SD card is empty. 
> > 
> > No you don't, this is your decision.  Grab a spare microSD and copy a 
> > console image to it, then you can boot with the spare microSD and fix 
> > the eMMC's extlinux.conf.. 
> > 
> > > Well I will once again regenerate the image in eMMC and once again 
> format the SD card in ext4. 
> > > At this critical stage, I had an empty SD card, formatted in ext4 with 
> a single "rootfs" partition. 
> > > So the next step (if my understanding is correct) was to create a boot 
> partition on the SD card, where I could then transfer MLO and u-boot.img. 
> > > You say I should edit exlinux.conf. 
> > > Ok i will do it as you suggest 
> > > And then? 
> > > What should I do with this exlinux.conf in order to create a boot 
> partition on the SD card. 
> > > BTW execution of generate_extlinux.sh (which creates exlinux.conf on 
> eMMC) corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes 
> "unbootable". 
> > 
> > It's not unbootable, your using the eMMC, change the 
> > root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1 
> > 
> > It's hard-coded to the microSD because I spent about a minute writing 
> > generate_extlinux.sh to show 'how' it could be done.. 
> > 
> > 
> https://github.com/RobertCNelson/boot-scripts/blob/master/tools/generate_extlinux.sh#L16
>  
>
> now fixed.. 
> https://github.com/RobertCNelson/boot-scripts/commit/52f044c01bf91827d771ff786ea39338add2076a
>  
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/565819b5-9d7f-4cd8-9a92-9af6a188045eo%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 8:11 AM Pavel Yermolenko  wrote:
>
> On Thursday, August 27, 2020 at 2:32:36 PM UTC+2 RobertCNelson wrote:
>>
>> On Thu, Aug 27, 2020 at 12:58 AM Pavel Yermolenko  wrote:
>> >
>> > Actually I have to start from scratch because as I mentioned before BBB 
>> > fails to boot from eMMC and the SD card is empty.
>>
>> No you don't, this is your decision. Grab a spare microSD and copy a
>> console image to it, then you can boot with the spare microSD and fix
>> the eMMC's extlinux.conf..
>
>
> The problem is I have only one sd-card. Once I flash eMMC from it, I begin to 
> use it for other purposes.
> But Ok, I'll buy another one.
>
>>
>> > Well I will once again regenerate the image in eMMC and once again format 
>> > the SD card in ext4.
>> > At this critical stage, I had an empty SD card, formatted in ext4 with a 
>> > single "rootfs" partition.
>> > So the next step (if my understanding is correct) was to create a boot 
>> > partition on the SD card, where I could then transfer MLO and u-boot.img.
>> > You say I should edit exlinux.conf.
>> > Ok i will do it as you suggest
>> > And then?
>> > What should I do with this exlinux.conf in order to create a boot 
>> > partition on the SD card.
>> > BTW execution of generate_extlinux.sh (which creates exlinux.conf on eMMC) 
>> > corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes 
>> > "unbootable".
>>
>> It's not unbootable, your using the eMMC, change the
>> root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1
>>
>> It's hard-coded to the microSD because I spent about a minute writing
>> generate_extlinux.sh to show 'how' it could be done..
>
>
> Ok, what next ... keeping in mind that ultimate goal is to transfer MLO and 
> u-boot.img to sd-card ?

So just "dd" those two files to the microsd to the same position.

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYiAbNDiYyePDG%3Db6A%3DKJpx__6stFNVSH_wyA0kWpJPYdw%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 7:31 AM Robert Nelson  wrote:
>
> On Thu, Aug 27, 2020 at 12:58 AM Pavel Yermolenko  wrote:
> >
> > Actually I have to start from scratch because as I mentioned before BBB 
> > fails to boot from eMMC and the SD card is empty.
>
> No you don't, this is your decision.  Grab a spare microSD and copy a
> console image to it, then you can boot with the spare microSD and fix
> the eMMC's extlinux.conf..
>
> > Well I will once again regenerate the image in eMMC and once again format 
> > the SD card in ext4.
> > At this critical stage, I had an empty SD card, formatted in ext4 with a 
> > single "rootfs" partition.
> > So the next step (if my understanding is correct) was to create a boot 
> > partition on the SD card, where I could then transfer MLO and u-boot.img.
> > You say I should edit exlinux.conf.
> > Ok i will do it as you suggest
> > And then?
> > What should I do with this exlinux.conf in order to create a boot partition 
> > on the SD card.
> > BTW execution of generate_extlinux.sh (which creates exlinux.conf on eMMC) 
> > corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes 
> > "unbootable".
>
> It's not unbootable, your using the eMMC, change the
> root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1
>
> It's hard-coded to the microSD because I spent about a minute writing
> generate_extlinux.sh to show 'how' it could be done..
>
> https://github.com/RobertCNelson/boot-scripts/blob/master/tools/generate_extlinux.sh#L16

now fixed.. 
https://github.com/RobertCNelson/boot-scripts/commit/52f044c01bf91827d771ff786ea39338add2076a

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYhH9nxy%3DbsK%3D%3DdMNcyE2vCRMFN%3Du-8tMNBxUAZ%3DZYF8hQ%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
On Thursday, August 27, 2020 at 2:32:36 PM UTC+2 RobertCNelson wrote:

> On Thu, Aug 27, 2020 at 12:58 AM Pavel Yermolenko  
> wrote: 
> > 
> > Actually I have to start from scratch because as I mentioned before BBB 
> fails to boot from eMMC and the SD card is empty. 
>
> No you don't, this is your decision. Grab a spare microSD and copy a 
> console image to it, then you can boot with the spare microSD and fix 
> the eMMC's extlinux.conf.. 
>
 
The problem is I have only one *sd-card*. Once I flash *eMMC *from it, I 
begin to use it for other purposes.
But Ok, I'll buy another one.


> > Well I will once again regenerate the image in eMMC and once again 
> format the SD card in ext4. 
> > At this critical stage, I had an empty SD card, formatted in ext4 with a 
> single "rootfs" partition. 
> > So the next step (if my understanding is correct) was to create a boot 
> partition on the SD card, where I could then transfer MLO and u-boot.img. 
> > You say I should edit exlinux.conf. 
> > Ok i will do it as you suggest 
> > And then? 
> > What should I do with this exlinux.conf in order to create a boot 
> partition on the SD card. 
> > BTW execution of generate_extlinux.sh (which creates exlinux.conf on 
> eMMC) corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes 
> "unbootable". 
>
> It's not unbootable, your using the eMMC, change the 
> root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1 
>
> It's hard-coded to the microSD because I spent about a minute writing 
> generate_extlinux.sh to show 'how' it could be done.. 
>

Ok, what next ... keeping in mind that ultimate goal is to transfer *MLO *and 
*u-boot.img* to sd-card ?


>
> https://github.com/RobertCNelson/boot-scripts/blob/master/tools/generate_extlinux.sh#L16
>  
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/4d6ee9a7-bbeb-4af4-bf67-12b7b5a4d969n%40googlegroups.com.


Re: [beagleboard] Switching a GPIO to and LED via the device tree

2020-08-27 Thread Mark A. Yoder

Yup, years for facing blank stares has taught me a few things.

This particular example touched on so many different things it could be a 
nice final exam.

--Mark
On Wednesday, August 26, 2020 at 9:59:23 PM UTC-4 lazarman wrote:

>
> Well presented I like your approach at documentation I bet that comes from 
> teaching 
>
>
> Sent from Yahoo Mail on Android 
> 
>
> On Wed, Aug 26, 2020 at 5:30 PM, Mark A. Yoder
>  wrote:
>
> Beagler's:
>   I just wrote up some notes on how to edit the device tree to change a 
> GPIO into an LED.
>
> Switching_a_GPIO_to_an_LED 
> 
>
> It's are rather involved process that requires understanding some deeper 
> magic.
>
> Let me know what you think.
>
> --Mark
>
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/beagleboard/61317cde-fb07-4c98-bc56-c968e58e7a10n%40googlegroups.com
>  
> 
> .
>
>

-- 
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/6203e02e-107b-4404-b952-0ef40ad12118n%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Robert Nelson
On Thu, Aug 27, 2020 at 12:58 AM Pavel Yermolenko  wrote:
>
> Actually I have to start from scratch because as I mentioned before BBB fails 
> to boot from eMMC and the SD card is empty.

No you don't, this is your decision.  Grab a spare microSD and copy a
console image to it, then you can boot with the spare microSD and fix
the eMMC's extlinux.conf..

> Well I will once again regenerate the image in eMMC and once again format the 
> SD card in ext4.
> At this critical stage, I had an empty SD card, formatted in ext4 with a 
> single "rootfs" partition.
> So the next step (if my understanding is correct) was to create a boot 
> partition on the SD card, where I could then transfer MLO and u-boot.img.
> You say I should edit exlinux.conf.
> Ok i will do it as you suggest
> And then?
> What should I do with this exlinux.conf in order to create a boot partition 
> on the SD card.
> BTW execution of generate_extlinux.sh (which creates exlinux.conf on eMMC) 
> corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes 
> "unbootable".

It's not unbootable, your using the eMMC, change the
root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1

It's hard-coded to the microSD because I spent about a minute writing
generate_extlinux.sh to show 'how' it could be done..

https://github.com/RobertCNelson/boot-scripts/blob/master/tools/generate_extlinux.sh#L16

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
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/CAOCHtYjVi44vXGOA5jGrOpW1g-Uu--%2B6YaBTX1vGvOokkuL76g%40mail.gmail.com.


[beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-27 Thread Pavel Yermolenko
Hi Dennis,

Please see my remarks below

On Thursday, August 27, 2020 at 2:48:16 AM UTC+2, Dennis Bieber wrote:
>
> On Wed, 26 Aug 2020 15:50:56 -0700 (PDT), in 
> gmane.comp.hardware.beagleboard.user Pavel Yermolenko 
> > wrote: 
>
>
> I suspect someone will point out where my interpretation is faulty 
> but... 
>
>
> >** Unable to read "/boot/uboot.env" from mmc0:1 ** 
>
> mmc0 is, I believe, the SD card; I presume the :1 is "partition 
> 1"; at 
> least mine booted with a standard image on SD card shows as being 
> /dev/mmcblk0p1. And standard images don't have a uboot.env file. 
>
> debian@beaglebone:~$ ls -l /boot 
> total 20108 
> -rw-r--r-- 1 root   root 162601 Aug 19 13:38 config-4.19.94-ti-r48 
> drwxr-xr-x 3 root   root   4096 Aug 19 17:14 dtbs 
> -rw-r--r-- 1 root   root6617852 Aug 19 17:20 initrd.img-4.19.94-ti-r48 
> -rw-r--r-- 1 root   root542 Aug 19 21:34 SOC.sh 
> -rw-r--r-- 1 root   root3626463 Aug 19 13:38 System.map-4.19.94-ti-r48 
> drwxr-xr-x 2 root   root   4096 Aug 19 17:23 uboot 
> -rw-r--r-- 1 debian debian 2062 Aug 19 21:34 uEnv.txt 
> -rwxr-xr-x 1 root   root   10158592 Aug 19 13:38 vmlinuz-4.19.94-ti-r48 
> debian@beaglebone:~$ 
>
> ... so did you create any such uboot.env file and place that on the SD 
> care?
>
 
No, sd-card was empty, ext4-fromatted with single partition rootfs.

>mmc0 is current device 
> >gpio: pin 54 (gpio 54) value is 1 
> >Checking for: /uEnv.txt ... 
> >Checking for: /boot.scr ... 
> >Checking for: /boot/boot.scr ... 
> >Checking for: /boot/uEnv.txt ... 
>
> Do ANY of these files exist on the SD card? 
>

No, sd-card was empty I prepared it for transferring u-boot files.

I've onlly one sd-card, so after regenerating the image in eMMC I plan to 
use it for u-boot exploring. My comprehension is as follows: at that stage 
I had to create in some way boot partition in order to transfer there *MLO* 
and *u-boot.img* on host machine.
 

> >mmc1(part 0) is current device 
> >Scanning mmc 1:1... 
>
> And here it appears it gave up on the SD card and switched to the 
> eMMC 
>
> >Found /boot/extlinux/extlinux.conf 
> >Retrieving file: /boot/extlinux/extlinux.conf 
> >256 bytes read in 13 ms (18.6 KiB/s) 
> >1:Linux 4.19.94-ti-r42 
> >Retrieving file: /boot/vmlinuz-4.19.94-ti-r42 
> >10095592 bytes read in 648 ms (14.9 MiB/s) 
> >append: console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 
>
> ... though that line looks, to this neophyte, like... after loading the 
> core image from eMMC, it is setting up the SD card to be the root file 
> system. 
>
> >[1.004670] Kernel panic - not syncing: No working init found.  Try 
> >passing init= option to kernel. See Linux 
> >Documentation/admin-guide/init.rst for guidance. 
>
> Unfortunately, that page doesn't seem too helpful. 
>
> >[1.097330] ---[ end Kernel panic - not syncing: VFS: Unable to mount 
> >root fs on unknown-block(0,0) ]--- 
>
> Now, that message is at 
> https://www.kernel.org/doc/Documentation/admin-guide/init.rst with this 
> advice: 
>
> """ 
> 1) **Unable to mount root FS**: Set "debug" kernel parameter (in 
> bootloader 
>config file or CONFIG_CMDLINE) to get more detailed kernel messages. 
> """ 
>
>
>
> -- 
> Dennis L Bieber 
>
>

-- 
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/1e211965-020e-4739-8aef-699082351cc5o%40googlegroups.com.