ARM64 support
This commit is contained in:
parent
08fc0b9a82
commit
c218fcb67e
|
@ -134,6 +134,10 @@ The following environment variables are supported:
|
|||
|
||||
If set, then instead of working through the numeric stages in order, this list will be followed. For example setting to `"stage0 stage1 mystage stage2"` will run the contents of `mystage` before stage2. Note that quotes are needed around the list. An absolute or relative path can be given for stages outside the pi-gen directory.
|
||||
|
||||
* `ENABLE_ARM64` (Default: `0`)
|
||||
|
||||
If set, the image uses arm64 instead of armhf. Arm64 is not fully stable yet, some programs may be not available or broken.
|
||||
|
||||
A simple example for building Raspbian:
|
||||
|
||||
```bash
|
||||
|
|
14
build.sh
14
build.sh
|
@ -105,8 +105,20 @@ run_stage(){
|
|||
for SUB_STAGE_DIR in "${STAGE_DIR}"/*; do
|
||||
if [ -d "${SUB_STAGE_DIR}" ] &&
|
||||
[ ! -f "${SUB_STAGE_DIR}/SKIP" ]; then
|
||||
if [[ ${SUB_STAGE_DIR} == *arm64 ]]; then
|
||||
if [ "$ENABLE_ARM64"="1" ]; then
|
||||
run_sub_stage
|
||||
fi
|
||||
elif [[ ${SUB_STAGE_DIR} == *armhf ]]; then
|
||||
echo "elif"
|
||||
if [[ ${ENABLE_ARM64} == 0 ]]; then
|
||||
echo "here"
|
||||
run_sub_stage
|
||||
fi
|
||||
else
|
||||
run_sub_stage
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
unmount "${WORK_DIR}/${STAGE}"
|
||||
|
@ -203,6 +215,8 @@ export QUILT_NO_DIFF_INDEX=1
|
|||
export QUILT_NO_DIFF_TIMESTAMPS=1
|
||||
export QUILT_REFRESH_ARGS="-p ab"
|
||||
|
||||
export ENABLE_ARM64="${ENABLE_ARM64:-0}"
|
||||
|
||||
# shellcheck source=scripts/common
|
||||
source "${SCRIPT_DIR}/common"
|
||||
# shellcheck source=scripts/dependencies_check
|
||||
|
|
|
@ -9,13 +9,17 @@ bootstrap(){
|
|||
|
||||
export http_proxy=${APT_PROXY}
|
||||
|
||||
if [ "$(dpkg --print-architecture)" != "armhf" ] && [ "$(dpkg --print-architecture)" != "aarch64" ]; then
|
||||
if [ "$(dpkg --print-architecture)" != "armhf" ] && [ "$(dpkg --print-architecture)" != "arm64" ]; then
|
||||
BOOTSTRAP_CMD=qemu-debootstrap
|
||||
fi
|
||||
|
||||
if [ "$ENABLE_ARM64"="1" ]; then
|
||||
BOOTSTRAP_ARGS+=(--arch arm64)
|
||||
else
|
||||
BOOTSTRAP_ARGS+=(--arch armhf)
|
||||
fi
|
||||
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/debian.gpg")
|
||||
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
|
||||
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
|
||||
BOOTSTRAP_ARGS+=("$@")
|
||||
printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}"
|
||||
|
||||
|
|
|
@ -12,7 +12,12 @@ else
|
|||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
fi
|
||||
|
||||
on_chroot << EOF
|
||||
apt-get update -o Acquire::AllowInsecureRepositories=true
|
||||
apt install gnupg -y
|
||||
EOF
|
||||
on_chroot apt-key add - < files/raspberrypi.gpg.key
|
||||
|
||||
on_chroot << EOF
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
deb http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi
|
||||
deb http://deb.debian.org/debian RELEASE main contrib non-free
|
||||
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
|
||||
#deb-src http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi
|
||||
#deb-src http://deb.debian.org/debian RELEASE main contrib non-free
|
||||
|
|
BIN
stage0/files/debian.gpg
Normal file
BIN
stage0/files/debian.gpg
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/
|
||||
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://deb.debian.org/debian/
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
install -m 644 files/cmdline.txt "${ROOTFS_DIR}/boot/"
|
||||
install -m 644 files/config.txt "${ROOTFS_DIR}/boot/"
|
||||
if [ "$ENABLE_ARM64"="1" ]; then
|
||||
install -m 644 files/config.txt "${ROOTFS_DIR}/boot/config.txt"
|
||||
else
|
||||
install -m 644 files/config.arm64.txt "${ROOTFS_DIR}/boot/config.txt"
|
||||
fi
|
||||
|
|
68
stage1/00-boot-files/files/config.arm64.txt
Normal file
68
stage1/00-boot-files/files/config.arm64.txt
Normal file
|
@ -0,0 +1,68 @@
|
|||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# uncomment if you get no picture on HDMI for a default "safe" mode
|
||||
#hdmi_safe=1
|
||||
|
||||
# uncomment this if your display has a black border of unused pixels visible
|
||||
# and your display can output without overscan
|
||||
#disable_overscan=1
|
||||
|
||||
# uncomment the following to adjust overscan. Use positive numbers if console
|
||||
# goes off screen, and negative if there is too much border
|
||||
#overscan_left=16
|
||||
#overscan_right=16
|
||||
#overscan_top=16
|
||||
#overscan_bottom=16
|
||||
|
||||
# uncomment to force a console size. By default it will be display's size minus
|
||||
# overscan.
|
||||
#framebuffer_width=1280
|
||||
#framebuffer_height=720
|
||||
|
||||
# uncomment if hdmi display is not detected and composite is being output
|
||||
#hdmi_force_hotplug=1
|
||||
|
||||
# uncomment to force a specific HDMI mode (this will force VGA)
|
||||
#hdmi_group=1
|
||||
#hdmi_mode=1
|
||||
|
||||
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
|
||||
# DMT (computer monitor) modes
|
||||
#hdmi_drive=2
|
||||
|
||||
# uncomment to increase signal to HDMI, if you have interference, blanking, or
|
||||
# no display
|
||||
#config_hdmi_boost=4
|
||||
|
||||
# uncomment for composite PAL
|
||||
#sdtv_mode=2
|
||||
|
||||
#uncomment to overclock the arm. 700 MHz is the default.
|
||||
#arm_freq=800
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Uncomment this to enable infrared communication.
|
||||
#dtoverlay=gpio-ir,gpio_pin=17
|
||||
#dtoverlay=gpio-ir-tx,gpio_pin=18
|
||||
|
||||
# Additional overlays and parameters are documented /boot/overlays/README
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
# Enable ARM64
|
||||
arm_64bit=1
|
||||
|
||||
[pi4]
|
||||
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
|
||||
dtoverlay=vc4-fkms-v3d
|
||||
max_framebuffers=2
|
||||
|
||||
[all]
|
||||
#dtoverlay=vc4-fkms-v3d
|
|
@ -2,12 +2,11 @@ gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-g
|
|||
qpdfview gtk2-engines alsa-utils
|
||||
desktop-base
|
||||
git
|
||||
omxplayer
|
||||
raspberrypi-artwork
|
||||
policykit-1
|
||||
gvfs
|
||||
rfkill
|
||||
chromium-browser rpi-chromium-mods
|
||||
chromium rpi-chromium-mods
|
||||
gldriver-test
|
||||
fonts-droid-fallback
|
||||
fonts-liberation2
|
||||
|
|
|
@ -3,4 +3,4 @@ mousepad
|
|||
lxde lxtask menu-xdg
|
||||
zenity xdg-utils
|
||||
gvfs-backends gvfs-fuse
|
||||
lightdm gnome-themes-standard-data gnome-icon-theme
|
||||
lightdm adwaita-icon-theme gnome-icon-theme
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
on_chroot << EOF
|
||||
update-alternatives --install /usr/bin/x-www-browser \
|
||||
x-www-browser /usr/bin/chromium-browser 86
|
||||
x-www-browser /usr/bin/chromium 86
|
||||
update-alternatives --install /usr/bin/gnome-www-browser \
|
||||
gnome-www-browser /usr/bin/chromium-browser 86
|
||||
gnome-www-browser /usr/bin/chromium 86
|
||||
EOF
|
||||
|
|
|
@ -13,7 +13,7 @@ tree
|
|||
libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr
|
||||
geany
|
||||
piclone
|
||||
wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python-gpiozero python3-gpiozero python3-rpi.gpio
|
||||
pigpio python-pigpio python3-pigpio raspi-gpio python-gpiozero python3-gpiozero python3-rpi.gpio
|
||||
python-spidev python3-spidev
|
||||
python-twython python3-twython
|
||||
python-smbus python3-smbus
|
||||
|
@ -21,5 +21,6 @@ python-flask python3-flask
|
|||
pprompt
|
||||
piwiz
|
||||
rp-prefapps
|
||||
rp-bookshelf
|
||||
ffmpeg
|
||||
vlc
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
pi-package
|
||||
realvnc-vnc-server
|
||||
|
|
1
stage4/01-install-packages-armhf/00-packages
Normal file
1
stage4/01-install-packages-armhf/00-packages
Normal file
|
@ -0,0 +1 @@
|
|||
wiringpi
|
1
stage4/01-install-packages-armhf/00-packages-nr
Normal file
1
stage4/01-install-packages-armhf/00-packages-nr
Normal file
|
@ -0,0 +1 @@
|
|||
realvnc-vnc-server
|
5
stage5/00-install-extras-armhf/00-packages
Normal file
5
stage5/00-install-extras-armhf/00-packages
Normal file
|
@ -0,0 +1,5 @@
|
|||
nuscratch
|
||||
minecraft-pi python-minecraftpi python-picraft python3-picraft
|
||||
wolfram-engine
|
||||
nodered
|
||||
realvnc-vnc-viewer
|
|
@ -1,16 +1,12 @@
|
|||
mu-editor
|
||||
sonic-pi
|
||||
scratch nuscratch scratch2 scratch3
|
||||
scratch scratch3
|
||||
smartsim
|
||||
|
||||
minecraft-pi python-minecraftpi python-picraft python3-picraft
|
||||
python-sense-emu sense-emu-tools python-sense-emu-doc
|
||||
|
||||
wolfram-engine
|
||||
claws-mail
|
||||
greenfoot-unbundled bluej
|
||||
nodered
|
||||
realvnc-vnc-viewer
|
||||
|
||||
python-games
|
||||
code-the-classics
|
||||
|
|
Loading…
Reference in New Issue
Block a user