mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-29 09:39:11 +00:00
FEL and NFS related fixes
Added extra packages to default packages list
This commit is contained in:
parent
7779e2db9f
commit
35e524df56
5 changed files with 37 additions and 27 deletions
|
@ -535,7 +535,7 @@ PACKAGE_LIST="automake bash-completion bc bridge-utils build-essential cmake cpu
|
||||||
# Non-essential packages
|
# Non-essential packages
|
||||||
PACKAGE_LIST_ADDITIONAL="alsa-utils btrfs-tools bluez hddtemp i2c-tools iperf ir-keytable iotop iozone3 weather-util weather-util-data stress \
|
PACKAGE_LIST_ADDITIONAL="alsa-utils btrfs-tools bluez hddtemp i2c-tools iperf ir-keytable iotop iozone3 weather-util weather-util-data stress \
|
||||||
dvb-apps sysbench libbluetooth-dev libbluetooth3 subversion screen ntfs-3g vim pciutils evtest htop mtp-tools python-smbus \
|
dvb-apps sysbench libbluetooth-dev libbluetooth3 subversion screen ntfs-3g vim pciutils evtest htop mtp-tools python-smbus \
|
||||||
apt-transport-https libfuse2 libdigest-sha-perl libproc-processtable-perl w-scan"
|
apt-transport-https libfuse2 libdigest-sha-perl libproc-processtable-perl w-scan aptitude dnsutils"
|
||||||
|
|
||||||
# Release specific packages
|
# Release specific packages
|
||||||
case $RELEASE in
|
case $RELEASE in
|
||||||
|
|
|
@ -103,6 +103,19 @@ debootstrap_ng()
|
||||||
|
|
||||||
umount_chroot
|
umount_chroot
|
||||||
|
|
||||||
|
if [[ $ROOTFS_TYPE == fel || $ROOTFS_TYPE == nfs ]]; then
|
||||||
|
# kill /etc/network/interfaces on target to prevent conflicts between kernel
|
||||||
|
# and userspace network config (mainly on Xenial)
|
||||||
|
rm -f $DEST/cache/sdcard/etc/network/interfaces
|
||||||
|
printf "auto lo\niface lo inet loopback" > $DEST/cache/sdcard/etc/network/interfaces
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $ROOTFS_TYPE != ext4 ]]; then
|
||||||
|
# to prevent creating swap file on NFS (needs specific kernel options)
|
||||||
|
# and f2fs/btrfs (not recommended or needs specific kernel options)
|
||||||
|
touch $FEL_ROOTFS/var/swap
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $ROOTFS_TYPE == fel ]]; then
|
if [[ $ROOTFS_TYPE == fel ]]; then
|
||||||
FEL_ROOTFS=$DEST/cache/sdcard/
|
FEL_ROOTFS=$DEST/cache/sdcard/
|
||||||
display_alert "Starting FEL boot" "$BOARD" "info"
|
display_alert "Starting FEL boot" "$BOARD" "info"
|
||||||
|
@ -436,14 +449,6 @@ create_image()
|
||||||
eval 'rsync -aHWh --exclude="/boot/*" --exclude="/dev/*" --exclude="/proc/*" --exclude="/run/*" --exclude="/tmp/*" \
|
eval 'rsync -aHWh --exclude="/boot/*" --exclude="/dev/*" --exclude="/proc/*" --exclude="/run/*" --exclude="/tmp/*" \
|
||||||
--exclude="/sys/*" --info=progress2,stats1 $DEST/cache/sdcard/ $DEST/cache/mount/'
|
--exclude="/sys/*" --info=progress2,stats1 $DEST/cache/sdcard/ $DEST/cache/mount/'
|
||||||
else
|
else
|
||||||
# to prevent creating swap file on NFS share as it needs special kernel config option turned on
|
|
||||||
touch $DEST/cache/sdcard/var/swap
|
|
||||||
|
|
||||||
# kill /etc/network/interfaces on target to prevent conflicts between kernel
|
|
||||||
# and userspace network config (mainly on Xenial)
|
|
||||||
rm -f $FEL_ROOTFS/etc/network/interfaces
|
|
||||||
printf "auto lo\niface lo inet loopback" > $FEL_ROOTFS/etc/network/interfaces
|
|
||||||
|
|
||||||
display_alert "Creating rootfs archive" "rootfs.tgz" "info"
|
display_alert "Creating rootfs archive" "rootfs.tgz" "info"
|
||||||
tar cp --directory=$DEST/cache/sdcard/ --exclude='./boot/*' --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \
|
tar cp --directory=$DEST/cache/sdcard/ --exclude='./boot/*' --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \
|
||||||
--exclude='./sys/*' . | \
|
--exclude='./sys/*' . | \
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
FEL/NFS boot mode is a possibility to test freshly created Armbian distribution without using SD card. It is implemented by loading u-boot, kernel, boot script and .bin/.dtb file via [USB FEL mode](https://linux-sunxi.org/FEL/USBBoot) and providing root filesystem via NFS share.
|
FEL/NFS boot mode is a possibility to test freshly created Armbian distribution without using SD card. It is implemented by loading u-boot, kernel, boot script and .bin/.dtb file via [USB FEL mode](https://linux-sunxi.org/FEL/USBBoot) and providing root filesystem via NFS share.
|
||||||
|
|
||||||
Note, this mode is designed only for testing. To use root on NFS permanently, use `ROOTFS_TYPE=nfs` option.
|
NOTE: this mode is designed only for testing. To use root on NFS permanently, use `ROOTFS_TYPE=nfs` option.
|
||||||
|
NOTE: "hot" switching between kernel branches (default <-> dev/next) is not supported
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
|
|
24
fel-load.sh
24
fel-load.sh
|
@ -41,16 +41,11 @@ fel_prepare_target()
|
||||||
# kill /etc/fstab on target
|
# kill /etc/fstab on target
|
||||||
echo > $FEL_ROOTFS/etc/fstab
|
echo > $FEL_ROOTFS/etc/fstab
|
||||||
echo "tmpfs /tmp tmpfs defaults,rw,nosuid 0 0" >> $FEL_ROOTFS/etc/fstab
|
echo "tmpfs /tmp tmpfs defaults,rw,nosuid 0 0" >> $FEL_ROOTFS/etc/fstab
|
||||||
|
}
|
||||||
|
|
||||||
# kill /etc/network/interfaces on target to prevent conflicts between kernel
|
fel_load()
|
||||||
# and userspace network config (mainly on Xenial)
|
{
|
||||||
rm -f $FEL_ROOTFS/etc/network/interfaces
|
# update each time in case boot/script.bin link was changed in multi-board images
|
||||||
printf "auto lo\niface lo inet loopback" > $FEL_ROOTFS/etc/network/interfaces
|
|
||||||
|
|
||||||
|
|
||||||
# to prevent creating swap file
|
|
||||||
touch $FEL_ROOTFS/var/swap
|
|
||||||
|
|
||||||
if [[ -z $FEL_DTB_FILE ]]; then
|
if [[ -z $FEL_DTB_FILE ]]; then
|
||||||
if [[ $BRANCH == default ]]; then
|
if [[ $BRANCH == default ]]; then
|
||||||
# script.bin is either regular file or absolute symlink
|
# script.bin is either regular file or absolute symlink
|
||||||
|
@ -60,15 +55,16 @@ fel_prepare_target()
|
||||||
FEL_DTB_FILE=boot/script.bin
|
FEL_DTB_FILE=boot/script.bin
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
FEL_DTB_FILE=boot/dtb/$(grep CONFIG_DEFAULT_DEVICE_TREE $SOURCES/$BOOTSOURCEDIR/.config | cut -d '"' -f2).dtb
|
if [[ -f $SOURCES/$BOOTSOURCEDIR/.config ]]; then
|
||||||
|
FEL_DTB_FILE=boot/dtb/$(grep CONFIG_DEFAULT_DEVICE_TREE $SOURCES/$BOOTSOURCEDIR/.config | cut -d '"' -f2).dtb
|
||||||
|
else
|
||||||
|
FEL_DTB_FILE=boot/dtb/$(grep CONFIG_DEFAULT_DEVICE_TREE $SOURCES/$BOOTSOURCEDIR/configs/$BOOTCONFIG | cut -d '"' -f2).dtb
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
fel_load()
|
|
||||||
{
|
|
||||||
display_alert "Loading files via" "FEL USB" "info"
|
display_alert "Loading files via" "FEL USB" "info"
|
||||||
sunxi-fel -p uboot $SOURCES/$BOOTSOURCEDIR/u-boot-sunxi-with-spl.bin \
|
sunxi-fel -p uboot $FEL_ROOTFS/usr/lib/$CHOOSEN_UBOOT/u-boot-sunxi-with-spl.bin \
|
||||||
write 0x42000000 $FEL_ROOTFS/boot/zImage \
|
write 0x42000000 $FEL_ROOTFS/boot/zImage \
|
||||||
write 0x43000000 $FEL_ROOTFS/$FEL_DTB_FILE \
|
write 0x43000000 $FEL_ROOTFS/$FEL_DTB_FILE \
|
||||||
write 0x43100000 $FEL_ROOTFS/boot/boot.scr
|
write 0x43100000 $FEL_ROOTFS/boot/boot.scr
|
||||||
|
|
|
@ -1,15 +1,23 @@
|
||||||
## set this to NFS root path (ip:path)
|
## set this to NFS root path (ip:path)
|
||||||
## or else use dhcp option 17 (root-path)
|
## or else provide dhcp option 17 (root-path)
|
||||||
|
|
||||||
#setenv nfs_root 192.168.0.2:/mnt/nfsroot
|
#setenv nfs_root 192.168.0.2:/mnt/nfsroot
|
||||||
|
|
||||||
setenv bootargs "console=tty1 console=ttyS0,115200 root=/dev/nfs ip=dhcp rw rootflags=noatime,nodiratime disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=6"
|
# for DHCP
|
||||||
|
setenv net_setup "ip=dhcp"
|
||||||
|
|
||||||
|
# for static configuration see documentation
|
||||||
|
# https://github.com/torvalds/linux/blob/master/Documentation/filesystems/nfs/nfsroot.txt
|
||||||
|
# setenv net_setup "ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>"
|
||||||
|
|
||||||
|
# you may need to add extra kernel arguments specific to your device
|
||||||
|
setenv bootargs "console=tty1 console=ttyS0,115200 root=/dev/nfs ${net_setup} rw rootflags=noatime,nodiratime disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=6"
|
||||||
|
|
||||||
if test -n ${nfs_root}; then
|
if test -n ${nfs_root}; then
|
||||||
setenv bootargs "${bootargs} nfsroot=${nfs_root}"
|
setenv bootargs "${bootargs} nfsroot=${nfs_root}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ext4load mmc 0 0x00000000 .next || fatload mmc 0 0x00000000 .next
|
if ext4load mmc 0 0x00000000 .next || fatload mmc 0 0x00000000 .next; then
|
||||||
ext4load mmc 0 ${fdt_addr_r} /dtb/${fdtfile} || fatload mmc 0 ${fdt_addr_r} /dtb/${fdtfile}
|
ext4load mmc 0 ${fdt_addr_r} /dtb/${fdtfile} || fatload mmc 0 ${fdt_addr_r} /dtb/${fdtfile}
|
||||||
ext4load mmc 0 ${kernel_addr_r} zImage || fatload mmc 0 ${kernel_addr_r} zImage
|
ext4load mmc 0 ${kernel_addr_r} zImage || fatload mmc 0 ${kernel_addr_r} zImage
|
||||||
setenv fdt_high ffffffff
|
setenv fdt_high ffffffff
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue