sdcard prepare for 4GB cards. Minor clean-ups.

This commit is contained in:
Benjamin Krill 2014-03-31 11:25:59 +02:00
parent b2e55d7bea
commit d39530c29c
5 changed files with 30 additions and 36 deletions

View File

@ -134,7 +134,7 @@
type = "int"; type = "int";
} }
} }
element button_pio.s1 element led_pio.s1
{ {
datum _lockedAddress datum _lockedAddress
{ {
@ -143,7 +143,7 @@
} }
datum baseAddress datum baseAddress
{ {
value = "65728"; value = "65600";
type = "String"; type = "String";
} }
} }
@ -160,7 +160,7 @@
type = "String"; type = "String";
} }
} }
element led_pio.s1 element button_pio.s1
{ {
datum _lockedAddress datum _lockedAddress
{ {
@ -169,7 +169,7 @@
} }
datum baseAddress datum baseAddress
{ {
value = "65600"; value = "65728";
type = "String"; type = "String";
} }
} }

View File

@ -222,9 +222,7 @@ mac-address field in device tree blob -->
<val type="hex">0x100</val> <val type="hex">0x100</val>
</DTAppend> </DTAppend>
<Chosen> <Chosen>
<Bootargs val="console=ttyS0,57600"></Bootargs> <Bootargs val="console=ttyS0,115200"></Bootargs>
</Chosen> </Chosen>
</BoardInfo> </BoardInfo>

View File

@ -73,8 +73,6 @@ $(PRELOADER_DIR)/Makefile: $(PRELOADER_ID)
--preloader-settings-dir "$(PRELOADER_HANDOFF)" \ --preloader-settings-dir "$(PRELOADER_HANDOFF)" \
--settings settings.bsp \ --settings settings.bsp \
--set spl.boot.WATCHDOG_ENABLE false --set spl.boot.WATCHDOG_ENABLE false
@echo "PATCH MAKEFILE"
sed -i 's/mkpimage -o \$$\@ \$$< \$$< \$$< \$$</mkpimage -o \$$@ \$$</' $(PRELOADER_DIR)/Makefile
preloader: $(PRELOADER_DIR)/Makefile preloader: $(PRELOADER_DIR)/Makefile
make -C $(PRELOADER_DIR) make -C $(PRELOADER_DIR)
@ -172,39 +170,41 @@ ifeq ($(origin SD_PRELOADER), command line)
SD_DEPENDENCY += sd_preloader SD_DEPENDENCY += sd_preloader
endif endif
sd_rootfs: $(SD_DEV)2 $(ROOTFS) PART_EXT=p
sudo mount $(SD_DEV)2 /mnt
sudo tar --strip-components 1 -xf $(ROOTFS) -C /mnt sd_rootfs: $(SD_DEV)$(PART_EXT)2 $(ROOTFS)
sudo mkfs.ext4 $(SD_DEV)$(PART_EXT)2
sudo mount $(SD_DEV)$(PART_EXT)2 /mnt
#sudo tar --strip-components 1 -xf $(ROOTFS) -C /mnt
sudo tar -xf $(ROOTFS) -C /mnt
sudo umount /mnt sudo umount /mnt
sync sync
sd_kernel: $(DEVICE_TREE_BLOB) $(QUARTUS_RBF) $(KERNEL) $(SD_DEV)1 sd_kernel: $(DEVICE_TREE_BLOB) $(QUARTUS_RBF) $(KERNEL) $(SD_DEV)$(PART_EXT)1
sudo mkdosfs $(SD_DEV)1 sudo mkdosfs $(SD_DEV)$(PART_EXT)1
sudo mount $(SD_DEV)1 /mnt sudo mount $(SD_DEV)$(PART_EXT)1 /mnt
sudo cp $(KERNEL) /mnt/uImage sudo cp $(KERNEL) /mnt/zImage
sudo cp $(DEVICE_TREE_BLOB) /mnt/$(PROJECT).dtb sudo cp $(DEVICE_TREE_BLOB) /mnt/socfpga.dtb
sudo cp $(QUARTUS_RBF) /mnt/$(PROJECT).rbf sudo cp $(QUARTUS_RBF) /mnt/socfpga.rbf
sudo umount /mnt sudo umount /mnt
sync sync
sd_preloader: $(SD_DEV)3 sd_preloader: $(SD_DEV)$(PART_EXT)3
sudo dd if=$(PRELOADER_IMG) of=$(SD_DEV)3 bs=64k seek=0 sudo dd if=$(PRELOADER_IMG) of=$(SD_DEV)$(PART_EXT)3 seek=0 count=1
sudo dd if=$(UBOOT_IMG) of=/dev/sdx3 bs=64K seek=4 sudo dd if=$(UBOOT_IMG) of=$(SD_DEV)$(PART_EXT)3 bs=64K seek=4
sd_prepare: $(SD_DEV) sd_prepare: $(SD_DEV)
@echo "DEV_BOARD: Bootsel jumpers = 101 (booting from SD)" @echo "DEV_BOARD: Bootsel jumpers = 101 (booting from SD)"
@echo "DEV_BOARD: MSEL jumpers = 00000 (enable the ARM to configure the FPGA)" @echo "DEV_BOARD: MSEL jumpers = 00000 (enable the ARM to configure the FPGA)"
sudo dd if=/dev/zero of=$(SDCARD_DEV) bs=512 count=1 sudo dd if=/dev/zero of=$(SD_DEV) bs=512 count=1
sudo partprobe $(SDCARD_DEV) # Partition-Table for a 4GB SDCARD
@for p in "n p 2 4096 +4496384 t 83" "n p 1 9000000 +20480K t 1 b" "n p 3 2048 +1024K t 3 a2a"; do \ @CMD="echo"; for c in n p 3 2048 +1024K t a2 n p 2 4096 +3814368K t 2 83 n p 1 7632896 " " t 1 b w; do \
unset CMD; \ CMD="$$CMD;echo $$c"; \
for c in $$p; do \ done; \
CMD="$$CMD echo $$c;"; \ CMD="( $$CMD ) | sudo fdisk $(SD_DEV)"; \
done; \ echo "CREATE PARTITIONS [$$CMD]"; \
CMD="( $$CMD ) | $(SD_DEV)"; \ eval $$CMD;
echo "CREATE PARTITION [$$p]" \ sudo partprobe $(SD_DEV)
eval $$CMD; \
done
sdcard: $(SD_DEPENDENCY) sdcard: $(SD_DEPENDENCY)

