Code Monkey home page Code Monkey logo

boot-scripts's People

Contributors

abhishek-kakkar avatar ansarid avatar atsushinemoto avatar bjornborg avatar cdsteinkuehler avatar codingwithclass avatar dlech avatar hlapp avatar iainahunter avatar jadonk avatar jallwine avatar jcwren avatar josegoncalves avatar ka6sox avatar knaldgas avatar markayoder avatar ncicek avatar pdollo avatar petelawler avatar pillar1989 avatar rakoskr6 avatar robamu avatar robertcnelson avatar siriobalmelli avatar skladd avatar slamont avatar stephanecharette avatar strawsondesign avatar thatwileyguy avatar ycdtosa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boot-scripts's Issues

beaglebone-black-make-microSD-flasher-from-eMMC.sh Will not work with 4.1.x kernels

This may help others that are debugging this issue.

As mentioned in this thread https://groups.google.com/forum/#!category-topic/beaglebone/AGuWaV4sdKo

When you use the updated boot-scripts : beaglebone-black-make-microSD-flasher-from-eMMC.sh to create a 'clone' of your 4.1.x system it does not boot into the root filesystem properly.

Why would you use kernel 4.1.x instead of 4.4.x ? Because it came installed in my industrial beaglebone.

Pocket Beagle Generic Boot script

I'm trying to minimize the boot time on the pocket beagle while still retaining ssh capabilities. Generic boot script (and dev-mmcblk0p1, but that is the SD card, correct?) takes a ton of time, 35 seconds on average. I was reading on another post that you can get rid of the am335x_evm.sh call in generic-startup.sh, but to keep the serial capabilities you were referencing an .conf file that doesn't exist on the pocket beagle. What would be the best way to resolve this?

bbb-eMMC-flasher-eewiki-ext4 not working on ti-linux-rt-4.4.y kernel

With ti-linux-kernel-dev repo ti-linux-rt-4.4.y branch, the bbb-eMMC-flasher-eewiki-ext4.sh script stopped working.

The following happens:

debian@arm:/opt/scripts/tools/eMMC$ sudo ./bbb-eMMC-flasher-eewiki-ext4.sh
-----------------------------
Version: [1.20160113: upgrade backup u-boot: v2016.01-r5...]
-----------------------------
Checking for Valid BBB EEPROM header
debian@arm:/opt/scripts/tools/eMMC$

After debugging the script I found a solution:

bbb-eMMC-flasher-eewiki-ext4.sh line 118:
eeprom_location=$(ls /sys/devices/ocp*/44e0b000.i2c/i2c-0/0-0050/eeprom 2> /dev/null)

It seems the ocp directory is moved from /sys/devices/ocp to /sys/devices/platform/ocp.
After correcting the path, the flasher script worked perfectly.

Anybody can validate this?

beaglebone-black-make-microSD-flasher-from-eMMC.sh errors

hello,

I get a lot of errors when running the beaglebone-black-make-microSD-flasher-from-eMMC.sh script.
Most of the errros are like below.
what can be a reason for this kind of error?

ERROR: sys/power/image_size failed verification -- update discarded.

the summary at the end is like below

Final System Tweaks:
sed: can't read /tmp/rootfs/boot/uEnv.txt: No such file or directory
beaglebone-black-make-microSD-flasher-from-eMMC.sh: 351: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/boot/uEnv.txt: Directory nonexistent
UUID=7d5529f0-129a-4a00-b0c0-49ea3860a079
Generating: /etc/fstab
beaglebone-black-make-microSD-flasher-from-eMMC.sh: 367: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent
beaglebone-black-make-microSD-flasher-from-eMMC.sh: 368: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent
beaglebone-black-make-microSD-flasher-from-eMMC.sh: 369: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent
beaglebone-black-make-microSD-flasher-from-eMMC.sh: 370: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent
cat: /tmp/rootfs/etc/fstab: No such file or directory
/boot/uEnv.txt: enabling eMMC flasher script
beaglebone-black-make-microSD-flasher-from-eMMC.sh: 375: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/boot/uEnv.txt: Directory nonexistent
cat: /tmp/rootfs/boot/uEnv.txt: No such file or directory

umount: /tmp/rootfs/: not mounted
umount: /tmp/rootfs/: not mounted
writing to [/dev/mmcblk1] failed...

Syncing: /dev/mmcblk1
100000+0 records in
100000+0 records out
51200000 bytes (51 MB) copied, 2.43149 s, 21.1 MB/s
Syncing: /dev/mmcblk1 complete

umount: /tmp: not mounted
umount: /tmp: not mounted
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=59232,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=100788k,mode=755)
/dev/mmcblk0p1 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
eMMC has been flashed: please wait for device to power down.

