-
Notifications
You must be signed in to change notification settings - Fork 5
Prepare SD card
Muhammad Saad edited this page Mar 18, 2020
·
9 revisions
- Plug the SD Card to a card reader (mounted to a Linux PC x86_64)
- Find the name of the mounted SD card using e.g.
lsblk
- Note: This description assumes that the device of the SD card is /dev/sdb
- Ensure that no partition of the SD card is mounted, type
sudo umount -lf $(mount -l | grep /dev/sdb | awk '{print $3}')
- Create partition table and ext2-partition on SD card
echo -e "o\nn\np\n1\n\n\nw" | sudo fdisk /dev/sdb
sudo mkfs.ext2 /dev/sdb1
- Download latest rootfs:
- Unpack rootfs and copy to SD-card
sudo mount /dev/sdb1 /mnt/
sudo tar -xvf ubuntu_16.04_arm_fhg_$(VERSION).tar.gz
sudo rsync -aHP ./rootfs/ /mnt/
sync
sudo umount /mnt
- Mount the SD card and boot
- Stop the auto-boot by pressing any keyboard button and set the following uboot configurations.
- Note: These configurations are for Ubuntu 16.04
setenv fdtfile uImage.dtb
setenv loadfdt ext2load mmc $\{bootdev\}:$\{bootpart\} $\{fdtaddr\} $\{fdtfile\}
setenv sddev 1
setenv sdpart 1
setenv sdroot '/dev/mmcblk1p1 rootwait rw'
setenv sdboot 'setenv bootdev $\{sddev\}; setenv bootpart $\{sdpart\}; mmc dev $\{sddev\}; if mmc rescan; then if run loaduimage; then echo Booting from SD Card ...; if run loadfdt; then setenv bootargs console=ttymxc0,115200 root=$\{sdroot\} video=mxcfb0:dev=hdmi,1280x1024M@60,bpp=32; bootm $\{loadaddr\} - $\{fdtaddr\};fi;fi;fi'
setenv bootdelay 12
saveenv
reset
- Allow to boot
- Set the correct hostname in /etc/hostname (regarding DNS)