mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-07 17:02:30 +00:00
RISC-V: enable building for Nezha board
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
312d9221ee
commit
1527ac2b4e
@ -938,7 +938,14 @@ case $PROJECT in
|
|||||||
;;
|
;;
|
||||||
riscv64*)
|
riscv64*)
|
||||||
if [ -n "$SUBARCH" ]; then
|
if [ -n "$SUBARCH" ]; then
|
||||||
KERNEL_FLAVOURS=generic
|
case "${SUBARCH:-}" in
|
||||||
|
nezha)
|
||||||
|
KERNEL_FLAVOURS=allwinner
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
KERNEL_FLAVOURS=generic
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -209,25 +209,48 @@ install_grub() {
|
|||||||
chroot mountpoint u-boot-update
|
chroot mountpoint u-boot-update
|
||||||
|
|
||||||
if [ -n "${SUBARCH:-}" ]; then
|
if [ -n "${SUBARCH:-}" ]; then
|
||||||
u_boot_arch="${SUBARCH}"
|
case "${SUBARCH}" in
|
||||||
if [ "${u_boot_arch}" = "hifive" ]; then
|
"nezha")
|
||||||
u_boot_arch=sifive_fu540
|
echo "Installing U-Boot for Nezha board" &1>2
|
||||||
fi
|
chroot mountpoint apt-get install -qqy nezha-boot0
|
||||||
chroot mountpoint apt-get install -qqy u-boot-sifive
|
# FSBL, which gets U-Boot SPL
|
||||||
# FSBL, which gets U-Boot SPL
|
loader1="/dev/mapper${loop_device///dev/}p13"
|
||||||
loader1="/dev/mapper${loop_device///dev/}p13"
|
dd if=mountpoint/usr/lib/u-boot/nezha/boot0_sdcard_sun20iw1p1.bin of=$loader1
|
||||||
# The real U-Boot
|
# The real U-Boot
|
||||||
loader2="/dev/mapper${loop_device///dev/}p14"
|
chroot mountpoint apt-get install -qqy u-boot-nezha
|
||||||
dd if=mountpoint/usr/lib/u-boot/${u_boot_arch}/u-boot-spl.bin of=$loader1
|
loader2="/dev/mapper${loop_device///dev/}p14"
|
||||||
dd if=mountpoint/usr/lib/u-boot/${u_boot_arch}/u-boot.itb of=$loader2
|
dd if=mountpoint/usr/lib/u-boot/nezha/u-boot.toc1 of=$loader2
|
||||||
# Provide end-user modifyable CIDATA
|
# Provide end-user modifyable CIDATA
|
||||||
cidata_dev="/dev/mapper${loop_device///dev/}p12"
|
cidata_dev="/dev/mapper${loop_device///dev/}p12"
|
||||||
setup_cidata "${cidata_dev}"
|
setup_cidata "${cidata_dev}"
|
||||||
# Provide stock nocloud datasource
|
# Provide stock nocloud datasource
|
||||||
# Allow interactive login on baremetal SiFive board,
|
# Allow interactive login on baremetal SiFive board,
|
||||||
# without a cloud datasource.
|
# without a cloud datasource.
|
||||||
setup_cinocloud mountpoint
|
setup_cinocloud mountpoint
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
u_boot_arch="${SUBARCH}"
|
||||||
|
if [ "${u_boot_arch}" = "hifive" ]; then
|
||||||
|
u_boot_arch=sifive_fu540
|
||||||
|
fi
|
||||||
|
chroot mountpoint apt-get install -qqy u-boot-sifive
|
||||||
|
# FSBL, which gets U-Boot SPL
|
||||||
|
loader1="/dev/mapper${loop_device///dev/}p13"
|
||||||
|
# The real U-Boot
|
||||||
|
loader2="/dev/mapper${loop_device///dev/}p14"
|
||||||
|
dd if=mountpoint/usr/lib/u-boot/${u_boot_arch}/u-boot-spl.bin of=$loader1
|
||||||
|
dd if=mountpoint/usr/lib/u-boot/${u_boot_arch}/u-boot.itb of=$loader2
|
||||||
|
# Provide end-user modifyable CIDATA
|
||||||
|
cidata_dev="/dev/mapper${loop_device///dev/}p12"
|
||||||
|
setup_cidata "${cidata_dev}"
|
||||||
|
# Provide stock nocloud datasource
|
||||||
|
# Allow interactive login on baremetal SiFive board,
|
||||||
|
# without a cloud datasource.
|
||||||
|
setup_cinocloud mountpoint
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## TODO remove below once we have grub-efi-riscv64
|
## TODO remove below once we have grub-efi-riscv64
|
||||||
rm mountpoint/tmp/device.map
|
rm mountpoint/tmp/device.map
|
||||||
umount mountpoint/boot/efi
|
umount mountpoint/boot/efi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user