Halting.

autoconfigure_usb0.sh udhcpd detection fails when udhcpd uninstalled and replaced with dnsmasq

boot-scripts/boot/autoconfigure_usb0.sh

Not critical, but if someone were to do a typical apt-get uninstall udhpd, the system will keep the /etc/defaults/udhcpd folder around. Since that is what is used for detecting if udhcpd is installed, this script will then fail when it runs even when dnsmasq has been installed as a replacement.

Don't know if grep'ing the dpkg --list is too heavy, but it would serve as a more accurate detection method.

The current work around is to manually delete the /etc/defaults/udhcpd folder after uninstalling udhcpd.

grow_partiton.sh not working on ubuntu 16.04

Seems like --in-order --Linux and -uM is deprecated on 16.04

ubuntu@arm:/opt/scripts/tools$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Xenial Xerus (development branch)
Release:    16.04
Codename:   xenial

ubuntu@arm:/opt/scripts/tools$ sudo ./grow_partition.sh
Media: [/dev/mmcblk0]
sfdisk: unrecognized option '--in-order'

Usage:
 sfdisk [options] <dev> [[-N] <part>]
 sfdisk [options] <command>

default gateway not working on usb0

Hi Robert,

Thanks for your work.

I am playing around with the PocketBeagle. I am ssh'ing over usb0, and at the moment I have to type:

sudo ip route add default via 192.168.7.1
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf

in order to get internet access on the PocketBeagle.
This is despite my /etc/network/interfaces file containing:

iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.0
    gateway 192.168.7.1
    dns-nameservers 8.8.8.8

I can get around the resolv.conf issue by disabling connman:

sudo systemctl disable connman.service

but cannot figure out how to set the default gateway. I am guessing the problem is with autoconfigure_usb0.sh?

Any suggestions would be greatly appreciated.

Thanks,

Ben

version.sh should check the CONTROL_STATUS register to determine which SPL was run

It would be of great help in supporting people to know what boot mode was configured and exactly which SPL was executed on a specific boot cycle. At least the boot mode can be figured by reading the CONTROL_STATUS register (0x44E10040):

  • Bits 7:0 will reflect what the processor read on SYSBOOT[7:0]
  • Bit 16:23 will reflect what the processor read on SYSBOOT[15:8]

The actual SPL executed might be possible to determine, but I'm not currently aware of how to do it.

Grabbing the SYSBOOT status and putting the boot order in the output of version.sh will help in some debugging instances.

BBB Proper way to enable and use eth0

I am attempting to use eth0 on BBB. I added the following in /etc/network/interfaces file
auto eth0 iface eth0 inet dhcp dns-nameservers 8.8.8.8 8.8.4.4

I can then ping 8.8.8.8 but did not succeed to ping google.com unless if I remove dnsmasq.

It seems that network configuration is done in am335x_evm.sh script but I am a little bit lost on how to use it to enable dns resolution on eth0.

eMMC flasher fails with 4.4.110 on Beaglebone black

The Debian stretch IoT image comes with 4.4.91-ti-r133. I updated the kernel to 4.4.110 with kernel build from the github Beagleboard kernel repo and use the am335x-boneblack-custom.dtb with some changes of my own. All of this was while booting of the MicroSD card. Since the eMMC had an older image and wanting to update, while trying to use the eMMC flasher script, the flashing process failed. It seemed to be not able to determine the root_drive as it could not find /proc/cmdline in find_root_drive in functions.sh. Somehow it seems proc is not mounted by default. I used the kernel compiled with bb.org_defconfig and additional charger config enabled.

At first I suspected something is wrong with my device tree, but, using the device tree with 4.4.91 did not result in problems. But, using 4.4.110 kernel results in /proc being empty.

I had to add a manual mount proc command before the check for /proc/cmdline for it to work. boot-scripts is latest with last commit being 5935e83.

minicom log of flashing failure is attached.
minicom-custom2.log

Has anyone experience a similar issue?

boot-scripts/device/bone/capes/DLPDLCR2000/structured_light won't compile

Hi,
I just set up a BeagleBone with TI's DLP2000 DMD. In my case the Makefile in /opt/scripts/device/bone/capes/DLPDLCR2000/structured_light would not compile.

I changed display_core.h and display_core.c by removing the inline before the pixel_color function. Now it compiles!

Maybe someone else has the same problem and would be happy to find this solution in the README. The changed files are attached.

display_core.h.txt
display_core.c.txt

Do the current generation of boot-scripts/tools/eMMC scripts also clone the uboot partition?

Just want to clarify that cloning the SD card to the eMMC will also update the uboot partition with whatever version is on the SD card.

