Weekly Progress Report 1 ( BeagleBoot )

97 views
Skip to first unread message

Ravi Kumar Prasad

unread,
Jun 6, 2017, 4:14:29 PM6/6/17
to BeagleBoard GSoC
Hello everyone,
This week has been so much fun doing coding. I've achieved so far 3 weeks milestones that I set in my proposal.
Here they are:
Completed before official coding time: 
1. Milestone #1
  • Choose binary parser modules for JavaScript and create an example
  • Write code for ether packet and verify hardware address of BeagleBone from BOOT request data packet received by server
Completed this week 
2. Milestone #2 
  • Write code for packet headers to implement all network protocols used and basic testing
3. Milestone #3
  • Write code for BOOTP reply from server

  • Receive ARP request from client(BB) and make ARP response from server

Here are the parsed packet data received from BB by node.js Server
  • BOOT request (ether header)
{ h_dest: [ 255, 255, 255, 255, 255, 255 ],
      h_source: [ 160, 246, 253, 138, 233, 26 ],
        h_proto: 2048 }
      • ARP request (ARP header)
        hlen: 6,
        plen: 4,
        opcode: 1,
        hw_source: [ 160, 246, 253, 138, 233, 26 ],
        ip_source: [ 192, 168, 1, 3 ],
        hw_dest: [ 0, 0, 0, 0, 0, 0 ],
        ip_dest: [ 192, 168, 1, 9 ] }
      • SPL tftp request ( udp packet)
      { udpSrc: 1234, udpDest: 69, udpLen: 20, chkSum: 32823 }

      Issues that I came across:
      Next week goals:
      • Configuring SPL/u-boot for USB mass storage mode.
      • Transfer and booting SPL.
      Thanks
      ravikp7

      Ravi Kumar Prasad

      unread,
      Jun 14, 2017, 7:01:06 AM6/14/17
      to BeagleBoard GSoC
      Hi,
      This is my second weekly report. The node.js bootloader server is almost complete.
      Tasks completed this week:
      1. Code implementation of SPL and UBOOT binary transfer. Code: https://github.com/ravikp7/node-beagle-boot
      2. Configured SPL for usb boot using Michael's patch https://patchwork.ozlabs.org/patch/774899/
      3. Configured UBOOT for ums mode, here's diff for changes https://pastebin.com/rZ3R3zRs

      Current problems: 
      The configured SPL boots but is unable to tftp the UBOOT file. The problem I suspect is caused by error "usb_ether address not set" in serial output of SPL. Serial output here https://pastebin.com/zZLNWf0V

      What works now:
      The server is working with BBBlfs' precompiled SPL to transfer the uboot configured for ums. The server is able to boot BB into mass storage mode by simply:
      1. Connecting BB through usb by holding down boot switch.
      2. Running server by command "sudo npm start".
      Server working output https://pastebin.com/fXd6VedP

      Goals for next week:
      1. Fix latest SPL config for uboot tftp.
      2. Fix bugs: like sometimes SPL binary transfer freezes.
      3. Optimize code for performance. (like Uboot transfer is 1.5 seconds faster through BBBlfs than this node.js server)
      4. Test server on various platforms with dfferent node versions.

      Thanks
      Ravi


      Kridner, Jason

      unread,
      Jun 14, 2017, 12:11:04 PM6/14/17
      to beaglebo...@googlegroups.com
      Can you save that for after full integration?

      4. Test server on various platforms with dfferent node versions.

      Yes please!!


      Thanks
      Ravi


      --
      You received this message because you are subscribed to the Google Groups "BeagleBoard GSoC" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard-gs...@googlegroups.com.
      For more options, visit https://groups.google.com/d/optout.

      Ravi Kumar Prasad

      unread,
      Jun 14, 2017, 12:55:58 PM6/14/17
      to BeagleBoard GSoC


      On Wednesday, June 14, 2017 at 9:41:04 PM UTC+5:30, Jason Kridner wrote:
      Can you save that for after full integration?

       ok, will start working on integration beginning with UI. I'll update etcher developers with the development and get info about the etcher sdk.


      Yes please!!
      Did you test the server? Please also have a look and the travis ci build error, it needs a fix.





      Jason Kridner

      unread,
      Jun 14, 2017, 2:44:51 PM6/14/17
      to beaglebo...@googlegroups.com
      Haven't had chance to test the server, but here's a fix for Travis CI:

       





      --
      You received this message because you are subscribed to the Google Groups "BeagleBoard GSoC" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard-gs...@googlegroups.com.
      For more options, visit https://groups.google.com/d/optout.
      --

      Ravi Kumar Prasad

      unread,
      Jun 21, 2017, 9:00:37 AM6/21/17
      to BeagleBoard GSoC
      Hi, This is my third weekly report.
      This week was focused on testing the node.js server on Windows and OSX, as it was already running on Linux.
      On Windows, I'm facing the following issues:
      I tried both drivers WInUSB and libusbWin32. Both behaved same.
      1. When I connect BB to usb 2.0 port on host, the device can't be opened as it can't read the device config descriptor.
      2. When I connect BB to usb 3.0 port on host, the device opens. But the device wasn't broadcasting bootp messages. So, I initialized the rndis device (BB) by sending rndis_init and rndis_set messages via control transfer, refrence https://docs.microsoft.com/en-us/windows-hardware/drivers/network/example-connectionless--802-3--initialization-sequence 
      3. Then BB started to broadcast bootp, SPL was transferred successfully. But the interface of the SPL device can't be claimed yet. 

      On OSX, Jason is testing the server, he's also unable to claim the interface of SPL device.

      Goals for this week:
      1. Analyze the usb bus transfer to identify the problem with SPL device and finally getting uboot transferred with Windows and OSX.
      2. Make changes in code to turn synchronous part into asynchronous.
      3. And finally completing the server with proper documentation.

      Thanks
      Ravi

      Ravi Kumar Prasad

      unread,
      Jun 28, 2017, 11:10:21 AM6/28/17
      to BeagleBoard GSoC
      Hi, 
      This is my fourth weekly report.
      Tasks done this week :

      1. Analyze the usb bus transfer to identify the problem with SPL device and finally getting uboot transferred on Windows and OSX.

      Here's the problem : SPL device has two usb configuration descriptions, one with single interface and other with two interfaces. We need the configuration with two interfaces to TFTP uboot. Linux, by default sets the configuration with two interfaces hence uboot TFTP is working on lInux.
      WIndows and OSX are setting configuration with single interface by default and the other configuration can't be set through libusb as I've tried on Windows. So, TFTP of uboot isn't working on either. 
       
      2. Make changes in code to turn synchronous part into asynchronous.

      I've removed all synchronous code and implemented all code asynchronously through promises. Also, removed redundant code for spl and uboot transfers. Code : https://github.com/ravikp7/node-beagle-boot/tree/dev
       
      3. And finally completing the server with proper documentation.

      The node.js server code part is complete. I think for working on OSX and Windows, all need to be fixed is on uboot part which is turning out to be more complex than I thought. I've already reported the problem on u-boot part earlier this week in the mailing list. 

      This was a slow week as I couldn't give enough time to work due to some other urgent personal work.

      Goals for next week:
      1. Getting uboot problem fixed. 
      2. Remove one usb configuration descriptor for spl device to get it working on Windows and OSX.
      3. Start working on integration of bootloader server with flashing tool.

      Thanks
      Ravi 

      Ravi Kumar Prasad

      unread,
      Jul 5, 2017, 10:14:04 AM7/5/17
      to BeagleBoard GSoC
      Hi,
      This is my fifth weekly report.
      • The asynchronous code that I implemented last week for the server was complicated, so I made all code event driven.
      • I tried flashing BeagleBone black using etcher tool, it takes 30 minutes to flash it.
      • This week was focused more on learning, got some concepts cleared about node.js working and learning Angular for UI design.
      • I've started working on modifying the UI to change some styling and accomodate a button to run the server.
      Goals for next week:
      • Complete UI for the flashing tool.
      Problems:
      • I still didn't get any helpful reply through uboot mailing list to fix the tftfp issue.

      Robert Nelson

      unread,
      Jul 5, 2017, 10:17:38 AM7/5/17
      to beaglebo...@googlegroups.com, 7ra...@gmail.com
      On Wed, Jul 5, 2017 at 9:14 AM, Ravi Kumar Prasad <7ra...@gmail.com> wrote:
      > Hi,
      > This is my fifth weekly report.
      >
      > The asynchronous code that I implemented last week for the server was
      > complicated, so I made all code event driven.
      > I tried flashing BeagleBone black using etcher tool, it takes 30 minutes to
      > flash it.

      If your running etcher on the Black, to save time, pre-uncompress the *.img.xz..

      Regards,

      --
      Robert Nelson
      https://rcn-ee.com/
      Message has been deleted

      Ravi Kumar Prasad

      unread,
      Jul 12, 2017, 10:43:33 AM7/12/17
      to BeagleBoard GSoC
      Hi, This is my 6th weekly report.
      Tested node modules (drivelist and etcher-image-write) used for flashing. The etcher sdk isn't ready yet, so its developer has suggested me to go with these modules for now as APIs would be almost same. 
      For UI, I was planning to go with angular till last week. But, I found React more comfortable, so I've started learning React.
      I couldn't start work for UI this week as I was not well for last few days.

      For next week, I plan to complete the UI with React for the Electron app.

      Ravi Kumar Prasad

      unread,
      Jul 19, 2017, 8:33:15 AM7/19/17
      to BeagleBoard GSoC
      Hi, This is my 7th weekly report.

      Tasks completed this week:
      • The UI for the flashing tool is almost complete. I used React for the UI.
      • I modified the server module code to return an EventEmitter which can emit the process progress, error and completion. Code https://github.com/ravikp7/node-beagle-boot 
      • I published the server as node module on npmjs, link here https://www.npmjs.com/package/beagle-boot . I'm yet to update the documentation for the API, will do it now.
      • I integrated the node.js server with the flashing app (electron app). It's working fine. By pressing 'USB Mass Storage' button in app, it boots BB into ums mode, it also shows the process progress in a progress bar with info. Code for app https://github.com/ravikp7/BeagleBoot
      • Here are some screenshots of app in action https://goo.gl/w5Uz2y 
      Tasks for next week:
      • Integrate etcher modules in app for flashing.
      • Integrate sudo prompt in app.
      Thanks

      Ravi Kumar Prasad

      unread,
      Jul 26, 2017, 10:12:16 AM7/26/17
      to BeagleBoard GSoC
      Hi, this is my 8th weekly report.

      Tasks done this week:
      • Implemented changes in the way the bootloader server works. Earlier, it had a stateful nature and it performed predefined tasks in series. Now, it listens for events such as rom, spl device detection and runs the tftp server on detection, this way it can start transfer any number of times after reset or disconnection.
      • Other major change is that the server now identifies the request received and then responds accordingly. Earlier it was servicing requests in series like bootp, arp and then tftp.
      • We got the usb bootloader server working on OS X too. Now only windows left. Having problems with the usb library used. 
      For the integration of server with flashing app, I'm currently working on two things:
      • Adding sudo prompt in app.
      • Adding Redux for managing app state.
      Only two etcher modules drive-list and image-write are stable and maintained, using them I can get only flashing done with uncompressed images. So, not going with them and plan to use etcher-sdk instead, considering a long term solution. There's still a week or two for etcher sdk release. The sdk has all APIs including drive scanner, flasher, decompresser and images downloader from http/https for flashing.

      Ravi Kumar Prasad

      unread,
      Aug 2, 2017, 10:47:33 AM8/2/17
      to BeagleBoard GSoC
      Hi, this is my 9th weekly report.

      Task done this week:
      • I made code changes for server functionality, removed much of spl, uboot specific code and implemented as a generalized server which takes three parameters vid, pid and path of file to be transferred.
      •  I also removed the for loop for file blocks transfer, also earlier it didn't wait for outend transfer to complete before initiating the inend transfer during file transfer, I implemented that way as it worked and file transfer was almost twice as much fast. But, it was failing on a Windows pc that I tried. So now, it's part of same framework as all other requests are handled through event invoking.
      Complete API for file transfer is now documented https://github.com/ravikp7/node-beagle-boot

      Currently working on:

      Jason Kridner

      unread,
      Aug 3, 2017, 9:58:45 AM8/3/17
      to beaglebo...@googlegroups.com
      The app is pretty usable, except on Windows. Can we get some more testers as well as beg for help on the Windows portion to the resin.io community?
      --

      Ravi Kumar Prasad

      unread,
      Aug 3, 2017, 11:02:14 AM8/3/17
      to BeagleBoard GSoC
      For more testing on Linux and OS X, I request you to ask BeagleBoard.org community for it. Your words have more power. I usually get an average response :( I'm ready to help testers in testing. Please send a mail to BeagleBoard.org mailing list regarding this and cc me same.
      We stil aren't able to set the required usb configuration for spl device on Windows. So, uboot transfer is still pending on Windows. Not sure, if they can help with uboot. I'll be looking into this and will ask other mentors for help on same.

      Ravi Kumar Prasad

      unread,
      Aug 9, 2017, 10:44:32 AM8/9/17
      to BeagleBoard GSoC
      Hi, this is my 10th weekly report.
      Task done this week
      Task for next week
      • Getting flashing modules working for uncompressed images in the app.

      Ravi Kumar Prasad

      unread,
      Aug 9, 2017, 10:47:11 AM8/9/17
      to BeagleBoard GSoC
      Apologies for irregular font. Internet is down here, had to type this in phone, and things got messed up somehow :(

      Ravi Kumar Prasad

      unread,
      Aug 16, 2017, 10:28:41 AM8/16/17
      to BeagleBoard GSoC
      Hi, this is my 11th weekly report.
       
      Tasks done this week:
      • Integrated all etcher flashing modules with the app.
      • Implemented ipc server client communication to run multiple scripts through the elevated process. In the app, I use it to run usbMassStorage and ImageWrite scripts in the app.
      Status: The app now works good to boot BeagleBone into usbMassStorage mode and flash the emmc. App here https://github.com/ravikp7/BeagleBoot . I request all to please give it a try for testing purpose. Only Linux and OSX supported for now.

      Currently working on: Fixing bugs in app and proper error reporting.

      Tasks for next week:
      • Completing the remaining parts of UI (settings and about page).
      • Adding Windows support in the elevation process, it needs a bit different treatment (like checking if elevated and setting env variables) than unix.
      • Packaging the app in native packages for all platforms.

      Ravi Kumar Prasad

      unread,
      Aug 23, 2017, 11:33:50 AM8/23/17
      to BeagleBoard GSoC
      Hi,
      This is the final report. It was a great experience working on this project. I want to thank all mentors for all the support and guidance.

      Code for USB bootloader server: https://github.com/ravikp7/node-beagle-boot

      First I'll list tasks completed this week:
      • Added Windows support in the elevation process in the app.
      • Fixed all bugs found in the app.
      • User interface polishing with app icons.
      Now the status of the project :
      • As per the project goals, almost everything is complete except Windows support in the Flashing app. We've a functional GUI flashing app.
      • For Windows support, I just need to update the bootloader server module with fixes for Windows. No changes are required in the app for Windows support.
      Tasks that I'm still working on:
      • Building and publishing app native packages for supported platforms on Github release through CI servers. I'll be releasing an alpha in few hours.
      • Completing the documentation for the project.
      So, what's next?
      • This kind of project needs continuous updates and support.
      • I plan to work on getting Windows support as well.
      • Other enhancements are also needed in the app like auto updates, other feature additions.
      • I look forward to actively support the app development as long as I can.
      Thanks
      Ravi Kumar Prasad
      Reply all
      Reply to author
      Forward
      0 new messages