Skip to content

Commit

Permalink
2020.10-alt2
Browse files Browse the repository at this point in the history
- added utilities fw_printenv and fw_setenv
- added mipsel support
  • Loading branch information
Dmitriy Voropaev committed Feb 1, 2021
1 parent fd294cd commit 8d65515
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
43 changes: 43 additions & 0 deletions fw_env.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is omitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
# Device offset must be prefixed with 0x to be parsed as a hexadecimal value.

# Baikal Electronics BFK3.1
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd1 0x0000 0x10000 0x10000


# NOR example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd1 0x0000 0x4000 0x4000
#/dev/mtd2 0x0000 0x4000 0x4000

# MTD SPI-dataflash example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd5 0x4200 0x4200
#/dev/mtd6 0x4200 0x4200

# NAND example
#/dev/mtd0 0x4000 0x4000 0x20000 2

# On a block device a negative offset is treated as a backwards offset from the
# end of the device/partition, rather than a forwards offset from the start.

# Block device example
#/dev/mmcblk0 0xc0000 0x20000
#/dev/mmcblk0 -0x20000 0x20000

# VFAT example
#/boot/uboot.env 0x0000 0x4000

# UBI volume
#/dev/ubi0_0 0x0 0x1f000 0x1f000
#/dev/ubi0_1 0x0 0x1f000 0x1f000

# UBI volume by name
#/dev/ubi0:env 0x0 0x1f000 0x1f000
#/dev/ubi0:env-redund 0x0 0x1f000 0x1f000
20 changes: 17 additions & 3 deletions u-boot-tools.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: u-boot-tools
Version: 2020.10
Release: alt1
Release: alt2

Summary: Das U-Boot
License: GPLv2+
Expand All @@ -17,6 +17,12 @@ BuildRequires: flex libssl-devel

%def_without sandbox

%ifarch mipsel
%define config_name qemu_mipsel_defconfig
%else
%define config_name sandbox_defconfig
%endif

%description
boot loader for embedded boards based on PowerPC, ARM, MIPS and several
other processors, which can be installed in a boot ROM and used to
Expand All @@ -27,16 +33,24 @@ This package contains sandboxed U-Boot and tools.
%setup

%build
%make_build sandbox_defconfig %{?_with_sandbox:all NO_SDL=1}%{!?_with_sandbox:tools}
%make_build sandbox_defconfig %{?_with_sandbox:all NO_SDL=1}%{!?_with_sandbox:tools} envtools

%install
mkdir -p %buildroot%_sysconfdir
mkdir -p %buildroot%_bindir
install -pm0755 tools/{dumpimage,fdtgrep,gen_eth_addr,mkimage,mkenvimage} %{?_with_sandbox:u-boot} %buildroot%_bindir/
install -pm0755 tools/{dumpimage,fdtgrep,gen_eth_addr,mkimage,mkenvimage,/env/fw_printenv} %{?_with_sandbox:u-boot} %buildroot%_bindir/
install -pm0644 fw_env.config %buildroot%_sysconfdir
ln -rs %buildroot%_bindir/fw_printenv %buildroot%_bindir/fw_setenv

%files
%_bindir/*
%config(noreplace) %_sysconfdir/fw_env.config

%changelog
* Mon Feb 01 2021 Voropaev Dmitriy <voropaevdmtr@altlinux.org> 2020.10-alt2
- added utilities fw_printenv and fw_setenv
- added mipsel support

* Tue Oct 06 2020 Sergey Bolshakov <sbolshakov@altlinux.ru> 2020.10-alt1
- 2020.10 released

Expand Down

0 comments on commit 8d65515

Please sign in to comment.