It is my understanding that the eMMC boot loader is always used unless the button on the beaglebone is pressed to change the boot order. Thus if updating the boot loader, for my customers using SD cards, I believe they will need to go ahead and flash the eMMC to get the boot loader changes.

Make SSH key regeneration optional?

After writing the SD card contents to the internal flash using init-eMMC-flasher-v3.sh, I was surprised that the SSH host key had changes. Looking at the scripts, this seems intentional.

Thinking about it, it makes sense when you use a single SD card for multiple boards. However, in my setup, I usually only flash once from an SD card. I start with a clean install on SD, then tweak it until I am satisfied, and once I am, I flash it to the eMMC and clear the SD card.

For my usecase (which I suspect others will also share), it would be good if the SSH-key reset (and, as I learned later, the macine-id reset which piggy-backs on the SSH-key reset) would be optional. It should probably be enabled by default, but some way to disable it would be good (a commandline option seems sensible, except that no options are supported so far)?

beaglebone-black-eMMC-flasher.sh fails on Debian 8.7 2017-03-19 4GB SD IoT image from beaglebone.org

When running the /opt/script/tools/beaglebone-black-eMMC-flasher.sh script, I am getting the message:

"Error: script halting, system unrecognized..."

This is with the beaglebone.org recommended image: Debian 8.7 2017-03-19 4GB SD IoT
I have cd'd to /opt/script/tools and run git pull to make sure I have the freshest version of the scripts.

Diving into the script code: lines 32-33 determine the boot drive by using the lsblk command. However, lsblk -l doesn't output what the script is looking for. There has been a change somewhere (in the lsblk command output, or the default layout of the system partitions?)
Because the boot drive can't be determined by the lsblk method on this newest system, the script fails.

There are probably other ways to detect the boot drive, but maybe not as robustly? This is a handy script for cloning beaglebone images when a person has a few beaglebones to manage and keep up to date, so it's something I'd love to continue to be able to use (without having to resort to horrible local hacks.) :-)

Thanks,

Curt.

WIFI AP

Ok, im trying to figure out where this is happening, but on start up it constantly sets the wifi back to BeagleBone-xxxx for the access point, even if i comment out the section in am335x_evm.sh am i missing a second place?

this is a little more frustrating as its also decided to not let me enable tethering afterwords (Tethering not supported for wifi)

This is on a BBGW

root@beaglebone:/boot/dtbs# cat /etc/debian_version
8.7
root@beaglebone:/boot/dtbs# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

I had fixed this before by doing a delayed command to just force it back to what i wanted... but i copied the SD card and it no longer works (that part confuses me more)

BeagleBone Black and Green running Amazon Greengrass IOT

Hi,

/etc/fstab needs a cgroups entry to run Amazon's IOT Greengrass core like this:-

cgroup /sys/fs/cgroup cgroup defaults 0 0

The flasher creates its fstab afresh and does not add/copy this line from the old fstab so a newly flashed BB Greengrass device has to be manually edited again to add the line. We solved this by adding the following line to init-eMMC-flasher-v3.sh

echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /tmp/rootfs/etc/fstab

