Skip to content

update gateware #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a037505
peripherals.soc_main: update gateware
herbertp Mar 4, 2024
1fd13c7
peripherals.bitstreams: update bitstreams
anuejn Mar 4, 2024
695e7c3
packages: add libdisplay-info
anuejn Mar 4, 2024
cc0fd28
add pll files and scripts for hdmi data islands
Apr 11, 2024
17c6ea3
get rid of /opt/bitstreams
anuejn Apr 11, 2024
2d0756f
add raw related / HDMI data island related changes
se6astian-pi Apr 11, 2024
d57d2dc
update memtool
herbertp Apr 11, 2024
ae8419f
add changes to changes.md
se6astian-pi Apr 11, 2024
31c30ac
enable bash completion
anuejn Apr 11, 2024
6f082b3
add pvim/pnano/pcat command to edit scripts in path
anuejn Apr 11, 2024
48fefac
differentiate raw modes
anuejn Apr 11, 2024
0205f68
add axiom_grow_fs.sh
anuejn Apr 11, 2024
7206b87
permit logins as root
anuejn Apr 11, 2024
b7f6a68
replace hashdeep with rhash
anuejn Apr 11, 2024
f0d5c12
Update CHANGES.md
se6astian-pi Apr 11, 2024
3e1cf1d
inline axiom_setup.sh into axiom_start.sh
anuejn Apr 11, 2024
2386a6c
mask systemd-random-seed
anuejn Apr 12, 2024
fe3719e
axiom-start.sh: do needed stuff also in non-raw modes
anuejn Apr 12, 2024
aab8658
add timestamp conversion python script for gateware
se6astian-pi Apr 11, 2024
c7e9b5c
replaced gateware with version from 7.3.24
se6astian-pi Apr 11, 2024
cd04cdf
remove outdated duplicates of scripts
se6astian-pi Apr 11, 2024
f8a006a
Update CHANGES.md
se6astian-pi Apr 11, 2024
aa3f9a5
Update CHANGES.md
se6astian-pi Apr 11, 2024
2df10dd
simplify rhash usage
anuejn Apr 11, 2024
2f8b20c
add script to output date of loaded gateware
se6astian-pi Apr 11, 2024
74da166
rsync --safe-links for kernel modules
anuejn Apr 11, 2024
e9fb7b0
Update Hotspot.nmconnection
se6astian-pi Jun 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
This file lists major or notable changes to the AXIOM Beta Firmware in chronological order (YYYY-MM-DD format). This is not
a complete change list, only those that may directly interest or affect users.


# 2024-04-11

##latest additions are:

* memtool updated to latest version
* latest gateware bin file added (now supports HDMI Data Islands)
* python scripts added to fill HDMI Data Islands with metadata
* added pseudo random number generator tool (prng)
* login via root user now possible
* pvim, pnano, pcat commands added to access scripts and tools without having to care about their location
* axiom_grow_fs.sh added to expand primary partition size to size of microsd card
* hashdeep package replaced with rhash package
* bash-completion added
* axiom_gateware_version.sh script added to output generation date of loaded gateware

firmware release: fillme


# 2021-11-17

## CHANGES.md file crated, recent additions are:
Expand Down
2 changes: 1 addition & 1 deletion makefiles/host/rootfs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OPENOCD_VERSION = d46f28c2ea2611f5fbbc679a5eed253d3dcd2fe3
OPENOCD_SOURCE = build/openocd-$(OPENOCD_VERSION).git

build/root.fs/.install_stamp: $(shell find makefiles/in_chroot/) build/root.fs/opt/axiom-firmware/.install_stamp $(LINUX_SOURCE)/arch/arm/boot/zImage build/root.fs/.base_install build/webui/dist/index.html build/nctrl/target/armv7-unknown-linux-musleabihf/release/nctrl $(OPENOCD_SOURCE)/.build_stamp
rsync -aK build/kernel_modules.fs/ $(@D)
rsync --safe-links -aK build/kernel_modules.fs/ $(@D)

cp -r build/webui/dist $(@D)/opt/axiom-firmware/software/webui

