UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
1,019 Views
Registered: ‎04-12-2018

U-Boot: USB/DFU removal

Jump to solution

Hello All,

 

Chip: xczu4ev

Petalinux: 2017.3

Component: U-Boot

 

I am trying to reduce the size of U-Boot, and remove potential attack vectors of the board, one of these is USB DFU.

It seems that no matter what I do I cannot get U-Boot to build when I disable DFU and USB.

I have tried with a custom board config, and doing petalinux-configure -c u-boot, I always end up with build failures related to symbols from DFU and/or U-Boot....

 

Any ideas / pointers on where to look would be most appreciated.

 

I have already seen:

https://forums.xilinx.com/t5/Embedded-Linux/How-do-I-remove-USB-from-U-Boot/m-p/840014#M24868

https://forums.xilinx.com/t5/Xilinx-Boards-and-Kits/ZCU-102-boot-from-USB-DFU/m-p/826793#M16912

 

 

Mark

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
1,288 Views
Registered: ‎02-07-2018

Re: U-Boot: USB/DFU removal

Jump to solution

Hi Msmith,

 

Please try below steps, it will build, I already verified with 2017.4 SW.

 

By default DFU config is disabled, You just need to disable the USB & usb command as well.


1. petalinux-config -c u-boot
    Device Drivers --->[] USB support ---> un select 

2.  Command line interface  --> Device access commands  --> [ ] usb   -- Un select , save & exit.

3. petalinux-build

4.petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/download.bit --u-boot

 

Thanks & regards

Aravind


----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
Moderator
Moderator
1,289 Views
Registered: ‎02-07-2018

Re: U-Boot: USB/DFU removal

Jump to solution

Hi Msmith,

 

Please try below steps, it will build, I already verified with 2017.4 SW.

 

By default DFU config is disabled, You just need to disable the USB & usb command as well.


1. petalinux-config -c u-boot
    Device Drivers --->[] USB support ---> un select 

2.  Command line interface  --> Device access commands  --> [ ] usb   -- Un select , save & exit.

3. petalinux-build

4.petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/download.bit --u-boot

 

Thanks & regards

Aravind


----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
972 Views
Registered: ‎04-12-2018

Re: U-Boot: USB/DFU removal

Jump to solution

Hello Aravind,

 

After removing a few extra hash defines from my main config header it seems fine. I'm sure I tried that in the past, must have missed something last time!

 

Annoyingly I cannot seem to put the relevant config changes in my defconfig. It simply ignores them.....

Specifying:

CONFIG_CMD_USB=n
CONFIG_CMD_DFU=n
CONFIG_USB=n

or

# CONFIG_CMD_USB is not set
# CONFIG_CMD_DFU is not set
# CONFIG_USB is not set

 

I'll mark this as solved, but I don't really think its a good way, I should be able to control this via the defconfig, thanks for you help.

 

Mark

 

0 Kudos
961 Views
Registered: ‎04-12-2018

Re: U-Boot: USB/DFU removal

Jump to solution

It is worth noting that this only worked becuase i have control over the board include file. If I try this with a standard config (say zcu106) it failed to compile due to "THOR_DOWNLOAD" being defined.

0 Kudos