between these two lines in functions.sh (see line 972/3

echo "debugfs  /sys/kernel/debug  debugfs  defaults  0  0" >> ${tmp_rootfs_dir}/etc/fstab
echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> ${tmp_rootfs_dir}/etc/fstab
	echo_broadcast "===> /etc/fstab generated"

Proper way to disable the getting_started image.

Hi. I would like to have control of the image file loaded when the BB is plugged via USB.
That control would ideally allow me to disable the feature entirely.

so here is the question:

What is the proper way to disable loading the image file, if any?
Also, it feels safe to just remove the image files. Am i right?
Would that be enough?

Also, I am aware of issue #63, and i would not mind working on that.

having /etc/default/bb-boot
( content is uppercase just like /etc/default/bb-wl18xx )

# USB_IMAGE_FILE_DISABLED
# default value  which means the usb_image_file will be loaded.
# expected values "yes" to disable loading the image_file.
USB_IMAGE_FILE_DISABLED=yes

and maybe

# USE_USB_IMAGE_FILE=/full/path/to/image/file.img
# set the path to the file that should be loaded.
# if the file does not exist, an error will be logged unless USB_IMAGE_FILE_DISABLED=yes
# any auto-detected value will be ignored and this one will be used instead, if present.

For what i have seen so far, most of the work is done at the am335x_evm.sh script.
and it has to do with the usb_image_file variable in that file.

IIUC the variable value is being changed based on board detected,
and the default value of usb_image_file is discarded,

Those values can be (auto-detected) to any of the following:
/var/local/bb_usb_mass_storage.iso | .img
/var/local/bbg_usb_mass_storage.iso | .img
/var/local/bbgw_usb_mass_storage.iso | .img

it will finally log the selected file.
from there use_libcomposite() takes care of the rest....

So i would not change anything until use_libcomposite()
there i would check those to variables and use them if these are set.

beaglebone-black-make-microSD-flasher-from-eMMC.sh does not write anything to microSD

When I attempt to create a backup of eMMC to a microSD card, I am left with a blank microSD.

base image:
bone-debian-9.3-iot-armhf-2018-03-05-4gb.img.xz

$ uname -a
Linux smartmold 4.9.82-ti-r102 #1 SMP PREEMPT Thu Feb 22 01:16:12 UTC 2018 armv7l GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.4 (stretch)
Release: 9.4
Codename: stretch

Do not see errors when running script.
make_microsd.txt
make_microSD_more.txt

BBmicroSDflasher "rsync: link_stat "/boot/uboot/*" failed: No such file or directory (2)"

Hey,
Encountered following issue when trying to run the microSD flasher script. Up to this point no errors were encountered. At the last line terminal stalls.

beagleboard version:
BeagleBoard.org Debian Image 2015-11-12

================================================================================
Partitionning /dev/mmcblk1

==> sfdisk parameters:
sfdisk: [sfdisk --force --Linux --in-order --unit M /dev/mmcblk1]
sfdisk: [1,96,0xE,*]
sfdisk: [97,,,-]
==> Partitionning

Checking that no-one is using this disk right now ...
OK

Disk /dev/mmcblk1: 243840 cylinders, 4 heads, 16 sectors/track

sfdisk: ERROR: sector 3069768701 does not have an msdos signature
/dev/mmcblk1: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System
/dev/mmcblk1p1 * 1 96 96 98304 e W95 FAT16 (LBA)
/dev/mmcblk1p2 97 7619 7523 7703552 83 Linux
/dev/mmcblk1p3 0 - 0 0 0 Empty
/dev/mmcblk1p4 0 - 0 0 0 Empty
Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

==> Partitionning Completed
==> Generated Partitions:

Disk /dev/mmcblk1: 243840 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk1p1 * 32 3103 3072 98304 e W95 FAT16 (LBA)
/dev/mmcblk1p2 3104 243839 240736 7703552 83 Linux
/dev/mmcblk1p3 0 - 0 0 0 Empty
/dev/mmcblk1p4 0 - 0 0 0 Empty

================================================================================

================================================================================
Preparing future /boot to receive files

==> Formatting boot partition with mkfs.vfat -F 16 /dev/mmcblk1p1 -n BEAGLEBONE

mkfs.vfat 3.0.13 (30 Jun 2012)

==> Formatting boot: /dev/mmcblk1p1 complete
==> Creating temporary boot directory (/tmp/boot)
==> Mounting /dev/mmcblk1p1 to /tmp/boot

================================================================================

================================================================================
Copying boot: /dev/mmcblk0p1 -> /dev/mmcblk1p1
==> rsync: /boot/uboot/ -> /tmp/boot
sending incremental file list
rsync: link_stat "/boot/uboot/*" failed: No such file or directory (2)

sent 12 bytes received 12 bytes 48.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]
writing to [/dev/mmcblk1] failed...
==> Stopping Cylon LEDs ...
==> Setting LEDs to
./functions.sh: line 385: 6809 Terminated cylon_leds

Simple Readme

Any chance you have a simple readme on this script? I tried running everything, but wasn't sure when if it completed. Cylon leds ran without stopping. Using ftdi terminal it appears that it completed, but when I pulled card and tried to install on another BBB no luck.

suggestion: do not force udhcpd to be dedicated to USB0 on BBB

Greetings,

Your debian distro is fantastic -- thank you!

However I'd like to use 99.999% of your setup except I want to use DHCP for wifi instead of the usb ethernet gadget.

But your script forces the default for UDHCPD to be enabled, on every boot. I guess I can 'repair' this from a cron @reboot or other means but you probably have a better idea, like maybe an Env.txt option???

Thanks for your consideration,

William

ps: you may not have noticed but your script adds an extra "#" in front of DHCPD_ENABLED on every boot. For example, mine has #####DHCPD_ENABLED="no" at the moment.

update_kernel.sh: ti-sgx-es8-modules not found

I'm trying to update the kernel on a Beaglebone Black and ran into an issue where it is unable to locate the package ti-sgx-es8-modules-4.6.4-bone3. I've included the script output below.

sudo /opt/scripts/tools/update_kernel.sh --beta --bone-channel

info: checking archive
2016-07-27 00:47:46 URL:https://rcn-ee.com/repos/latest/jessie-armhf/LATEST-omap-psp [140/140] -> "LATEST-omap-psp" [1]
-----------------------------
Kernel Options:
ABI:1 LTS41 4.1.28-bone22
ABI:1 LTS44 4.4.15-bone11
ABI:1 STABLE 3.8.13-bone80
ABI:1 TESTING 4.6.4-bone3
ABI:1 EXPERIMENTAL 4.7.0-rc7-bone0
-----------------------------
info: you are running: [4.4.12-ti-r31], latest is: [4.6.4-bone3] updating...
Ign http://repositories.sensuapp.org sensu InRelease
Hit http://repositories.sensuapp.org sensu Release.gpg                                                                                                        
Hit http://repositories.sensuapp.org sensu Release                                                                                                            
Hit http://repos.rcn-ee.com jessie InRelease                                                                                                                  
Hit http://repo.mosquitto.org jessie InRelease                                                                                                                
Hit http://security.debian.org jessie/updates InRelease                                     
Get:1 http://repositories.sensuapp.org sensu/main armhf Packages [2,220 B]
Get:2 http://repos.rcn-ee.com jessie/main armhf Packages [544 kB]                                 
Hit http://httpredir.debian.org jessie-updates InRelease                                                                                                 
Ign http://httpredir.debian.org jessie InRelease                                                                                                         
Get:3 http://repo.mosquitto.org jessie/main armhf Packages [2,186 B]                                  
Hit http://httpredir.debian.org jessie Release.gpg                                                            
Hit http://httpredir.debian.org jessie Release                                                                
Get:4 http://security.debian.org jessie/updates/main armhf Packages [357 kB]    
Hit https://deb.nodesource.com jessie InRelease                                      
Hit https://deb.nodesource.com jessie InRelease                                      
Get:5 http://security.debian.org jessie/updates/contrib armhf Packages [994 B]            
Get:6 http://security.debian.org jessie/updates/non-free armhf Packages [20 B]
Get:7 http://httpredir.debian.org jessie-updates/main armhf Packages [17.6 kB]
Get:8 http://httpredir.debian.org jessie-updates/contrib armhf Packages [20 B]                 
Get:9 http://httpredir.debian.org jessie-updates/non-free armhf Packages [450 B]
Get:10 http://httpredir.debian.org jessie/main armhf Packages [8,832 kB]    
Get:11 https://deb.nodesource.com jessie/main armhf Packages [981 B]                                       
Get:12 https://deb.nodesource.com jessie/main Sources [762 B]                         
Get:13 http://httpredir.debian.org jessie/contrib armhf Packages [44.7 kB]                 
Get:14 https://deb.nodesource.com jessie/main armhf Packages [965 B]    
Get:15 http://httpredir.debian.org jessie/non-free armhf Packages [74.6 kB]                                                                                   
Fetched 9,879 kB in 14s (683 kB/s)                                                                                                                            
Reading package lists... Done
Checking dpkg...
Checking apt-cache...
debug: reinstalling: [linux-image-4.6.4-bone3]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 11 not upgraded.
Need to get 21.9 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://repos.rcn-ee.com/debian/ jessie/main linux-image-4.6.4-bone3 armhf 1jessie [21.9 MB]
Fetched 21.9 MB in 2min 12s (165 kB/s)                                                                                                                        
(Reading database ... 47165 files and directories currently installed.)
Preparing to unpack .../linux-image-4.6.4-bone3_1jessie_armhf.deb ...
Unpacking linux-image-4.6.4-bone3 (1jessie) over (1jessie) ...
Setting up linux-image-4.6.4-bone3 (1jessie) ...
update-initramfs: Generating /boot/initrd.img-4.6.4-bone3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ti-sgx-es8-modules-4.6.4-bone3
E: Couldn't find any package by regex 'ti-sgx-es8-modules-4.6.4-bone3'
update-initramfs: Generating /boot/initrd.img-4.6.4-bone3

Tagged releases

(I realised that this issue may not be the right place but I am at a loss where else to start so here goes) I wonder if tagged releases would be a good idea.

The context of this question, I am using console images eg version A[1]. Occasionally a new stable build is updated at [1] eg version B. Is there any visibility as to which additional commits of boot-scripts go into the new stable build?

The use case is: I do not want to keep changing the console image that I use for customisation, ie keep chasing the latest stable build. So I may want to selectively pull commits to version A.

So ideally, I want a LTS console image, with the option to pull in commits for boot-scripts that are stable fixes via git.

[1] http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Jessie_Snapshot_console

update_kernel.sh --lts-4_4 --bone-rt-channel

Hello, I've installed debian stretch, I wanted to update to the realtime kernel patch using the update_kernel with:

sudo ./update_kernel.sh --lts-4_4 --bone-rt-channel

after the reboot, no leds after the bootloader, dmesg gives me:

[   11.087103] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.107135] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.108338] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.109080] leds_gpio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.110075] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.141427] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.171321] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.210816] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.217997] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.248942] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.264872] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.289087] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.315477] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.392396] uio: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.564507] tda998x: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
[   11.587196] evdev: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)

I guess the kernel modules should be recompiled or updated. By searching around it seems an ABI problem, from where could I update the kernel without having this issue?

Cannot boot from SDcard on BBB rev. A5A board

Hello,

I'm resurrecting an A5A rev. board that boots fine to Angstrom Linux on the 2GB eMMC.

I've tried the latest 'small image' versions of Debian and Ubuntu:

  • bone-debian-9.9-console-armhf-2019-05-12-1gb.img.xz
  • bone-ubuntu-18.04.2-console-armhf-2019-04-10-2gb.img.xz

I used xzcat <image> | dd of=/dev/sda to write both. And neither can boot, I get the following on the serial port:

U-Boot SPL 2019.04-00002-gc8b5ad3a1f (Apr 16 2019 - 09:21:31 -0500)
Trying to boot from MMC1
Loading Environment from EXT4... ** No partition table - mmc 0 **

I tried on several SDHC cards to no avail.

Seems that the bootloader is getting confused between MMC1 and MMC0. I can't even get to the u-boot boot menu. I renamed the MLO file on the eMMC, so I can't even boot from the eMMC anymore.

Any pointers to how I can fix this?

Thanks,

Clément

./update_kernel.sh not working

Hi RCN!

When i first installed Ubuntu on the BeagleBoneBlack, I also reverted back to the 3.8.13-bone68 kernel via your script. All was well but recently I noticed two things that changed in the system after a while:

  1. When I first installed the 3.8.13-bone68 kernel, the eqep driver and device where visible in /dev and and /sys but now for some reason they are not.
  2. For the issue in 1., I thought maybe using the update_kernel.sh script again to re-install the kernel may fix the problem, but this has the following problem. When I run:

$ sudo ./update_kernel.sh --kernel 3.8.13-bone68
syncing local clock to pool.ntp.org

Nothing happens. Only the ntpdate related message is shown, but nothing else happens.

Any help would be much appreciated.

Best regards,

Vassilis

Files in /boot/uboot not getting updated

Hi Robert,

in a previous comment you told me that:

In our case, when you install a linux-image-*.deb, we have a postinstall script to manually update the files under /boot/uboot/ when present:

https://github.com/rcn-ee/repos/blob/master/bb-bb-customizations/suite/jessie/debian/zz-uenv_txt

Regards,

I'm trying to understand if I'm doing something wrong, if there is a bug or if I simply misunderstood. When I launch '/opt/scripts/tools/update_kernel.sh' the files in /boot/uboot doesn't get updated as they should based on my understanding of your previous comment.

See this pastebin : http://pastebin.com/te130LG6

Is there something I'm missing ?

Latest beaglebone-black-make-microSD-flasher-from-eMMC.sh

I have just used the beaglebone-black-make-microSD-flasher-from-eMMC.sh script as I have done many times before but did a git pull before hand to grab the latest code.

The script runs fine with no problems and creates an SD card that is bootable. However this then seems to just boot into the SD Card and not a flasher. No cylon LED's and no flashing of the eMMC appears to be taking place at all.

To fix I went into the booted clone and found that in the /boot/uEnv.txt the script was disabled and had a # before it. I removed this and it seemed to then boot into the flasher

@RobertCNelson

Please allow option to disable boot-scripts control of networking/DNS

Hi,
I am trying to install pi-hole on the BBB. Unfortunately, scripts like am335x_evm.sh make strong assumptions about what kind of DNS services I want to set up and auto-generate at boot a conflicting dnsmasq configuration file 'SoftAp0'.

Could you please think about using some configuration file that allows me to override these kind of behaviors and use my own choice of DHCP or DNS servers? Maybe add a script to get rid of the bonescript server / DHCP connections over USB? I can always edit out things but this could be cleaner.

Thanks for your work!

EEprom header check fails on 3.19 ish and later kernels

If I try to use a newer-ish kernel (like the 3.19.3-bone4 version, which I seem to need for a GSM modem to work properly), the init-eMMC-flasher-v3.sh script fails with the following:

  • '[' 'xChecking for Valid BBB EEPROM header' '!=' x ']'
  • echo 'Checking for Valid BBB EEPROM header'
    Checking for Valid BBB EEPROM header
  • echo 'Checking for Valid BBB EEPROM header'
    ++ ls '/sys/devices/ocp*/44e0b000.i2c/i2c-0/0-0050/eeprom'
  • eeprom_location=
    [ 10.292591] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
    [ 10.292591]
    [ 10.307525] CPU: 0 PID: 1 Comm: init-eMMC-flash Not tainted 3.19.3-bone4 #1
    [ 10.317376] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 10.326418] from
    [ 10.337127] from
    [ 10.346955] from
    [ 10.356583] from
    [ 10.366728] from
    [ 10.377481] from
    [ 10.388387] drm_kms_helper: panic occurred, switching back to text console
    [ 10.398173] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
    [ 10.398173]
    [ 63.252421] random: nonblocking pool is initialized

