Porting beaglebone's USB based bootloader from C to javascript:GSOC 2017

Greetings,

This is with respect to becoming a student contributor to the beaglebone community.

My name is Udit Kumar Agarwal (IRC NICK: uka_in). I am currently in my second year of engineering ,pursuing Electronics. I am proficient with embedded C ,C++ ,Python , Java , php, JavaScript and Linux kernel.

Being interested in contributing towards GSOC 2017, I referred the Idea page and the project “Porting Beagle Bone’s USB based boot loader from c to JavaScript” particularly interests me. I tried to make an outline of what we will be doing under the task, but have some initial doubts and queries which are as follows:

  1. BBBlfs being able to put BBB into USB mass storage mode,are we simply going to run BBBlfs’s scripts via .js?(If so, then how can it be cross platformed?)
    OR
    After claiming bbb’s RNDIS interface via Node.js, are we going to use BBBlfs scripts to convert .xz image file into a binary blob, and then load it via Node.js?(If so, then can we add compatibility for more compression types other then .xz?).

  2. Does this task require kernel cross compiling?

Please excuse any baseless assumption/question on my part(I am still a beginner,trying to correlate stuff!!)

Any rectification/support regarding this task would be extremely helpful.

yours faithfully,

Udit Kumar Agarwal
(uditagarwal1997@gmail.com)

Greetings,

This is with respect to becoming a student contributor to the beaglebone community.

My name is Udit Kumar Agarwal (IRC NICK: uka_in). I am currently in my second year of engineering ,pursuing Electronics. I am proficient with embedded C ,C++ ,Python , Java , php, JavaScript and Linux kernel.

Being interested in contributing towards GSOC 2017, I referred the Idea page and the project “Porting Beagle Bone’s USB based boot loader from c to JavaScript” particularly interests me. I tried to make an outline of what we will be doing under the task, but have some initial doubts and queries which are as follows:

  1. BBBlfs being able to put BBB into USB mass storage mode,are we simply going to run BBBlfs’s scripts via .js?(If so, then how can it be cross platformed?)

BBBlfs uses libusb, so it could be cross-platform, but that isn’t the idea. The idea is to use node-usb.

OR
After claiming bbb’s RNDIS interface via Node.js, are we going to use BBBlfs scripts to convert .xz image file into a binary blob, and then load it via Node.js?(If so, then can we add compatibility for more compression types other then .xz?).

No, we’d use etcher.io to write the .img.xz file to the eMMC. The RNDIS client provided by the ROM code would be used to load u-boot and start USB Mass Storage.

  1. Does this task require kernel cross compiling?

No, but you should show you know how to cross-compile. You would likely be well-served by cross-compiling u-boot.

Please excuse any baseless assumption/question on my part(I am still a beginner,trying to correlate stuff!!)

Any rectification/support regarding this task would be extremely helpful.

I made some notes at https://gist.github.com/jadonk/208f209351f16fa02ecb56a9f75447d9 due to some queries on IRC.

Thanks for reply!!
I successfully cross compiled u-boot as well as hello world application given on github.
logs:https://gist.github.com/madaari/e9d66c1fa766398aa762c61a1b36c2f4

However, i had some issues while testing u-boot image on qemu
errors:https://gist.github.com/madaari/ed965e11c2f6b54350c221a3bebd3f14

Also, I had a look at your notes and will proceed ahead with testing the code on my workspace( I’m a beginner at node.js, so meanwhile i’ll learn that too!!!).

Please suggest any further requirement/task which will be needed for this project.

Yours faithfully,
Udit Kumar Agarwal
(IRC: uka_in)
uditagarwal1997@gmail.com

Jkridner,
I tried the code on OSX , and there was no issue in claiming the interface.