I'm trying to change the value of GPIO port manually.
To change the value of gpio18 (physical port 12), I did as follow:
# gpio unexportall
# echo 18 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio18/direction
# cat /sys/class/gpio/gpio18/value #output is 0
# echo 1 > /sys/class/gpio/gpio18/value
# cat /sys/class/gpio/gpio18/value #output is 1
For gpio7 (physical port 26) I perform the exact commands as above. But the value remains 0:
# echo 7 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio7/direction
# cat /sys/class/gpio/gpio7/value #output is 0
# echo 1 > /sys/class/gpio/gpio7/value
# cat /sys/class/gpio/gpio7/value #output is 0 again
I've tried with all other gpio ports. All ports function properly except gpio7 and gpio11 (the value is always 0).
By the way before using this raspberry pi, I was working with another raspberry pi2. Strangely the gpio7 in the previous raspberry pi had the same problem too. Is it a hardware problem or I am doing something wrong?
EDIt: I have also used Wiringpi and J4Pi, the result is the same.
Related
I compiled U-Boot (#v2022.01-rc1) with untouched rpi_4_defconfig. The U-Boot loads into shell successfuly, however
entering this sequence of commands will get stuck on "Starting kernel ...":
setenv serverip 192.168.0.1
setenv ipaddr 192.168.0.10
setenv kernel_comp_addr_r 0x0A000000
setenv kernel_comp_size 7921972
tftp ${kernel_addr_r} kernel8.img
tftp ${fdt_addr_r} bcm2711-rpi-4-b.dtb
booti ${kernel_addr_r} - ${fdt_addr_r} // Gets stuck at Starting kernel...
However, if I replace ${fdt_addr_r} with ${fdt_addr} in booti command it will load the kernel successfully. Like this:
booti ${kernel_addr_r} - ${fdt_addr} // Works fine
What is the difference between ${fdt_addr_r} and ${fdt_addr}? Why doesn't my first approach work? Why does ${fdt_addr} work?
DEBUG INFO:
RPi firmware boot logs:
Read start4.elf bytes 2228768 hnd 0x00000072
Read fixup4.dat bytes 5446 hnd 0x00000067
Firmware: d7f29d96450abfc77cd6cf011af1faf1e03e5e56 Apr 30 2021 13:45:52
0x00c03112 0x00000000 0x000000ff
MEM GPU: 76 ARM: 948 TOTAL: 1024
Starting start4.elf # 0xfec00200 partition 0
PCI reset
+
MESS:00:00:05.184648:0: arasan: arasan_emmc_open
MESS:00:00:05.332928:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:05.335639:0: brfs: File read: 81 bytes
MESS:00:00:05.402894:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:05.421071:0: brfs: File read: 81 bytes
MESS:00:00:05.902232:0: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
MESS:00:00:05.909524:0: *** Restart logging
MESS:00:00:05.914477:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:05.923831:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:05.929762:0: HDMI0: hdmi_pixel_encoding: 300000000
MESS:00:00:05.935229:0: HDMI1: hdmi_pixel_encoding: 300000000
MESS:00:00:05.945421:0: dtb_file 'bcm2711-rpi-4-b.dtb'
MESS:00:00:05.952218:0: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb
MESS:00:00:05.955466:0: Loading 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xc2a9
MESS:00:00:05.974659:0: brfs: File read: 49833 bytes
MESS:00:00:06.039897:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:06.042389:0: brfs: File read: 81 bytes
MESS:00:00:06.047663:0: brfs: File read: /mfs/sd/overlays/disable-bt.dtbo
MESS:00:00:06.067534:0: Loaded overlay 'disable-bt'
MESS:00:00:06.107041:0: brfs: File read: 1073 bytes
MESS:00:00:06.108885:0: Failed to open command line file 'cmdline.txt'
MESS:00:00:07.249713:0: brfs: File read: /mfs/sd/u-boot.bin
MESS:00:00:07.252181:0: Loading 'u-boot.bin' to 0x80000 size 0x8f720
MESS:00:00:07.258265:0: Device tree loaded to 0x2eff3800 (size 0xc743)
MESS:00:00:07.266568:0: uart: Set PL011 baud rate to 103448.300000 Hz
MESS:00:00:07.273628:0: uart: Baud rate change done...
MESS:00:00:07.275688:0: uart: Baud rate change done...
MESS:00:00:07.281220:0: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
U-Boot log:
U-Boot 2022.01-rc1 (Nov 11 2021 - 15:59:50 +0100)
DRAM: 3.9 GiB
RPI 4 Model B (0xc03112)
MMC: mmcnr#7e300000: 1, mmc#7e340000: 0
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... In: serial
Out: serial
Err: serial
Net: eth0: ethernet#7d580000
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 2
U-boot environment (without entering any commands, or modifying env in any way):
arch=arm
baudrate=115200
board=rpi
board_name=4 Model B
board_rev=0x11
board_rev_scheme=1
board_revision=0xC03112
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_pci_enum=pci enum
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 mmc1 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=devtype=dhcp; run boot_net_usb_start; run boot_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; run boot_pci_enum; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=2
cpu=armv8
dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1;config.txt fat 0 1;Image fat 0 1
dhcpuboot=usb start; dhcp u-boot.uimg; bootm
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
ethaddr=dc:a6:32:5f:91:f4
fdt_addr=2eff3800
fdt_addr_r=0x02600000
fdt_high=ffffffffffffffff
fdtcontroladdr=3af44630
fdtfile=broadcom/bcm2711-rpi-4-b.dtb
initrd_high=ffffffffffffffff
kernel_addr_r=0x00080000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x1000000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
preboot=pci enum; usb start;
pxefile_addr_r=0x02500000
ramdisk_addr_r=0x02700000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x02400000
serial#=100000009b911a03
soc=bcm283x
stderr=serial,vidconsole
stdin=serial,usbkbd
stdout=serial,vidconsole
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
usbethaddr=dc:a6:32:5f:91:f4
vendor=raspberrypi
Environment size: 4113/16380 bytes
U-boot process of entering commands and booting the kernel:
U-Boot> setenv serverip 192.168.0.1
U-Boot> setenv ipaddr 192.168.0.10
U-Boot> setenv kernel_comp_addr_r 0x0A000000
U-Boot> setenv kernel_comp_size 7921972
U-Boot> tftp ${kernel_addr_r} kernel8.img
Using ethernet#7d580000 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.10
Filename 'kernel8.img'.
Load address: 0x80000
Loading: *################################################## 7.6 MiB
13.9 MiB/s
done
Bytes transferred = 7921972 (78e134 hex)
U-Boot> tftp ${fdt_addr_r} bcm2711-rpi-4-b.dtb
Using ethernet#7d580000 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.10
Filename 'bcm2711-rpi-4-b.dtb'.
Load address: 0x2600000
Loading: *################################################## 48.7 KiB
5.3 MiB/s
done
Bytes transferred = 49833 (c2a9 hex)
U-Boot> booti ${kernel_addr_r} - ${fdt_addr_r}
Uncompressing Kernel Image
Moving Image from 0x80000 to 0x200000, end=17f0000
## Flattened Device Tree blob at 02600000
Booting using the fdt blob at 0x2600000
Using Device Tree in place at 0000000002600000, end 000000000260f2a8
Starting kernel ... // <------ !!!! stuck here forever
Regarding ${fdt_addr} and ${fdt_addr_r}:
The u-boot rpi_4_defconfig configures CONFIG_OF_BOARD. By this option u-boot does not use its own device tree, but it receives the device tree which is provided by the eeprom bootloader of the Raspberry Pi 4. The RPi bootloader already prepares the device tree depending on the options in the file config.txt of the boot partition, including dt-overlays and including bootargs specified in cmdline.txt.
So the device tree located at address ${fdt_addr} is the device tree prepared by the Raspberry Pi bootloader. This might be the reason why booting using ${fdt_addr} works. As a consequence, you don't have to necessarily prepare and load a device tree on your own on the Raspberry Pi. You could just reuse ${fdt_addr} in the u-boot booti command as it is already loaded.
If you choose to load your own device tree, compare its contents with the configuration in config.txt (especially the dtoverlay=..). Also check cmdline.txt for bootargs. In your u-boot command list you did not set any bootargs with setenv bootargs ....
As mentioned by sawdust you could use setenv bootargs 'earlycon=uart8250,mmio32,0xfe215040 console=serial0,115200 ...' for getting debug infos on the miniuart serial line.
The setup: An automated test station, built around a Windows 7 PC. The UUT (Unit Under Test) are connected and disconnected often, creating many COM ports.
The Problem: The test is searching for the device at a specific COM port, requiring the user to manually remove the "ghost" com ports.
The question: Since the software is used by several test stations in parallel, at a production floor, I cannot install additional software (e.g. Devcon, part of Windows SDK). Is there a command line option to remove the COM ports?
Based on This blog entry
The only thing that actually worked for me is not the intended solution... But it fit the case at hand:
Created a batch file at C:\windows\system32
The content:
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter" /v ComDB /t REG_BINARY /d 0206 /f
The actual value of the registry key (0206 in my example) can either be read from that key (use regedit) or calculated from binary:
com8 com7 com6 com5 com4 com3 com2 com1 com16 com15 com14 com13 com12 com11 com10 com9
0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0
since I wished to keep com1, com2, com10 and com11 - 0000 0011 0000 0110 - which stand for 0206
executing this batch file will remove the unnecessary comports while leaving the one's I intended
*The batch should be at system32 to be executed as elevated (administrator)
*for more details refer to this PDF
I have 2 PIs with ip 192.168.0.2 and 192.168.0.3. I can password-less ssh to each pi. (I used to have 3001 for ssh port, but now I change it back to 22)
I follow tinkernut's pi cluster tutorial: https://www.tinkernut.com/2014/05/make-cluster-computer-part-2/
I stuck in this part of tutorial: "mpiexec -f machinefile -n 4 hostname"
My command is simply "mpiexec -f machinefile -n 2 hostname"
After running my simple command, the output is:
pi01 (works!)
when it tries to reach pi02, the errors are
host: 192.168.0.2
host: 192.168.0.3
==================================================================================================
mpiexec options:
----------------
Base path: /home/rpimpi/mpi-install/bin/
Launcher: (null)
Debug level: 1
Enable X: -1
Global environment:
-------------------
MAIL=/var/mail/pi
USER=pi
SHLVL=1
HOME=/home/pi
OLDPWD=/home/pi/misc
HUSHLOGIN=FALSE
L1=tty1
LOGNAME=pi
_=./test.sh
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/rpimpi/mpi-install/bin
LANG=en_GB.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
SHELL=/bin/bash
PWD=/home/pi/misc/test
Hydra internal environment:
---------------------------
GFORTRAN_UNBUFFERED_PRECONNECTED=y
Proxy information:
*********************
[1] proxy: 192.168.0.2 (1 cores)
Exec list: hostname (1 processes);
[2] proxy: 192.168.0.3 (1 cores)
Exec list: hostname (1 processes);
==================================================================================================
[mpiexec#pi01] Timeout set to -1 (-1 means infinite)
[mpiexec#pi01] Got a control port string of 192.168.0.2:39681
Proxy launch args: /home/rpimpi/mpi-install/bin/hydra_pmi_proxy --control-port 192.168.0.2:39681 --debug --rmk user --launcher ssh --demux poll --pgid 0 --retries 10 --usize -2 --proxy-id
Arguments being passed to proxy 0:
--version 3.1.4 --iface-ip-env-name MPIR_CVAR_CH3_INTERFACE_HOSTNAME --hostname 192.168.0.2 --global-core-map 0,1,2 --pmi-id-map 0,0 --global-process-count 2 --auto-cleanup 1 --pmi-kvsname kvs_2638_0 --pmi-process-mapping (vector,(0,2,1)) --ckpoint-num -1 --global-inherited-env 15 'MAIL=/var/mail/pi' 'USER=pi' 'SHLVL=1' 'HOME=/home/pi' 'OLDPWD=/home/pi/misc' 'HUSHLOGIN=FALSE' 'L1=tty1' 'LOGNAME=pi' '_=./test.sh' 'TERM=linux' 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/rpimpi/mpi-install/bin' 'LANG=en_GB.UTF-8' 'LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:' 'SHELL=/bin/bash' 'PWD=/home/pi/misc/test' --global-user-env 0 --global-system-env 1 'GFORTRAN_UNBUFFERED_PRECONNECTED=y' --proxy-core-count 1 --exec --exec-appnum 0 --exec-proc-count 1 --exec-local-env 0 --exec-wdir /home/pi/misc/test --exec-args 1 hostname
Arguments being passed to proxy 1:
--version 3.1.4 --iface-ip-env-name MPIR_CVAR_CH3_INTERFACE_HOSTNAME --hostname 192.168.0.3 --global-core-map 0,1,2 --pmi-id-map 0,1 --global-process-count 2 --auto-cleanup 1 --pmi-kvsname kvs_2638_0 --pmi-process-mapping (vector,(0,2,1)) --ckpoint-num -1 --global-inherited-env 15 'MAIL=/var/mail/pi' 'USER=pi' 'SHLVL=1' 'HOME=/home/pi' 'OLDPWD=/home/pi/misc' 'HUSHLOGIN=FALSE' 'L1=tty1' 'LOGNAME=pi' '_=./test.sh' 'TERM=linux' 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/rpimpi/mpi-install/bin' 'LANG=en_GB.UTF-8' 'LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:' 'SHELL=/bin/bash' 'PWD=/home/pi/misc/test' --global-user-env 0 --global-system-env 1 'GFORTRAN_UNBUFFERED_PRECONNECTED=y' --proxy-core-count 1 --exec --exec-appnum 0 --exec-proc-count 1 --exec-local-env 0 --exec-wdir /home/pi/misc/test --exec-args 1 hostname
[mpiexec#pi01] Launch arguments: /home/rpimpi/mpi-install/bin/hydra_pmi_proxy --control-port 192.168.0.2:39681 --debug --rmk user --launcher ssh --demux poll --pgid 0 --retries 10 --usize -2 --proxy-id 0
[mpiexec#pi01] Launch arguments: /usr/bin/ssh -x 192.168.0.3 "/home/rpimpi/mpi-install/bin/hydra_pmi_proxy" --control-port 192.168.0.2:39681 --debug --rmk user --launcher ssh --demux poll --pgid 0 --retries 10 --usize -2 --proxy-id 1
pi01
[mpiexec#pi01] control_cb (/home/pi/Downloads/mpich3/mpich-3.1.4/src/pm/hydra/pm/pmiserv/pmiserv_cb.c:200): assert (!closed) failed
[mpiexec#pi01] HYDT_dmxu_poll_wait_for_event (/home/pi/Downloads/mpich3/mpich-3.1.4/src/pm/hydra/tools/demux/demux_poll.c:76): callback returned error status
[mpiexec#pi01] HYD_pmci_wait_for_completion (/home/pi/Downloads/mpich3/mpich-3.1.4/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c:198): error waiting for event
[mpiexec#pi01] main (/home/pi/Downloads/mpich3/mpich-3.1.4/src/pm/hydra/ui/mpich/mpiexec.c:344): process manager error waiting for completion
Research I done so far:
https://stackoverflow.com/questions/27419782/error-while-executing-mpi
mpiexec checkpointing error (RPi)
MPICH example cpi generates error when it runs on multiple fresh installed vps
I realized that I don’t use switch to connect all PIs, instead of I use wifi dongle for each PI. I ssh to the PI1 itself, this forces to add to know_hosts under .ssh. I did this to PI2 as well. Now I am able exeucte this command: “mpiexec -f machinefile -n 2 hostname”. It outputs “pi01” and “pi02”. If it is still not working, I recommend you back up your .ssh and regenerate a new one.
http://kenpeter.github.io/raspberry/pi/2015/07/13/control-cb-assert-failed.html
I am trying porting openwrt to BBB. And as shown in title, I cannot boot-up openwrt on BeagleBone Black.
If someone have tried to do something on BeagleBone Black(BBB), you must know there are two partitions in its flash or SD card.
The first partition is FAT32 as a boot partition, the second partition is Ext4 as linux root file system.
When I use original files and BINs of Angstrom for BBB, I can start up system.
My work is related to http://wiki.openwrt.org/toh/beaglebone/black#installation
I have done many experiments:
Use BINs and other files, rootfs etc. on snapshot of OPENWRT to replace all the original files. When I power on BBB, I cannot see any log from UART. I think the MLO file on snapshot is wrong.
I modified uEvn.txt only. I can see the log as shown below.
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
438 bytes read in 3 ms (142.6 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading zImage
2051400 bytes read in 238 ms (8.2 MiB/s)
reading am335x-boneblack.dtb
** Unable to read file am335x-boneblack.dtb **
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
gpio: pin 55 (gpio 55) value is 1
** File not found /boot/uImage **
I only replace zImage which on snapshot to my flash.
The log from UART shows that, boot-up flow stopped at
Starting kernel ...
Log shown as below.
U-Boot SPL 2014.01-rc1-00172-ge7e17b0 (Dec 12 2013 - 15:20:09)
reading args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
U-Boot 2014.01-rc1-00172-ge7e17b0 (Dec 12 2013 - 15:20:09)
I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
494 bytes read in 5 ms (95.7 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading zImage
2187584 bytes read in 214 ms (9.7 MiB/s)
reading am335x-boneblack.dtb
25172 bytes read in 11 ms (2.2 MiB/s)
Kernel image # 0x80200000 [ 0x000000 - 0x216140 ]
Starting kernel ...
To this step, I found that the files on snapshot may not suit for BBB.
And after that, I compile my own version of openwrt for BBB. And replace zImage. The issue is still block in starting kernel.
So Is there anybody have some experience for porting openwrt to BBB?
Can you show me what I should do for porting. Or did I do something wrong?
If someone have compiled your own openwrt version for BBB, could you please share your config file to me?
Thanks so much.
Post my uEvn.txtx first:
cat /mnt/p1/uEnv.txt
kernel_file=zImage
fdtfile=am335x-boneblack.dtb
loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file}
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}
console=ttyO0,115200n8
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
uenvcmd=run loadzimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr}
optargs="debug init=/etc/preinit"
OUTPUT from printenv:
arch=arm
baudrate=115200
board=am335x
board_name=A335BNLT
board_rev=00A5
boot_fdt=try
bootcmd=i2c mw 0x24 1 0x3e; run findfdt; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;run nandboot;
bootcount=1
bootdelay=1
bootdir=/boot
bootenv=uEnv.txt
bootfile=zImage
bootpart=0:2
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc mmc 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 400;spl-os-args.raw mmc 80 80;spl-os-image.raw mmc 900 2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part 0 9
dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
ethact=cpsw
ethaddr=7c:66:9d:53:6f:07
fdt_high=0xffffffff
fdtaddr=0x80F80000
fdtfile=am335x-boneblack.dtb
filesize=1f8
findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; if test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi; if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi;
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
kernel_file=zImage
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file}
mmcargs=setenv bootargs console=${console} root=${mmcroot}
mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run mmcloados;fi;fi;
mmcdev=0
mmcloados=run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mtdids=nand0=omap2-nand.0
mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1792k(u-boot),128k(u-boot-spl-os),128k(u-boot-env),5m(kernel),-(rootfs)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} u-boot-spl-os; nand read ${loadaddr} kernel; bootz ${loadaddr} - ${fdtaddr}
nandroot=ubi0:rootfs rw ubi.mtd=7,2048
nandrootfstype=ubifs rootwait=1
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
nfsopts=nolock
optargs="debug init=/etc/preinit"
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootfstype=${mmcrootfstype} ${optargs}
rootpath=/export/rootfs
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
uenvcmd=printenv; run loadzimage; run loadfdt; run mmcargs; bootz ${loadaddr} -
usbnet_devaddr=7c:66:9d:53:6f:07
vendor=ti
ver=U-Boot 2014.01-rc1-00172-ge7e17b0 (Dec 12 2013 - 15:20:09)
Environment size: 4451/131068 bytes
Your output clearly indicates that uBoot was unable to read the device tree binary (am335x-boneblack.dtb). Make sure you have that file in the root of your FAT partition as well. It can be found in the build output: openwrt/bin/omap/dtbs after you make OpenWRT.
I have the following script to start, stop, restart apache2 in my debian 7
#!/bin/sh
### BEGIN INIT INFO
# Provides: apache2
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: apache2
# Description: Start apache2
### END INIT INFO
case "$1" in
start)
echo "Starting Apache ..."
# Change the location to your specific location
/usr/local/apache2/bin/apachectl start
;;
stop)
echo "Stopping Apache ..."
# Change the location to your specific location
/usr/local/apache2/bin/apachectl stop
;;
graceful)
echo "Restarting Apache gracefully..."
# Change the location to your specific location
/usr/local/apache2/bin/apachectl graceful
;;
restart)
echo "Restarting Apache ..."
# Change the location to your specific location
/usr/local/apache2/bin/apachectl restart
;;
*)
echo "Usage: '$0' {start|stop|restart|graceful}"
exit 64
;;
esac
exit 0
When I add the script to update-rc.d I see the following warnings:
root#pomelo:/etc/init.d# update-rc.d apache2 defaults
update-rc.d: using dependency based boot sequencing
insserv: Script jexec is broken: incomplete LSB comment.
insserv: missing `Required-Stop:' entry: please add even if empty.
insserv: missing `Default-Stop:' entry: please add even if empty.
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `jexec'
But I already added Required-Stop and Default-Stop to the script.
Does anybody know how to solve this problem?
The issue is not in your apache2 init script, it is in 'jexec' it says so 'Script jexec is broken'.
That one is missing the Required-Stop and Default-Stop
Had the same issue on my SLES boxen. Don't worry though, even if it shows you these errors, everything still just runs fine!
HTH