Does this require changes to detect some new access method for the eeprom header, or does it require the ocp driver to be ported to 3.19ish kernels?

Can't clone SD card to eMMC

I've tried the "init-emmc-flasher-v3-bbg.sh" while adding the required "cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3-bbg.sh" to /boot/uEnv.txt and it seems to skip over this and boot up normally without ever copying files over to the eMMC.
I've also tried running the "sudo ./bbb-eMMC-flasher-eewiki-ext4.sh" to clone the SD card over to the eMMC but I end up with the following error:

-----------------------------
Starting eMMC Flasher from microSD media
Version: [1.20160222: deal with v4.4.x+ back to old eeprom location...]
-----------------------------
Checking for Valid bbg-eeprom header
Valid bbg-eeprom header found [335]
-----------------------------
copying: [/dev/mmcblk0] -> [/dev/mmcblk1]
lsblk:
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0   1.9G  0 disk 
└─mmcblk0p1 179:1    0   1.9G  0 part /
-----------------------------
df -h | grep rootfs:
-----------------------------
Error: [/dev/mmcblk1] does not exist
writing to [/dev/mmcblk1] failed...

I'm not sure if I'm not putting the files in the right places or not setting the options up correctly

update_kernel.sh not installing overlays

After v3.8.13-bone54 the install-me.sh script stopped downloading and copying the compiled overlays. Is there any particular reason for this? It seemed to me like the best way to distribute updates to overlays.

