Boot ArchLinux on Zedboard Zynq FPGA

archlinux-logo-dark-1200dpi.b42bd35d5916

———————
Install to a SD card
———————
Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.

1. Start fdisk to partition the SD card:
fdisk -l
fdisk /dev/sdX

2. At the fdisk prompt, delete old partitions and create a new one:
a. Type o. This will clear out any partitions on the drive.
b. Type p to list partitions. There should be no partitions left.
c. Type n, then p for primary, 1 for the first partition on the drive, default for the first sector, press “enter”, then +50M for the last sector.
d. Type t, then c to set the first partition as W95 FAT32 (LBA).
e. Type n, then p for primary, 2 for the second partition on the drive, then ENTER twice to accept the default first and last sectors.
f. Write the partition table and exit by typing w.

3. Create and mount the ext4 filesystem:
mkfs.ext4 /dev/sdX2
mkdir mnt
mount /dev/sdX2 mnt

4. Download and extract the root filesystem: (tar may take a few minutes)
wget http://archlinuxarm.org/os/ArchLinuxARM-zedboard-latest.tar.gz
bsdtar -xpf ArchLinuxARM-zedboard-latest.tar.gz -C mnt
sync

5. Create and mount the FAT filesystem: (dependent package: dosfstools)
mkfs.vfat /dev/sdX1
mkdir boot
mount /dev/sdX1 boot

6. Copy boot files to the boot partition:
cp mnt/boot/* boot
umount boot
umount mnt
sync

7. Insert the SD card into the ZedBoard, connect ethernet, micro-USB serial, and apply power.

—————–
Configure U-Boot
—————–
1. After applying power, the micro-USB cable will create a serial device on your computer as /dev/ttyACM0. Connect to this using 115200n8.

2. Press any key to stop autoboot and get to the U-Boot command prompt.

3. Save variables that will be replaced:
setenv sdboot_orig $sdboot

4. Set the new variables:
setenv bootargs 'console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait'
setenv sdboot 'echo Copying Linux from SD to RAM... && mmcinfo && fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && bootm 0x3000000 - 0x2A00000'

5. Save the new configuration:
saveenv

6. Boot the system by typing:
boot

Login as the default user alarm with the password alarm.
The default root password is root.

Adapted from: ArchLinux Zedboard

Justin DING
one for all, all for one.

Leave a Comment

Your email address will not be published. Required fields are marked *