Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ A few options are provided in the debos recipes; for the root filesystem recipe:

For the image recipe:
- dtb: override the firmware provided device tree with one from the linux kernel, e.g. `qcom/qcs6490-rb3gen2.dtb`; default: don't override
- imagetype: either `ufs` (the default) or (`sdcard`); UFS uses 4096 bytes sectors and SD card 512 bytes
- image: set the output disk image filename; default is to suffix it with the imagetype: `disk-ufs.img`
- imagetype: either `ufs` (the default) or (`sdcard`); UFS images are named disk-ufs.img and use 4096 bytes sectors and SD card images are named disk-sdcard.img and use 512 bytes sectors
- imagesize: set the output disk image size; default: `4GiB`

These can be passed as follows:
Expand All @@ -72,7 +71,7 @@ The RB3 Gen2 board boots from UFS by default. To flash a disk image to the UFS s
```xml
<?xml version="1.0" ?>
<data>
<program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="disk-4096.img" label="image" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="0" start_sector="0"/>
<program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="disk-ufs.img" label="image" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="0" start_sector="0"/>
</data>
```
1. put the board in "emergency download" mode (EDL) by removing any cable from the USB type-C port, and pressing the `F_DL` button while turning the power on
Expand Down
12 changes: 6 additions & 6 deletions debos-recipes/qualcomm-linux-debian-image.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- $dtb := or .dtb "firmware" }}
{{- $imagesize := or .imagesize "4GiB" }}
{{- $imagetype := or .imagetype "ufs" }}
{{- $image := or .image (printf "disk-%s.img" $imagetype) }}
{{- $image := printf "disk-%s.img" $imagetype }}

architecture: arm64
sectorsize: {{if eq $imagetype "ufs"}} 4096 {{else}} 512 {{end}}
Expand All @@ -17,9 +17,9 @@ actions:
description: Use OS device tree override (board specific)
chroot: true
command: |
set -eu
mkdir -p /etc/kernel
echo {{ $dtb }} >/etc/kernel/devicetree
set -eux
mkdir -pv /etc/kernel
echo "{{ $dtb }}" >/etc/kernel/devicetree
{{- end }}

# parttype values are from:
Expand Down Expand Up @@ -72,7 +72,7 @@ actions:
description: Create task to grow root filesystem on first boot
chroot: true
command: |
set -eu
set -eux
# for growpart
apt -y install cloud-guest-utils
# extract the dev of the root filesystem from fstab; change UUID=id into
Expand All @@ -97,5 +97,5 @@ actions:

- action: run
postprocess: true
command: gzip -f "${ARTIFACTDIR}/{{ $image }}"
command: gzip -v -f "${ARTIFACTDIR}/{{ $image }}"

19 changes: 12 additions & 7 deletions debos-recipes/qualcomm-linux-debian-rootfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ actions:
description: Modernize APT sources
chroot: true
command: |
apt modernize-sources -y
rm /etc/apt/sources.list.bak
set -eux
apt -y modernize-sources
rm -v /etc/apt/sources.list.bak

- action: apt
description: Install foundational packages
recommends: true
Expand Down Expand Up @@ -47,14 +49,16 @@ actions:
description: Set hostname to "debian"
chroot: true
command: |
set -eux
echo debian >/etc/hostname
# /etc/hosts is created by netbase
sed -i "1s/^/127.0.1.1 debian\n/" /etc/hosts

- action: run
description: Add a "debian" user, add it to sudoers and various groups
chroot: true
command: |
set -eu
set -eux
# pre-emptively create a sudo group if sudo isn't installed
getent group sudo >/dev/null 2>&1 || groupadd --system sudo
# some of these groups are only needed for desktop scenarios
Expand All @@ -64,7 +68,8 @@ actions:
chage --lastday 0 debian
echo debian:debian | chpasswd
# add to sudoers
mkdir --mode 755 --parents /etc/sudoers.d
mkdir -v --mode 755 --parents /etc/sudoers.d
# subshell to override umask
(
umask 226
echo "debian ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/90-debos
Expand Down Expand Up @@ -144,7 +149,7 @@ actions:
description: Set default locale
chroot: true
command: |
set -eu
set -eux
if which locale-gen >/dev/null 2>&1; then
echo en_US.UTF-8 UTF-8 >>/etc/locale.gen
locale-gen en_US.UTF-8 UTF-8
Expand All @@ -167,7 +172,7 @@ actions:
description: Install Linux kernel from experimental
chroot: true
command: |
set -eu
set -eux
# add experimental APT sources
cat >/etc/apt/sources.list.d/debian-experimental.sources <<EOF
Types: deb
Expand All @@ -178,7 +183,7 @@ actions:
EOF
# update and install kernel from experimental
apt update
apt install -y -t experimental linux-image-arm64
apt -y install -t experimental linux-image-arm64
# disable experimental from APT sources
sed -i "1s/^/Enabled: no\n/" \
/etc/apt/sources.list.d/debian-experimental.sources
Expand Down
Loading