robertcnelson / boot-scripts Goto Github PK
View Code? Open in Web Editor NEWJust a bunch of useful scripts placed under /opt/scripts/
Just a bunch of useful scripts placed under /opt/scripts/
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 ?
bbb-eMMC-flasher-eewiki-ext4.sh seems to work,
and ends with the message "eMMC has been flashed: please wait for device to power down"
but there is no attempt to power down the machine.
maybe the message should be changed to...
"eMMC has been flashed: you might power down / halt the device now"
Just wondering... I'd like to try snappy on bb
(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
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
.
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?
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:
$ 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
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)
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.
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
The script is not reusable as the boot script creates a new net persistent udev rule each boot, if the script is used in more than one beagle bone.
Interface scripts do not work if they rely on eth0.
https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/init-eMMC-flasher-v3.sh
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)?
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.
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.
I tried to run - tools/developers/dtc-overlay.sh - but it stops with merge conflicts.
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?
Hi Robert,
May I get a usbflasher image? so I can run your tutorial.
https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/mmc_usbflasher_example.md
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.
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
The halt -f command does not seem to be right in eMMC -> to SD direction does it?
For what reason should i stop the cpu and halt everything?
Can we remove these lines from the scripts?
I am extracting eMMC contents to sdCard on my BBB, when running the sell:
sudo /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh
I got a error:
sed: can't read /tmp/rootfs/boot/uEnv.txt: No such file or directory
Any helps?
Thanks!
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:
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?
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
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 ...
Disk /dev/mmcblk1: 243840 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0
================================================================================
==> 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)
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.
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?
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?
So, after updating, I can no longer find uio_pruss.ko ...
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?
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
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.
https://github.com/jadonk/boot-scripts/blob/master/boot/omap3_beagle.sh#L24
Do you know where this file would be enabled in the image builds?
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
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.
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):
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.
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.
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.
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
What about 9.3 support?
autoconfigure_usb0.sh said there is no ifconfig.
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?
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.
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>
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.
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
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"
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
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.
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!
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)
Hi,
I have an A5C BBB. Would this script work to put the right (2 GB) Debian OS on the eMMC?
https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/init-eMMC-flasher-v3.sh
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.