Sorry if this is not the best place to ask, I couldn't figure out if that install-me.sh script came from another repo.

generic-board-startup.service takes a long time to run, contributing to slow boot time.

Hello,

I'm currently attempting to decrease the boot time of a Beaglebone Black for use in an industrial situation where boot times are important.

Running systemd-analyze plot shows that generic-board-startup service (which i believe runs eventually runs, am35xx_evm.sh) takes a significant time to run, around 4.5 seconds. Upon reducing the sleep statements in am335x_evm.sh and generic-startup.sh I've got this time down to 2.5 seconds but still wish to reduce this time further. Do you have any suggestions?

I have tried disabling this service from starting at all, but this appears to disable the serial console, meaning I am unable to login to the board.

Thanks.

SoftAp0 causes wrong DNS resolution

I'm using Ubuntu image for BeagleBone Black.
Because of this script /opt/scripts/boot/am335x_evm.sh, the file /etc/dnsmasq.d/SoftAp0 is added and makes every domain translated to 172.1.8.1!
This breaks apt.

Cannot boot flashed BBB from beaglebone-black-make-microSD-flasher-from-eMMC.sh

I have used beaglebone-black-make-microSD-flasher-from-eMMC.sh for quite some time and I have just come to update an image I was using.

I updated to the latest scripts in this repo and managed to create an SD card flasher as per normal.

