forked from ros-realtime/ros-realtime-rpi4-image
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release 1.0 for ruediger offline - only ruediger2_control working
- Loading branch information
Showing
10 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Overrides the variables in focal-rt/config.ini. See that file for a more | ||
# comprehensive example. | ||
[build] | ||
# The image url to download and customize. | ||
image_url = https://github.com/ros-realtime/ros-realtime-rpi4-image/releases/download/22.04.1_v5.15.39-rt42-raspi_ros2_humble/ubuntu-22.04.1-rt-ros2-arm64+raspi.img.xz | ||
|
||
# Mount location for the partitions in the image file downloaded. | ||
image_mounts = /boot/firmware,/ | ||
|
||
# This is passed to truncate --size=<image_size> when operating against the | ||
# .img file | ||
image_size = 12G | ||
|
||
# The filename of the output image | ||
output_filename = ubuntu-22.04.1-rt-ruediger2-arm64+raspi.img | ||
|
||
# The host path to the qemu-user-static binary required for the above image | ||
qemu_user_static_path = /usr/bin/qemu-aarch64-static | ||
|
||
[env] | ||
ROS_DISTRO = humble | ||
|
1 change: 1 addition & 0 deletions
1
image_builder/data/jammy-rt-humble-ruediger/rootfs/boot/firmware/cmdline.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash |
51 changes: 51 additions & 0 deletions
51
image_builder/data/jammy-rt-humble-ruediger/rootfs/boot/firmware/config.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[all] | ||
kernel=vmlinuz | ||
cmdline=cmdline.txt | ||
initramfs initrd.img followkernel | ||
|
||
[pi4] | ||
max_framebuffers=2 | ||
arm_boost=1 | ||
|
||
[all] | ||
# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these | ||
# parameters related to the base device-tree they must appear *before* any | ||
# other dtoverlay= specification | ||
dtparam=audio=on | ||
dtparam=i2c_arm=on,i2c_arm_baudrate=400000 | ||
dtparam=spi=on | ||
|
||
# Comment out the following line if the edges of the desktop appear outside | ||
# the edges of your display | ||
disable_overscan=1 | ||
|
||
# If you have issues with audio, you may try uncommenting the following line | ||
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't | ||
# support audio output) | ||
#hdmi_drive=2 | ||
|
||
# Enable the serial pins | ||
enable_uart=1 | ||
|
||
# Autoload overlays for any recognized cameras or displays that are attached | ||
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for | ||
# the legacy camera stack | ||
camera_auto_detect=1 | ||
display_auto_detect=1 | ||
|
||
# Config settings specific to arm64 | ||
arm_64bit=1 | ||
dtoverlay=dwc2 | ||
|
||
[cm4] | ||
# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into | ||
# such a board) | ||
dtoverlay=dwc2,dr_mode=host | ||
|
||
[pi3] | ||
dtoverlay=pi3-disable-bt | ||
|
||
[all] | ||
start_x=1 | ||
gpu_mem=256 | ||
dtoverlay=disable-bt |
32 changes: 32 additions & 0 deletions
32
image_builder/data/jammy-rt-humble-ruediger/rootfs/boot/firmware/user-data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#cloud-config | ||
|
||
# On first boot, set the (default) ruediger user's password to "ruediger" and | ||
# expire user passwords | ||
chpasswd: | ||
expire: true | ||
list: | ||
- ruediger:ruediger | ||
|
||
## Set the system's hostname. Please note that, unless you have a local DNS | ||
## setup where the hostname is derived from DHCP requests (as with dnsmasq), | ||
## setting the hostname here will not make the machine reachable by this name. | ||
## You may also wish to install avahi-daemon (see the "packages:" key below) | ||
## to make your machine reachable by the .local domain | ||
hostname: ruediger2 | ||
|
||
# Enable password authentication with the SSH daemon | ||
ssh_pwauth: true | ||
|
||
users: | ||
- default | ||
- name: ruediger | ||
plain_text_passwd: 'ruediger' | ||
homedir: /home/ruediger | ||
shell: /bin/bash | ||
groups: [ adm, audio, cdrom, dialout, floppy, video, plugdev, dip, netdev, sudo, lxd ] | ||
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | ||
|
||
|
||
## Run arbitrary commands at rc.local like time | ||
runcmd: | ||
- [deluser, --remove-home, ubuntu] |
1 change: 1 addition & 0 deletions
1
image_builder/data/jammy-rt-humble-ruediger/rootfs/etc/apt/sources.list.d/ros2.list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deb [arch=arm64 signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu jammy main |
3 changes: 3 additions & 0 deletions
3
image_builder/data/jammy-rt-humble-ruediger/rootfs/etc/profile.d/99-source-ros.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if [ -f /opt/ros/humble/setup.bash ]; then | ||
source /opt/ros/humble/setup.bash | ||
fi |
11 changes: 11 additions & 0 deletions
11
image_builder/data/jammy-rt-humble-ruediger/scripts/extract-image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
# This script extract the image downloaded from the image_url specified in | ||
# config.ini. The script should be tailored to the image download. | ||
# | ||
# The script is called with only one argument: the path to the file downloaded. | ||
# The script should output the decompressed output into stdout, so it can be | ||
# redirected into a file by the build system. | ||
exec xzcat --decompress "$1" |
8 changes: 8 additions & 0 deletions
8
image_builder/data/jammy-rt-humble-ruediger/scripts/loop-device-setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
loop_device=$1 | ||
|
||
set -xe | ||
|
||
# The image should always be using the second partition | ||
e2fsck -y -f "${loop_device}"p2 | ||
resize2fs "${loop_device}"p2 |
18 changes: 18 additions & 0 deletions
18
image_builder/data/jammy-rt-humble-ruediger/scripts/phase1-target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
apt-get update | ||
|
||
apt-get install -y ros-$ROS_DISTRO-xacro ros-$ROS_DISTRO-ros2-control ros-$ROS_DISTRO-ros2-controllers libwiringpi-dev | ||
|
||
# reverse the network names to eth0 instead of enx<mac-address> | ||
# this is automatique after a apt-get update | ||
# https://askubuntu.com/a/1025201 | ||
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules | ||
|
||
# add library link | ||
ln -s /home/ruediger/deployement/serial_megapi/lib/serial_megapi/libserial_megapi.so /usr/local/lib/libserial_megapi.so | ||
ldconfig | ||
|
||
# clean up to reduce image size | ||
apt-get autoremove -y && apt-get clean | ||
rm -rf /var/lib/apt/lists/* |