How to undefine CONFIG_CMD_NET? - u-boot

I can not find this configuration defined anywhere in my include/configs/.h file and includes, nor in configs/_defconfig and it is still defined in .config file after configuring u-boot. I am seeing this configuration defined in tools/Makefile. Is it default? Should I use #undef in me include/configs/.h or CONFIG_CMD_NET=n in configs/_defconfig? What is better?

This configuration option is described as
CONFIG_CMD_NET:
Network commands.
bootp - boot image via network using BOOTP/TFTP protocol
tftpboot - boot image via network using TFTP protocol
Symbol: CMD_NET [=y]
Type : boolean
Prompt: bootp, tftpboot
Location:
-> Command line interface
-> Network commands
Defined at cmd/Kconfig:403
Selects: NET [=n]
You can disable CMD_NET using make menuconfig.
Command line interface
Network commands
[*] bootp, tftpboot
You can also hardcode your configuration in your board's config file, as suggested in the README file:
EXAMPLE: If you want all functions except for network support you can write:
#include "config_cmd_all.h"
#undef CONFIG_CMD_NET

Related

SWUpdate on RPi4 via yocto - error parsing configuration file

After booting SWUpdate yocto-generated image for the first time, executing swupdate results in error message:
Error parsing configuration file: 'globals' section missing, exiting.
I tried to strictly follow SWUpdate's documentation, but it gets short when it comes to yocto integration. I'm using meta-swupdate, meta-swupdate-boards, and meta-openembedded layers together with poky example repository all at Kirkstone tag, building via bitbake update-image and having modyfied local.conf as:
MACHINE ??= "raspberrypi4-64"
ENABLE_UART = "1"
RPI_USE_U_BOOT = "1"
IMAGE_FSTYPES = "wic ext4.gz"
PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
IMAGE_INSTALL:append = " swupdate"
Is there anything else I need to modify to generate the configuration file and be able to run SWUpdate binary properly?
Side question: In the documentation, it's recommended to append swupdate-www to achieve a better web server. However, if I append it, there is no swupdate-www binary inside the `/usr/bin' directory.
As with other recipes folders the recipes-support/swupdate/swupdate/raspberrypi4-64 folder was missing inside the meta-swupdate-boards layer. Therefore, an empty config file was always generated. After adding this folder and all related files, strongly inspired by raspberrypi3 folder, the error was gone and swupdate -h provided the expected output.
There was also one new error during build process thrown by yocto. It was related to missing systemd requirement and was solved by adding:
DISTRO_FEATURES_append = " systemd"
to local.conf

Passing T32_xxx cmds to DSP Trace32 instance

We have a ARM + DSP set up. Each has a specific invocation, the former uses the tmarm.exe and the latter uses the t32m6000.exe with the config.t32 file. What I want to know is, I have a cmm script that starts the ARM instance and then does a bunch of things and then it starts the DSP instance but after starting I don't know how to send commands to it. I am using the T32 lib via MATLAB so at one point I do a system('C6000start.bat') in MATLAB which issues the call to start the DSP and the DSP instance starts up but in the next line if I send any command to it it won't work. In the config6000.t32 file I have commented out the RCL, PORT and PACKLEN directives since t32m6000.exe flags a syntax error and I concluded that those directives only apply to the ARM.
I don't know if I have to use the INTERCOM command to switch focus to the DSP instance.
========== batch file C6000start.bat ===============
start "" %t32path%\t32m6000 -c config6000.t32
=====================================================
=============== config6000.t32=====================
; Environment variables
OS=
ID=T32
SYS=C:\T32
; USB information
PBI=
USB
; Printer settings
PRINTER=WINDOWS
; Remote Control Access
; Printer settings
PRINTER=WINDOWS
; Remote Control Access
;RCL=NETASSIST
;PORT=20001
;PACKLEN=1024
========================================================

librpm - How to verify the signature key of an installed package

I would like to programmatically check if a RPM package is (1) signed (has a signature) and (2) the key used to sign is trusted.
[root]$ rpm -qi setup
Name : setup
Signature : RSA/SHA1, Wed 02 Oct 2013 05:15:22 AM MDT, Key ID 0946
[root]$ rpm -qi testing
Name : testing
Signature : (none)
I'm browsing the librpm API but I don't see any public methods allowing signature verification on already installed packages.
# This requires a file descriptor
rpmcli.h:rpmVerifySignatures
# This also requires a file descriptor
rpmlib.h:rpmReadPackageFile
Digging further I see:
# This uses a callback `qva_showPackage` which gives (QVA_t, rpmts, Header)
rpmcli.h:rpmcliVerify
But I cannot seem to get RPM tags (RPMTAG_SHA1HEADER) from the Header passed in by the callback. If I could get these tags then it would make sense to call into rpmpgp.h:pgpVerifySig to verify the signature.
Edit:
I see the bulk of the signature verification work is done in a static method rpmchecksig.c:rpmpkgVerifySigs which is only available through rpmcli.h:rpmVerifySignatures. But this method requires a file descriptor. Is there a way to get a FD from an already installed package to be able to use this method?
RPM will verify header-only signatures when retrieving from an rpmdb if enabled through various mode-specific %_vsflags* settings. See /usr/lib/rpm/macros for values.
You will see the verification if you do, say, "rpm -Vvv bash". You can also enable the header-only signature verification on --query (or other) rpm modes by changing specific macros.
There is a means (but not a specific call) to retrieve the header plaintext, the header-only signature, and the pubkey if you wish to verify external to rpm.

Can I easily compile u-boot with more commands for arm versatile bp

I have compiled u-boot from u-boot-2013.01.y branch for versatilebp board (arm), and I need fatload command that is not present in this configuation.
I'm running u-boot under qemu
DRAM: 128 MiB
WARNING: Caches not enabled
Using default environment
In: serial
Out: serial
Err: serial
Net: SMC91111-0
Warning: SMC91111-0 using MAC address from net device
VersatilePB # fat
Unknown command 'fat' - try 'help'
VersatilePB # help
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
cmp - memory compare
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
env - environment handling commands
erase - erase FLASH memory
flinfo - print FLASH memory information
go - start application at address 'addr'
help - print command description/usage
iminfo - print header information for application image
loop - infinite loop on address range
md - memory display
mm - memory modify (auto-incrementing address)
mtest - simple RAM read/write test
mw - memory write (fill)
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
reset - Perform RESET of the CPU
setenv - set environment variables
tftpboot- boot image via network using TFTP protocol
version - print monitor, compiler and linker version
VersatilePB #
I need fatload to load file containing image of fat filesystem containing kernel of freebsd. Can I somehow change compile config for that board to compile u-boot with fatload command? Or it's just not possible/not supported for that board?
Having done more or less exactly this for a Versatile AB, it's most certainly possible. The simplest way is to find where that board's command set is defined, and hack in the commands you want by defining the relevant CONFIG_CMD_* symbols. In this case, that place is include/configs/versatile.h.
Looking at my checkout of 2015.07, I seem to have added, among others (I think I was trying to convince the MMC to work at the time), these lines:
#define CONFIG_CMD_FAT
#define CONFIG_DOS_PARTITION 1

Generation of RTE_Components.h

I'm working with MDK-Pro and the File System library.
In my application, I require an SPI interface to the SD card. I've managed to setup the project properly, except that in the RTE_Components.h file that Keil generates the line #define RTE_Drivers_MCI0 which subsequently triggers a preprocessor error ("SDIO not configured in RTE_Device.h").
Although I can manually comment out this line in RTE_Components.h, every so often Keil updates this file and I get the above problem. Does anyone know what exactly generates this file, and how I can stop it from adding the SDIO-related definitions into the project?
The RTE_Components.h is not supposed to be modified and will always be automatically generated. That the stack tries to connect via MCI interface is related to your configuration made in the "FS_Config_MC_0.h".
// <o>Connect to hardware via Driver_MCI# <0-255>
// <i>Select driver control block for hardware interface
#define MC0_MCI_DRIVER 0
// <o>Connect to hardware via Driver_SPI# <0-255>
// <i>Select driver control block for hardware interface when in SPI mode
#define MC0_SPI_DRIVER 0
// <o>Memory Card Interface Mode <0=>Native <1=>SPI
// <i>Native uses a SD Bus with up to 8 data lines, CLK, and CMD
// <i>SPI uses 2 data lines (MOSI and MISO), SCLK and CS
// <i>When using SPI both Driver_SPI# and Driver_MCI# must be specified
// <i>since the MCI driver provides the control interface lines.
#define MC0_SPI 1

Resources