Commit b8794df1 authored by Jonathan Currier's avatar Jonathan Currier

Buildroot 2020.05 has some changes to openrc so adapt the files to work

with it.

Also add a ChangeLog
parent 75da0457
2020-09-09 Jonathan Currier <>
* Breaking changes:
the update user no longer allows buildroot to auto assign uid/gui, and
is now hard coded to 768/768. Reason is that auto assigned id can
change, however people may reasonably use the dev-data partion to have
update user/group files, which would randomly and supprisngly break.
This update should prevent future breakage (but can't prevent this
* Buildroot 2020.05.x now recommended, 2019.08 may not work well or at all.
* Notable improvments:
usb-ecm now only uses a random mac if one is not already detected, and
saves the mac for use next time. Obviously only works if persistence
is enable, or if it's burned into dev-data.
* Other notes:
buildroot has a bug in openrc build that results in the 'local'
service not being in default. bangBMC will add it back in, however
hopefully a patch can be merged to upstream buildroot and the
workaround can be dropped.
set -e
......@@ -9,7 +9,7 @@ BOARD_DIR=${BR2_EXTERNAL_bangBMC_PATH}/board/bangBMC
shift 1
[ -z "${TARGET_DIR}"] && echo "empty target dir" && exit 1
[ -z "${TARGET_DIR}" ] && echo "empty target dir" && exit 1
echo "disabling undesirable init scripts"
......@@ -18,6 +18,5 @@
# Launch a getty on ttyS4
# openrc (a)getty controll is a bit more complex (and flexible)
# but lets just put this one-liner here
ttyS4::respawn:/sbin/getty -L ttyS4 115200 xterm
::shutdown:/sbin/openrc shutdown
# simply sets up an ecm gadget
set -x
mount -t configfs config /config
cd /config/usb_gadget/
set -e
if [ -e "${SCRIPT_CFG_FILE}" ] ; then
. "${SCRIPT_CFG_FILE}" || true
# Newer buildroot has openrc set to automount the configfs
# so no need to meddle with it
#mount -t configfs config /config
cd ${CONFIG_DIR}/usb_gadget/
mkdir g0
cd g0/functions/
mkdir ecm.0
# Arbitrarily key off host_addr
if [ -n "${usb_ecm_host_addr}" ] ; then
cd ecm.0
echo "${usb_ecm_host_addr}" >host_addr
echo "${usb_ecm_dev_addr}" >dev_addr
cd -
usb_ecm_host_addr="$(cat ecm.0/host_addr)"
usb_ecm_dev_addr="$(cat ecm.0/dev_addr)"
echo '
cd ../configs/
mkdir c.1
cd c.1/
\ No newline at end of file
......@@ -7,8 +7,15 @@ UPDATE_SHELL_AUTORECONF = YES
# Give the shell user a fix uid/gid.
# The reason for this is that buildroot does/has changed their
# uid/gid mapins so auto-assign may drift. this normally would not be
# a problem, however dev-data has uid and gids embedded in it, which means an
# update would break dev-data. This has already happened, so this change should
# prevent further breakage (or at least generated a build time error instead
# of silently breaking things).
update -1 update -1 * /usr/libexec/update /usr/bin/update-shell - user account for performing system updates
update 768 update 768 * /usr/libexec/update /usr/bin/update-shell - user account for performing system updates
# update-su is only executable
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment