2008-11-20 11:27:31 +00:00
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
2008-11-25 19:54:23 +00:00
# $Id$
2008-11-20 11:27:31 +00:00
#
include $(TOOLSDIR)/functions.make
2011-02-02 17:43:32 +00:00
DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) $(TARGET) \
2010-05-27 09:41:46 +00:00
-DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" $(BUILDDATE) \
2008-11-20 11:27:31 +00:00
$(EXTRA_DEFINES) # <-- -DSIMULATOR or not
2009-03-02 06:13:18 +00:00
INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
2008-11-20 11:27:31 +00:00
CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS)
2010-03-20 08:53:27 +00:00
PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix
2010-12-27 17:27:59 +00:00
ASMFLAGS = -D__ASSEMBLER__ # work around gcc 3.4.x bug with -std=gnu99, only meant for .S files
2013-04-16 21:47:58 +00:00
CORE_LDOPTS = $(GLOBAL_LDOPTS) # linker ops specifically for core build
2008-11-20 11:27:31 +00:00
TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
$(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \
2010-02-16 21:55:42 +00:00
$(TOOLSDIR)/uclpack $(TOOLSDIR)/mkboot $(TOOLSDIR)/iaudio_bl_flash.c \
2011-03-09 21:50:43 +00:00
$(TOOLSDIR)/iaudio_bl_flash.h
2008-11-20 11:27:31 +00:00
2012-05-18 21:24:57 +00:00
ifeq ($(MODELNAME),archosplayer)
TOOLS += $(TOOLSDIR)/player_unifont
endif
2009-04-12 01:28:33 +00:00
ifeq (,$(PREFIX))
2010-08-01 16:15:27 +00:00
ifdef APP_TYPE
2009-04-12 01:28:33 +00:00
# for sims, set simdisk/ as default
2010-08-01 16:15:27 +00:00
ifeq ($(APP_TYPE),sdl-sim)
RBPREFIX = simdisk
else ifeq ($(APP_TYPE),sdl-app)
RBPREFIX = /usr/local
endif
INSTALL = --install="$(RBPREFIX)"
2009-04-12 01:28:33 +00:00
else
# /dev/null as magic to tell it wasn't set, error out later in buildzip.pl
INSTALL = --install=/dev/null
endif
else
2010-08-01 16:15:27 +00:00
RBPREFIX = $(PREFIX)
INSTALL = --install="$(RBPREFIX)"
2009-04-12 01:28:33 +00:00
endif
2008-11-21 13:21:25 +00:00
RBINFO = $(BUILDDIR)/rockbox-info.txt
2008-11-20 11:27:31 +00:00
# list suffixes to be understood by $*
.SUFFIXES: .rock .codec .map .elf .c .S .o .bmp .a
.PHONY: all clean tags zip tools manual bin build info langs
2009-03-10 19:06:14 +00:00
ifeq (,$(filter clean veryclean reconf tags voice voicetools manual manual-pdf manual-html manual-zhtml manual-txt manual-ztxt manual-zip help fontzip ,$(MAKECMDGOALS)))
2008-11-26 23:21:30 +00:00
# none of the above
2008-11-20 11:27:31 +00:00
DEPFILE = $(BUILDDIR)/make.dep
2008-11-26 23:21:30 +00:00
endif
2008-11-20 11:27:31 +00:00
all: $(DEPFILE) build
2012-03-26 20:24:57 +00:00
# Subdir makefiles. their primary purpose is to populate SRC, OTHER_SRC,
2013-01-24 15:01:28 +00:00
# ASMDEFS_SRC and CORE_LIBS. But they also define special dependencies and
# compile rules
2008-11-20 11:27:31 +00:00
include $(TOOLSDIR)/tools.make
2009-09-01 14:53:37 +00:00
2012-03-26 23:22:51 +00:00
ifeq (,$(findstring checkwps,$(APP_TYPE)))
ifeq (,$(findstring database,$(APP_TYPE)))
ifeq (,$(findstring warble,$(APP_TYPE)))
2012-03-26 22:16:09 +00:00
include $(FIRMDIR)/firmware.make
include $(ROOTDIR)/apps/bitmaps/bitmaps.make
2013-03-13 20:40:04 +00:00
ifeq (arch_arm,$(ARCH))
2017-02-23 10:33:19 +00:00
# some targets don't use the unwarminder because they have the glibc backtrace
ifeq (,$(filter sonynwz,$(APP_TYPE)))
include $(ROOTDIR)/lib/unwarminder/unwarminder.make
endif
2013-03-13 20:40:04 +00:00
endif
2013-01-24 15:01:28 +00:00
ifeq (,$(findstring bootloader,$(APPSDIR)))
2012-03-26 22:16:09 +00:00
include $(ROOTDIR)/lib/skin_parser/skin_parser.make
2012-03-27 14:27:02 +00:00
include $(ROOTDIR)/lib/tlsf/libtlsf.make
2012-03-26 22:16:09 +00:00
endif
2012-03-26 21:55:02 +00:00
endif
2010-02-25 12:28:30 +00:00
endif
2009-09-01 14:53:37 +00:00
endif
2008-11-20 11:27:31 +00:00
2012-01-17 06:36:08 +00:00
#included before codecs.make and plugins.make so they see them)
2010-08-24 12:38:42 +00:00
ifndef APP_TYPE
include $(ROOTDIR)/lib/libsetjmp/libsetjmp.make
2012-03-28 20:57:13 +00:00
ifeq (arch_arm,$(ARCH))
2012-01-17 06:36:08 +00:00
include $(ROOTDIR)/lib/arm_support/arm_support.make
endif
2010-08-24 12:38:42 +00:00
endif
2013-04-16 21:47:58 +00:00
ifeq (,$(findstring bootloader,$(APPSDIR)))
ifeq (,$(findstring checkwps,$(APP_TYPE)))
include $(ROOTDIR)/lib/fixedpoint/fixedpoint.make
endif
endif
2008-11-20 11:27:31 +00:00
ifneq (,$(findstring bootloader,$(APPSDIR)))
2017-02-23 10:33:19 +00:00
ifneq (,$(findstring sonynwz,$(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/sonynwz/sonynwz.make
2017-04-27 09:36:40 +00:00
else ifneq (,$(findstring rocker,$(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/agptek/rocker.make
2017-02-23 10:33:19 +00:00
else
include $(APPSDIR)/bootloader.make
endif
2008-11-20 11:27:31 +00:00
else ifneq (,$(findstring bootbox,$(APPSDIR)))
include $(APPSDIR)/bootbox.make
2012-03-03 18:37:40 +00:00
else ifneq (,$(findstring checkwps,$(APP_TYPE)))
2009-08-21 20:28:26 +00:00
include $(APPSDIR)/checkwps.make
2012-03-26 21:57:20 +00:00
include $(ROOTDIR)/lib/skin_parser/skin_parser.make
2012-03-03 18:37:40 +00:00
else ifneq (,$(findstring database,$(APP_TYPE)))
2009-10-07 16:54:15 +00:00
include $(APPSDIR)/database.make
2012-03-03 18:37:40 +00:00
else ifneq (,$(findstring warble,$(APP_TYPE)))
include $(ROOTDIR)/lib/rbcodec/test/warble.make
2012-03-28 22:01:44 +00:00
include $(ROOTDIR)/lib/tlsf/libtlsf.make
2012-03-26 22:16:09 +00:00
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
2013-04-16 21:47:58 +00:00
else # core
2008-11-20 11:27:31 +00:00
include $(APPSDIR)/lang/lang.make
2019-07-20 10:46:11 +00:00
include $(APPSDIR)/apps.make
2013-04-16 21:47:58 +00:00
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
2008-11-20 11:27:31 +00:00
ifdef ENABLEDPLUGINS
include $(APPSDIR)/plugins/bitmaps/pluginbitmaps.make
include $(APPSDIR)/plugins/plugins.make
endif
2010-09-02 00:24:40 +00:00
ifneq (,$(findstring sdl,$(APP_TYPE)))
2008-11-20 11:27:31 +00:00
include $(ROOTDIR)/uisimulator/uisimulator.make
endif
2010-09-02 00:24:40 +00:00
Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.
The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).
Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.
This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.
Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.
Flyspray: FS#12348
Author: Lorenzo Miori, myself
Merry christmas to ypr0 owners! :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 11:56:46 +00:00
ifneq (,$(findstring ypr0,$(APP_TYPE)))
2013-02-23 15:59:49 +00:00
include $(ROOTDIR)/firmware/target/hosted/samsungypr/ypr0/ypr0.make
Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.
The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).
Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.
This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.
Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.
Flyspray: FS#12348
Author: Lorenzo Miori, myself
Merry christmas to ypr0 owners! :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 11:56:46 +00:00
endif
2013-09-10 20:48:34 +00:00
ifneq (,$(findstring ypr1,$(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/samsungypr/ypr1/ypr1.make
endif
2017-02-23 10:33:19 +00:00
ifneq (,$(findstring sonynwz,$(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/sonynwz/sonynwz.make
endif
2017-04-27 09:36:40 +00:00
ifneq (,$(findstring rocker,$(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/agptek/rocker.make
endif
iBasso DX50/DX90: Major code cleanup and reorganization.
Reorganization
- Separated iBasso devices from PLATFORM_ANDROID. These are now standlone
hosted targets. Most device specific code is in the
firmware/target/hosted/ibasso directory.
- No dependency on Android SDK, only the Android NDK is needed.
32 bit Android NDK and Android API Level 16.
- Separate implementation for each device where feasible.
Code cleanup
- Rewrite of existing code, from simple reformat to complete reimplementation.
- New backlight interface, seperating backlight from touchscreen.
- Rewrite of device button handler, removing unneeded code and fixing memory
leaks.
- New Debug messages interface logging to Android adb logcat (DEBUGF, panicf,
logf).
- Rewrite of lcd device handler, removing unneeded code and fixing memory leaks.
- Rewrite of audiohw device handler/pcm interface, removing unneeded code and
fixing memory leaks, enabling 44.1/48kHz pthreaded playback.
- Rewrite of power and powermng, proper shutdown, using batterylog results
(see http://gerrit.rockbox.org/r/#/c/1047/).
- Rewrite of configure (Android NDK) and device specific config.
- Rewrite of the Android NDK specific Makefile.
Misc
- All plugins/games/demos activated.
- Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa.
Includes
- http://gerrit.rockbox.org/r/#/c/993/
- http://gerrit.rockbox.org/r/#/c/1010/
- http://gerrit.rockbox.org/r/#/c/1035/
Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight
interface and new option for hold switch, touchscreen, physical button
interaction.
Rockbox needs the iBasso DX50/DX90 loader for startup, see
http://gerrit.rockbox.org/r/#/c/1099/
The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If
/mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit
gracefully and the loader will restart Rockbox on USB disconnect.
Tested on iBasso DX50.
Compiled (not tested) for iBasso DX90.
Compiled (not tested) for PLATFORM_ANDROID.
Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
2015-02-02 20:44:29 +00:00
ifneq (,$(findstring android_ndk, $(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/ibasso/android_ndk.make
else
ifneq (,$(findstring android, $(APP_TYPE)))
include $(ROOTDIR)/android/android.make
endif
2010-09-02 00:24:40 +00:00
endif
2011-06-09 20:58:03 +00:00
ifneq (,$(findstring pandora, $(MODELNAME)))
include $(ROOTDIR)/packaging/pandora/pandora.make
endif
2008-11-20 11:27:31 +00:00
endif # bootloader
2013-04-16 21:47:58 +00:00
# One or more subdir makefiles requested --gc-sections?
ifdef CORE_GCSECTIONS
# Do not use '--gc-sections' when compiling sdl-sim
ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
CORE_LDOPTS += -Wl,--gc-sections
endif
endif # CORE_GCSECTIONS
2008-11-20 11:27:31 +00:00
OBJ := $(SRC:.c=.o)
OBJ := $(OBJ:.S=.o)
OBJ += $(BMP:.bmp=.o)
2017-05-12 09:50:56 +00:00
OBJ := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(OBJ))
2008-11-20 11:27:31 +00:00
2008-11-21 13:21:25 +00:00
build: $(TOOLS) $(BUILDDIR)/$(BINARY) $(CODECS) $(ROCKS) $(ARCHOSROM) $(RBINFO)
$(RBINFO): $(BUILDDIR)/$(BINARY)
$(SILENT)echo Creating $(@F)
$(SILENT)$(TOOLSDIR)/mkinfo.pl $@
2008-11-20 11:27:31 +00:00
$(DEPFILE) dep:
$(call PRINTS,Generating dependencies)
2010-08-21 18:07:12 +00:00
$(call mkdepfile,$(DEPFILE)_,$(SRC))
$(call mkdepfile,$(DEPFILE)_,$(OTHER_SRC:%.lua=))
$(call mkdepfile,$(DEPFILE)_,$(ASMDEFS_SRC))
$(call bmpdepfile,$(DEPFILE)_,$(BMP) $(PBMP))
2009-02-04 20:59:27 +00:00
@mv $(DEPFILE)_ $(DEPFILE)
2008-11-20 11:27:31 +00:00
2009-04-03 13:44:47 +00:00
bin: $(DEPFILE) $(TOOLS) $(BUILDDIR)/$(BINARY) $(RBINFO)
2008-11-20 11:27:31 +00:00
rocks: $(DEPFILE) $(TOOLS) $(ROCKS)
codecs: $(DEPFILE) $(TOOLS) $(CODECS)
2009-03-11 16:13:46 +00:00
tools: $(TOOLS)
2008-11-20 11:27:31 +00:00
-include $(DEPFILE)
veryclean: clean
$(SILENT)rm -rf $(TOOLS)
2010-09-12 16:35:02 +00:00
clean::
2008-11-20 11:27:31 +00:00
$(SILENT)echo Cleaning build directory
2008-11-22 23:34:24 +00:00
$(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \
2010-06-19 06:11:22 +00:00
rockbox.tar.bz2 TAGS apps firmware tools comsim sim lang lib \
2008-11-22 23:34:24 +00:00
manual *.pdf *.a credits.raw rockbox.ipod bitmaps \
pluginbitmaps UI256.bmp rockbox-full.zip html txt \
rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \
2009-03-02 06:13:18 +00:00
*.wav *.mp3 *.voice $(CLEANOBJS) \
2008-11-22 23:34:24 +00:00
$(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin \
2008-11-28 22:22:47 +00:00
make.dep rombox.elf rombox.map rombox.bin rombox.ucl romstart.txt \
2011-03-11 15:45:49 +00:00
$(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK) \
2019-07-20 14:04:32 +00:00
rockbox.apk lang_enum.h rbversion.h
2008-11-20 11:27:31 +00:00
#### linking the binaries: ####
.SECONDEXPANSION:
ifeq (,$(findstring bootloader,$(APPSDIR)))
# not bootloader
2008-11-21 15:27:16 +00:00
OBJ += $(LANG_O)
2010-07-10 13:49:49 +00:00
ifndef APP_TYPE
2008-11-21 15:27:16 +00:00
2008-11-20 11:27:31 +00:00
## target build
2010-01-24 15:32:23 +00:00
CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h
2014-01-10 15:12:38 +00:00
ifeq ($(wildcard $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds),)
RAMLDS := $(FIRMDIR)/target/$(CPU)/app.lds
else
2008-11-20 11:27:31 +00:00
RAMLDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds
2014-01-10 15:12:38 +00:00
endif
2008-11-20 11:27:31 +00:00
LINKRAM := $(BUILDDIR)/ram.link
ROMLDS := $(FIRMDIR)/rom.lds
LINKROM := $(BUILDDIR)/rom.link
2010-01-24 15:32:23 +00:00
$(LINKRAM): $(RAMLDS) $(CONFIGFILE)
2008-11-20 11:27:31 +00:00
$(call PRINTS,PP $(@F))
$(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS))
$(LINKROM): $(ROMLDS)
$(call PRINTS,PP $(@F))
$(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS))
2013-05-04 20:16:08 +00:00
# Note: make sure -Wl,--gc-sections comes before -T in the linker options.
# Having the latter first caused crashes on (at least) mini2g.
2012-03-26 20:24:57 +00:00
$(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKRAM)
2008-11-20 15:04:30 +00:00
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
2019-07-19 13:16:37 +00:00
-L$(BUILDDIR)/firmware \
2011-06-26 01:32:25 +00:00
-L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \
2012-03-26 20:24:57 +00:00
-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
2013-05-04 20:16:08 +00:00
-lgcc $(CORE_LDOPTS) -T$(LINKRAM) \
-Wl,-Map,$(BUILDDIR)/rockbox.map
2008-11-20 11:27:31 +00:00
2012-03-26 20:24:57 +00:00
$(BUILDDIR)/rombox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $$(LINKROM)
2008-11-20 11:27:31 +00:00
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
2019-07-19 13:16:37 +00:00
-L$(BUILDDIR)/firmware \
2011-06-26 01:32:25 +00:00
-L$(RBCODEC_BLD)/codecs $(call a2lnk, $(VOICESPEEXLIB)) \
2012-03-26 20:24:57 +00:00
-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
2013-05-04 20:16:08 +00:00
-lgcc $(CORE_LDOPTS) -T$(LINKROM) \
-Wl,-Map,$(BUILDDIR)/rombox.map
2008-11-20 11:27:31 +00:00
$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf
2012-04-04 19:43:22 +00:00
$(call PRINTS,OC $(@F))$(call objcopy,$<,$@)
2008-11-20 11:27:31 +00:00
$(BUILDDIR)/rombox.bin : $(BUILDDIR)/rombox.elf
2012-04-04 19:43:22 +00:00
$(call PRINTS,OC $(@F))$(call objcopy,$<,$@)
2008-11-20 11:27:31 +00:00
#
# If there's a flashfile defined for this target (rockbox.ucl for Archos
# models) Then check if the mkfirmware script fails, as then it is (likely)
# because the image is too big and we need to create a compressed image
# instead.
#
$(BUILDDIR)/$(BINARY) : $(BUILDDIR)/rockbox.bin $(FLASHFILE)
$(call PRINTS,SCRAMBLE $(notdir $@))($(MKFIRMWARE) $< $@; \
stat=$$?; \
if test -n "$(FLASHFILE)"; then \
if test "$$stat" -ne 0; then \
echo "Image too big, making a compressed version!"; \
$(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \
$(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \
fi \
fi )
# archos
$(BUILDDIR)/rockbox.ucl: $(BUILDDIR)/rockbox.bin
2009-02-23 08:45:16 +00:00
$(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --best --2e -b1048576 $< $@ >/dev/null
2008-11-20 11:27:31 +00:00
MAXINFILE = $(BUILDDIR)/temp.txt
MAXOUTFILE = $(BUILDDIR)/romstart.txt
$(BUILDDIR)/rombox.ucl: $(BUILDDIR)/rombox.bin $(MAXOUTFILE)
$(call PRINTS,UCLPACK $(@F))$(TOOLSDIR)/uclpack --none $< $@ >/dev/null; \
perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \
if test $$? -ne 0; then \
echo "removing UCL file again, making it a fake one"; \
echo "fake" > $@; \
fi
$(MAXOUTFILE):
$(call PRINTS,Creating $(@F))
2010-08-21 18:07:12 +00:00
$(SILENT)echo '#include "config.h"' > $(MAXINFILE)
$(SILENT)echo "ROM_START" >> $(MAXINFILE)
2008-11-20 11:27:31 +00:00
$(call preprocess2file,$(MAXINFILE),$(MAXOUTFILE))
$(SILENT)rm $(MAXINFILE)
# iriver
$(BUILDDIR)/rombox.iriver: $(BUILDDIR)/rombox.bin
$(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@
2010-07-10 13:49:49 +00:00
endif # !APP_TYPE
2008-11-21 15:27:16 +00:00
endif # !bootloader
2008-11-20 11:27:31 +00:00
voicetools:
$(SILENT)$(MAKE) -C $(TOOLSDIR) CC=$(HOSTCC) AR=$(HOSTAR) rbspeexenc voicefont wavtrim
tags:
$(SILENT)rm -f TAGS
$(SILENT)etags -o $(BUILDDIR)/TAGS $(filter-out %.o,$(SRC) $(OTHER_SRC))
fontzip:
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY)
2008-11-20 11:27:31 +00:00
2011-06-06 22:00:44 +00:00
zip: $(BUILDDIR)/rockbox.zip
2011-06-22 14:14:49 +00:00
ifdef NODEPS
$(BUILDDIR)/rockbox.zip:
else
2011-06-06 22:00:44 +00:00
$(BUILDDIR)/rockbox.zip: build
2011-06-22 14:14:49 +00:00
endif
2018-08-31 17:39:25 +00:00
$(call PRINTS,ZIP $(notdir $@))
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY)
2008-11-20 11:27:31 +00:00
mapzip:
$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip
2011-02-20 19:56:53 +00:00
elfzip:
$(SILENT)find . -name "*.elf" | xargs zip rockbox-elfs.zip
2008-11-20 11:27:31 +00:00
fullzip:
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY)
2008-11-20 11:27:31 +00:00
7zip:
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY)
2008-11-20 11:27:31 +00:00
tar:
$(SILENT)rm -f rockbox.tar
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m \"$(MODELNAME)\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" $(TARGET) $(BINARY)
2008-11-20 11:27:31 +00:00
bzip2: tar
$(SILENT)bzip2 -f9 rockbox.tar
gzip: tar
$(SILENT)gzip -f9 rockbox.tar
manual manual-pdf:
$(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-pdf
manual-html:
$(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-html
manual-zhtml: manual-zip
manual-txt:
$(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt
manual-ztxt:
$(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt-zip
manual-zip:
$(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-zip
ifdef TTS_ENGINE
2010-06-30 16:29:55 +00:00
voice: voicetools $(BUILDDIR)/apps/features
2008-11-20 11:27:31 +00:00
$(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \
for lang in `echo $(VOICELANGUAGE) |sed "s/,/ /g"`; do $(TOOLSDIR)/voice.pl -V -l=$$lang -t=$(MODELNAME)$$feat -i=$(TARGET_ID) -e="$(ENCODER)" -E="$(ENC_OPTS)" -s=$(TTS_ENGINE) -S="$(TTS_OPTS)"; done \
endif
2011-01-24 17:06:04 +00:00
ifeq (,$(findstring android, $(APP_TYPE)))
2014-02-22 22:17:16 +00:00
Rewrite filesystem code (WIP)
This patch redoes the filesystem code from the FAT driver up to the
clipboard code in onplay.c.
Not every aspect of this is finished therefore it is still "WIP". I
don't wish to do too much at once (haha!). What is left to do is get
dircache back in the sim and find an implementation for the dircache
indicies in the tagcache and playlist code or do something else that
has the same benefit. Leaving these out for now does not make anything
unusable. All the basics are done.
Phone app code should probably get vetted (and app path handling
just plain rewritten as environment expansions); the SDL app and
Android run well.
Main things addressed:
1) Thread safety: There is none right now in the trunk code. Most of
what currently works is luck when multiple threads are involved or
multiple descriptors to the same file are open.
2) POSIX compliance: Many of the functions behave nothing like their
counterparts on a host system. This leads to inconsistent code or very
different behavior from native to hosted. One huge offender was
rename(). Going point by point would fill a book.
3) Actual running RAM usage: Many targets will use less RAM and less
stack space (some more RAM because I upped the number of cache buffers
for large memory). There's very little memory lying fallow in rarely-used
areas (see 'Key core changes' below). Also, all targets may open the same
number of directory streams whereas before those with less than 8MB RAM
were limited to 8, not 12 implying those targets will save slightly
less.
4) Performance: The test_disk plugin shows markedly improved performance,
particularly in the area of (uncached) directory scanning, due partly to
more optimal directory reading and to a better sector cache algorithm.
Uncached times tend to be better while there is a bit of a slowdown in
dircache due to it being a bit heavier of an implementation. It's not
noticeable by a human as far as I can say.
Key core changes:
1) Files and directories share core code and data structures.
2) The filesystem code knows which descriptors refer to same file.
This ensures that changes from one stream are appropriately reflected
in every open descriptor for that file (fileobj_mgr.c).
3) File and directory cache buffers are borrowed from the main sector
cache. This means that when they are not in use by a file, they are not
wasted, but used for the cache. Most of the time, only a few of them
are needed. It also means that adding more file and directory handles
is less expensive. All one must do in ensure a large enough cache to
borrow from.
4) Relative path components are supported and the namespace is unified.
It does not support full relative paths to an implied current directory;
what is does support is use of "." and "..". Adding the former would
not be very difficult. The namespace is unified in the sense that
volumes may be specified several times along with relative parts, e.g.:
"/<0>/foo/../../<1>/bar" :<=> "/<1>/bar".
5) Stack usage is down due to sharing of data, static allocation and
less duplication of strings on the stack. This requires more
serialization than I would like but since the number of threads is
limited to a low number, the tradoff in favor of the stack seems
reasonable.
6) Separates and heirarchicalizes (sic) the SIM and APP filesystem
code. SIM path and volume handling is just like the target. Some
aspects of the APP file code get more straightforward (e.g. no path
hashing is needed).
Dircache:
Deserves its own section. Dircache is new but pays homage to the old.
The old one was not compatible and so it, since it got redone, does
all the stuff it always should have done such as:
1) It may be update and used at any time during the build process.
No longer has one to wait for it to finish building to do basic file
management (create, remove, rename, etc.).
2) It does not need to be either fully scanned or completely disabled;
it can be incomplete (i.e. overfilled, missing paths), still be
of benefit and be correct.
3) Handles mounting and dismounting of individual volumes which means
a full rebuild is not needed just because you pop a new SD card in the
slot. Now, because it reuses its freed entry data, may rebuild only
that volume.
4) Much more fundamental to the file code. When it is built, it is
the keeper of the master file list whether enabled or not ("disabled"
is just a state of the cache). Its must always to ready to be started
and bind all streams opened prior to being enabled.
5) Maintains any short filenames in OEM format which means that it does
not need to be rebuilt when changing the default codepage.
Miscellaneous Compatibility:
1) Update any other code that would otherwise not work such as the
hotswap mounting code in various card drivers.
2) File management: Clipboard needed updating because of the behavioral
changes. Still needs a little more work on some finer points.
3) Remove now-obsolete functionality such as the mutex's "no preempt"
flag (which was only for the prior FAT driver).
4) struct dirinfo uses time_t rather than raw FAT directory entry
time fields. I plan to follow up on genericizing everything there
(i.e. no FAT attributes).
5) unicode.c needed some redoing so that the file code does not try
try to load codepages during a scan, which is actually a problem with
the current code. The default codepage, if any is required, is now
kept in RAM separarately (bufalloced) from codepages specified to
iso_decode() (which must not be bufalloced because the conversion
may be done by playback threads).
Brings with it some additional reusable core code:
1) Revised file functions: Reusable code that does things such as
safe path concatenation and parsing without buffer limitations or
data duplication. Variants that copy or alter the input path may be
based off these.
To do:
1) Put dircache functionality back in the sim. Treating it internally
as a different kind of file system seems the best approach at this
time.
2) Restore use of dircache indexes in the playlist and database or
something effectively the same. Since the cache doesn't have to be
complete in order to be used, not getting a hit on the cache doesn't
unambiguously say if the path exists or not.
Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8
Reviewed-on: http://gerrit.rockbox.org/566
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2013-08-06 02:02:45 +00:00
simext1:
2014-02-22 22:17:16 +00:00
$(SILENT)mkdir -p $@
2010-06-19 08:46:18 +00:00
bininstall: $(BUILDDIR)/$(BINARY)
2010-08-01 16:15:27 +00:00
@echo "Installing your rockbox binary in your '$(RBPREFIX)' dir"
$(SILENT)cp $(BINARY) "$(RBPREFIX)/.rockbox/"
2010-06-19 08:43:53 +00:00
Rewrite filesystem code (WIP)
This patch redoes the filesystem code from the FAT driver up to the
clipboard code in onplay.c.
Not every aspect of this is finished therefore it is still "WIP". I
don't wish to do too much at once (haha!). What is left to do is get
dircache back in the sim and find an implementation for the dircache
indicies in the tagcache and playlist code or do something else that
has the same benefit. Leaving these out for now does not make anything
unusable. All the basics are done.
Phone app code should probably get vetted (and app path handling
just plain rewritten as environment expansions); the SDL app and
Android run well.
Main things addressed:
1) Thread safety: There is none right now in the trunk code. Most of
what currently works is luck when multiple threads are involved or
multiple descriptors to the same file are open.
2) POSIX compliance: Many of the functions behave nothing like their
counterparts on a host system. This leads to inconsistent code or very
different behavior from native to hosted. One huge offender was
rename(). Going point by point would fill a book.
3) Actual running RAM usage: Many targets will use less RAM and less
stack space (some more RAM because I upped the number of cache buffers
for large memory). There's very little memory lying fallow in rarely-used
areas (see 'Key core changes' below). Also, all targets may open the same
number of directory streams whereas before those with less than 8MB RAM
were limited to 8, not 12 implying those targets will save slightly
less.
4) Performance: The test_disk plugin shows markedly improved performance,
particularly in the area of (uncached) directory scanning, due partly to
more optimal directory reading and to a better sector cache algorithm.
Uncached times tend to be better while there is a bit of a slowdown in
dircache due to it being a bit heavier of an implementation. It's not
noticeable by a human as far as I can say.
Key core changes:
1) Files and directories share core code and data structures.
2) The filesystem code knows which descriptors refer to same file.
This ensures that changes from one stream are appropriately reflected
in every open descriptor for that file (fileobj_mgr.c).
3) File and directory cache buffers are borrowed from the main sector
cache. This means that when they are not in use by a file, they are not
wasted, but used for the cache. Most of the time, only a few of them
are needed. It also means that adding more file and directory handles
is less expensive. All one must do in ensure a large enough cache to
borrow from.
4) Relative path components are supported and the namespace is unified.
It does not support full relative paths to an implied current directory;
what is does support is use of "." and "..". Adding the former would
not be very difficult. The namespace is unified in the sense that
volumes may be specified several times along with relative parts, e.g.:
"/<0>/foo/../../<1>/bar" :<=> "/<1>/bar".
5) Stack usage is down due to sharing of data, static allocation and
less duplication of strings on the stack. This requires more
serialization than I would like but since the number of threads is
limited to a low number, the tradoff in favor of the stack seems
reasonable.
6) Separates and heirarchicalizes (sic) the SIM and APP filesystem
code. SIM path and volume handling is just like the target. Some
aspects of the APP file code get more straightforward (e.g. no path
hashing is needed).
Dircache:
Deserves its own section. Dircache is new but pays homage to the old.
The old one was not compatible and so it, since it got redone, does
all the stuff it always should have done such as:
1) It may be update and used at any time during the build process.
No longer has one to wait for it to finish building to do basic file
management (create, remove, rename, etc.).
2) It does not need to be either fully scanned or completely disabled;
it can be incomplete (i.e. overfilled, missing paths), still be
of benefit and be correct.
3) Handles mounting and dismounting of individual volumes which means
a full rebuild is not needed just because you pop a new SD card in the
slot. Now, because it reuses its freed entry data, may rebuild only
that volume.
4) Much more fundamental to the file code. When it is built, it is
the keeper of the master file list whether enabled or not ("disabled"
is just a state of the cache). Its must always to ready to be started
and bind all streams opened prior to being enabled.
5) Maintains any short filenames in OEM format which means that it does
not need to be rebuilt when changing the default codepage.
Miscellaneous Compatibility:
1) Update any other code that would otherwise not work such as the
hotswap mounting code in various card drivers.
2) File management: Clipboard needed updating because of the behavioral
changes. Still needs a little more work on some finer points.
3) Remove now-obsolete functionality such as the mutex's "no preempt"
flag (which was only for the prior FAT driver).
4) struct dirinfo uses time_t rather than raw FAT directory entry
time fields. I plan to follow up on genericizing everything there
(i.e. no FAT attributes).
5) unicode.c needed some redoing so that the file code does not try
try to load codepages during a scan, which is actually a problem with
the current code. The default codepage, if any is required, is now
kept in RAM separarately (bufalloced) from codepages specified to
iso_decode() (which must not be bufalloced because the conversion
may be done by playback threads).
Brings with it some additional reusable core code:
1) Revised file functions: Reusable code that does things such as
safe path concatenation and parsing without buffer limitations or
data duplication. Variants that copy or alter the input path may be
based off these.
To do:
1) Put dircache functionality back in the sim. Treating it internally
as a different kind of file system seems the best approach at this
time.
2) Restore use of dircache indexes in the playlist and database or
something effectively the same. Since the cache doesn't have to be
complete in order to be used, not getting a hit on the cache doesn't
unambiguously say if the path exists or not.
Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8
Reviewed-on: http://gerrit.rockbox.org/566
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2013-08-06 02:02:45 +00:00
install: simext1
2010-08-08 00:03:08 +00:00
@echo "Installing your build in your '$(RBPREFIX)' dir"
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 0 $(TARGET) $(BINARY)
2008-11-20 11:27:31 +00:00
Rewrite filesystem code (WIP)
This patch redoes the filesystem code from the FAT driver up to the
clipboard code in onplay.c.
Not every aspect of this is finished therefore it is still "WIP". I
don't wish to do too much at once (haha!). What is left to do is get
dircache back in the sim and find an implementation for the dircache
indicies in the tagcache and playlist code or do something else that
has the same benefit. Leaving these out for now does not make anything
unusable. All the basics are done.
Phone app code should probably get vetted (and app path handling
just plain rewritten as environment expansions); the SDL app and
Android run well.
Main things addressed:
1) Thread safety: There is none right now in the trunk code. Most of
what currently works is luck when multiple threads are involved or
multiple descriptors to the same file are open.
2) POSIX compliance: Many of the functions behave nothing like their
counterparts on a host system. This leads to inconsistent code or very
different behavior from native to hosted. One huge offender was
rename(). Going point by point would fill a book.
3) Actual running RAM usage: Many targets will use less RAM and less
stack space (some more RAM because I upped the number of cache buffers
for large memory). There's very little memory lying fallow in rarely-used
areas (see 'Key core changes' below). Also, all targets may open the same
number of directory streams whereas before those with less than 8MB RAM
were limited to 8, not 12 implying those targets will save slightly
less.
4) Performance: The test_disk plugin shows markedly improved performance,
particularly in the area of (uncached) directory scanning, due partly to
more optimal directory reading and to a better sector cache algorithm.
Uncached times tend to be better while there is a bit of a slowdown in
dircache due to it being a bit heavier of an implementation. It's not
noticeable by a human as far as I can say.
Key core changes:
1) Files and directories share core code and data structures.
2) The filesystem code knows which descriptors refer to same file.
This ensures that changes from one stream are appropriately reflected
in every open descriptor for that file (fileobj_mgr.c).
3) File and directory cache buffers are borrowed from the main sector
cache. This means that when they are not in use by a file, they are not
wasted, but used for the cache. Most of the time, only a few of them
are needed. It also means that adding more file and directory handles
is less expensive. All one must do in ensure a large enough cache to
borrow from.
4) Relative path components are supported and the namespace is unified.
It does not support full relative paths to an implied current directory;
what is does support is use of "." and "..". Adding the former would
not be very difficult. The namespace is unified in the sense that
volumes may be specified several times along with relative parts, e.g.:
"/<0>/foo/../../<1>/bar" :<=> "/<1>/bar".
5) Stack usage is down due to sharing of data, static allocation and
less duplication of strings on the stack. This requires more
serialization than I would like but since the number of threads is
limited to a low number, the tradoff in favor of the stack seems
reasonable.
6) Separates and heirarchicalizes (sic) the SIM and APP filesystem
code. SIM path and volume handling is just like the target. Some
aspects of the APP file code get more straightforward (e.g. no path
hashing is needed).
Dircache:
Deserves its own section. Dircache is new but pays homage to the old.
The old one was not compatible and so it, since it got redone, does
all the stuff it always should have done such as:
1) It may be update and used at any time during the build process.
No longer has one to wait for it to finish building to do basic file
management (create, remove, rename, etc.).
2) It does not need to be either fully scanned or completely disabled;
it can be incomplete (i.e. overfilled, missing paths), still be
of benefit and be correct.
3) Handles mounting and dismounting of individual volumes which means
a full rebuild is not needed just because you pop a new SD card in the
slot. Now, because it reuses its freed entry data, may rebuild only
that volume.
4) Much more fundamental to the file code. When it is built, it is
the keeper of the master file list whether enabled or not ("disabled"
is just a state of the cache). Its must always to ready to be started
and bind all streams opened prior to being enabled.
5) Maintains any short filenames in OEM format which means that it does
not need to be rebuilt when changing the default codepage.
Miscellaneous Compatibility:
1) Update any other code that would otherwise not work such as the
hotswap mounting code in various card drivers.
2) File management: Clipboard needed updating because of the behavioral
changes. Still needs a little more work on some finer points.
3) Remove now-obsolete functionality such as the mutex's "no preempt"
flag (which was only for the prior FAT driver).
4) struct dirinfo uses time_t rather than raw FAT directory entry
time fields. I plan to follow up on genericizing everything there
(i.e. no FAT attributes).
5) unicode.c needed some redoing so that the file code does not try
try to load codepages during a scan, which is actually a problem with
the current code. The default codepage, if any is required, is now
kept in RAM separarately (bufalloced) from codepages specified to
iso_decode() (which must not be bufalloced because the conversion
may be done by playback threads).
Brings with it some additional reusable core code:
1) Revised file functions: Reusable code that does things such as
safe path concatenation and parsing without buffer limitations or
data duplication. Variants that copy or alter the input path may be
based off these.
To do:
1) Put dircache functionality back in the sim. Treating it internally
as a different kind of file system seems the best approach at this
time.
2) Restore use of dircache indexes in the playlist and database or
something effectively the same. Since the cache doesn't have to be
complete in order to be used, not getting a hit on the cache doesn't
unambiguously say if the path exists or not.
Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8
Reviewed-on: http://gerrit.rockbox.org/566
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2013-08-06 02:02:45 +00:00
fullinstall: simext1
2010-08-08 00:03:08 +00:00
@echo "Installing a full setup in your '$(RBPREFIX)' dir"
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY)
2008-11-20 11:27:31 +00:00
Rewrite filesystem code (WIP)
This patch redoes the filesystem code from the FAT driver up to the
clipboard code in onplay.c.
Not every aspect of this is finished therefore it is still "WIP". I
don't wish to do too much at once (haha!). What is left to do is get
dircache back in the sim and find an implementation for the dircache
indicies in the tagcache and playlist code or do something else that
has the same benefit. Leaving these out for now does not make anything
unusable. All the basics are done.
Phone app code should probably get vetted (and app path handling
just plain rewritten as environment expansions); the SDL app and
Android run well.
Main things addressed:
1) Thread safety: There is none right now in the trunk code. Most of
what currently works is luck when multiple threads are involved or
multiple descriptors to the same file are open.
2) POSIX compliance: Many of the functions behave nothing like their
counterparts on a host system. This leads to inconsistent code or very
different behavior from native to hosted. One huge offender was
rename(). Going point by point would fill a book.
3) Actual running RAM usage: Many targets will use less RAM and less
stack space (some more RAM because I upped the number of cache buffers
for large memory). There's very little memory lying fallow in rarely-used
areas (see 'Key core changes' below). Also, all targets may open the same
number of directory streams whereas before those with less than 8MB RAM
were limited to 8, not 12 implying those targets will save slightly
less.
4) Performance: The test_disk plugin shows markedly improved performance,
particularly in the area of (uncached) directory scanning, due partly to
more optimal directory reading and to a better sector cache algorithm.
Uncached times tend to be better while there is a bit of a slowdown in
dircache due to it being a bit heavier of an implementation. It's not
noticeable by a human as far as I can say.
Key core changes:
1) Files and directories share core code and data structures.
2) The filesystem code knows which descriptors refer to same file.
This ensures that changes from one stream are appropriately reflected
in every open descriptor for that file (fileobj_mgr.c).
3) File and directory cache buffers are borrowed from the main sector
cache. This means that when they are not in use by a file, they are not
wasted, but used for the cache. Most of the time, only a few of them
are needed. It also means that adding more file and directory handles
is less expensive. All one must do in ensure a large enough cache to
borrow from.
4) Relative path components are supported and the namespace is unified.
It does not support full relative paths to an implied current directory;
what is does support is use of "." and "..". Adding the former would
not be very difficult. The namespace is unified in the sense that
volumes may be specified several times along with relative parts, e.g.:
"/<0>/foo/../../<1>/bar" :<=> "/<1>/bar".
5) Stack usage is down due to sharing of data, static allocation and
less duplication of strings on the stack. This requires more
serialization than I would like but since the number of threads is
limited to a low number, the tradoff in favor of the stack seems
reasonable.
6) Separates and heirarchicalizes (sic) the SIM and APP filesystem
code. SIM path and volume handling is just like the target. Some
aspects of the APP file code get more straightforward (e.g. no path
hashing is needed).
Dircache:
Deserves its own section. Dircache is new but pays homage to the old.
The old one was not compatible and so it, since it got redone, does
all the stuff it always should have done such as:
1) It may be update and used at any time during the build process.
No longer has one to wait for it to finish building to do basic file
management (create, remove, rename, etc.).
2) It does not need to be either fully scanned or completely disabled;
it can be incomplete (i.e. overfilled, missing paths), still be
of benefit and be correct.
3) Handles mounting and dismounting of individual volumes which means
a full rebuild is not needed just because you pop a new SD card in the
slot. Now, because it reuses its freed entry data, may rebuild only
that volume.
4) Much more fundamental to the file code. When it is built, it is
the keeper of the master file list whether enabled or not ("disabled"
is just a state of the cache). Its must always to ready to be started
and bind all streams opened prior to being enabled.
5) Maintains any short filenames in OEM format which means that it does
not need to be rebuilt when changing the default codepage.
Miscellaneous Compatibility:
1) Update any other code that would otherwise not work such as the
hotswap mounting code in various card drivers.
2) File management: Clipboard needed updating because of the behavioral
changes. Still needs a little more work on some finer points.
3) Remove now-obsolete functionality such as the mutex's "no preempt"
flag (which was only for the prior FAT driver).
4) struct dirinfo uses time_t rather than raw FAT directory entry
time fields. I plan to follow up on genericizing everything there
(i.e. no FAT attributes).
5) unicode.c needed some redoing so that the file code does not try
try to load codepages during a scan, which is actually a problem with
the current code. The default codepage, if any is required, is now
kept in RAM separarately (bufalloced) from codepages specified to
iso_decode() (which must not be bufalloced because the conversion
may be done by playback threads).
Brings with it some additional reusable core code:
1) Revised file functions: Reusable code that does things such as
safe path concatenation and parsing without buffer limitations or
data duplication. Variants that copy or alter the input path may be
based off these.
To do:
1) Put dircache functionality back in the sim. Treating it internally
as a different kind of file system seems the best approach at this
time.
2) Restore use of dircache indexes in the playlist and database or
something effectively the same. Since the cache doesn't have to be
complete in order to be used, not getting a hit on the cache doesn't
unambiguously say if the path exists or not.
Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8
Reviewed-on: http://gerrit.rockbox.org/566
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2013-08-06 02:02:45 +00:00
symlinkinstall: simext1
2010-12-28 10:30:46 +00:00
@echo "Installing a full setup with links in your '$(RBPREFIX)' dir"
2011-02-27 11:37:39 +00:00
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) -l
2011-01-24 17:06:04 +00:00
endif
2010-12-28 10:30:46 +00:00
2008-11-20 11:27:31 +00:00
help:
@echo "A few helpful make targets"
@echo ""
2010-12-28 10:30:46 +00:00
@echo "all - builds a full Rockbox (default), including tools"
@echo "bin - builds only the Rockbox.<target name> file"
@echo "rocks - builds only plugins"
@echo "codecs - builds only codecs"
@echo "dep - regenerates make dependency database"
@echo "clean - cleans a build directory (not tools)"
@echo "veryclean - cleans the build and tools directories"
@echo "manual - builds a manual (pdf)"
@echo "manual-html - HTML manual"
@echo "manual-zip - HTML manual (zipped)"
@echo "manual-txt - txt manual"
@echo "fullzip - creates a rockbox.zip of your build with fonts"
@echo "zip - creates a rockbox.zip of your build (no fonts)"
@echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
@echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
@echo "7zip - creates a rockbox.7z of your build (no fonts)"
@echo "fontzip - creates rockbox-fonts.zip"
@echo "mapzip - creates rockbox-maps.zip with all .map files"
2011-02-26 20:50:12 +00:00
@echo "elfzip - creates rockbox-elfs.zip with all .elf files"
2011-06-09 20:58:03 +00:00
@echo "pnd - creates rockbox.pnd archive (Pandora builds only)"
2010-12-28 10:30:46 +00:00
@echo "tools - builds the tools only"
@echo "voice - creates the voice clips (voice builds only)"
@echo "voicetools - builds the voice tools only"
@echo "install - installs your build (at PREFIX, defaults to simdisk/ for simulators (no fonts))"
@echo "fullinstall - installs your build (like install, but with fonts)"
@echo "symlinkinstall - like fullinstall, but with links instead of copying files. (Good for developing on simulator)"
@echo "reconf - rerun configure with the same selection"
2008-11-20 11:27:31 +00:00
### general compile rules:
# when source and object are in different locations (normal):
$(BUILDDIR)/%.o: $(ROOTDIR)/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
$(BUILDDIR)/%.o: $(ROOTDIR)/%.S
$(SILENT)mkdir -p $(dir $@)
2010-12-27 17:27:59 +00:00
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@
2008-11-20 11:27:31 +00:00
2009-07-13 00:40:35 +00:00
# generated definitions for use in .S files
$(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c
$(call PRINTS,ASMDEFS $(@F))
$(SILENT)mkdir -p $(dir $@)
$(call asmdefs2file,$<,$@)
2008-11-20 11:27:31 +00:00
# when source and object are both in BUILDDIR (generated code):
%.o: %.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
%.o: %.S
$(SILENT)mkdir -p $(dir $@)
2010-12-27 17:27:59 +00:00
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@
2009-01-09 23:15:27 +00:00
2009-01-10 22:23:27 +00:00
Makefile: $(TOOLSDIR)/configure
2009-08-02 09:45:51 +00:00
ifneq (reconf,$(MAKECMDGOALS))
2009-01-10 22:36:41 +00:00
$(SILENT)echo "*** tools/configure is newer than Makefile. You should run 'make reconf'."
2009-08-02 09:45:51 +00:00
endif
2009-01-10 22:36:41 +00:00
reconf:
2010-08-01 16:15:27 +00:00
$(SILENT$)$(TOOLSDIR)/configure $(CONFIGURE_OPTIONS)