├── .github └── workflows │ └── build.yml ├── 0001-binary_linux-image-install-dtbs.patch ├── 10_linux ├── README.md ├── additional-packages-live.jammy ├── additional-packages.bookworm ├── additional-packages.jammy ├── customize-chroot-bookworm.hook.chroot ├── customize-chroot-jammy.hook.chroot ├── grub-dtb.patch ├── lb-config-bookworm.sh ├── lb-config-jammy.sh ├── networkmanager.yaml └── remove-raspi-firmware.patch /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | jobs: 8 | prepare_release: 9 | runs-on: ubuntu-24.04-arm 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v2 13 | - name: Get time 14 | id: time 15 | uses: nanzm/get-time-action@v1.1 16 | with: 17 | format: 'YYYYMMDD-HHmm' 18 | - name: Create empty release 19 | id: release 20 | uses: softprops/action-gh-release@v1 21 | with: 22 | tag_name: ${{ steps.time.outputs.time }} 23 | body_path: README.md 24 | token: ${{ secrets.GITHUB_TOKEN }} 25 | draft: false 26 | outputs: 27 | release_id: ${{ steps.release.outputs.id }} 28 | build: 29 | runs-on: ubuntu-24.04-arm 30 | needs: prepare_release 31 | strategy: 32 | matrix: 33 | CODENAME: [bookworm] 34 | steps: 35 | - name: Install deb deps 36 | uses: awalsh128/cache-apt-pkgs-action@latest 37 | with: 38 | packages: devscripts build-essential debhelper po4a gettext debootstrap libnss-mymachines live-boot-doc live-config-doc live-manual-html systemd-container qemu-user-static debian-archive-keyring 39 | version: 1.0 40 | - name: Checkout 41 | uses: actions/checkout@v3 42 | - name: Build live-build 43 | shell: bash 44 | run: | 45 | sudo apt update 46 | mkdir live-build && cd live-build 47 | git clone https://salsa.debian.org/live-team/live-build.git -b master --depth=1 48 | cd live-build 49 | sudo apt -y install debhelper po4a gettext devscripts build-essential 50 | patch -p1 < ../../0001-binary_linux-image-install-dtbs.patch 51 | patch -p1 < ../../grub-dtb.patch 52 | patch -p1 < ../../remove-raspi-firmware.patch 53 | dpkg-buildpackage -us -uc 54 | sudo apt -y install ../live-build_*_all.deb 55 | - name: Build live iso 56 | shell: bash 57 | run: | 58 | mkdir iso-build && cd iso-build 59 | cp ../lb-config-${{ matrix.CODENAME }}.sh lb-config.sh 60 | cp ../additional-packages.${{ matrix.CODENAME }} additional-packages 61 | cp ../additional-packages-live.jammy additional-packages-live.jammy 62 | cp ../networkmanager.yaml . 63 | cp ../customize-chroot-${{ matrix.CODENAME }}.hook.chroot customize-chroot.hook.chroot 64 | cp ../10_linux . 65 | chmod +x lb-config.sh 66 | ./lb-config.sh 67 | sudo apt -y install qemu-user-static debian-archive-keyring 68 | sudo lb build 69 | - name: Upload iso 70 | uses: xresloader/upload-to-github-release@v1 71 | env: 72 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 73 | with: 74 | release_id: ${{ needs.prepare_release.outputs.release_id }} 75 | file: "iso-build/*.iso" 76 | draft: false 77 | overwrite: true 78 | - name: Rollback release 79 | if: failure() 80 | uses: author/action-rollback@stable 81 | env: 82 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 83 | with: 84 | release_id: ${{ needs.prepare_release.outputs.release_id }} 85 | -------------------------------------------------------------------------------- /0001-binary_linux-image-install-dtbs.patch: -------------------------------------------------------------------------------- 1 | From 38b60d9748964c640898ff1f6b39f6745b90be88 Mon Sep 17 00:00:00 2001 2 | From: jfliu 3 | Date: Mon, 17 Jul 2023 09:57:06 +0800 4 | Subject: [PATCH 1/2] binary_linux-image: install dtbs 5 | 6 | --- 7 | scripts/build/binary_linux-image | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/scripts/build/binary_linux-image b/scripts/build/binary_linux-image 11 | index d1877daf4..6e4b5ee3f 100755 12 | --- a/scripts/build/binary_linux-image 13 | +++ b/scripts/build/binary_linux-image 14 | @@ -62,6 +62,7 @@ mkdir -p "${DESTDIR}" 15 | 16 | # Installing linux-image 17 | cp -a chroot/boot/"${LINUX}"-* "${DESTDIR}" 18 | +cp -a chroot/boot/dtb-* "${DESTDIR}/dtb" 2>&1 || Echo_message "Sking installing missing dtbs." 19 | cp -a chroot/boot/initrd.img-* "${DESTDIR}" 2>&1 || Echo_message "Skip installing missing initrd." 20 | 21 | case "${LB_INITRAMFS}" in 22 | -- 23 | 2.34.1 24 | 25 | -------------------------------------------------------------------------------- /10_linux: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | set -e 3 | 4 | # grub-mkconfig helper script. 5 | # Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc. 6 | # 7 | # GRUB is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # GRUB is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with GRUB. If not, see . 19 | 20 | prefix="/usr" 21 | exec_prefix="/usr" 22 | datarootdir="/usr/share" 23 | ubuntu_recovery="0" 24 | quiet_boot="0" 25 | quick_boot="0" 26 | gfxpayload_dynamic="0" 27 | vt_handoff="0" 28 | 29 | . "$pkgdatadir/grub-mkconfig_lib" 30 | 31 | export TEXTDOMAIN=grub 32 | export TEXTDOMAINDIR="${datarootdir}/locale" 33 | 34 | CLASS="--class gnu-linux --class gnu --class os" 35 | SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart" 36 | 37 | if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then 38 | OS=GNU/Linux 39 | else 40 | case ${GRUB_DISTRIBUTOR} in 41 | Ubuntu|Kubuntu) 42 | OS="${GRUB_DISTRIBUTOR}" 43 | ;; 44 | *) 45 | OS="${GRUB_DISTRIBUTOR} GNU/Linux" 46 | ;; 47 | esac 48 | CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" 49 | fi 50 | 51 | # loop-AES arranges things so that /dev/loop/X can be our root device, but 52 | # the initrds that Linux uses don't like that. 53 | case ${GRUB_DEVICE} in 54 | /dev/loop/*|/dev/loop[0-9]) 55 | GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"` 56 | # We can't cope with devices loop-mounted from files here. 57 | case ${GRUB_DEVICE} in 58 | /dev/*) ;; 59 | *) exit 0 ;; 60 | esac 61 | ;; 62 | esac 63 | 64 | # Default to disabling partition uuid support to maintian compatibility with 65 | # older kernels. 66 | GRUB_DISABLE_LINUX_PARTUUID=${GRUB_DISABLE_LINUX_PARTUUID-true} 67 | 68 | # btrfs may reside on multiple devices. We cannot pass them as value of root= parameter 69 | # and mounting btrfs requires user space scanning, so force UUID in this case. 70 | if ( [ "x${GRUB_DEVICE_UUID}" = "x" ] && [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] ) \ 71 | || ( [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ 72 | && [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ] ) \ 73 | || ( ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \ 74 | && ! test -e "/dev/disk/by-partuuid/${GRUB_DEVICE_PARTUUID}" ) \ 75 | || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then 76 | LINUX_ROOT_DEVICE=${GRUB_DEVICE} 77 | elif [ "x${GRUB_DEVICE_UUID}" = "x" ] \ 78 | || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ]; then 79 | LINUX_ROOT_DEVICE=PARTUUID=${GRUB_DEVICE_PARTUUID} 80 | else 81 | LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} 82 | fi 83 | 84 | case x"$GRUB_FS" in 85 | xbtrfs) 86 | rootsubvol="`make_system_path_relative_to_its_root /`" 87 | rootsubvol="${rootsubvol#/}" 88 | if [ "x${rootsubvol}" != x ]; then 89 | GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}" 90 | fi;; 91 | xzfs) 92 | rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` 93 | bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`" 94 | LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}" 95 | ;; 96 | esac 97 | 98 | title_correction_code= 99 | 100 | if [ -x /lib/recovery-mode/recovery-menu ]; then 101 | GRUB_CMDLINE_LINUX_RECOVERY=recovery 102 | else 103 | GRUB_CMDLINE_LINUX_RECOVERY=single 104 | fi 105 | if [ "$ubuntu_recovery" = 1 ]; then 106 | GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY nomodeset" 107 | fi 108 | 109 | if [ "$vt_handoff" = 1 ]; then 110 | for word in $GRUB_CMDLINE_LINUX_DEFAULT; do 111 | if [ "$word" = splash ]; then 112 | GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \$vt_handoff" 113 | fi 114 | done 115 | fi 116 | 117 | linux_entry () 118 | { 119 | os="$1" 120 | version="$2" 121 | type="$3" 122 | args="$4" 123 | 124 | if [ -z "$boot_device_id" ]; then 125 | boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" 126 | fi 127 | if [ x$type != xsimple ] ; then 128 | case $type in 129 | recovery) 130 | title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")" ;; 131 | init-*) 132 | title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "${type#init-}")" ;; 133 | *) 134 | title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;; 135 | esac 136 | if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then 137 | replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" 138 | quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)" 139 | title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;" 140 | grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")" 141 | fi 142 | echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" 143 | else 144 | echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" 145 | fi 146 | if [ "$quick_boot" = 1 ]; then 147 | echo " recordfail" | sed "s/^/$submenu_indentation/" 148 | fi 149 | if [ x$type != xrecovery ] ; then 150 | save_default_entry | grub_add_tab 151 | fi 152 | 153 | # Use ELILO's generic "efifb" when it's known to be available. 154 | # FIXME: We need an interface to select vesafb in case efifb can't be used. 155 | if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then 156 | echo " load_video" | sed "s/^/$submenu_indentation/" 157 | else 158 | if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then 159 | echo " load_video" | sed "s/^/$submenu_indentation/" 160 | fi 161 | fi 162 | if ([ "$ubuntu_recovery" = 0 ] || [ x$type != xrecovery ]) && \ 163 | ([ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 1 ]); then 164 | echo " gfxmode \$linux_gfx_mode" | sed "s/^/$submenu_indentation/" 165 | fi 166 | 167 | echo " insmod gzio" | sed "s/^/$submenu_indentation/" 168 | echo " if [ x\$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi" | sed "s/^/$submenu_indentation/" 169 | 170 | if [ x$dirname = x/ ]; then 171 | if [ -z "${prepare_root_cache}" ]; then 172 | prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)" 173 | fi 174 | printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/" 175 | else 176 | if [ -z "${prepare_boot_cache}" ]; then 177 | prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)" 178 | fi 179 | printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" 180 | fi 181 | if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then 182 | message="$(gettext_printf "Loading Linux %s ..." ${version})" 183 | sed "s/^/$submenu_indentation/" << EOF 184 | echo '$(echo "$message" | grub_quote)' 185 | EOF 186 | fi 187 | if test -e /sys/firmware/devicetree/base/name; then 188 | sed "s/^/$submenu_indentation/" << EOF 189 | smbios -t 11 -s 4 --set=devicetreename 190 | if [ -f ${rel_dirname}/dtb/rockchip/\$devicetreename ];then 191 | devicetree ${rel_dirname}/dtb/rockchip/\$devicetreename 192 | elif [ -f ${rel_dirname}/dtb/rockchip/\$devicetreename.dtb ];then 193 | devicetree ${rel_dirname}/dtb/rockchip/\$devicetreename.dtb 194 | fi 195 | EOF 196 | fi 197 | if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then 198 | sed "s/^/$submenu_indentation/" << EOF 199 | linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args} 200 | EOF 201 | else 202 | sed "s/^/$submenu_indentation/" << EOF 203 | linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} 204 | EOF 205 | fi 206 | if test -n "${initrd}" ; then 207 | # TRANSLATORS: ramdisk isn't identifier. Should be translated. 208 | if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then 209 | message="$(gettext_printf "Loading initial ramdisk ...")" 210 | sed "s/^/$submenu_indentation/" << EOF 211 | echo '$(echo "$message" | grub_quote)' 212 | EOF 213 | fi 214 | initrd_path= 215 | for i in ${initrd}; do 216 | initrd_path="${initrd_path} ${rel_dirname}/${i}" 217 | done 218 | sed "s/^/$submenu_indentation/" << EOF 219 | initrd $(echo $initrd_path) 220 | EOF 221 | fi 222 | sed "s/^/$submenu_indentation/" << EOF 223 | } 224 | EOF 225 | } 226 | 227 | machine=`uname -m` 228 | case "x$machine" in 229 | xi?86 | xx86_64) 230 | list= 231 | for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do 232 | if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi 233 | done ;; 234 | *) 235 | list= 236 | for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do 237 | if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi 238 | done ;; 239 | esac 240 | 241 | case "$machine" in 242 | i?86) GENKERNEL_ARCH="x86" ;; 243 | mips|mips64) GENKERNEL_ARCH="mips" ;; 244 | mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;; 245 | arm*) GENKERNEL_ARCH="arm" ;; 246 | *) GENKERNEL_ARCH="$machine" ;; 247 | esac 248 | 249 | prepare_boot_cache= 250 | prepare_root_cache= 251 | boot_device_id= 252 | title_correction_code= 253 | 254 | cat << 'EOF' 255 | function gfxmode { 256 | set gfxpayload="${1}" 257 | EOF 258 | if [ "$vt_handoff" = 1 ]; then 259 | cat << 'EOF' 260 | if [ "${1}" = "keep" ]; then 261 | set vt_handoff=vt.handoff=7 262 | else 263 | set vt_handoff= 264 | fi 265 | EOF 266 | fi 267 | cat << EOF 268 | } 269 | EOF 270 | 271 | # Use ELILO's generic "efifb" when it's known to be available. 272 | # FIXME: We need an interface to select vesafb in case efifb can't be used. 273 | if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 0 ]; then 274 | echo "set linux_gfx_mode=$GRUB_GFXPAYLOAD_LINUX" 275 | else 276 | cat << EOF 277 | if [ "\${recordfail}" != 1 ]; then 278 | if [ -e \${prefix}/gfxblacklist.txt ]; then 279 | if hwmatch \${prefix}/gfxblacklist.txt 3; then 280 | if [ \${match} = 0 ]; then 281 | set linux_gfx_mode=keep 282 | else 283 | set linux_gfx_mode=text 284 | fi 285 | else 286 | set linux_gfx_mode=text 287 | fi 288 | else 289 | set linux_gfx_mode=keep 290 | fi 291 | else 292 | set linux_gfx_mode=text 293 | fi 294 | EOF 295 | fi 296 | cat << EOF 297 | export linux_gfx_mode 298 | EOF 299 | 300 | # Extra indentation to add to menu entries in a submenu. We're not in a submenu 301 | # yet, so it's empty. In a submenu it will be equal to '\t' (one tab). 302 | submenu_indentation="" 303 | 304 | is_top_level=true 305 | while [ "x$list" != "x" ] ; do 306 | linux=`version_find_latest $list` 307 | case $linux in 308 | *.efi.signed) 309 | # We handle these in linux_entry. 310 | list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` 311 | continue 312 | ;; 313 | esac 314 | gettext_printf "Found linux image: %s\n" "$linux" >&2 315 | basename=`basename $linux` 316 | dirname=`dirname $linux` 317 | rel_dirname=`make_system_path_relative_to_its_root $dirname` 318 | version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` 319 | alt_version=`echo $version | sed -e "s,\.old$,,g"` 320 | linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" 321 | 322 | initrd_early= 323 | for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \ 324 | ${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do 325 | if test -e "${dirname}/${i}" ; then 326 | initrd_early="${initrd_early} ${i}" 327 | fi 328 | done 329 | 330 | initrd_real= 331 | for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ 332 | "initrd-${version}" "initramfs-${version}.img" \ 333 | "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ 334 | "initrd-${alt_version}" "initramfs-${alt_version}.img" \ 335 | "initramfs-genkernel-${version}" \ 336 | "initramfs-genkernel-${alt_version}" \ 337 | "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ 338 | "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do 339 | if test -e "${dirname}/${i}" ; then 340 | initrd_real="${i}" 341 | break 342 | fi 343 | done 344 | 345 | initrd= 346 | if test -n "${initrd_early}" || test -n "${initrd_real}"; then 347 | initrd="${initrd_early} ${initrd_real}" 348 | 349 | initrd_display= 350 | for i in ${initrd}; do 351 | initrd_display="${initrd_display} ${dirname}/${i}" 352 | done 353 | gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2 354 | fi 355 | 356 | config= 357 | for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do 358 | if test -e "${i}" ; then 359 | config="${i}" 360 | break 361 | fi 362 | done 363 | 364 | initramfs= 365 | if test -n "${config}" ; then 366 | initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"` 367 | fi 368 | 369 | if test -z "${initramfs}" && test -z "${initrd_real}" ; then 370 | # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's 371 | # no initrd or builtin initramfs, it can't work here. 372 | if [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] \ 373 | || [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ]; then 374 | 375 | linux_root_device_thisversion=${GRUB_DEVICE} 376 | else 377 | linux_root_device_thisversion=PARTUUID=${GRUB_DEVICE_PARTUUID} 378 | fi 379 | fi 380 | 381 | # The GRUB_DISABLE_SUBMENU option used to be different than others since it was 382 | # mentioned in the documentation that has to be set to 'y' instead of 'true' to 383 | # enable it. This caused a lot of confusion to users that set the option to 'y', 384 | # 'yes' or 'true'. This was fixed but all of these values must be supported now. 385 | if [ "x${GRUB_DISABLE_SUBMENU}" = xyes ] || [ "x${GRUB_DISABLE_SUBMENU}" = xy ]; then 386 | GRUB_DISABLE_SUBMENU="true" 387 | fi 388 | 389 | if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then 390 | linux_entry "${OS}" "${version}" simple \ 391 | "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" 392 | 393 | submenu_indentation="$grub_tab" 394 | 395 | if [ -z "$boot_device_id" ]; then 396 | boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" 397 | fi 398 | # TRANSLATORS: %s is replaced with an OS name 399 | echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" 400 | is_top_level=false 401 | fi 402 | 403 | linux_entry "${OS}" "${version}" advanced \ 404 | "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" 405 | for supported_init in ${SUPPORTED_INITS}; do 406 | init_path="${supported_init#*:}" 407 | if [ -x "${init_path}" ] && [ "$(readlink -f /sbin/init)" != "$(readlink -f "${init_path}")" ]; then 408 | linux_entry "${OS}" "${version}" "init-${supported_init%%:*}" \ 409 | "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} init=${init_path}" 410 | fi 411 | done 412 | if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then 413 | linux_entry "${OS}" "${version}" recovery \ 414 | "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}" 415 | fi 416 | 417 | list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '` 418 | done 419 | 420 | # If at least one kernel was found, then we need to 421 | # add a closing '}' for the submenu command. 422 | if [ x"$is_top_level" != xtrue ]; then 423 | echo '}' 424 | fi 425 | 426 | echo "$title_correction_code" 427 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Live iso for rk3588 based on debian live project 2 | [![image_build](https://github.com/amazingfate/rk3588-live-iso/workflows/Build/badge.svg)](https://github.com/amazingfate/rk3588-live-iso/actions/workflows/build.yml) 3 | 4 | # Live iso is using legacy 5.10 kernel packaged by armbian. 5 | -------------------------------------------------------------------------------- /additional-packages-live.jammy: -------------------------------------------------------------------------------- 1 | ubiquity-frontend-gtk 2 | ubiquity-slideshow-ubuntu 3 | user-setup 4 | -------------------------------------------------------------------------------- /additional-packages.bookworm: -------------------------------------------------------------------------------- 1 | firmware-misc-nonfree 2 | mesa-utils 3 | vim 4 | calamares-settings-debian 5 | grub-efi-arm64 6 | gparted 7 | live-task-localisation 8 | live-task-recommended 9 | systemd-timesyncd 10 | -------------------------------------------------------------------------------- /additional-packages.jammy: -------------------------------------------------------------------------------- 1 | rockchip-multimedia-config 2 | libv4l-rkmpp 3 | malirun 4 | mesa-utils 5 | armbian-firmware-full 6 | chromium-browser 7 | libwidevinecdm 8 | vim 9 | grub-efi-arm64 10 | ubuntu-desktop 11 | gparted 12 | -------------------------------------------------------------------------------- /customize-chroot-bookworm.hook.chroot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ -f /usr/sbin/bootloader-config ] 6 | then 7 | sed -i "s|grub-efi-amd64|grub-efi-arm64|g" /usr/sbin/bootloader-config 8 | sed -i "s|installEFIFallback: false|installEFIFallback: true|g" /etc/calamares/modules/bootloader.conf 9 | fi 10 | 11 | echo "chroot \$CHROOT /usr/bin/ssh-keygen -A" >> /usr/sbin/bootloader-config 12 | -------------------------------------------------------------------------------- /customize-chroot-jammy.hook.chroot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | sed -i "s|filesystem.manifest|filesystem.packages|g" /usr/share/ubiquity/install.py 4 | sed -i "s|filesystem.manifest|filesystem.packages|g" /usr/share/ubiquity/plugininstall.py 5 | sed -i "s|'/cdrom'|'/run/live/medium'|g" /usr/share/ubiquity/plugininstall.py 6 | sed -i "s|'/cdrom'|'/run/live/medium'|g" /usr/lib/ubiquity/ubiquity/install_misc.py 7 | echo "export LIVE_MEDIA_PATH=live" > /etc/casper.conf 8 | -------------------------------------------------------------------------------- /grub-dtb.patch: -------------------------------------------------------------------------------- 1 | diff --git a/scripts/build/binary_grub_cfg b/scripts/build/binary_grub_cfg 2 | index c41a4fba4..9d7fd0bdc 100755 3 | --- a/scripts/build/binary_grub_cfg 4 | +++ b/scripts/build/binary_grub_cfg 5 | @@ -54,6 +54,12 @@ Grub_live_menu_entry() { 6 | 7 | cat >> "${LIVE_ENTRIES_TMP}" < config/archives/live.list.chroot 27 | echo "deb https://apt.armbian.com bookworm main bookworm-utils bookworm-desktop" > config/archives/live.list.binary 28 | echo "deb https://download.opensuse.org/repositories/home:/amazingfate:/panfork-mesa/Debian_12/ ./" >> config/archives/live.list.chroot 29 | echo "deb https://download.opensuse.org/repositories/home:/amazingfate:/panfork-mesa/Debian_12/ ./" >> config/archives/live.list.binary 30 | 31 | wget https://raw.githubusercontent.com/armbian/build/main/config/armbian.key 32 | gpg --dearmor < armbian.key > armbian.gpg 33 | cp armbian.gpg config/archives/armbian.key.binary 34 | cp armbian.gpg config/archives/armbian.key.chroot 35 | wget https://download.opensuse.org/repositories/home:/amazingfate:/panfork-mesa/Debian_12/Release.key 36 | gpg --dearmor < Release.key > obs-amazingfate.gpg 37 | cp obs-amazingfate.gpg config/archives/obs-amazingfate.key.binary 38 | cp obs-amazingfate.gpg config/archives/obs-amazingfate.key.chroot 39 | 40 | wget https://raw.githubusercontent.com/armbian/build/main/config/cli/common/main/packages -O config/package-lists/armbian-cli.list.chroot 41 | wget https://raw.githubusercontent.com/armbian/build/main/config/cli/common/main/packages.additional -O config/package-lists/armbian-cli-addtional.list.chroot 42 | wget https://raw.githubusercontent.com/armbian/build/main/config/desktop/bookworm/environments/gnome/config_base/packages -O config/package-lists/armbian-gnome.list.chroot 43 | sed -i "/lightdm/d" config/package-lists/armbian-gnome.list.chroot 44 | sed -i "/wireguard-tools/d" config/package-lists/armbian-cli.list.chroot 45 | cp additional-packages config/package-lists/additional-packages.list.chroot 46 | 47 | mkdir -p config/includes.chroot_after_packages/etc/netplan 48 | cp networkmanager.yaml config/includes.chroot_after_packages/etc/netplan 49 | 50 | cp customize-chroot.hook.chroot config/hooks/live 51 | mkdir -p config/includes.chroot_after_packages/etc/grub.d/ 52 | cp 10_linux config/includes.chroot_after_packages/etc/grub.d/ 53 | -------------------------------------------------------------------------------- /lb-config-jammy.sh: -------------------------------------------------------------------------------- 1 | LB_IMAGE_NAME="ubuntu-jammy-live" lb config \ 2 | --architecture arm64 \ 3 | --archive-areas 'main restricted universe multiverse' \ 4 | --parent-archive-areas 'main restricted universe multiverse' \ 5 | --debian-installer-distribution jammy \ 6 | --distribution jammy \ 7 | --distribution-chroot jammy \ 8 | --distribution-binary jammy\ 9 | --apt-recommends false \ 10 | --bootloaders grub-efi \ 11 | --compression xz \ 12 | --keyring-packages "ubuntu-keyring initramfs-tools" \ 13 | --linux-packages "linux-image linux-dtb" \ 14 | --linux-flavours "legacy-rk35xx" \ 15 | --parent-mirror-bootstrap "http://ports.ubuntu.com" \ 16 | --parent-mirror-chroot "http://ports.ubuntu.com" \ 17 | --parent-mirror-chroot-security "http://ports.ubuntu.com" \ 18 | --parent-mirror-binary "http://ports.ubuntu.com" \ 19 | --parent-mirror-binary-security "http://ports.ubuntu.com" \ 20 | --parent-mirror-debian-installer "http://ports.ubuntu.com" \ 21 | --mirror-bootstrap "http://ports.ubuntu.com" \ 22 | --mirror-chroot "http://ports.ubuntu.com" \ 23 | --mirror-chroot-security "http://ports.ubuntu.com" \ 24 | --mirror-binary "http://ports.ubuntu.com" \ 25 | --mirror-binary-security "http://ports.ubuntu.com" \ 26 | --mirror-debian-installer "http://ports.ubuntu.com" 27 | 28 | echo "deb https://apt.armbian.com jammy main jammy-utils jammy-desktop" > config/archives/live.list.chroot 29 | echo "deb https://ppa.launchpadcontent.net/liujianfeng1994/panfork-mesa/ubuntu/ jammy main" >> config/archives/live.list.chroot 30 | echo "deb https://ppa.launchpadcontent.net/liujianfeng1994/rockchip-multimedia/ubuntu/ jammy main" >> config/archives/live.list.chroot 31 | echo "deb https://apt.armbian.com jammy main jammy-utils jammy-desktop" > config/archives/live.list.binary 32 | echo "deb https://ppa.launchpadcontent.net/liujianfeng1994/panfork-mesa/ubuntu/ jammy main" >> config/archives/live.list.binary 33 | echo "deb https://ppa.launchpadcontent.net/liujianfeng1994/rockchip-multimedia/ubuntu/ jammy main" >> config/archives/live.list.binary 34 | 35 | wget https://raw.githubusercontent.com/armbian/build/main/config/armbian.key 36 | gpg --dearmor < armbian.key > armbian.gpg 37 | curl -S "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0B2F0747E3BD546820A639B68065BE1FC67AABDE" |gpg --batch --yes --dearmor --output "launchpad-liujianfeng1994.gpg" 38 | cp armbian.gpg config/archives/armbian.key.binary 39 | cp launchpad-liujianfeng1994.gpg config/archives/launchpad-liujianfeng1994.key.binary 40 | cp armbian.gpg config/archives/armbian.key.chroot 41 | cp launchpad-liujianfeng1994.gpg config/archives/launchpad-liujianfeng1994.key.chroot 42 | 43 | wget https://raw.githubusercontent.com/armbian/build/main/config/cli/jammy/main/packages -O config/package-lists/armbian-cli.list.chroot_install 44 | wget https://raw.githubusercontent.com/armbian/build/main/config/cli/common/main/packages.additional -O config/package-lists/armbian-cli-addtional.list.chroot_install 45 | wget https://raw.githubusercontent.com/armbian/build/main/config/desktop/jammy/environments/gnome/config_base/packages -O config/package-lists/armbian-gnome.list.chroot_install 46 | sed -i "/lightdm/d" config/package-lists/armbian-gnome.list.chroot_install 47 | sed -i "/openssh-server/d" config/package-lists/armbian-cli.list.chroot_install 48 | cp additional-packages config/package-lists/additional-packages.list.chroot_install 49 | cp additional-packages-live.jammy config/package-lists/additional-packages.list.chroot_live 50 | mv config/package-lists/live.list.chroot config/package-lists/live.list.chroot_live 51 | 52 | mkdir -p config/includes.chroot_after_packages/etc/netplan 53 | cp networkmanager.yaml config/includes.chroot_after_packages/etc/netplan 54 | 55 | cp customize-chroot.hook.chroot config/hooks/live 56 | mkdir -p config/includes.chroot_after_packages/etc/grub.d/ 57 | cp 10_linux config/includes.chroot_after_packages/etc/grub.d/ 58 | -------------------------------------------------------------------------------- /networkmanager.yaml: -------------------------------------------------------------------------------- 1 | network: 2 | version: 2 3 | renderer: NetworkManager 4 | -------------------------------------------------------------------------------- /remove-raspi-firmware.patch: -------------------------------------------------------------------------------- 1 | diff --git a/functions/firmwarelists.sh b/functions/firmwarelists.sh 2 | index fe11d985a..6b3b405e3 100755 3 | --- a/functions/firmwarelists.sh 4 | +++ b/functions/firmwarelists.sh 5 | @@ -96,7 +96,7 @@ Firmware_List_From_Contents () { 6 | # Exclude x86 firmware when no x86 is requested 7 | if [ ${HAS_X86_ARCH} -eq 0 ] 8 | then 9 | - BLOCKLIST_FIRMWARE="${BLOCKLIST_FIRMWARE} amd64-microcode firmware-intel-sound firmware-sof-signed intel-microcode" 10 | + BLOCKLIST_FIRMWARE="${BLOCKLIST_FIRMWARE} amd64-microcode firmware-intel-sound firmware-sof-signed intel-microcode raspi-firmware" 11 | fi 12 | 13 | # Deduplicate the list and prepare for easier manipulation by having each package on its own line 14 | --------------------------------------------------------------------------------