aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/image
Commit message (Expand)AuthorAgeFilesLines
* treewide: replace wpad-basic-wolfssl defaultRosen Penev2023-02-041-1/+1
* treewide: provide global default for SUPPORTED_DEVICESAdrian Schmutzler2021-01-232-2/+0
* oxnas: now longer build KD20 factory imageDaniel Golle2020-12-231-4/+0
* oxnas: kd20: revert accedintally commited changeDaniel Golle2020-08-291-0/+4
* treewide: use wpad-basic-wolfssl as defaultPetr Štetiar2020-08-201-1/+1
* oxnas: reduce size of ATA DMA descriptor spaceDaniel Golle2020-08-111-4/+0
* oxnas: use vendor_model scheme for ox810seAdrian Schmutzler2020-07-251-3/+4
* treewide: simplify inclusion of subtarget image filesAdrian Schmutzler2020-06-111-7/+1
* oxnas: some improvements for Shuttle KD20Daniel Golle2020-03-311-3/+3
* oxnas: enable sata on Pogoplug V3/ProSungbo Eo2020-03-171-3/+4
* oxnas: harmonize line breaks in ox820.mkSungbo Eo2020-03-161-12/+14
* kernel: make kmod-hwmon-core selected by dependent modulesSungbo Eo2020-03-131-1/+1
* oxnas: clean up DEVICE_VARSSungbo Eo2020-03-112-4/+3
* oxnas: convert DEVICE_TITLE to new variablesDaniel Golle2019-07-102-8/+13
* oxnas: install wireless driver on pogoplugproDaniel Golle2019-03-121-1/+1
* oxnas: use generic filenames for image and DTSDaniel Golle2019-03-111-20/+17
* oxnas: switch to kmod-ledtrig-usb-portDaniel Golle2019-03-011-5/+6
* oxnas: enable image metadata by setting SUPPORTED_DEVICESDaniel Golle2018-11-041-0/+5
* oxnas: bring in new oxnas targetDaniel Golle2018-06-013-0/+114
* oxnas: kill old oxnas targetDaniel Golle2018-06-011-107/+0
* oxnas: put u-boot images into image staging directoryJo-Philipp Wich2017-01-271-1/+1
* oxnas: append metadata to sysupgrade imageDaniel Golle2017-01-011-1/+1
* image: add KERNEL_SIZE to the default device varsMathias Kresin2016-09-131-1/+1
* image: use k as unit suffix for blocksizeMathias Kresin2016-09-041-1/+1
* oxnas: small image improvements for kd20Daniel Golle2016-09-091-2/+4
* oxnas: kd20: generate image compatible with stock firmwareDaniel Golle2016-09-041-1/+26
* build: rename sysupgrade-nand to sysupgrade-tarJo-Philipp Wich2016-07-291-1/+1
* image: clean up UBI related device variable definitionsFelix Fietkau2016-07-141-2/+1
* oxnas: install kernel binaries into bin/ for use with external storageFelix Fietkau2016-06-071-0/+3
* oxnas: use global UBIFS_OPTS, all profiles use the same settingsFelix Fietkau2016-05-221-5/+1
* oxnas: reorganize image build code and nuke profilesDaniel Golle2016-05-161-37/+29
* oxnas: add support for Akitio MyCloud miniHauke Mehrtens2016-04-191-1/+5
* oxnas: set ubifs parameters for Default profileJohn Crispin2016-03-231-0/+1
* oxnas: switch to new image generation templateJohn Crispin2016-03-201-86/+44
* oxnas: image: Remove custom mkfs targz override as base should be fine nowFelix Fietkau2015-10-311-5/+0
* oxnas: image: Refactor sanitize_profile_name using PROFILE_SANITIZED variableFelix Fietkau2015-10-311-12/+8
* image.mk: move KDIR_TMP definition to a central locationJonas Gorski2015-08-141-1/+0
* oxnas: change file extension of u-boot+initramfs imageFelix Fietkau2015-06-141-1/+1
* oxnas: fix itb generationJohn Crispin2015-02-161-2/+2
* oxnas: copy ubinized images to binary folderJohn Crispin2015-02-091-0/+2
* oxnas: use u-boot.bin in KDIRJohn Crispin2014-12-121-2/+2
* add new target 'oxnas'John Crispin2014-11-261-0/+135
1) := (others => '0'); subtype nat1 is natural range 0 to 1; type nat1_to_sl_type is array (nat1) of bit; constant nat1_to_01 : nat1_to_sl_type := (0 => '0', 1 => '1'); subtype sl_01 is bit; type carry_array is array (sl_01, sl_01, sl_01) of sl_01; constant compute_carry : carry_array := ('0' => ('0' => ('0' => '0', '1' => '0'), '1' => ('0' => '0', '1' => '1')), '1' => ('0' => ('0' => '0', '1' => '1'), '1' => ('0' => '1', '1' => '1'))); constant compute_sum : carry_array := ('0' => ('0' => ('0' => '0', '1' => '1'), '1' => ('0' => '1', '1' => '0')), '1' => ('0' => ('0' => '1', '1' => '0'), '1' => ('0' => '0', '1' => '1'))); type compare_type is (compare_unknown, compare_lt, compare_eq, compare_gt); function MAX (L, R : natural) return natural is begin if L > R then return L; else return R; end if; end MAX; function TO_INTEGER (ARG : UNSIGNED) return NATURAL is variable res : natural := 0; begin if arg'length = 0 then assert NO_WARNING report "NUMERIC_BIT.TO_INTEGER: null array detected, returning 0" severity warning; return 0; end if; for i in arg'range loop res := res + res; if arg (i) = '1' then res := res + 1; end if; end loop; return res; end TO_INTEGER; function TO_INTEGER (ARG : SIGNED) return INTEGER is alias argn : SIGNED (ARG'Length -1 downto 0) is arg; variable res : integer := 0; variable b : bit; begin if argn'length = 0 then assert NO_WARNING report "NUMERIC_BIT.TO_INTEGER: null array detected, returning 0" severity warning; return 0; end if; if argn (argn'left) = '1' then -- Negative value b := '0'; else b := '1'; end if; for i in argn'range loop res := res + res; if argn (i) = b then res := res + 1; end if; end loop; if b = '0' then -- Avoid overflow. res := -res - 1; end if; return res; end TO_INTEGER; function TO_UNSIGNED (ARG, SIZE : NATURAL) return UNSIGNED is variable res : UNSIGNED (SIZE - 1 downto 0); variable a : natural := arg; variable d : nat1; begin if size = 0 then return null_unsigned; end if; for i in res'reverse_range loop d := a rem 2; res (i) := nat1_to_01 (d); a := a / 2; end loop; if a /= 0 then assert NO_WARNING report "NUMERIC_BIT.TO_UNSIGNED: vector is truncated" severity warning; end if; return res; end TO_UNSIGNED; function TO_SIGNED (ARG : INTEGER; SIZE : NATURAL) return SIGNED is variable res : SIGNED (SIZE - 1 downto 0); variable v : integer := arg; variable b0, b1 : bit; variable d : nat1; begin if size = 0 then return null_signed; end if; if arg < 0 then -- Use one complement to avoid overflow: -- -v = (not v) + 1 -- not v = -v - 1 -- not v = -(v + 1) v := -(arg + 1); b0 := '1'; b1 := '0'; else v := arg; b0 := '0'; b1 := '1'; end if; for i in res'reverse_range loop d := v rem 2; v := v / 2; if d = 0 then res (i) := b0; else res (i) := b1; end if; end loop; if v /= 0 or res (res'left) /= b0 then assert NO_WARNING report "NUMERIC_BIT.TO_SIGNED: vector is truncated" severity warning; end if; return res; end TO_SIGNED; @ARITH @LOG function rising_edge (signal s : bit) return boolean is begin return s'event and s = '1'; end rising_edge; function falling_edge (signal s : bit) return boolean is begin return s'event and s = '0'; end falling_edge; end NUMERIC_BIT;