The SD card on a new BBB boots and appears to flash the BBB all ok. However when it then does it's first "flashed" boot it halts with the following...

Trying to boot from MMC2


U-Boot 2016.11-rc3-00002-g73df7f7 (Nov 04 2016 - 15:20:36 -0500), Build: jenkins-github_Bootloader-Builder-479

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
Net:   eth0: MII MODE
cpsw
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
380 bytes read in 21 ms (17.6 KiB/s)
Loaded environment from /boot/uEnv.txt
debug: [dtb=am335x-boneblack-emmc-pf-overlay-pps.dtb] ...
Using: dtb=am335x-boneblack-emmc-pf-overlay-pps.dtb ...
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.1.15-ti-r41 ...
8304880 bytes read in 554 ms (14.3 MiB/s)
loading /boot/dtbs/4.1.15-ti-r41/am335x-boneblack-emmc-pf-overlay-pps.dtb ...
57631 bytes read in 46 ms (1.2 MiB/s)
loading /boot/initrd.img-4.1.15-ti-r41 ...
4573448 bytes read in 316 ms (13.8 MiB/s)
debug: [console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M quiet] ...
debug: [bootz 0x82000000 0x88080000:45c908 0x88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8fba3000, end 8ffff908 ... OK
   Loading Device Tree to 8fb91000, end 8fba211e ... OK

Starting kernel ...

[    3.759210] cpu cpu0: cpu0 clock notifier not ready, retry
[    3.897748] bone_capemgr bone_capemgr: slot #0: No cape found
[    3.957671] bone_capemgr bone_capemgr: slot #1: No cape found
[    4.017667] bone_capemgr bone_capemgr: slot #2: No cape found
[    4.077668] bone_capemgr bone_capemgr: slot #3: No cape found
Loading, please wait...
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/mmcblk1p1 does not exist.  Dropping to a shell!
modprobe: module i8042 not found in modules.dep
modprobe: module ehci-orion not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep
modprobe: module ohci-hcd not found in modules.dep


BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) 

