mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-15 19:31:42 +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
|
||||
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 \
|
||||
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
|
||||
case $RELEASE in
|
||||
|
|
|
@ -103,6 +103,19 @@ debootstrap_ng()
|
|||
|
||||
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
|
||||
FEL_ROOTFS=$DEST/cache/sdcard/
|
||||
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/*" \
|
||||
--exclude="/sys/*" --info=progress2,stats1 $DEST/cache/sdcard/ $DEST/cache/mount/'
|
||||
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"
|
||||
tar cp --directory=$DEST/cache/sdcard/ --exclude='./boot/*' --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \
|
||||
--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.
|
||||
|
||||
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
|
||||
|
||||
|
|
24
fel-load.sh
24
fel-load.sh
|
@ -41,16 +41,11 @@ fel_prepare_target()
|
|||
# kill /etc/fstab on target
|
||||
echo > $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
|
||||
# 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
|
||||
|
||||
|
||||
# to prevent creating swap file
|
||||
touch $FEL_ROOTFS/var/swap
|
||||
|
||||
fel_load()
|
||||
{
|
||||
# update each time in case boot/script.bin link was changed in multi-board images
|
||||
if [[ -z $FEL_DTB_FILE ]]; then
|
||||
if [[ $BRANCH == default ]]; then
|
||||
# script.bin is either regular file or absolute symlink
|
||||
|
@ -60,15 +55,16 @@ fel_prepare_target()
|
|||
FEL_DTB_FILE=boot/script.bin
|
||||
fi
|
||||
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
|
||||
}
|
||||
|
||||
fel_load()
|
||||
{
|
||||
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 0x43000000 $FEL_ROOTFS/$FEL_DTB_FILE \
|
||||
write 0x43100000 $FEL_ROOTFS/boot/boot.scr
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
## 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 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
|
||||
setenv bootargs "${bootargs} nfsroot=${nfs_root}"
|
||||
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 ${kernel_addr_r} zImage || fatload mmc 0 ${kernel_addr_r} zImage
|
||||
setenv fdt_high ffffffff
|
||||
|
|
Loading…
Add table
Reference in a new issue