You are not logged in.
I'm trying to package fwupdate as mentioned in phoronix... Imma not gonna add a link for that article.
# Maintainer: Pablo Lezaeta <prflr88 (arro'a) gmail puntocom>
pkgname=fwupdate-git
pkgver=0.4.r97
pkgrel=1
pkgdesc="Provides user access to read the EFI System Resource Table (ESRT)."
url="https://github.com/rhinstaller/fwupdate"
licence=("GPL2")
arch=("i686" "x86_64" "aarch64")
provides=("fwupdate")
conflict=("fwupdate")
makedepends=("git" "pesign" "gnu-efi-libs" "efivars" "gettext" "popt" "pkgconfig")
source=("fwupdate::git+https://github.com/rhinstaller/fwupdate")
md5sums=('SKIP')
pkgver() {
cd "$srcdir/fwupdate"
echo $(git describe --abbrev=0).r$(git rev-list --count master) | sed 's|-|.|g' | sed 's|v||g'
}
build() {
cd "$srcdir/fwupdate"
make libexecdir=/usr/lib/fwupdate libdir=/usr/lib \
sbindir=/usr/bin bindir=/usr/bin \
prefix=/usr
}
package() {
cd "$srcdir/fwupdate"
make DESTDIR="$pkgdir" install
}I get the deps from the fwupdate.spec.in and I'm tweaking with try and error but I can figure out what presign and efivars equivalent to arch are, and I run in a build problem.
<all up here is ok>
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o mkvar2.o mkvar2.c
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib/gnuefi/ /usr/lib/gnuefi//crt0-efi-ia32.o -o fakeesrt2.so fakeesrt2.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/gnuefi//elf_ia32_efi.lds
ld: cannot open linker script file /usr/lib/gnuefi//elf_ia32_efi.lds: No such file or directory
Makefile:56: recipe for target 'fakeesrt2.so' failed
make[1]: *** [fakeesrt2.so] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes. Stop.
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2I'm testing this in a i686 environment since I have no axes to x86_64 machine.
Some help and someone that could thest it in a x86_64 environment could be apresiated too.
Also fixing this could open the dor for the fwupdate stabñle version too.
Last edited by Jristz (2015-06-25 00:52:06)
Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::
Offline
https://www.archlinux.org/packages/extr … -efi-libs/
The path is slightly different.
Offline
I fix this issue adding GNUEFIDIR=/usr/lib and EFIDIR=Arch and upercase all the variables and adding libdir=/usr/lib as uptream point me.
but then I get another error...
==> Starting build()...
make[1]: Entering directory '/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/efi'
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o fakeesrt2.o fakeesrt2.c
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o fakeesrt.o fakeesrt.c
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o dumpesrt.o dumpesrt.c
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o fwupdate.o fwupdate.c
fakeesrt.c: In function 'efi_main':
fakeesrt.c:50:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
VOID *ptr = (VOID *)mem;
^
fwupdate.c: In function 'allocate':
fwupdate.c:41:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
*addr = (void *)pageaddr;
^
In file included from /usr/include/efi/efi.h:35:0,
from fwupdate.c:11:
fwupdate.c: In function 'free':
fwupdate.c:51:43: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
rc = uefi_call_wrapper(BS->FreePages, 2, (EFI_PHYSICAL_ADDRESS)addr,
^
/usr/include/efi/ia32/efibind.h:283:51: note: in definition of macro 'uefi_call_wrapper'
#define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
^
fwupdate.c: In function 'apply_capsules':
fwupdate.c:446:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(EFI_PHYSICAL_ADDRESS)(VOID *)cbd);
^
/usr/include/efi/ia32/efibind.h:283:51: note: in definition of macro 'uefi_call_wrapper'
#define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
^
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o mkvar.o mkvar.c
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o dumpf.o dumpf.c
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include -c -o mkvar2.o mkvar2.c
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib /usr/lib/crt0-efi-ia32.o -o fakeesrt2.so fakeesrt2.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/elf_ia32_efi.lds
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib /usr/lib/crt0-efi-ia32.o -o fakeesrt.so fakeesrt.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/elf_ia32_efi.lds
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib /usr/lib/crt0-efi-ia32.o -o dumpesrt.so dumpesrt.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/elf_ia32_efi.lds
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib /usr/lib/crt0-efi-ia32.o -o fwupdate.so fwupdate.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/elf_ia32_efi.lds
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib /usr/lib/crt0-efi-ia32.o -o mkvar.so mkvar.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/elf_ia32_efi.lds
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib /usr/lib/crt0-efi-ia32.o -o dumpf.so dumpf.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/elf_ia32_efi.lds
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared -Bsymbolic -L/usr/lib -L/usr/lib /usr/lib/crt0-efi-ia32.o -o mkvar2.so mkvar2.o -lefi -lgnuefi \
/usr/lib/gcc/i686-pc-linux-gnu/5.1.0/libgcc.a \
-T /usr/lib/elf_ia32_efi.lds
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel* -j .rela* -j .reloc \
--target efi-app-ia32 fakeesrt2.so fakeesrt2.efi.unsigned
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel* -j .rela* -j .reloc \
--target efi-app-ia32 fakeesrt.so fakeesrt.efi.unsigned
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel* -j .rela* -j .reloc \
--target efi-app-ia32 dumpesrt.so dumpesrt.efi.unsigned
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel* -j .rela* -j .reloc \
--target efi-app-ia32 fwupdate.so fwupdate.efi.unsigned
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel* -j .rela* -j .reloc \
--target efi-app-ia32 mkvar.so mkvar.efi.unsigned
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel* -j .rela* -j .reloc \
--target efi-app-ia32 dumpf.so dumpf.efi.unsigned
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel* -j .rela* -j .reloc \
--target efi-app-ia32 mkvar2.so mkvar2.efi.unsigned
pesign -s -i fakeesrt2.efi.unsigned -o fakeesrt2.efi --force -c 'Red Hat Test Certificate'
make[1]: pesign: Command not found
Makefile:48: recipe for target 'fakeesrt2.efi' failed
make[1]: *** [fakeesrt2.efi] Error 127
make[1]: *** Waiting for unfinished jobs....
rm dumpf.efi.unsigned mkvar.efi.unsigned fwupdate.so fakeesrt.so fakeesrt2.o mkvar2.so dumpesrt.so dumpf.o mkvar.o fwupdate.efi.unsigned fakeesrt.efi.unsigned mkvar2.efi.unsigned dumpesrt.efi.unsigned fakeesrt2.so dumpf.so mkvar.so fwupdate.o fakeesrt.o mkvar2.o dumpesrt.o fakeesrt2.efi.unsigned
make[1]: Leaving directory '/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/efi'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
2 shelf@Sombra ..oyectos/jristz/aur4-maint/fwupdate-git [master¿]% :(now trying to find what is pesign, maybe will be better work with upstream.
Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::
Offline
I just find https://aur4.archlinux.org/cgit/aur.git … h=fwupdate
wow I think someone beat me... but I 'm ok
I gonna test but I think with the help of that all is fixed.
EDIT: son of a submariner...
efiboot.h? why pkgfile not found you?
==> Starting build()...
make[1]: Entering directory '/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/efi'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/efi'
make[1]: Entering directory '/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/linux'
Package efiboot was not found in the pkg-config search path.
Perhaps you should add the directory containing `efiboot.pc'
to the PKG_CONFIG_PATH environment variable
No package 'efiboot' found
gcc -g -O0 -Wall -Wno-unused-result -Wno-unused-function -Wsign-compare -Werror=sign-compare -fshort-wchar --std=c11 -DLOCALEDIR=\"/usr/share//locale/\" -D_GNU_SOURCE -DFWUP_EFI_DIR_NAME=\"Arch\" -I/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/linux/include -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include/ -fPIC -c -o libfwup.o libfwup.c
gcc -g -O0 -Wall -Wno-unused-result -Wno-unused-function -Wsign-compare -Werror=sign-compare -fshort-wchar --std=c11 -DLOCALEDIR=\"/usr/share//locale/\" -D_GNU_SOURCE -DFWUP_EFI_DIR_NAME=\"Arch\" -I/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/linux/include -iquote/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/include/ -fPIC -c -o fwupdate.o fwupdate.c
libfwup.c:13:21: fatal error: efiboot.h: No such file or directory
compilation terminated.
Makefile:59: recipe for target 'libfwup.o' failed
make[1]: *** [libfwup.o] Error 1
make[1]: *** Waiting for unfinished jobs....
rm fwupdate.o
make[1]: Leaving directory '/home/shelf/Proyectos/jristz/aur4-maint/fwupdate-git/src/fwupdate/linux'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...as an additional the latest pkgbuild is on aur4 so look at that or here
# Maintainer: Pablo Lezaeta <prflr88 (arro'a) gmail puntocom>
pkgname=fwupdate-git
pkgver=0.4.r97
pkgrel=1
pkgdesc="Provides user access to read the EFI System Resource Table (ESRT) - Git version"
url="https://github.com/rhinstaller/fwupdate"
license=("GPL2")
arch=("i686" "x86_64")
provides=("fwupdate" "fwupdate-git")
conflicts=("fwupdate")
depends=("efivar")
makedepends=("git" "pesign" "gnu-efi-libs" "gettext" "popt" "pkgconfig")
source=("fwupdate::git+https://github.com/rhinstaller/fwupdate")
md5sums=('SKIP')
pkgver() {
cd "${srcdir}/fwupdate"
echo $(git describe --abbrev=0).r$(git rev-list --count master) | sed 's|-|.|g' | sed 's|v||g'
}
build() {
cd "${srcdir}/fwupdate"
make LIBEXECDIR=/usr/lib/fwupdate LIBDIR=/usr/lib \
SBINDIR=/usr/bin BINDIR=/usr/bin libdir=/usr/lib \
GNUEFIDIR=/usr/lib EFIDIR=Arch PREFIX=/usr
}
package() {
cd "${srcdir}/fwupdate"
make LIBDIR=/usr/lib EFIDIR=Arch DESTDIR="${pkgdir}" install
#don't install into /boot. copy files to /usr/lib/fwupdate for manual installation
install -d "${pkgdir}"/usr/lib/fwupdate
mv "${pkgdir}"/boot/efi/EFI "${pkgdir}"/usr/lib/fwupdate/EFI
rm -rf "${pkgdir}"/boot
}Last edited by Jristz (2015-06-25 00:54:23)
Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::
Offline