Expand Down
37 changes: 15 additions & 22 deletions makefiles/in_chroot/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,14 @@ sed -i 's/#IgnorePkg =/IgnorePkg = linux linux-*/' /etc/pacman.conf
echo 'Server = http://de3.mirror.archlinuxarm.org/$arch/$repo' > /etc/pacman.d/mirrorlist
pacman-key --init
pacman-key --populate archlinuxarm
pacman --noprogressbar --noconfirm --needed -Syu
pacman --noprogressbar --noconfirm --needed --overwrite '*' -Syu
pacman --noprogressbar --noconfirm -R linux-zedboard || true

# install dependencies
pacman --noprogressbar --noconfirm --needed -S $(grep -vE "^\s*#" makefiles/in_chroot/requirements_pacman.txt | tr "\n" " ")
pacman --noprogressbar --noconfirm --needed --overwrite '*' -S $(grep -vE "^\s*#" makefiles/in_chroot/requirements_pacman.txt | tr "\n" " ")
pip install --break-system-packages wheel
pip install --break-system-packages --progress-bar off -r makefiles/in_chroot/requirements_pip.txt

# setup users
if ! grep "dont log in as root" /root/.profile; then
echo 'echo -e "\033[31municorns dont log in as root\033[0m"' >> /root/.profile
fi

PASS=axiom
USERNAME=operator
if ! [ -d /home/$USERNAME ]; then
Expand All @@ -39,6 +34,9 @@ if ! [ -d /home/$USERNAME ]; then
rm -f /home/$USERNAME/.bashrc
fi

# also set the same password for root
echo "root:$PASS" | chpasswd

