Inhaltsverzeichnis

Firmware

Die von der Community Pinneberg verwendete Firmware ist Gluon. Siehe:

Es gibt verschiedene Zweige:

Pinneberger Versionen

Firmware erstellen

Voraussetzungen

apt-get install build-essential git subversion python gawk unzip file libssl-dev zlib1g-dev libncurses5-dev
git clone https://github.com/freifunk-gluon/gluon.git
cd gluon
git clone git://github.com/thooge/ffpi-site.git site
cd site
git checkout [master|beta|experimental]
cd ..
 
git checkout v2015.1.2
make update
make -j10 GLUON_TARGET=ar71xx-generic GLUON_BRANCH=[stable|beta|experimental]
 
# Falls die Versin < 2017 ist, muß die Datei modules angepaßt werden:
# Das Reporitory muß von openwrt auf chaos_calmer umgestellt werden
 
make update
 
make manifest GLUON_BRANCH=[stable|beta|experimental]

Weitere Targets

Erstellen wiederholen

cd gluon
git pull
make clean GLUON_TARGET=ar71xx-generic GLUON_BRANCH=[stable|beta|experimental]
make update
make -j10 GLUON_TARGET=ar71xx-generic GLUON_BRANCH=[stable|beta|experimental]

Alles löschen: make dirclean

Fehlerbehebung

Falls der Build mit einer Fehlermeldung abbricht, kann das Kommando um V=s ergänzt werden. Damit wird eine ausführliche Protokollierung eingeschaltet.

Fehler aufgrund Änderungen in glibc

Fehler bei m4:

cd ./openwrt-ramips/build_dir/host/m4-1.4.17
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
tools/bison/patches/110-glibc-change-work-around.patch
Subject: Workaround change in glibc
 
Temporary workaround to compile with glibc 2.28, which
deprecated some constants
 
Based on the workaround made for the tools/m4 package
 
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -18,6 +18,12 @@
    the same implementation of stdio extension API, except that some fields
    have different naming conventions, or their access requires some casts.  */
 
+/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
+   problem by defining it ourselves.  FIXME: Do not rely on glibc
+   internals.  */
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
+# define _IO_IN_BACKUP 0x100
+#endif
 
 /* BSD stdio derived implementations.  */
 
--- a/lib/fseterr.c
+++ b/lib/fseterr.c
@@ -29,7 +29,7 @@
   /* Most systems provide FILE as a struct and the necessary bitmask in
      <stdio.h>, because they need it for implementing getc() and putc() as
      fast macros.  */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   fp->_flags |= _IO_ERR_SEEN;
 #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   fp_->_flags |= __SERR;
tools/squashfs/patches/140-gcc-10-fix.patch
Fixes the following build error with GCC 10:
	/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here
And a compile warning.
 
--- a/squashfs-tools/read_fs.c
+++ b/squashfs-tools/read_fs.c
@@ -61,7 +61,7 @@ extern int add_file(long long, long long
 						fprintf(stderr, s, ## args); \
 					} while(0)
 
-int swap;
+static int swap;
 
 int read_block(int fd, long long start, long long *next, unsigned char *block, squashfs_super_block *sBlk)
 {
--- a/squashfs-tools/mksquashfs.c
+++ b/squashfs-tools/mksquashfs.c
@@ -258,6 +258,7 @@ int read_sort_file(char *filename, int s
 void sort_files_and_write(struct dir_info *dir);
 struct file_info *duplicate(char *(get_next_file_block)(struct duplicate_buffer_handle *, unsigned int), struct duplicate_buffer_handle *file_start, long long bytes, unsigned int **block_list, long long *start, int blocks, struct fragment **fragment, char *frag_data, int frag_bytes);
 struct dir_info *dir_scan1(char *, int (_readdir)(char *, char *, struct dir_info *));
+int dir_scan2(squashfs_inode *inode, struct dir_info *dir_info);
 
 #define MKINODE(A)	((squashfs_inode)(((squashfs_inode) inode_bytes << 16) + (((char *)A) - data_cache)))

Meistens fehlt:

#include <sys/sysmacros.h>

Mögliche betroffene Dateien:

siehe auch: https://forum.openwrt.org/t/solved-error-undefined-reference-to-major/108258

Firmware signieren

Benötigte Bibliotheken:

make manifest GLUON_BRANCH=[stable|beta|experimental]
contrib/sign.sh <private_key> output/images/sysupgrade/[stable|beta|experimental].manifest