View File

@ -501,7 +501,6 @@ set_location_assignment PIN_AF9 -to temp_sclk
set_location_assignment PIN_AG7 -to temp_mosi set_location_assignment PIN_AG7 -to temp_mosi
set_location_assignment PIN_AG1 -to temp_miso set_location_assignment PIN_AG1 -to temp_miso
#set_instance_assignment -name IO_STANDARD "2.5 V" -to hsmc_clkin_n[1] #set_instance_assignment -name IO_STANDARD "2.5 V" -to hsmc_clkin_n[1]
#set_instance_assignment -name IO_STANDARD "2.5 V" -to hsmc_clkin_n[2] #set_instance_assignment -name IO_STANDARD "2.5 V" -to hsmc_clkin_n[2]
set_instance_assignment -name IO_STANDARD LVDS -to hsmc_clkin_p[1] set_instance_assignment -name IO_STANDARD LVDS -to hsmc_clkin_p[1]

View File

@ -28,9 +28,6 @@ use soc_system.all;
entity sockit is entity sockit is
port ( port (
clk : in std_logic;
reset_n : in std_logic;
hps_mem_a : out std_logic_vector(14 downto 0); hps_mem_a : out std_logic_vector(14 downto 0);
hps_mem_ba : out std_logic_vector( 2 downto 0); hps_mem_ba : out std_logic_vector( 2 downto 0);
hps_mem_ck : out std_logic; hps_mem_ck : out std_logic;