# add empty ~/.ssh/authorized_keys (see #80)
function add_authorized_keys_file() {
SSH_AUTHORIZED_KEYS=/home/$1/.ssh/authorized_keys
Expand All @@ -56,8 +54,8 @@ add_authorized_keys_file "root"
userdel -r -f alarm || true

# configure ssh
grep 'PermitRootLogin' /etc/ssh/sshd_config && sed -i 's/^.*PermitRootLogin.*$/PermitRootLogin without-password/' /etc/ssh/sshd_config
grep 'PermitRootLogin' /etc/ssh/sshd_config || echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config
grep 'PermitRootLogin' /etc/ssh/sshd_config && sed -i 's/^.*PermitRootLogin.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
grep 'PermitRootLogin' /etc/ssh/sshd_config || echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
grep -x 'X11Forwarding yes' /etc/ssh/sshd_config || echo "X11Forwarding yes" >> /etc/ssh/sshd_config

# build all the tools
Expand Down Expand Up @@ -116,23 +114,22 @@ chmod 700 /etc/NetworkManager/dispatcher.d/iptables.sh
cp -f software/configs/dnsmasq-shared-hosts.conf /etc/NetworkManager/dnsmasq-shared.d/hosts.conf
systemctl enable NetworkManager

# disable services that take a long time during boot
systemctl mask systemd-random-seed

# build raw2dng
cdmake software/misc-tools-utilities/raw2dng

# copy prebuilt fpga binaries & select the default binary
# also convert the bitstreams to the format expected by the linux kernel
mkdir -p /opt/bitstreams/
for bit in peripherals/bitstreams/*.bit; do
NAME=$(basename $bit)
ln -sf $(pwd)/$bit /opt/bitstreams
./makefiles/in_chroot/to_raw_bitstream.py -f /opt/bitstreams/$NAME /opt/bitstreams/"$(basename ${NAME%.bit}).bin"
ln -sf /opt/bitstreams/"${NAME%.bit}.bin" /lib/firmware
./makefiles/in_chroot/to_raw_bitstream.py -f $bit /lib/firmware/"$(basename ${bit%.bit}).bin"
done

if [[ $DEVICE == 'micro' ]]; then
ln -sf /opt/bitstreams/micro_main.bin /lib/firmware/axiom_fpga_main.bin
ln -sf /lib/firmware/micro_main.bin /lib/firmware/axiom_fpga_main.bin
else
ln -sf /opt/bitstreams/cmv_hdmi3_dual_60.bin /lib/firmware/axiom_fpga_main.bin
ln -sf /lib/firmware/cmv_hdmi.bin /lib/firmware/axiom_fpga_main.bin
fi

cp software/scripts/axiom_start.service /etc/systemd/system/
Expand Down Expand Up @@ -193,11 +190,7 @@ yarn cache clean --all
VERIFY_DIRECTORIES="/etc /usr /opt"
HASH_LOCATION="/opt/integrity_check"
mkdir -p $HASH_LOCATION
# delete hashes so they aren't included in the new files list
rm -f $HASH_LOCATION/hashes.txt; rm -f $HASH_LOCATION/files.txt
find $VERIFY_DIRECTORIES -type f > $HASH_LOCATION/files.txt
# also hash file list
echo "$HASH_LOCATION/files.txt" >> $HASH_LOCATION/files.txt
hashdeep -c sha256 -f $HASH_LOCATION/files.txt > $HASH_LOCATION/hashes.txt

sudo rhash --sha256 --recursive $VERIFY_DIRECTORIES -o $HASH_LOCATION/hashes.txt

echo "axiom-update finished. Software version is now $(git describe --always --abbrev=8 --dirty)."
6 changes: 5 additions & 1 deletion makefiles/in_chroot/requirements_pacman.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ base-devel
git
figlet
wget
hashdeep
rhash
pacman-contrib
rsync

Expand All @@ -35,6 +35,10 @@ python-numpy
dtc
man
man-pages
libdisplay-info
bash-completion
# for growpart
cloud-guest-utils

# webserver
lighttpd
Expand Down
6 changes: 2 additions & 4 deletions peripherals/bitstreams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ Until nextpnr, yosys and ghdl are ready to build this gateware or we have switch
## contents
### micro_main.bit
This bitstream is for the AXIOM Micro r2, it reads out the AR0330 sensor and writes the sensor into a ringbuffer in the DDR3 RAM connected to the zynq. From there the data can sent away over ethernet.
### cmv_hdmi3_dual_60.bit
This bitstream is for the AXIOM Beta, it reads out the cmv12k sensor and outputs 1920x1080@60Hz HDMI on both plugin modules.
### cmv_hdmi3_dual_30.bit
This bitstream is for the AXIOM Beta, it reads out the cmv12k sensor and outputs 1920x1080@30Hz HDMI on both plugin modules.
### cmv_hdmi.bit
This bitstream is for the AXIOM Beta, it reads out the cmv12k sensor and gives HDMI output in a configurable fashion.
### icsp.bit, check_pin10.bit, check_pin20.bit
These bitstreams are used for the initial bringup of a AXIOM Beta.
Binary file added peripherals/bitstreams/cmv_hdmi.bit
Binary file not shown.
2 changes: 2 additions & 0 deletions peripherals/bitstreams/cmv_hdmi.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: © 2023 Herbert Poetzl <herbert@13thfloor.at>
SPDX-License-Identifier: CC-BY-SA-4.0
Binary file removed peripherals/bitstreams/cmv_hdmi3_dual_30.bit
Binary file not shown.
2 changes: 0 additions & 2 deletions peripherals/bitstreams/cmv_hdmi3_dual_30.bit.license

This file was deleted.

Binary file removed peripherals/bitstreams/cmv_hdmi3_dual_60.bit
Binary file not shown.
2 changes: 0 additions & 2 deletions peripherals/bitstreams/cmv_hdmi3_dual_60.bit.license

This file was deleted.

Binary file removed peripherals/bitstreams/cmv_hdmi3_raw.bit
Binary file not shown.
2 changes: 0 additions & 2 deletions peripherals/bitstreams/cmv_hdmi3_raw.bit.license

This file was deleted.

Binary file added peripherals/pll/HDMI_100000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_10000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_108000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_10800KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_11000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_120000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_12000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_12375KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_12500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_13500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_13750KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_14400KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_148500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_14850KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_15000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_160000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_16000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_165000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_16500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_18000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_20000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_20625KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_21600KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_24000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_24750KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_25000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_27000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_27500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_29700KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_30000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_32000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_33000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_36000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_37125KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_40000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_41250KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_43200KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_48000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_49500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_50000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_54000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_55000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_5940KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_60000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_6400KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_6600KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_6750KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_6875KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_72000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_74250KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_7425KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_7500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_80000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_8000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_82500KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_8250KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_8640KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_9000KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_9600KHZ.pll
Binary file not shown.
Binary file added peripherals/pll/HDMI_9900KHZ.pll
Binary file not shown.
81 changes: 18 additions & 63 deletions peripherals/soc_main/addr_gen.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
library IEEE;
use IEEE.std_logic_1164.ALL;
use IEEE.numeric_std.ALL;
use IEEE.std_logic_unsigned.all;

use work.vivado_pkg.ALL; -- Vivado Attributes


entity addr_gen is
generic (
COUNT_WIDTH : natural := 12;
Expand All @@ -40,88 +40,43 @@ entity addr_gen is

end entity addr_gen;


architecture RTL of addr_gen is

attribute KEEP_HIERARCHY of RTL : architecture is "TRUE";

signal ccnt : unsigned(COUNT_WIDTH downto 0) := (others => '0');

alias ccnt_high : std_logic is ccnt(COUNT_WIDTH);

signal pat_c : std_logic_vector (47 downto 0)
:= (others => '0');
signal ab_in : std_logic_vector (47 downto 0)
:= (others => '0');

alias inc_a : std_logic_vector (29 downto 0)
is ab_in(47 downto 18);

alias inc_b : std_logic_vector (17 downto 0)
is ab_in(17 downto 0);

signal opmode : std_logic_vector (6 downto 0);

signal p_out : std_logic_vector (47 downto 0);

signal detect : std_logic;
signal active : std_logic;
signal first : std_logic;
signal detect : std_logic := '0';
signal ccnt : std_logic_vector(COUNT_WIDTH - 1 downto 0) := (others => '0');
signal addr_accum : std_logic_vector(ADDR_WIDTH - 1 downto 0) := (others => '0');

begin

ccnt_proc: process (clk)
begin
if rising_edge(clk) then
if load = '1' then
ccnt(col_cnt'range) <= unsigned(col_cnt);
ccnt_high <= '0';
first <= '1';
ccnt <= (others => '1');
addr_accum <= addr_in;
detect <= '0';

elsif enable = '1' then
if ccnt_high = '1' then
ccnt(col_cnt'range) <= unsigned(col_cnt);
ccnt_high <= '0';
if ccnt = col_cnt then
ccnt <= (others => '1');
addr_accum <= addr_accum + row_inc;

else
ccnt <= ccnt - "1";
addr_accum <= addr_accum + col_inc;
ccnt <= ccnt + "1";

end if;
first <= '0';
if addr_accum = pattern then
detect <= '1';

end if;
end if;
end if;
end process;

pat_c(addr_in'range) <= addr_in
when load = '1' else pattern;

ab_in(col_inc'range) <= col_inc
when ccnt_high = '0' else row_inc;

opmode <= "0110000" when load = '1' else "0100011";

DSP48_addr_inst : entity work.dsp48_wrap
generic map (
PREG => 1, -- Pipeline stages for P (0 or 1)
MASK => x"000000000000", -- 48-bit mask value for pattern detect
SEL_PATTERN => "C", -- Select pattern value ("PATTERN" or "C")
USE_PATTERN_DETECT => "PATDET", -- ("PATDET" or "NO_PATDET")
USE_SIMD => "ONE48" ) -- SIMD selection ("ONE48", "TWO24", "FOUR12")
port map (
CLK => clk, -- 1-bit input: Clock input
A => inc_a, -- 30-bit input: A data input
B => inc_b, -- 18-bit input: B data input
C => pat_c, -- 48-bit input: C data input
OPMODE => opmode, -- 7-bit input: Operation mode input
ALUMODE => "0000", -- 7-bit input: Operation mode input
CARRYIN => '0', -- 1-bit input: Carry input signal
CEP => active, -- 1-bit input: CE input for PREG
--
PATTERNDETECT => detect, -- Match indicator P[47:0] with pattern
P => p_out ); -- 48-bit output: Primary data output

match <= detect and not first;
active <= load or enable;
addr <= p_out(addr'range);
addr <= addr_accum;
match <= detect;

end RTL;
Loading