This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
doc:howto:tce [2021/01/10 01:24] stefanbaur [Configuring the Build] don't use qemu when building arm on arm |
doc:howto:tce [2021/01/25 00:18] stefanbaur [Configuring the Build] This is part one of the patch to create Images for the Raspberry Pi |
||
---|---|---|---|
Line 44: | Line 44: | ||
# we have a successful connect on port 3142, assume | # we have a successful connect on port 3142, assume | ||
# it's apt-cacher-ng and use it | # it's apt-cacher-ng and use it | ||
- | + | # | |
- | if nc -z 127.0.0.1 3142 ; then | + | if nc -z 127.0.0.1 3142 ; then |
# bad idea with apt-cacher-ng, | # bad idea with apt-cacher-ng, | ||
- | # export https_proxy=http:// | + | # export https_proxy=http:// |
# export http_proxy=http:// | # export http_proxy=http:// | ||
# export ftp_proxy=http:// | # export ftp_proxy=http:// | ||
Line 54: | Line 54: | ||
export LB_APT_HTTP_PROXY=http:// | export LB_APT_HTTP_PROXY=http:// | ||
fi | fi | ||
+ | |||
+ | # set these to true to save source files | ||
+ | #export LB_SOURCE=" | ||
+ | #export LBX2GO_GETSRC=" | ||
# Select ONE of the following git reposities | # Select ONE of the following git reposities | ||
Line 71: | Line 75: | ||
# 32-Bit, smallest memory footprint - not available on buster | # 32-Bit, smallest memory footprint - not available on buster | ||
# export LBX2GO_ARCH=' | # export LBX2GO_ARCH=' | ||
- | # EXPERIMENTAL: | + | # For ARM (Raspberry Pi): |
- | # export LBX2GO_ARCH=' | + | #export LBX2GO_ARCH=' |
- | # Note that ARM builds are currently | + | #export LBX2GO_ARCH_MODEL=' |
# If you want to use the stock ISO image as created by this script, add your boot parameters here | # If you want to use the stock ISO image as created by this script, add your boot parameters here | ||
# export LBX2GO_BOOTAPPEND_LIVE=" | # export LBX2GO_BOOTAPPEND_LIVE=" | ||
+ | |||
+ | if echo -e " | ||
+ | LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE | ||
+ | elif echo -e " | ||
+ | LBX2GO_BOOTAPPEND_LIVE+=' | ||
+ | export LBX2GO_BOOTAPPEND_LIVE | ||
+ | fi | ||
# detect if the selected git repo is meant to build a buster, stretch or jessie image | # detect if the selected git repo is meant to build a buster, stretch or jessie image | ||
if [ -z " | if [ -z " | ||
export LBX2GO_DEBVERSION=" | export LBX2GO_DEBVERSION=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | elif [ -z " | ||
+ | export LBX2GO_DEBVERSION=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | elif [ -z " | ||
+ | export LBX2GO_DEBVERSION=" | ||
export LBX2GO_BOOTAPPEND_LIVE+=" | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
elif [ -z " | elif [ -z " | ||
Line 97: | Line 115: | ||
# set boot loader type - leave this unchanged unless you really know what you're doing | # set boot loader type - leave this unchanged unless you really know what you're doing | ||
- | if echo "$LBX2GO_ARCH" | + | if echo $LBX2GO_ARCH | awk ' |
# This is part of our experimental ARM support | # This is part of our experimental ARM support | ||
LBX2GO_BOOTLOADERPARAMNAME=" | LBX2GO_BOOTLOADERPARAMNAME=" | ||
Line 138: | Line 156: | ||
# This is part of our experimental ARM support | # This is part of our experimental ARM support | ||
- | if echo "$LBX2GO_ARCH" | + | if echo $LBX2GO_ARCH |
export LBX2GO_DEFAULTS+=" | export LBX2GO_DEFAULTS+=" | ||
- | --bootstrap-qemu-static / | + | --bootstrap-qemu-static / |
+ | --apt-options \" | ||
+ | fi | ||
+ | |||
+ | # This is part of our experimental ARM support | ||
+ | # This makes sure the resulting disk image is at least 1GB in size, even though our build currently requires way less. | ||
+ | # It's unlikely that anyone will need to boot from a smaller partition; but if we let live-build pick the minimum size automatically, | ||
+ | # we will not have enough space left to copy the firmware blobs into the right location. | ||
+ | if echo $LBX2GO_ARCH | grep -q ' | ||
+ | export LBX2GO_DEFAULTS+=" | ||
+ | --hdd-size 1024" | ||
fi | fi | ||
Line 150: | Line 178: | ||
# This is to optimize squashfs size, based on a suggestion by intrigeri from the TAILS team | # This is to optimize squashfs size, based on a suggestion by intrigeri from the TAILS team | ||
# note that this will permanently change / | # note that this will permanently change / | ||
- | sed -i -e ' | + | if dpkg --print-architecture | grep -q ' |
+ | # on arm, these parameters must not be used; if they' | ||
+ | if grep -q -- '-Xbcj x86 -b 1024K -Xdict-size 1024K' / | ||
+ | apt install --reinstall live-build | ||
+ | fi | ||
+ | else | ||
+ | | ||
+ | fi | ||
# This removes documentation, | # This removes documentation, | ||
Line 159: | Line 194: | ||
# This patches the squashfs file into the initrd. Only parsed when image type " | # This patches the squashfs file into the initrd. Only parsed when image type " | ||
# Will require boot parameter live-media=/ | # Will require boot parameter live-media=/ | ||
- | # Both TFTP client and TFTP server must support file transfers >32MB for this to work, if you want to deploy this initrd via TFTP, | + | # Both TFTP client and TFTP server must support file transfers >32MB for this to work, if you want to deploy this initrd via TFTP, |
# so e.g. atftpd will not work - tftpd-hpa, however, seems to have no problem with larger files. | # so e.g. atftpd will not work - tftpd-hpa, however, seems to have no problem with larger files. | ||
# When using iPXE, you can use http instead of TFTP. | # When using iPXE, you can use http instead of TFTP. | ||
Line 174: | Line 209: | ||
# /!\ the options below are NOT RECOMMENDED unless you use live-build from Debian Buster /!\ | # /!\ the options below are NOT RECOMMENDED unless you use live-build from Debian Buster /!\ | ||
# to create an image that can be written to a hard disk (for older live-build versions, this | # to create an image that can be written to a hard disk (for older live-build versions, this | ||
- | # always results in a "build failed" | + | # always results in a "build failed" |
# live-build from Buster and things will work): | # live-build from Buster and things will work): | ||
# export LBX2GO_IMAGETYPE=' | # export LBX2GO_IMAGETYPE=' | ||
# to create a tar file only (seems to be broken in older live-build versions - Buster works): | # to create a tar file only (seems to be broken in older live-build versions - Buster works): | ||
# export LBX2GO_IMAGETYPE=' | # export LBX2GO_IMAGETYPE=' | ||
+ | |||
+ | # This is part of our experimental ARM support | ||
+ | if echo " | ||
+ | # enforce hdd image for arm at the moment (might need to support netboot later on too) | ||
+ | if ! [ " | ||
+ | echo " | ||
+ | LBX2GO_IMAGETYPE=" | ||
+ | fi | ||
+ | fi | ||
if [ " | if [ " |