Wifi SSID replacement

Have an issue. Setting the Wifi tether name via connman breaks the USB tether interface. the computer connects and get's an IP address, but none of the webui(Cloud9, default .local address, direct IP access, or node-red) works when that's done. The Wifi SSID change persists, but nothing connected directly works any longer.

I was looking for ways to change the SSID and ran across this in the startup script in /opt/scripts/boot. I'm not sure if this is whats affecting it or some other portion.

This code block:
`if [ -f /var/lib/connman/settings ] ; then
wifi_name=$(grep Tethering.Identifier= /var/lib/connman/settings | awk -F '=' '{print $2}' || true)

#Dont blindly, change Tethering.Identifier as user may have changed it, just match ${wifi_prefix}
if [ "x${wifi_name}" = "x${wifi_prefix}" ] ; then
	ssid_append=$(echo ${cpsw_0_mac} | cut -b 13-17 | sed 's/://g' || true)
	if [ ! "x${wifi_name}" = "x${wifi_prefix}-${ssid_append}" ] ; then
		if [ ! "x${wifi_name}" = "x${wifi_prefix}-${ssid_append}" ] ; then
			systemctl stop connman.service || true
			sed -i -e 's:Tethering.Identifier='$wifi_name':Tethering.Identifier='$wifi_prefix'-'$ssid_append':g' /var/lib/connman/settings
			systemctl daemon-reload || true
			systemctl restart connman.service || true
		fi
	fi
fi

if [ -f /etc/systemd/system/network-online.target.wants/connman-wait-online.service ] ; then
	systemctl disable connman-wait-online.service || true
fi

fi`

One thing i did notice is that
if [ ! "x${wifi_name}" = "x${wifi_prefix}-${ssid_append}" ] ; then if [ ! "x${wifi_name}" = "x${wifi_prefix}-${ssid_append}" ] ; then

Is layered even though it's the same exact condition? is it possibly that a portion of this should be outside of the condition that's causing the wifi to stop work?

BBB flash from eMMC to SD not running completely

Scripts exits with error code 32 in line 398 due to an umount command of a directory which is not mounted.

Umount of a directory which is not mounted:
https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh#L398

It seems like a copy and paste error from https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/init-eMMC-flasher-v3.sh

But there is a tmpfs mounted in line [47](It seems like a copy and paste error from https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/init-eMMC-flasher-v3.sh#L47) which is missing in BBB flasher.

I was not sure how to fix it, if i had to add a mount to a tmpfs or remove the umount of temp.

dd: failed to open ‘’: No such file or directory

I am trying to run the script beaglebone-black-make-microSD-flasher-from-eMMC.sh and it shows me the following error.

> Writing bootloader to [/dev/mmcblk0]
> ----------------------------------------
> ==> Figuring out options for SPL U-Boot copy ...
> ===> Will use :
> ==> Figuring out options for U-Boot copy ...
> ===> Will use :
> ==> Copying SPL U-Boot with dd if= of=/dev/mmcblk0
> ------------------------------------------------------------
> dd: failed to open ‘’: No such file or directory
> Traceback (last called is first):
>      _dd_bootloader() in ./functions.sh:801
>      prepare_drive_reverse() in ./functions.sh:1432
>      main() in ./beaglebone-black-make-microSD-flasher-from-eMMC.sh:37
> The command dd if=${dd_spl_uboot_backup} of=${destination} ${dd_spl_uboot} exited with exit c                                                                                                 ode 1.

Should make any changes to the script functions.sh ?
Thanks,
Rohit

writing to [/dev/mmcblk1] failed

Can anyone advise on why I'm getting the following error message - I'm trying to flash the Debian image to a BeagleBone Black using a brand new MicroSD and an image written using Etcher on a Mac and a Linux laptop:

==> rsync: / -> /tmp/rootfs

writing to [/dev/mmcblk1] failed

...and that's all the error logging I get.

Any ideas? Or should I just dump the BeagleBoard in the trash and get another Pi?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.