###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2019 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
PART_TYPE = c
ifeq "$(BUILD_ARCH)" "aarch64"
BOOTLOADER = grub
+ S_OFFSET = 32768
endif
else
BOOTLOADER = grub
endif
# Install Pandaboard MLO and uboot first
-ifeq "$(BUILD_ARCH)" "armv5tel"
+ifeq "$(BUILD_ARCH)" "armv6l"
cp -v /boot/MLO $(MNThdd)/boot/
cp -v /boot/u-boot.img $(MNThdd)/boot/
sync
# Install IPFire
ifneq "$(BUILD_PLATFORM)" "arm"
- tar $(TAR_OPTIONS) -x --xz -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img
+ tar $(TAR_OPTIONS) -x --zstd -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img
else
tar $(TAR_OPTIONS) -x -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img
endif
# Create configuration
mkdir -pv $(MNThdd)/boot/grub
- chroot $(MNThdd) grub-mkconfig -o /boot/grub/grub.cfg
+ GRUB_FIRST_BOOT=true KERNEL_RELEASE="$(KVER)-ipfire" chroot $(MNThdd) \
+ grub-mkconfig -o /boot/grub/grub.cfg
# Boot the first kernel by default
chroot $(MNThdd) grub-set-default 0
# not copied to a block device)
dd if=/dev/zero bs=1M count=$(PADDING) >> $(IMG)
-ifeq "$(BUILD_ARCH)" "armv5tel"
+ifeq "$(BUILD_ARCH)" "armv6l"
# Install u-boot for Orangepi Zero/Nanopi DUO into image 8KB
dd if=/usr/share/u-boot/orangepi_zero/u-boot-sunxi-with-spl.bin of=$(IMG) bs=1K seek=8 conv=notrunc
endif
+ifeq "$(BUILD_ARCH)" "aarch64"
+ # Install u-boot for NanoPi R2S into image 8KB
+ dd if=/usr/share/u-boot/nanopi_r2s/u-boot-rockchip.bin of=$(IMG) bs=1K seek=32 conv=notrunc
+endif
# Compress Image
xz $(XZ_OPT) < $(IMG) > $(IMAGE_FILE)